[PATCH] Add ethernet0 alias in Nanopi NEO's device tree

Baltazár Radics baltazar.radics at gmail.com
Sat Mar 26 08:17:44 CET 2022


On Sun, 2022-02-27 at 14:36 +0100, Baltazár Radics wrote:
> This is required to enable automatic MAC address generation.
> 
> Signed-off-by: Baltazár Radics <baltazar.radics at gmail.com>
> ---
>  arch/arm/dts/sun8i-h3-nanopi-neo.dts | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm/dts/sun8i-h3-nanopi-neo.dts
> b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
> index 9f33f6fae..28cf6f8bd 100644
> --- a/arch/arm/dts/sun8i-h3-nanopi-neo.dts
> +++ b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
> @@ -45,6 +45,10 @@
>  / {
>         model = "FriendlyARM NanoPi NEO";
>         compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
> +
> +       aliases {
> +               ethernet0 = &emac;
> +       }
>  };
>  
>  &ehci0 {

Oops, I just realized the patch I sent was wrong, there's a missing
semicolon. Here's the correct patch:

Signed-off-by: Baltazár Radics <baltazar.radics at gmail.com>
---
 arch/arm/dts/sun8i-h3-nanopi-neo.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/sun8i-h3-nanopi-neo.dts b/arch/arm/dts/sun8i-
h3-nanopi-neo.dts
index 9f33f6fae..df71fab3c 100644
--- a/arch/arm/dts/sun8i-h3-nanopi-neo.dts
+++ b/arch/arm/dts/sun8i-h3-nanopi-neo.dts
@@ -45,6 +45,10 @@
 / {
 	model = "FriendlyARM NanoPi NEO";
 	compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
+
+	aliases {
+		ethernet0 = &emac;
+	};
 };
 
 &ehci0 {


More information about the U-Boot mailing list