arm64: dts: allwinner: define USB3 Ethernet on NanoPi R1S H5
Subsystems (2)
PATCH 1/1 arm64: dts: allwinner: define USB3 Ethernet on NanoPi R1S H5
The NanoPi R1S H5 has a Realtek RTL8153B USB 3.0 Ethernet chip connected to the USB 2.0 port of the Allwinner H5 SoC.
--- arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +7 -1
@@ -21,7 +21,8 @@ / { aliases { ethernet0 = &emac; - ethernet1 = &rtl8189etv; + ethernet1 = &rtl8153; + ethernet2 = &rtl8189etv; serial0 = &uart0; };
@@ -116,6 +117,11 @@ &cpu0 { &ehci1 { status = "okay"; + + rtl8153: device@1 { + compatible = "usbbda,8153"; + reg = <1>; + }; }; &ehci2 {
Signature · 7 lines
2.25.1 _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Jernej Škrabec
maintainerDne ponedeljek, 02. maj 2022 ob 16:40:09 CEST je Chukun Pan napisal(a):
Review
Quoted 9 lines
The NanoPi R1S H5 has a Realtek RTL8153B USB 3.0 Ethernet chip connected to the USB 2.0 port of the Allwinner H5 SoC.
Signed-off-by Chukun Pan <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)(quoted diff) renamed from arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +0
-0
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
Quoted 14 lines
index
55b369534a08..dd655a491549100644arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +2
-1@@ -21,7 +21,8 @@ / { aliases { ethernet0 = &emac; - ethernet1 = &rtl8189etv; + ethernet1 = &rtl8153; + ethernet2 = &rtl8189etv; serial0 = &uart0; };
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts &cpu0 { · line 119
Quoted 3 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +0
-0@@ -116,6 +117,11 @@ &cpu0 { &ehci1 { status = "okay";
You need to add #address-cells and #size-cells properties, otherwise "make dtbs_check W=1" generates warnings.
Best regards,
Jernej
Quoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +5
-0+ + rtl8153: device@1 { + compatible = "usbbda,8153"; + reg = <1>; + }; }; &ehci2 {Signature · 1 line
2.25.1
Jernej Škrabec
maintainerDne torek, 03. maj 2022 ob 19:54:34 CEST je Jernej Škrabec napisal(a):
Quoted 16 lines
Dne ponedeljek, 02. maj 2022 ob 16:40:09 CEST je Chukun Pan napisal(a):
Review
Quoted 9 lines
The NanoPi R1S H5 has a Realtek RTL8153B USB 3.0 Ethernet chip connected to the USB 2.0 port of the Allwinner H5 SoC.
Signed-off-by Chukun Pan <[email protected]>--- arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)(quoted diff) renamed from arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +0
-0
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dtsQuoted 5 lines
index
55b369534a08..dd655a491549100644arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +0
-0@@ -21,7 +21,8 @@ / {
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts / { · line 25
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +2
-1aliases { ethernet0 = &emac; - ethernet1 = &rtl8189etv; + ethernet1 = &rtl8153; + ethernet2 = &rtl8189etv;
Additionally, it's not a good idea to change order of ethernet nodes. It can affect mac address assigning procedure in bootloader.
Best regards,
Jernej
Quoted 29 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts &cpu0 { · line 119
Quoted 7 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +0
-0serial0 = &uart0; };@@ -116,6 +117,11 @@ &cpu0 { &ehci1 { status = "okay";You need to add #address-cells and #size-cells properties, otherwise "make
dtbs_checkW=1" generates warnings.Best regards,
JernejQuoted 12 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +5
-0+ + rtl8153: device@1 { + compatible = "usbbda,8153"; + reg = <1>; + }; }; &ehci2 {Signature · 1 line
2.25.1
Quoted 4 lines
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +0
-0@@ -21,7 +21,8 @@ / {
Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts / { · line 25
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +2
-1aliases { ethernet0 = &emac; - ethernet1 = &rtl8189etv; + ethernet1 = &rtl8153; + ethernet2 = &rtl8189etv;Additionally, it's not a good idea to change order of ethernet nodes. It can affect mac address assigning procedure in bootloader.
There is no eth1addr in uboot, so this doesn't affect the mac address. The network order in the kernel is eth0(emac) / eth1(rtl8153) / wlan0, so I think it would be better to change it this way.
Thanks,
Chukun
On Sun, 8 May 2022 23:25:05 +0800
Chukun Pan <[email protected]> wrote:
Hi,
Quoted 13 lines
Quoted 4 lines
Quoted 4 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +0
-0@@ -21,7 +21,8 @@ / {Quoted 8 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts / { · line 25
Quoted 5 lines
arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts +2
-1aliases { ethernet0 = &emac; - ethernet1 = &rtl8189etv; + ethernet1 = &rtl8153; + ethernet2 = &rtl8189etv;Additionally, it's not a good idea to change order of ethernet nodes. It can affect mac address assigning procedure in bootloader.
Quoted 1 line
There is no eth1addr in uboot, so this doesn't affect the mac address.
Really? I don't have a board at hand to double check, but the code I read here says otherwise:
https://source.denx.de/u-boot/u-boot/-/blob/master/board/sunxi/board.c#L791-813
There it checks for up to four ethernet aliases and assigns MAC addresses to them, using the index in the lowest byte.
So this would change the MAC address of the WiFi adapter.
Am I missing something?
Quoted 1 line
The network order in the kernel is eth0(emac) / eth1(rtl8153) / wlan0,
Regardless of the fact that you shouldn't rely on indexes in device names, wouldn't that be that same, regardless of the order of USB and WiFi?
Cheers,
Andre
Quoted 6 lines
so I think it would be better to change it this way.
Thanks,
Chukun
Quoted 7 lines
Really? I don't have a board at hand to double check, but the code I read here says otherwise:
https://source.denx.de/u-boot/u-boot/-/blob/master/board/sunxi/board.c#L791-813
There it checks for up to four ethernet aliases and assigns MAC addresses to them, using the index in the lowest byte.
So this would change the MAC address of the WiFi adapter.
Am I missing something?
I'm very sorry for this, the rtl8189etv driver assigns the correct mac address to wlan0, so I didn't observe the mac address change. Sorry for my misunderstanding.
Thanks,
Chukun