diff mbox series

[4/4] bcm53xx: Add network configuration for DIR-890L

Message ID 20230513212137.1272012-5-linus.walleij@linaro.org
State Superseded
Headers show
Series OpenWrt support for D-Link DIR-890L | expand

Commit Message

Linus Walleij May 13, 2023, 9:21 p.m. UTC
This adds the lan/wan default bridge config and also the MAC
NVRAM read-out for et2.

DIR-885L was missing a default bridge config so I just added
that too while I was at it.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
 target/linux/bcm53xx/base-files/etc/board.d/02_network | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Rafał Miłecki May 15, 2023, 8:41 a.m. UTC | #1
On 2023-05-13 23:21, Linus Walleij wrote:
> This adds the lan/wan default bridge config and also the MAC
> NVRAM read-out for et2.
> 
> DIR-885L was missing a default bridge config so I just added
> that too while I was at it.

It seems that D-Link DIR-890L in its DTS file already has "et0macaddr"
specified and "gmac2" referencing it. So I think bgmac should read MAC
on its own and no user space extra code should be needed.

That should work starting with the commit 4ab27bc6efee ("kernel:
backport NVMEM patch for Broadcom's NVRAM MAC cells").

Can you test that, please?


> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
> ---
>  target/linux/bcm53xx/base-files/etc/board.d/02_network | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network
> b/target/linux/bcm53xx/base-files/etc/board.d/02_network
> index 6bec600540ea..35b1efc91323 100644
> --- a/target/linux/bcm53xx/base-files/etc/board.d/02_network
> +++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network
> @@ -16,6 +16,10 @@ bcm53xx_setup_interfaces()
>  	asus,rt-ac88u)
>  		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 extsw" "wan"
>  		;;
> +	dlink,dir-885l | \
> +	dlink,dir-890l)
> +		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
> +		;;
>  	dlink,dwl-8610ap)
>  		ucidef_set_interface_lan "eth0 eth1" "dhcp"
>  		;;
> @@ -50,6 +54,7 @@ bcm53xx_setup_macs()
>  		offset=1
>  		;;
>  	dlink,dir-885l | \
> +	dlink,dir-890l | \
>  	linksys,panamera | \
>  	netgear,r7900 | \
>  	netgear,r8000 | \
Linus Walleij May 15, 2023, 1:41 p.m. UTC | #2
On Mon, May 15, 2023 at 10:41 AM Rafał Miłecki <rafal@milecki.pl> wrote:
> On 2023-05-13 23:21, Linus Walleij wrote:

> > This adds the lan/wan default bridge config and also the MAC
> > NVRAM read-out for et2.
> >
> > DIR-885L was missing a default bridge config so I just added
> > that too while I was at it.
>
> It seems that D-Link DIR-890L in its DTS file already has "et0macaddr"
> specified and "gmac2" referencing it. So I think bgmac should read MAC
> on its own and no user space extra code should be needed.
>
> That should work starting with the commit 4ab27bc6efee ("kernel:
> backport NVMEM patch for Broadcom's NVRAM MAC cells").
>
> Can you test that, please?

Yup you're right, that works on its own.

Can you drop the oneliner when applying or do you want me to
send a revised patch?

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/target/linux/bcm53xx/base-files/etc/board.d/02_network b/target/linux/bcm53xx/base-files/etc/board.d/02_network
index 6bec600540ea..35b1efc91323 100644
--- a/target/linux/bcm53xx/base-files/etc/board.d/02_network
+++ b/target/linux/bcm53xx/base-files/etc/board.d/02_network
@@ -16,6 +16,10 @@  bcm53xx_setup_interfaces()
 	asus,rt-ac88u)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 extsw" "wan"
 		;;
+	dlink,dir-885l | \
+	dlink,dir-890l)
+		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
+		;;
 	dlink,dwl-8610ap)
 		ucidef_set_interface_lan "eth0 eth1" "dhcp"
 		;;
@@ -50,6 +54,7 @@  bcm53xx_setup_macs()
 		offset=1
 		;;
 	dlink,dir-885l | \
+	dlink,dir-890l | \
 	linksys,panamera | \
 	netgear,r7900 | \
 	netgear,r8000 | \