]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
arm64: zynqmp: Describe ethernet controllers via aliases on SOM
authorMichal Simek <michal.simek@amd.com>
Tue, 21 Jan 2025 13:41:49 +0000 (14:41 +0100)
committerMichal Simek <michal.simek@amd.com>
Wed, 5 Feb 2025 15:22:55 +0000 (16:22 +0100)
Add ethernet aliases to CC (Carrier card) description to create a
connection which is used by 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 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/6d360e71a0530d201578e27a6997dbd472772e39.1737466907.git.michal.simek@amd.com
arch/arm/dts/zynqmp-sck-kd-g-revA.dtso
arch/arm/dts/zynqmp-sck-kr-g-revA.dtso
arch/arm/dts/zynqmp-sck-kv-g-revA.dtso
arch/arm/dts/zynqmp-sck-kv-g-revB.dtso

index d56e863ce1c5b017bf494351e7d00ec13a1696b4..02be5e1e8686da588d84cc662b58661f7c4d2b45 100644 (file)
                     "xlnx,zynqmp-sk-kd240", "xlnx,zynqmp";
        model = "ZynqMP KD240 revA/B/1";
 
+       aliases {
+               ethernet0 = "/axi/ethernet@ff0c0000"; /* &gem1 */
+       };
+
        ina260-u3 {
                compatible = "iio-hwmon";
                io-channels = <&u3 0>, <&u3 1>, <&u3 2>;
index 9d0c0c2885dfa90888d0ff5deb452484f3cb60b5..fbacfa984d7640b3b4182a10b5e9bead9c1552ed 100644 (file)
                     "xlnx,zynqmp-sk-kr260", "xlnx,zynqmp";
        model = "ZynqMP KR260 revA";
 
+       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 7490efea98bdaa65fdddc214bde9c07b5b8c5784..078d98e8ff34e7413ab52a4e3f6834ece1647819 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>;