Skip to contentSkip to conversation

Add ethernet0 alias in Nanopi NEO's device tree

PATCH In review Baltazár Radics 2 participants 2 messages Mar 26, 2022 – Apr 4, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 Add ethernet0 alias in Nanopi NEO's device tree

This is required to enable automatic MAC address generation.

---
 arch/arm/dts/sun8i-h3-nanopi-neo.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/sun8i-h3-nanopi-neo.dts +4 -0
index 9f33f6fae..df71fab3c 100644
@@ -45,6 +45,10 @@
 / {
 	model = "FriendlyARM NanoPi NEO";
 	compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
+
+	aliases {
+		ethernet0 = &emac;
+	};
 };
 
 &ehci0 {
Signature · 1 line
2.35.1
#1 lore raw

On Sat, 26 Mar 2022 13:09:10 +0100 Baltazár Radics <[email protected]> wrote:

Hi Baltazár,

Quoted 1 line

This is required to enable automatic MAC address generation.

For the records, this should rather be marked as a sync from the Linux tree, where this was conveniently merged just recently.

In the long run we should see if we can avoid those ethernet aliases, since their only purpose seems to be to trigger U-Boot's MAC generation, and I wonder if there is a simpler way. Using U-Boot's DM interface to enumerate Ethernet devices comes to mind, for instance. This would avoid the churn of funnelling those trivial DT changes through Linux first.

I will apply this and push it for the merge window, after adding the Linux tag.

Thanks!
Andre

Quoted 20 lines
---
 arch/arm/dts/sun8i-h3-nanopi-neo.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm/dts/sun8i-h3-nanopi-neo.dts +4 -0
index 9f33f6fae..df71fab3c 100644
@@ -45,6 +45,10 @@
 / {
 	model = "FriendlyARM NanoPi NEO";
 	compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
+
+	aliases {
+		ethernet0 = &emac;
+	};
 };
 
 &ehci0 {