2
0

134-dt-sun8i-orangepiplus-enable-usbhost.patch 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. From 37e04fd781d3fc6d08116d38d34ec8124d916441 Mon Sep 17 00:00:00 2001
  2. From: Jens Kuske <jenskuske@gmail.com>
  3. Date: Tue, 17 Nov 2015 17:12:07 +0100
  4. Subject: [PATCH] ARM: dts: sun8i-h3-orangepi-plus: Enable USB host controllers
  5. Enable the 2 USB host controllers used on the Orange Pi Plus
  6. and add the necessary regulators.
  7. Signed-off-by: Reinder de Haan <patchesrdh@mveas.com>
  8. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
  9. Signed-off-by: Jens Kuske <jenskuske@gmail.com>
  10. ---
  11. arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 44 ++++++++++++++++++++++++++++
  12. 1 file changed, 44 insertions(+)
  13. --- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
  14. +++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
  15. @@ -58,6 +58,35 @@
  16. chosen {
  17. stdout-path = "serial0:115200n8";
  18. };
  19. +
  20. + reg_usb3_vbus: usb3-vbus {
  21. + compatible = "regulator-fixed";
  22. + pinctrl-names = "default";
  23. + pinctrl-0 = <&usb3_vbus_pin_a>;
  24. + regulator-name = "usb3-vbus";
  25. + regulator-min-microvolt = <5000000>;
  26. + regulator-max-microvolt = <5000000>;
  27. + regulator-boot-on;
  28. + enable-active-high;
  29. + gpio = <&pio 6 11 GPIO_ACTIVE_HIGH>;
  30. + };
  31. +};
  32. +
  33. +&ehci1 {
  34. + status = "okay";
  35. +};
  36. +
  37. +&ehci3 {
  38. + status = "okay";
  39. +};
  40. +
  41. +&pio {
  42. + usb3_vbus_pin_a: usb3_vbus_pin@0 {
  43. + allwinner,pins = "PG11";
  44. + allwinner,function = "gpio_out";
  45. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  46. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  47. + };
  48. };
  49. &mmc0 {
  50. @@ -70,8 +99,23 @@
  51. status = "okay";
  52. };
  53. +&reg_usb1_vbus {
  54. + gpio = <&pio 6 13 GPIO_ACTIVE_HIGH>;
  55. + status = "okay";
  56. +};
  57. +
  58. &uart0 {
  59. pinctrl-names = "default";
  60. pinctrl-0 = <&uart0_pins_a>;
  61. status = "okay";
  62. };
  63. +
  64. +&usb1_vbus_pin_a {
  65. + allwinner,pins = "PG13";
  66. +};
  67. +
  68. +&usbphy {
  69. + usb1_vbus-supply = <&reg_usb1_vbus>;
  70. + usb3_vbus-supply = <&reg_usb3_vbus>;
  71. + status = "okay";
  72. +};