Re: [PATCH] arm64: dts: broadcom: bcm2712: rpi-5: Add ethernet0 alias

Andrea della Porta
2025-11-03T09:10:36Z

Hi Laurent,

On 13:09 Sun 02 Nov , Laurent Pinchart wrote:
> On Sun, Nov 02, 2025 at 12:58:46PM +0200, Stanimir Varbanov wrote:
> > On 11/2/25 2:29 AM, Laurent Pinchart wrote:
> > > The RP1 ethernet controller DT node contains a local-mac-address
> > > property to pass the MAC address from the boot loader to the kernel. The
> > > boot loader does not fill the MAC address as the ethernet0 alias is
> > > missing. Add it.
> > >
> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > ---
> > > arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
> > > index 04738bf281eb..fa438ac8c9ef 100644
> > > --- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
> > > +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
> > > @@ -10,6 +10,7 @@ / {
> > > model = "Raspberry Pi 5";
> > >
> > > aliases {
> > > + ethernet0 = &rp1_eth;
> > > serial10 = &uart10;
> > > };
> > >
> >
> > Unfortunately this does not compile:
> >
> > make[1]: Entering directory '/rpi5/kobj'
> > GEN Makefile
> > DTC arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dtb
> > DTC arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dtb
> > DTC arch/arm64/boot/dts/broadcom/bcm2712-d-rpi-5-b.dtb
> > /linux/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts:12.10-15.4:
> > ERROR (path_references): /aliases: Reference to non-existent node or
> > label "rp1_eth"
> >
> > ERROR: Input tree has errors, aborting (use -f to force output)
> > make[4]: *** [/linux/scripts/Makefile.dtbs:132:
> > arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dtb] Error 2
> > make[4]: *** Waiting for unfinished jobs....
> > make[3]: *** [/linux/scripts/Makefile.build:556:
> > arch/arm64/boot/dts/broadcom] Error 2
>
> Ah indeed, I've only compiled bcm2712-rpi-5-b.dtb and forgot to test
> bcm2712-rpi-5-b-ovl-rp1.dtb. My bad.
>
> > I've made following fix on top of your patch, but I'm not sure that it
> > is the correct one.
> >
> > Andrea, could you comment please?
> >
> > diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
> > b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
> > index bbad90d497fa..734b06ac5ba2 100644
> > --- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
> > +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b-ovl-rp1.dts
> > @@ -9,8 +9,7 @@ / {
> > compatible = "raspberrypi,5-model-b", "brcm,bcm2712";
> > model = "Raspberry Pi 5";
> >
> > - aliases {
> > - ethernet0 = &rp1_eth;
> > + aliases: aliases {
> > serial10 = &uart10;
> > };
>
> Adding a label to the aliases node is a bit of an uncommon approach.
>
> > diff --git a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
> > b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
> > index 9f1976f0fd1a..26a99e72d441 100644
> > --- a/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
> > +++ b/arch/arm64/boot/dts/broadcom/bcm2712-rpi-5-b.dts
> > @@ -22,6 +22,10 @@ &pcie2 {
> > #include "rp1-nexus.dtsi"
> > };
> >
> > +&aliases {
> > + ethernet0 = &rp1_eth;
> > +};
>
> We could also just do
>
> / {
> aliases {
> ethernet0 = &rp1_eth;
> };
> };
>
> and drop tha aliases node. I'll send a v2.
>
> There's a side question of how the boot loader should pass the MAC
> address to the kernel when using the RP1 overlay, but I think that can
> be addressed later.

Yes, there are several (and probably more constraining) details we need
to figure out before referencing rp1 nodes with the overlay approach, which
is something I'm currently thinking about. It will take some time, unfortunately.

Thanks,
Andrea

>
> > +
> > &rp1_adc {
> > vref-supply = <&rp1_vdd_3v3>;
> > status = "okay";
>
> --
> Regards,
>
> Laurent Pinchart