164-dt-sun5i-add-usb-host-to-boards.patch 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. From 9f193366e6094f6e2087c4767e7e413a395bf0d2 Mon Sep 17 00:00:00 2001
  2. From: Roman Byshko <rbyshko@gmail.com>
  3. Date: Tue, 24 Sep 2013 20:07:53 +0200
  4. Subject: [PATCH] ARM: sun5i: dt: Add USB host nodes to A13-Olinuxino
  5. Add nodes for the usb-phy and ehci- and ohci-usb-host controllers.
  6. Signed-off-by: Roman Byshko <rbyshko@gmail.com>
  7. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  8. ---
  9. arch/arm/boot/dts/sun5i-a13-olinuxino.dts | 27 +++++++++++++++++++++++++++
  10. 1 file changed, 27 insertions(+)
  11. --- a/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
  12. +++ b/arch/arm/boot/dts/sun5i-a13-olinuxino.dts
  13. @@ -13,12 +13,26 @@
  14. /dts-v1/;
  15. /include/ "sun5i-a13.dtsi"
  16. +/include/ "sunxi-common-regulators.dtsi"
  17. / {
  18. model = "Olimex A13-Olinuxino";
  19. compatible = "olimex,a13-olinuxino", "allwinner,sun5i-a13";
  20. soc@01c00000 {
  21. + usbphy: phy@01c13400 {
  22. + usb1_vbus-supply = <&reg_usb1_vbus>;
  23. + status = "okay";
  24. + };
  25. +
  26. + ehci0: usb@01c14000 {
  27. + status = "okay";
  28. + };
  29. +
  30. + ohci0: usb@01c14400 {
  31. + status = "okay";
  32. + };
  33. +
  34. pinctrl@01c20800 {
  35. led_pins_olinuxino: led_pins@0 {
  36. allwinner,pins = "PG9";
  37. @@ -26,6 +40,13 @@
  38. allwinner,drive = <1>;
  39. allwinner,pull = <0>;
  40. };
  41. +
  42. + usb1_vbus_pin_olinuxino: usb1_vbus_pin@0 {
  43. + allwinner,pins = "PG11";
  44. + allwinner,function = "gpio_out";
  45. + allwinner,drive = <0>;
  46. + allwinner,pull = <0>;
  47. + };
  48. };
  49. uart1: serial@01c28400 {
  50. @@ -63,4 +84,10 @@
  51. default-state = "on";
  52. };
  53. };
  54. +
  55. + reg_usb1_vbus: usb1-vbus {
  56. + pinctrl-0 = <&usb1_vbus_pin_olinuxino>;
  57. + gpio = <&pio 6 11 0>;
  58. + status = "okay";
  59. + };
  60. };
  61. --- a/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts
  62. +++ b/arch/arm/boot/dts/sun5i-a13-olinuxino-micro.dts
  63. @@ -14,12 +14,26 @@
  64. /dts-v1/;
  65. /include/ "sun5i-a13.dtsi"
  66. +/include/ "sunxi-common-regulators.dtsi"
  67. / {
  68. model = "Olimex A13-Olinuxino Micro";
  69. compatible = "olimex,a13-olinuxino-micro", "allwinner,sun5i-a13";
  70. soc@01c00000 {
  71. + usbphy: phy@01c13400 {
  72. + usb1_vbus-supply = <&reg_usb1_vbus>;
  73. + status = "okay";
  74. + };
  75. +
  76. + ehci0: usb@01c14000 {
  77. + status = "okay";
  78. + };
  79. +
  80. + ohci0: usb@01c14400 {
  81. + status = "okay";
  82. + };
  83. +
  84. pinctrl@01c20800 {
  85. led_pins_olinuxinom: led_pins@0 {
  86. allwinner,pins = "PG9";
  87. @@ -27,6 +41,13 @@
  88. allwinner,drive = <1>;
  89. allwinner,pull = <0>;
  90. };
  91. +
  92. + usb1_vbus_pin_olinuxinom: usb1_vbus_pin@0 {
  93. + allwinner,pins = "PG11";
  94. + allwinner,function = "gpio_out";
  95. + allwinner,drive = <0>;
  96. + allwinner,pull = <0>;
  97. + };
  98. };
  99. uart1: serial@01c28400 {
  100. @@ -65,4 +86,10 @@
  101. default-state = "on";
  102. };
  103. };
  104. +
  105. + reg_usb1_vbus: usb1-vbus {
  106. + pinctrl-0 = <&usb1_vbus_pin_olinuxinom>;
  107. + gpio = <&pio 6 11 0>;
  108. + status = "okay";
  109. + };
  110. };