mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-21 06:33:41 +00:00
ramips: improve BDCOM WAP2100-SK support
Use the generic board detection instead of the target specific one as all recent additions are doing. Setup the USB led via devicetree (a58535771f
) and include the required driver by default. Merge the led userspace setting with an existing identical case. Use the wps led for boot status indication. Move the partitions into a partition table node (6031ab345d
) and drop needless labels. Drop misplaced cells properties (53624c1702
). Cleanup the pinmux and only switch pins to gpio functions which a referenced as gpio in the dts. Match the maximum image size with the size of the firmware partition. Signed-off-by: Mathias Kresin <dev@kresin.me>
This commit is contained in:
parent
71ba834cf1
commit
e4d9217fe5
@ -56,6 +56,10 @@ asl26555-16M)
|
|||||||
ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0"
|
ucidef_set_led_netdev "eth" "ETH" "asl26555:green:eth" "eth0"
|
||||||
set_wifi_led "asl26555:green:wlan"
|
set_wifi_led "asl26555:green:wlan"
|
||||||
;;
|
;;
|
||||||
|
bdcom,wap2100-sk|\
|
||||||
|
hiwifi,hc5861b)
|
||||||
|
set_wifi_led "$boardname:green:wlan2g"
|
||||||
|
;;
|
||||||
broadway)
|
broadway)
|
||||||
set_wifi_led "$boardname:red:wps_active"
|
set_wifi_led "$boardname:red:wps_active"
|
||||||
;;
|
;;
|
||||||
@ -172,9 +176,6 @@ hg255d)
|
|||||||
set_wifi_led "$boardname:green:wlan"
|
set_wifi_led "$boardname:green:wlan"
|
||||||
ucidef_set_led_netdev "internet" "internet" "$boardname:green:internet" "eth0.2"
|
ucidef_set_led_netdev "internet" "internet" "$boardname:green:internet" "eth0.2"
|
||||||
;;
|
;;
|
||||||
hiwifi,hc5861b)
|
|
||||||
set_wifi_led "$boardname:green:wlan2g"
|
|
||||||
;;
|
|
||||||
hpm)
|
hpm)
|
||||||
ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0"
|
ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0"
|
||||||
set_wifi_led "$boardname:green:wifi"
|
set_wifi_led "$boardname:green:wifi"
|
||||||
@ -369,10 +370,6 @@ vocore-16M)
|
|||||||
w502u)
|
w502u)
|
||||||
set_wifi_led "rt2800pci-phy0::radio"
|
set_wifi_led "rt2800pci-phy0::radio"
|
||||||
;;
|
;;
|
||||||
wap2100-sk)
|
|
||||||
set_usb_led "$boardname:green:usb"
|
|
||||||
set_wifi_led "$boardname:green:wlan2g"
|
|
||||||
;;
|
|
||||||
we1026-5g-16m)
|
we1026-5g-16m)
|
||||||
ucidef_set_led_netdev "lan" "LAN" "we1026-5g:green:lan" "eth0"
|
ucidef_set_led_netdev "lan" "LAN" "we1026-5g:green:lan" "eth0"
|
||||||
set_wifi_led "we1026-5g:green:wifi"
|
set_wifi_led "we1026-5g:green:wifi"
|
||||||
|
@ -198,6 +198,7 @@ ramips_setup_interfaces()
|
|||||||
atp-52b|\
|
atp-52b|\
|
||||||
awm002-evb-4M|\
|
awm002-evb-4M|\
|
||||||
awm002-evb-8M|\
|
awm002-evb-8M|\
|
||||||
|
bdcom,wap2100-sk|\
|
||||||
c20i|\
|
c20i|\
|
||||||
dir-645|\
|
dir-645|\
|
||||||
gl-mt300a|\
|
gl-mt300a|\
|
||||||
@ -224,7 +225,6 @@ ramips_setup_interfaces()
|
|||||||
ubnt-erx|\
|
ubnt-erx|\
|
||||||
ubnt-erx-sfp|\
|
ubnt-erx-sfp|\
|
||||||
ur-326n4g|\
|
ur-326n4g|\
|
||||||
wap2100-sk|\
|
|
||||||
wrtnode|\
|
wrtnode|\
|
||||||
wrtnode2p | \
|
wrtnode2p | \
|
||||||
wrtnode2r | \
|
wrtnode2r | \
|
||||||
|
@ -553,9 +553,6 @@ ramips_board_detect() {
|
|||||||
*"W502U")
|
*"W502U")
|
||||||
name="w502u"
|
name="w502u"
|
||||||
;;
|
;;
|
||||||
*"WAP2100-SK")
|
|
||||||
name="wap2100-sk"
|
|
||||||
;;
|
|
||||||
*"WCR-1166DS")
|
*"WCR-1166DS")
|
||||||
name="wcr-1166ds"
|
name="wcr-1166ds"
|
||||||
;;
|
;;
|
||||||
|
@ -31,6 +31,7 @@ platform_check_image() {
|
|||||||
awm002-evb-4M|\
|
awm002-evb-4M|\
|
||||||
awm002-evb-8M|\
|
awm002-evb-8M|\
|
||||||
bc2|\
|
bc2|\
|
||||||
|
bdcom,wap2100-sk|\
|
||||||
bocco|\
|
bocco|\
|
||||||
broadway|\
|
broadway|\
|
||||||
c108|\
|
c108|\
|
||||||
@ -186,7 +187,6 @@ platform_check_image() {
|
|||||||
widora,neo-32m|\
|
widora,neo-32m|\
|
||||||
mqmaker,witi-256m|\
|
mqmaker,witi-256m|\
|
||||||
mqmaker,witi-512m|\
|
mqmaker,witi-512m|\
|
||||||
wap2100-sk|\
|
|
||||||
we1026-5g-16m|\
|
we1026-5g-16m|\
|
||||||
wizfi630a|\
|
wizfi630a|\
|
||||||
wl-330n|\
|
wl-330n|\
|
||||||
|
@ -6,9 +6,14 @@
|
|||||||
#include <dt-bindings/input/input.h>
|
#include <dt-bindings/input/input.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
compatible = "bdcom,bdcom-wap2100-sk", "ralink,mt7620a-soc";
|
compatible = "bdcom,wap2100-sk", "ralink,mt7620a-soc";
|
||||||
model = "BDCOM WAP2100-SK";
|
model = "BDCOM WAP2100-SK";
|
||||||
|
|
||||||
|
aliases {
|
||||||
|
led-boot = &led_power;
|
||||||
|
led-failsafe = &led_power;
|
||||||
|
};
|
||||||
|
|
||||||
chosen {
|
chosen {
|
||||||
bootargs = "console=ttyS0,115200";
|
bootargs = "console=ttyS0,115200";
|
||||||
};
|
};
|
||||||
@ -19,9 +24,11 @@
|
|||||||
usb {
|
usb {
|
||||||
label = "wap2100-sk:green:usb";
|
label = "wap2100-sk:green:usb";
|
||||||
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
|
||||||
|
trigger-sources = <&ohci_port1>, <&ehci_port1>;
|
||||||
|
linux,default-trigger = "usbport";
|
||||||
};
|
};
|
||||||
|
|
||||||
wps {
|
led_power: wps {
|
||||||
label = "wap2100-sk:green:wps";
|
label = "wap2100-sk:green:wps";
|
||||||
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
|
gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
|
||||||
};
|
};
|
||||||
@ -34,8 +41,6 @@
|
|||||||
|
|
||||||
gpio-keys-polled {
|
gpio-keys-polled {
|
||||||
compatible = "gpio-keys-polled";
|
compatible = "gpio-keys-polled";
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <0>;
|
|
||||||
poll-interval = <20>;
|
poll-interval = <20>;
|
||||||
|
|
||||||
wps {
|
wps {
|
||||||
@ -55,13 +60,15 @@
|
|||||||
&spi0 {
|
&spi0 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
|
|
||||||
en25q128@0 {
|
flash@0 {
|
||||||
#address-cells = <1>;
|
|
||||||
#size-cells = <1>;
|
|
||||||
compatible = "jedec,spi-nor";
|
compatible = "jedec,spi-nor";
|
||||||
reg = <0>;
|
reg = <0>;
|
||||||
spi-max-frequency = <10000000>;
|
spi-max-frequency = <10000000>;
|
||||||
|
|
||||||
|
partitions {
|
||||||
|
#address-cells = <1>;
|
||||||
|
#size-cells = <1>;
|
||||||
|
|
||||||
partition@0 {
|
partition@0 {
|
||||||
label = "u-boot";
|
label = "u-boot";
|
||||||
reg = <0x0 0x30000>;
|
reg = <0x0 0x30000>;
|
||||||
@ -80,11 +87,12 @@
|
|||||||
read-only;
|
read-only;
|
||||||
};
|
};
|
||||||
|
|
||||||
firmware: partition@50000 {
|
partition@50000 {
|
||||||
label = "firmware";
|
label = "firmware";
|
||||||
reg = <0x50000 0xf70000>;
|
reg = <0x50000 0xf70000>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&gpio0 {
|
&gpio0 {
|
||||||
@ -123,7 +131,7 @@
|
|||||||
&pinctrl {
|
&pinctrl {
|
||||||
state_default: pinctrl0 {
|
state_default: pinctrl0 {
|
||||||
default {
|
default {
|
||||||
ralink,group = "wdt", "mdio", "spi refclk", "uartf", "wled";
|
ralink,group = "spi refclk", "uartf", "wled";
|
||||||
ralink,function = "gpio";
|
ralink,function = "gpio";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -80,14 +80,13 @@ define Device/ArcherMR200
|
|||||||
endef
|
endef
|
||||||
TARGET_DEVICES += ArcherMR200
|
TARGET_DEVICES += ArcherMR200
|
||||||
|
|
||||||
define Device/BDCOM-WAP2100-SK
|
define Device/bdcom_wap2100-sk
|
||||||
DTS := BDCOM-WAP2100-SK
|
DTS := BDCOM-WAP2100-SK
|
||||||
IMAGE_SIZE := $(ralink_default_fw_size_16M)
|
IMAGE_SIZE := 15808k
|
||||||
SUPPORTED_DEVICES += wap2100-sk
|
|
||||||
DEVICE_TITLE := BDCOM WAP2100-SK (ZTE ZXECS EBG3130)
|
DEVICE_TITLE := BDCOM WAP2100-SK (ZTE ZXECS EBG3130)
|
||||||
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620
|
DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-mt76 kmod-sdhci-mt7620 kmod-usb-ledtrig-usbport
|
||||||
endef
|
endef
|
||||||
TARGET_DEVICES += BDCOM-WAP2100-SK
|
TARGET_DEVICES += bdcom_wap2100-sk
|
||||||
|
|
||||||
define Device/bocco
|
define Device/bocco
|
||||||
DTS := BOCCO
|
DTS := BOCCO
|
||||||
|
Loading…
Reference in New Issue
Block a user