Convert userspace code to use generic device-tree compatible board
detection method. Users of the existing code will have to use
sysupgrade -F once to switch to the new generic board naming.
Properly setup pinctrl fixing the switch port LEDs.
Fixes commit
9c4fe103cb (ramips: add support for ZBT-WE1226)
Reported-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
set_wifi_led "zbt-we826:green:wifi"
set_usb_led "zbt-we826:green:usb"
;;
set_wifi_led "zbt-we826:green:wifi"
set_usb_led "zbt-we826:green:usb"
;;
set_wifi_led "$boardname:green:wlan"
ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x01"
ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x02"
set_wifi_led "$boardname:green:wlan"
ucidef_set_led_switch "lan1" "LAN1" "$boardname:green:lan1" "switch0" "0x01"
ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x02"
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "0:wan" "6@eth0"
;;
ucidef_add_switch "switch0" \
"1:lan" "2:lan" "0:wan" "6@eth0"
;;
y1)
ucidef_add_switch "switch0" \
"0:lan:2" "1:lan:1" "4:wan" "6@eth0"
y1)
ucidef_add_switch "switch0" \
"0:lan:2" "1:lan:1" "4:wan" "6@eth0"
zbt-we826-32M)
status_led="zbt-we826:green:power"
;;
zbt-we826-32M)
status_led="zbt-we826:green:power"
;;
- zbt-we1226)
- status_led="zbt-we1226:green:wlan"
+ zbtlink,zbt-we1226)
+ status_led="$boardname:green:wlan"
;;
zbt-wg3526-16M|\
zbt-wg3526-32M)
;;
zbt-wg3526-16M|\
zbt-wg3526-32M)
*"ZBT-WA05")
name="zbt-wa05"
;;
*"ZBT-WA05")
name="zbt-wa05"
;;
- *"ZBT-WE1226")
- name="zbt-we1226"
- ;;
*"ZBT-WE1326")
name="zbt-we1326"
;;
*"ZBT-WE1326")
name="zbt-we1326"
;;
zbt-ape522ii|\
zbt-cpe102|\
zbt-wa05|\
zbt-ape522ii|\
zbt-cpe102|\
zbt-wa05|\
zbt-we1326|\
zbt-we2026|\
zbtlink,zbt-we3526|\
zbt-we1326|\
zbt-we2026|\
zbtlink,zbt-we3526|\
#include "mt7628an.dtsi"
/ {
#include "mt7628an.dtsi"
/ {
- compatible = "zbt,we1226", "mediatek,mt7628an-soc";
+ compatible = "zbtlink,zbt-we1226", "mediatek,mt7628an-soc";
model = "Zbtlink ZBT-WE1226";
chosen {
model = "Zbtlink ZBT-WE1226";
chosen {
gpio-leds {
compatible = "gpio-leds";
gpio-leds {
compatible = "gpio-leds";
- lan2 {
- label = "zbt-we1226:green:lan2";
+ wan {
+ label = "zbt-we1226:green:wan";
gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
};
lan1 {
label = "zbt-we1226:green:lan1";
gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
};
lan1 {
label = "zbt-we1226:green:lan1";
- gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
+ gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
- wan {
- label = "zbt-we1226:green:wan";
- gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
+ lan2 {
+ label = "zbt-we1226:green:lan2";
+ gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
&pinctrl {
state_default: pinctrl0 {
gpio {
&pinctrl {
state_default: pinctrl0 {
gpio {
- ralink,group = "i2c", "wled_an";
+ ralink,group = "p0led_an", "p1led_an", "p4led_an", "wdt", "wled_an";
ralink,function = "gpio";
};
};
ralink,function = "gpio";
};
};
endef
TARGET_DEVICES += wrtnode2r
endef
TARGET_DEVICES += wrtnode2r
-define Device/zbt-we1226
+define Device/zbtlink_zbt-we1226
DTS := ZBT-WE1226
IMAGE_SIZE := $(ralink_default_fw_size_8M)
DEVICE_TITLE := ZBTlink ZBT-WE1226
endef
DTS := ZBT-WE1226
IMAGE_SIZE := $(ralink_default_fw_size_8M)
DEVICE_TITLE := ZBTlink ZBT-WE1226
endef
-TARGET_DEVICES += zbt-we1226
+TARGET_DEVICES += zbtlink_zbt-we1226