[PATCH 5/5] arm64: dts: renesas: s4sk: Fix ethernet0 alias for rswitch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Each rswitch port TSNn has a dedicated MAC address assigned to it,
so does AVB MAC. The MAC addresses for each rswitch port and AVB,
four in total, are stored in the FPGA populated on the board and
can be read out via I2C from bus i2c@e66e0000 address 0x70 offsets
0x58 for AVB and 0x60, 0x68, 0x70 for TSNn .

There is no single MAC address assigned to the rswitch itself, there
are three of them, one for each rswitch port. Instead of ethernet0
alias for rswitch itself, describe alias ethernet0, ethernet1 for
each enabled rswitch port. This allows U-Boot to insert MAC addresses
from its environment variables ethaddr/eth1addr/eth2addr into each
rswitch port nodes, so Linux can read and use one unique MAC address
for each rswitch port.

Note that it is unlikely this would break existing rswitch driver
operation in the Linux kernel, because as of right now, the rswitch
driver already calls of_get_ethdev_address() for each port to read
out the MAC address out of each rswitch port DT node, and if that is
missing, it falls back to MAC address settings read from the hardware
itself, and if that also fails, it uses random MAC address.

Fixes: 412f2224b3b6 ("arm64: dts: renesas: s4sk: Fix ethernet0 alias")
Signed-off-by: Marek Vasut <marek.vasut+renesas@xxxxxxxxxxx>
---
Cc: Conor Dooley <conor+dt@xxxxxxxxxx>
Cc: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
Cc: Krzysztof Kozlowski <krzk+dt@xxxxxxxxxx>
Cc: Rob Herring <robh@xxxxxxxxxx>
Cc: devicetree@xxxxxxxxxxxxxxx
Cc: linux-renesas-soc@xxxxxxxxxxxxxxx
---
 arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts b/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts
index 4bf526535ee05..86a1945127529 100644
--- a/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts
+++ b/arch/arm64/boot/dts/renesas/r8a779f4-s4sk.dts
@@ -22,7 +22,8 @@ aliases {
 		i2c5 = &i2c5;
 		serial0 = &hscif0;
 		serial1 = &hscif1;
-		ethernet0 = &rswitch;
+		ethernet0 = &rswitchport0;
+		ethernet1 = &rswitchport1;
 	};
 
 	chosen {
-- 
2.45.2





[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux