Skip to contentSkip to conversation

arm: mvebu: turris_omnia: Set ETHPRIME to DT alias

PATCH In review Pali Rohár 3 participants 5 messages Jul 15, 2022 – Jul 21, 2022 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: mvebu: turris_omnia: Set ETHPRIME to DT alias

CONFIG_ETHPRIME can be set to DT node name or alias which refers to DT node. Define ethernet aliases and set ETHPRIME to eth2 which refers to WAN ethernet port. This removes hardcoded DT node name from U-Boot configuration file.

---
 arch/arm/dts/armada-385-turris-omnia.dts | 6 ++++++
 configs/turris_omnia_defconfig           | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/dts/armada-385-turris-omnia.dts +6 -0
index 5511c84849ee..7f1478edfd23 100644
@@ -55,6 +55,12 @@
 		stdout-path = &uart0;
 	};
 
+	aliases {
+		ethernet0 = &eth0;
+		ethernet1 = &eth1;
+		ethernet2 = &eth2;
+	};
+
 	memory {
 		device_type = "memory";
 		reg = <0x00000000 0x40000000>; /* 1024 MB */
configs/turris_omnia_defconfig +1 -1
index 6460535ef94e..e2a0449b487b 100644
@@ -65,7 +65,7 @@ CONFIG_CMD_FS_UUID=y
 CONFIG_ENV_OVERWRITE=y
 CONFIG_SYS_RELOC_GD_ENV_ADDR=y
 CONFIG_USE_ETHPRIME=y
-CONFIG_ETHPRIME="ethernet@34000"
+CONFIG_ETHPRIME="eth2"
 CONFIG_ARP_TIMEOUT=200
 CONFIG_NET_RETRY_COUNT=50
 CONFIG_NETCONSOLE=y
Signature · 1 line
2.20.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · On Fri, 15 Jul 2022 10:16:00 +0200 Pali Rohár <[email protected]> wrote:

CONFIG_ETHPRIME can be set to DT node name or alias which refers to DT node. Define ethernet aliases and set ETHPRIME to eth2 which refers to WAN ethernet port. This removes hardcoded DT node name from U-Boot configuration file.

Oh yeah. Do we want to send this dt change also to Linux?

#2 lore raw
Quoted 11 lines · On Friday 15 July 2022 10:37:13 Marek Behún wrote:
Quoted 6 lines · On Fri, 15 Jul 2022 10:16:00 +0200 Pali Rohár <[email protected]> wrote:

CONFIG_ETHPRIME can be set to DT node name or alias which refers to DT node. Define ethernet aliases and set ETHPRIME to eth2 which refers to WAN ethernet port. This removes hardcoded DT node name from U-Boot configuration file.

Oh yeah. Do we want to send this dt change also to Linux?

Rather synchronize Omnia/A385 DTS files between U-Boot and Linux.

Quoted 1 line
Reviewed-by on v1 1/1
#3 lore raw
In reply to Pali Rohár
Quoted 6 lines · Pali Rohár

CONFIG_ETHPRIME can be set to DT node name or alias which refers to DT node. Define ethernet aliases and set ETHPRIME to eth2 which refers to WAN ethernet port. This removes hardcoded DT node name from U-Boot configuration file.

Thanks,
Stefan

Quoted 27 lines
---
  arch/arm/dts/armada-385-turris-omnia.dts | 6 ++++++
  configs/turris_omnia_defconfig           | 2 +-
  2 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/dts/armada-385-turris-omnia.dts +6 -0
index 5511c84849ee..7f1478edfd23 100644
@@ -55,6 +55,12 @@
  		stdout-path = &uart0;
  	};
 
+	aliases {
+		ethernet0 = &eth0;
+		ethernet1 = &eth1;
+		ethernet2 = &eth2;
+	};
+
  	memory {
  		device_type = "memory";
  		reg = <0x00000000 0x40000000>; /* 1024 MB */
configs/turris_omnia_defconfig +0 -0
index 6460535ef94e..e2a0449b487b 100644

configs/turris_omnia_defconfig CONFIG_CMD_FS_UUID=y · line 71

Quoted 8 lines
configs/turris_omnia_defconfig +1 -1
@@ -65,7 +65,7 @@ CONFIG_CMD_FS_UUID=y
  CONFIG_ENV_OVERWRITE=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_USE_ETHPRIME=y
-CONFIG_ETHPRIME="ethernet@34000"
+CONFIG_ETHPRIME="eth2"
  CONFIG_ARP_TIMEOUT=200
  CONFIG_NET_RETRY_COUNT=50
  CONFIG_NETCONSOLE=y

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]
#4 lore raw
In reply to Pali Rohár
Quoted 6 lines · Pali Rohár

CONFIG_ETHPRIME can be set to DT node name or alias which refers to DT node. Define ethernet aliases and set ETHPRIME to eth2 which refers to WAN ethernet port. This removes hardcoded DT node name from U-Boot configuration file.

Applied to u-boot-marvell/master

Thanks,
Stefan

Quoted 27 lines
---
  arch/arm/dts/armada-385-turris-omnia.dts | 6 ++++++
  configs/turris_omnia_defconfig           | 2 +-
  2 files changed, 7 insertions(+), 1 deletion(-)
arch/arm/dts/armada-385-turris-omnia.dts +6 -0
index 5511c84849ee..7f1478edfd23 100644
@@ -55,6 +55,12 @@
  		stdout-path = &uart0;
  	};
 
+	aliases {
+		ethernet0 = &eth0;
+		ethernet1 = &eth1;
+		ethernet2 = &eth2;
+	};
+
  	memory {
  		device_type = "memory";
  		reg = <0x00000000 0x40000000>; /* 1024 MB */
configs/turris_omnia_defconfig +0 -0
index 6460535ef94e..e2a0449b487b 100644

configs/turris_omnia_defconfig CONFIG_CMD_FS_UUID=y · line 71

Quoted 8 lines
configs/turris_omnia_defconfig +1 -1
@@ -65,7 +65,7 @@ CONFIG_CMD_FS_UUID=y
  CONFIG_ENV_OVERWRITE=y
  CONFIG_SYS_RELOC_GD_ENV_ADDR=y
  CONFIG_USE_ETHPRIME=y
-CONFIG_ETHPRIME="ethernet@34000"
+CONFIG_ETHPRIME="eth2"
  CONFIG_ARP_TIMEOUT=200
  CONFIG_NET_RETRY_COUNT=50
  CONFIG_NETCONSOLE=y

Viele Grüße,
Stefan Roese

Signature · 3 lines
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-51 Fax: (+49)-8142-66989-80 Email: [email protected]