[PATCH] bcm53xx: add support for Asus RT-AC88U

Rafał Miłecki rafal at milecki.pl
Wed Nov 3 23:52:40 PDT 2021


On 25.10.2021 23:37, Arınç ÜNAL wrote:
> @@ -8,6 +8,12 @@ netgear,r8000)
>   	ucidef_set_led_usbport "usb2" "USB 2.0" "bcm53xx:white:usb2" "usb1-port2" "usb2-port2"
>   	ucidef_set_led_usbport "usb3" "USB 3.0" "bcm53xx:white:usb3" "usb1-port1" "usb2-port1" "usb4-port1"
>   	;;
> +asus,rt-ac88u)
> +	ucidef_set_led_default "power" "Power" "white:power" "1"

Do we need that? "power" led seems to be enabled by default by DTS code:
linux,default-trigger = "default-on";

> +	ucidef_set_led_netdev "lan" "LAN" "white:lan" "eth1"

This info should be put in DT but we don't have bindings for that yet.


> +	ucidef_set_led_usbport "usb2" "USB 2.0" "white:usb2" "usb1-port2"
> +	ucidef_set_led_usbport "usb3" "USB 3.0" "white:usb3" "usb1-port1" "usb4-port1"

There is "linux,default-trigger" and "trigger-sources" in DT so this
shouldn't be needed. If for some reason "usbport" driver doesn't pick
that on its own - please kindly debug that.


> --- /dev/null
> +++ b/target/linux/bcm53xx/base-files/etc/init.d/set_nvram_vars
> @@ -0,0 +1,13 @@
> +#!/bin/sh /etc/rc.common
> +
> +START=99
> +boot() {
> +	. /lib/functions.sh
> +
> +	case $(board_name) in
> +		asus,rt-ac88u)
> +			# clear et0macaddr which makes cfe recovery mode inaccessible, set eth1 & eth2 mac addresses and wireless LEDs behaviour variables on nvram
> +			nvram unset et0macaddr set et1macaddr=$(nvram get 0:macaddr) set et2macaddr=$(nvram get 1:macaddr) set 0:ledbh9=0x7 set 1:ledbh9=0x7 && nvram commit
> +			;;
> +	esac
> +}

I'm not sure what to do about this. I don't think OpenWrt is a place
to automatically fix CFE issues. Recovery mode inaccessibility seems
like an important problem though.

Why do you set Ethernet interfaces to duplicate wireless MACs?

Does ledbh9 affect wireless firmware (uploaded by brcmfmac) somehow?
Why do we need that if original Asus firmware doesn't use it? Does
Asus make Linux control WLAN LEDs? Could we do the same?



More information about the openwrt-devel mailing list