Skip to contentSkip to conversation

ARM64: dts: meson: enable passing MAC addr on u-boot environment

PATCH New Neil Armstrong 2 participants 2 messages Jan 17, 2018 1 message not in the archive Arm/Amlogic Meson SoC support

lore
Share & tools
lore
#1 lore raw

PATCH 1/1 ARM64: dts: meson: enable passing MAC addr on u-boot environment

In reply to a message not in the archive

Hi Jorge,

Quoted 19 lines · Jorge Ramirez-Ortiz

From: Jorge Ramirez-Ortiz <[email protected]>

With the adequate configuration settings, u-boot will loop through the list of aliases looking for "ethernetX".

By adding an ethernet alias, u-boot can fixup the local-mac-address property in the kernel's device tree using a value held in its environment variable ethaddr.

---
 arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +0 -0
index 68d2c90..8ed2a98 100644

arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts line 21

Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +1 -0
@@ -18,6 +18,7 @@
 
 	aliases {
 		serial0 = &uart_AO;
+		ethernet = &ethmac;

Isn't it ethernet0 instead ?

arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts line 24

Quoted 4 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +0 -0
 	};
 
 	chosen {

It would be great to have this on all boards with ethernet enabled.

Neil

#2 lore raw

PATCH 1/1 ARM64: dts: meson: enable passing MAC addr on u-boot environment

Quoted 23 lines · Neil Armstrong

Hi Jorge,

Quoted 20 lines · Jorge Ramirez-Ortiz

From: Jorge Ramirez-Ortiz <[email protected]>

With the adequate configuration settings, u-boot will loop through the list of aliases looking for "ethernetX".

By adding an ethernet alias, u-boot can fixup the local-mac-address property in the kernel's device tree using a value held in its environment variable ethaddr.

---
  arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts | 1 +
  1 file changed, 1 insertion(+)
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +0 -0
index 68d2c90..8ed2a98 100644
@@ -18,6 +18,7 @@
 
Quoted 4 lines

arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts line 21

Quoted 3 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +1 -0
  	aliases {
  		serial0 = &uart_AO;
+		ethernet = &ethmac;

Isn't it ethernet0 instead ?

uboot can take both (ethernet or ethernet%i)
I just double checked amlogics uboot and you are right it needs ethernet%i

so will fix

Quoted 6 lines

arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts line 24

Quoted 5 lines
arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts +0 -0
  	};
 
  	chosen {

It would be great to have this on all boards with ethernet enabled.

yes will post a new version shortly

Quoted 3 lines

Neil