]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: zynqmp: Describe ethernet controllers via aliases on SOM
authorMichal Simek <michal.simek@amd.com>
Tue, 2 Sep 2025 07:56:20 +0000 (09:56 +0200)
committerMichal Simek <michal.simek@amd.com>
Wed, 10 Sep 2025 13:56:03 +0000 (15:56 +0200)
Add ethernet aliases to CC (Carrier card) description to create a
connection which is used by U-BOOT (fdt_fixup_ethernet()) for updating
local-mac-address in DT.
On Kria SOM MAC address is read from i2c eeprom at start and based on it
environment variables are created. Without creating aliases U-Boot is not
able to inject local-mac-address DT property and OS won't get the same MAC
address unless another i2c read is happening in OS.
Also aliases are using string not phandle (because of dtso) that's why full
path has to be provided but that shouldn't be a big issue because location
of ethernet controller is fixed.

Signed-off-by: Michal Simek <michal.simek@amd.com>
Link: https://lore.kernel.org/r/72304150f87fd5e3338e31e2be8cf5d29955cc02.1756799774.git.michal.simek@amd.com
arch/arm64/boot/dts/xilinx/zynqmp-sck-kr-g-revB.dtso
arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revA.dtso
arch/arm64/boot/dts/xilinx/zynqmp-sck-kv-g-revB.dtso

index b7cda216b1790e39777f834c4ca594dc1c2e429d..99ad220d13d6ff65f50aeb7a52462d5f079a87aa 100644 (file)
                     "xlnx,zynqmp-sk-kr260", "xlnx,zynqmp";
        model = "ZynqMP KR260 revB";
 
+       aliases {
+               ethernet0 = "/axi/ethernet@ff0b0000"; /* &gem0 */
+               ethernet1 = "/axi/ethernet@ff0c0000"; /* &gem1 */
+       };
+
        ina260-u14 {
                compatible = "iio-hwmon";
                io-channels = <&u14 0>, <&u14 1>, <&u14 2>;
index a98a888d1385b0dfb0066e774f398144f4a8e3e8..3c36eb52e96841939f5aea07df3eaf9bd7f818ae 100644 (file)
                     "xlnx,zynqmp-sk-kv260", "xlnx,zynqmp";
        model = "ZynqMP KV260 revA";
 
+       aliases {
+               ethernet0 = "/axi/ethernet@ff0e0000"; /* &gem3 */
+       };
+
        ina260-u14 {
                compatible = "iio-hwmon";
                io-channels = <&u14 0>, <&u14 1>, <&u14 2>;
index 1d2b46d7949e81618c21b68a31f6c1d1e3af4f2b..a4ae37ebaccf6f8eb39da938ab388c3dcbd087cc 100644 (file)
                     "xlnx,zynqmp-sk-kv260", "xlnx,zynqmp";
        model = "ZynqMP KV260 revB";
 
+       aliases {
+               ethernet0 = "/axi/ethernet@ff0e0000"; /* &gem3 */
+       };
+
        ina260-u14 {
                compatible = "iio-hwmon";
                io-channels = <&u14 0>, <&u14 1>, <&u14 2>;