102-rockchip-enable-LAN-port-on-NanoPi-R2S.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. From 0fc3b9b7619c4878f73a6a7989863f0d1a3fd392 Mon Sep 17 00:00:00 2001
  2. From: David Bauer <mail@david-bauer.net>
  3. Date: Fri, 10 Jul 2020 21:12:16 +0200
  4. Subject: [PATCH] rockchip: enabled LAN port on NanoPi R2S
  5. Enable the USB3 port on the FriendlyARM NanoPi R2S.
  6. This is required for the USB3 attached LAN port to work.
  7. Signed-off-by: David Bauer <mail@david-bauer.net>
  8. ---
  9. .../boot/dts/rockchip/rk3328-nanopi-r2s.dts | 27 +++++++++++++++++++
  10. 1 file changed, 27 insertions(+)
  11. --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
  12. +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
  13. @@ -44,6 +44,18 @@
  14. };
  15. };
  16. + vcc_rtl8153: vcc-rtl8153-regulator {
  17. + compatible = "regulator-fixed";
  18. + gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
  19. + pinctrl-names = "default";
  20. + pinctrl-0 = <&rtl8153_en_drv>;
  21. + regulator-always-on;
  22. + regulator-name = "vcc_rtl8153";
  23. + regulator-min-microvolt = <5000000>;
  24. + regulator-max-microvolt = <5000000>;
  25. + enable-active-high;
  26. + };
  27. +
  28. leds {
  29. compatible = "gpio-leds";
  30. pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
  31. @@ -269,6 +281,12 @@
  32. };
  33. };
  34. };
  35. +
  36. + usb {
  37. + rtl8153_en_drv: rtl8153-en-drv {
  38. + rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
  39. + };
  40. + };
  41. };
  42. &io_domains {
  43. @@ -375,3 +393,12 @@
  44. &usb_host0_ohci {
  45. status = "okay";
  46. };
  47. +
  48. +&usbdrd3 {
  49. + status = "okay";
  50. +};
  51. +
  52. +&usbdrd_dwc3 {
  53. + dr_mode = "host";
  54. + status = "okay";
  55. +};