All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] rockchip: enabled LAN port on NanoPi R2S
@ 2021-04-05  9:34 ` Tianling Shen
  0 siblings, 0 replies; 12+ messages in thread
From: Tianling Shen @ 2021-04-05  9:34 UTC (permalink / raw)
  To: Rob Herring, Heiko Stuebner, Johan Jonker, David Bauer,
	Robin Murphy, Chen-Yu Tsai
  Cc: devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
	Tianling Shen

From: David Bauer <mail@david-bauer.net>

Enable the USB3 port on the FriendlyARM NanoPi R2S.
This is required for the USB3 attached LAN port to work.

Signed-off-by: David Bauer <mail@david-bauer.net>
[added device node for USB Ethernet controller]
Signed-off-by: Tianling Shen <cnsztl@gmail.com>
---
 .../boot/dts/rockchip/rk3328-nanopi-r2s.dts   | 32 +++++++++++++++++++
 1 file changed, 32 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
index faf496d789cf..18936b393d9d 100644
--- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
@@ -13,6 +13,10 @@
 	model = "FriendlyElec NanoPi R2S";
 	compatible = "friendlyarm,nanopi-r2s", "rockchip,rk3328";
 
+	aliases {
+		ethernet1 = &r8153;
+	};
+
 	chosen {
 		stdout-path = "serial2:1500000n8";
 	};
@@ -37,6 +41,16 @@
 		};
 	};
 
+	vcc_rtl8153: vcc-rtl8153-regulator {
+		compatible = "regulator-fixed";
+		gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&rtl8153_en_drv>;
+		regulator-always-on;
+		regulator-name = "vcc_rtl8153";
+		enable-active-high;
+	};
+
 	leds {
 		compatible = "gpio-leds";
 		pinctrl-0 = <&lan_led_pin>,  <&sys_led_pin>, <&wan_led_pin>;
@@ -265,6 +279,12 @@
 			};
 		};
 	};
+
+	usb {
+		rtl8153_en_drv: rtl8153-en-drv {
+			rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
+		};
+	};
 };
 
 &io_domains {
@@ -364,6 +384,18 @@
 	dr_mode = "host";
 };
 
+&usbdrd3 {
+	dr_mode = "host";
+	status = "okay";
+
+	r8153: usb-eth@2 {
+		compatible = "realtek,rtl8153";
+		reg = <2>;
+
+		local-mac-address = [ 00 00 00 00 00 00 ]; /* Filled in by U-Boot */
+	};
+};
+
 &usb_host0_ehci {
 	status = "okay";
 };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2021-04-06 12:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-05  9:34 [PATCH v2] rockchip: enabled LAN port on NanoPi R2S Tianling Shen
2021-04-05  9:34 ` Tianling Shen
2021-04-05  9:34 ` Tianling Shen
2021-04-05 11:03 ` Johan Jonker
2021-04-05 11:03   ` Johan Jonker
2021-04-05 11:03   ` Johan Jonker
2021-04-05 11:56   ` Chen-Yu Tsai
2021-04-05 11:56     ` Chen-Yu Tsai
2021-04-05 11:56     ` Chen-Yu Tsai
2021-04-06 12:10   ` Tianling Shen
2021-04-06 12:10     ` Tianling Shen
2021-04-06 12:10     ` Tianling Shen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.