163-dt-sun4i-add-usb-host-to-boards.patch 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240
  1. From f2509ec45a09013e300460a967f694561d169b98 Mon Sep 17 00:00:00 2001
  2. From: Hans de Goede <hdegoede@redhat.com>
  3. Date: Sat, 11 Jan 2014 04:47:38 +0100
  4. Subject: [PATCH] ARM: sun4i: dt: Add USB host nodes to hackberry dts
  5. Add nodes for the usb-phy and ehci- and ohci-usb-host controllers.
  6. Based on fex file settings, the fex file also contains a mysterious line:
  7. usb_hub_vcc_en_gpio = port:PB09<1><0><default><0>
  8. Which also clashes with usbc0, which has:
  9. usb_drv_vbus_gpio = port:PB09<1><0><default><0>
  10. So if usb does not work properly we need someone with a hackberry to look
  11. closer into this.
  12. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  13. ---
  14. arch/arm/boot/dts/sun4i-a10-hackberry.dts | 40 +++++++++++++++++++++++++++++++
  15. 1 file changed, 40 insertions(+)
  16. --- a/arch/arm/boot/dts/sun4i-a10-hackberry.dts
  17. +++ b/arch/arm/boot/dts/sun4i-a10-hackberry.dts
  18. @@ -13,6 +13,7 @@
  19. /dts-v1/;
  20. /include/ "sun4i-a10.dtsi"
  21. +/include/ "sunxi-common-regulators.dtsi"
  22. / {
  23. model = "Miniand Hackberry";
  24. @@ -35,6 +36,28 @@
  25. };
  26. };
  27. + usbphy: phy@01c13400 {
  28. + usb1_vbus-supply = <&reg_usb1_vbus>;
  29. + usb2_vbus-supply = <&reg_usb2_vbus>;
  30. + status = "okay";
  31. + };
  32. +
  33. + ehci0: usb@01c14000 {
  34. + status = "okay";
  35. + };
  36. +
  37. + ohci0: usb@01c14400 {
  38. + status = "okay";
  39. + };
  40. +
  41. + ehci1: usb@01c1c000 {
  42. + status = "okay";
  43. + };
  44. +
  45. + ohci1: usb@01c1c400 {
  46. + status = "okay";
  47. + };
  48. +
  49. pio: pinctrl@01c20800 {
  50. pinctrl-names = "default";
  51. pinctrl-0 = <&hackberry_hogs>;
  52. @@ -45,6 +68,13 @@
  53. allwinner,drive = <0>;
  54. allwinner,pull = <0>;
  55. };
  56. +
  57. + usb2_vbus_pin_hackberry: usb2_vbus_pin@0 {
  58. + allwinner,pins = "PH12";
  59. + allwinner,function = "gpio_out";
  60. + allwinner,drive = <0>;
  61. + allwinner,pull = <0>;
  62. + };
  63. };
  64. uart0: serial@01c28000 {
  65. @@ -66,4 +96,14 @@
  66. gpio = <&pio 7 19 0>;
  67. };
  68. };
  69. +
  70. + reg_usb1_vbus: usb1-vbus {
  71. + status = "okay";
  72. + };
  73. +
  74. + reg_usb2_vbus: usb2-vbus {
  75. + pinctrl-0 = <&usb2_vbus_pin_hackberry>;
  76. + gpio = <&pio 7 12 0>;
  77. + status = "okay";
  78. + };
  79. };
  80. --- a/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
  81. +++ b/arch/arm/boot/dts/sun4i-a10-mini-xplus.dts
  82. @@ -13,16 +13,47 @@
  83. /dts-v1/;
  84. /include/ "sun4i-a10.dtsi"
  85. +/include/ "sunxi-common-regulators.dtsi"
  86. / {
  87. model = "PineRiver Mini X-Plus";
  88. compatible = "pineriver,mini-xplus", "allwinner,sun4i-a10";
  89. soc@01c00000 {
  90. + usbphy: phy@01c13400 {
  91. + usb1_vbus-supply = <&reg_usb1_vbus>;
  92. + usb2_vbus-supply = <&reg_usb2_vbus>;
  93. + status = "okay";
  94. + };
  95. +
  96. + ehci0: usb@01c14000 {
  97. + status = "okay";
  98. + };
  99. +
  100. + ohci0: usb@01c14400 {
  101. + status = "okay";
  102. + };
  103. +
  104. + ehci1: usb@01c1c000 {
  105. + status = "okay";
  106. + };
  107. +
  108. + ohci1: usb@01c1c400 {
  109. + status = "okay";
  110. + };
  111. +
  112. uart0: serial@01c28000 {
  113. pinctrl-names = "default";
  114. pinctrl-0 = <&uart0_pins_a>;
  115. status = "okay";
  116. };
  117. };
  118. +
  119. + reg_usb1_vbus: usb1-vbus {
  120. + status = "okay";
  121. + };
  122. +
  123. + reg_usb2_vbus: usb2-vbus {
  124. + status = "okay";
  125. + };
  126. };
  127. --- a/arch/arm/boot/dts/sun4i-a10-pcduino.dts
  128. +++ b/arch/arm/boot/dts/sun4i-a10-pcduino.dts
  129. @@ -12,6 +12,7 @@
  130. /dts-v1/;
  131. /include/ "sun4i-a10.dtsi"
  132. +/include/ "sunxi-common-regulators.dtsi"
  133. / {
  134. model = "LinkSprite pcDuino";
  135. @@ -33,6 +34,28 @@
  136. };
  137. };
  138. + usbphy: phy@01c13400 {
  139. + usb1_vbus-supply = <&reg_usb1_vbus>;
  140. + usb2_vbus-supply = <&reg_usb2_vbus>;
  141. + status = "okay";
  142. + };
  143. +
  144. + ehci0: usb@01c14000 {
  145. + status = "okay";
  146. + };
  147. +
  148. + ohci0: usb@01c14400 {
  149. + status = "okay";
  150. + };
  151. +
  152. + ehci1: usb@01c1c000 {
  153. + status = "okay";
  154. + };
  155. +
  156. + ohci1: usb@01c1c400 {
  157. + status = "okay";
  158. + };
  159. +
  160. uart0: serial@01c28000 {
  161. pinctrl-names = "default";
  162. pinctrl-0 = <&uart0_pins_a>;
  163. @@ -45,4 +68,12 @@
  164. status = "okay";
  165. };
  166. };
  167. +
  168. + reg_usb1_vbus: usb1-vbus {
  169. + status = "okay";
  170. + };
  171. +
  172. + reg_usb2_vbus: usb2-vbus {
  173. + status = "okay";
  174. + };
  175. };
  176. --- a/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
  177. +++ b/arch/arm/boot/dts/sun4i-a10-cubieboard.dts
  178. @@ -34,11 +34,33 @@
  179. };
  180. };
  181. + usbphy: phy@01c13400 {
  182. + usb1_vbus-supply = <&reg_usb1_vbus>;
  183. + usb2_vbus-supply = <&reg_usb2_vbus>;
  184. + status = "okay";
  185. + };
  186. +
  187. + ehci0: usb@01c14000 {
  188. + status = "okay";
  189. + };
  190. +
  191. + ohci0: usb@01c14400 {
  192. + status = "okay";
  193. + };
  194. +
  195. ahci: sata@01c18000 {
  196. target-supply = <&reg_ahci_5v>;
  197. status = "okay";
  198. };
  199. + ehci1: usb@01c1c000 {
  200. + status = "okay";
  201. + };
  202. +
  203. + ohci1: usb@01c1c400 {
  204. + status = "okay";
  205. + };
  206. +
  207. pinctrl@01c20800 {
  208. led_pins_cubieboard: led_pins@0 {
  209. allwinner,pins = "PH20", "PH21";
  210. @@ -87,4 +109,12 @@
  211. reg_ahci_5v: ahci-5v {
  212. status = "okay";
  213. };
  214. +
  215. + reg_usb1_vbus: usb1-vbus {
  216. + status = "okay";
  217. + };
  218. +
  219. + reg_usb2_vbus: usb2-vbus {
  220. + status = "okay";
  221. + };
  222. };