Merge Official Source

This commit is contained in:
CN_SZTL 2020-05-23 18:54:52 +08:00
commit 63a93191eb
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
18 changed files with 542 additions and 21 deletions

View File

@ -38,6 +38,10 @@ static inline int has_feature(const char *feat)
#ifdef CONFIG_SUITEB192
if (!strcmp(feat, "suiteb192"))
return 1;
#endif
#ifdef CONFIG_WEP
if (!strcmp(feat, "wep"))
return 1;
#endif
return 0;
}

View File

@ -0,0 +1,236 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "ar9344.dtsi"
/ {
compatible = "enterasys,ws-ap3705i", "qca,ar9344";
model = "Enterasys WS-AP3705i";
chosen {
bootargs = "console=ttyS0,115200n8";
};
aliases {
led-boot = &led_power_green;
led-failsafe = &led_power_red;
led-running = &led_power_green;
led-upgrade = &led_power_red;
label-mac-device = &eth0;
};
mtd-concat {
compatible = "mtd-concat";
devices = <&concat0 &concat1>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x0 0x1dd0000>;
};
};
};
leds {
compatible = "gpio-leds";
pinctrl-names = "default";
pinctrl-0 = <&enable_gpio_11 &enable_gpio_16>;
led_power_green: power_green {
label = "ws-ap3705i:green:power";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
led_power_red: power_red {
label = "ws-ap3705i:red:power";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
lan_blue {
label = "ws-ap3705i:blue:lan";
gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
};
lan_green {
label = "ws-ap3705i:green:lan";
gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
};
radio2 {
label = "ws-ap3705i:green:radio2";
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
ath9k-leds {
compatible = "gpio-leds";
radio1 {
label = "ws-ap3705i:green:radio1";
gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "Reset button";
linux,code = <KEY_RESTART>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
};
};
};
&ref {
clock-frequency = <40000000>;
};
&uart {
status = "okay";
};
&pinmux {
enable_gpio_16: pinmux_enable_gpio_16 {
pinctrl-single,bits = <0x10 0x0 0x000000ff>;
};
enable_gpio_11: pinmux_enable_gpio_11 {
pinctrl-single,bits = <0x8 0x0 0xff000000>;
};
};
&gpio {
status = "okay";
};
&wmac {
status = "okay";
qca,no-eeprom;
};
&spi {
status = "okay";
cs-gpios = <0>, <0>;
num-cs = <2>;
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot-bak";
reg = <0x0 0x80000>;
read-only;
};
partition@80000 {
label = "u-boot-env0";
reg = <0x80000 0x10000>;
read-only;
};
partition@90000 {
label = "u-boot-env1";
reg = <0x90000 0x10000>;
read-only;
};
partition@a0000 {
label = "u-boot";
reg = <0xa0000 0x80000>;
read-only;
};
partition@120000 {
label = "calibrate";
reg = <0x120000 0x10000>;
read-only;
};
partition@130000 {
label = "nvram";
reg = <0x130000 0x100000>;
read-only;
};
concat0: partition@230000 {
label = "concat0";
reg = <0x230000 0xdd0000>;
};
};
};
flash@1 {
compatible = "jedec,spi-nor";
reg = <1>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
concat1: partition@0 {
label = "concat1";
reg = <0x0 0x1000000>;
};
};
};
};
&pcie {
status = "okay";
ath9k: wifi@0,0 {
compatible = "pci168c,0033";
reg = <0x0000 0 0 0 0>;
qca,no-eeprom;
#gpio-cells = <2>;
gpio-controller;
};
};
&mdio0 {
status = "okay";
phy0: ethernet-phy@0 {
reg = <0>;
};
};
&eth0 {
status = "okay";
pll-data = <0x1e000000 0x08000101 0x08001313>;
phy-mode = "rgmii";
phy-handle = <&phy0>;
gmac-config {
device = <&gmac>;
rgmii-gmac0 = <1>;
rxd-delay = <0>;
rxdv-delay = <0>;
txen-delay = <0>;
txd-delay = <0>;
};
};

View File

@ -95,7 +95,8 @@ comfast,cf-ew72)
ucidef_set_led_netdev "wan" "WAN" "$boardname:blue:wan" "eth1"
;;
comfast,cf-wr752ac-v1|\
engenius,ecb1750)
engenius,ecb1750|\
enterasys,ws-ap3705i)
ucidef_set_led_netdev "lan" "LAN" "$boardname:blue:lan" "eth0"
;;
devolo,magic-2-wifi)

View File

@ -22,6 +22,7 @@ ath79_setup_interfaces()
devolo,dvl1750x|\
dlink,dir-505|\
engenius,ecb1750|\
enterasys,ws-ap3705i|\
glinet,gl-ar300m-lite|\
netgear,ex6400|\
netgear,ex7300|\
@ -400,6 +401,9 @@ ath79_setup_macs()
ucidef_set_interface "eth0" ifname "eth0" protocol "none" macaddr "$lan_mac"
ucidef_set_interface "eth1" ifname "eth1" protocol "none" macaddr "$eth1_mac"
;;
enterasys,ws-ap3705i)
label_mac=$(mtd_get_mac_ascii u-boot-env0 ethaddr)
;;
iodata,etg3-r)
lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
wan_mac=$(macaddr_add "$lan_mac" -1)

View File

@ -43,6 +43,10 @@ case "$FIRMWARE" in
caldata_extract "art" 0x1000 0x440
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env ethaddr)
;;
enterasys,ws-ap3705i)
caldata_extract "calibrate" 0x1000 0x440
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env0 RADIOADDR1)
;;
nec,wg800hp)
caldata_extract "art" 0x1000 0x440
ath9k_patch_mac $(mtd_get_mac_text board_data 0x680)
@ -72,6 +76,10 @@ case "$FIRMWARE" in
caldata_extract "art" 0x5000 0x440
ath9k_patch_mac $(macaddr_add $(mtd_get_mac_text "mac" 0x18) 1)
;;
enterasys,ws-ap3705i)
caldata_extract "calibrate" 0x5000 0x440
ath9k_patch_mac $(mtd_get_mac_ascii u-boot-env0 RADIOADDR0)
;;
ocedo,raccoon|\
tplink,tl-wdr3500-v1|\
tplink,tl-wdr3600-v1|\

View File

@ -8,6 +8,9 @@ preinit_set_mac_address() {
avm,fritz450e)
ip link set dev eth0 address $(fritz_tffs -n maca -i $(find_mtd_part "tffs (1)"))
;;
enterasys,ws-ap3705i)
ip link set dev eth0 address $(mtd_get_mac_ascii u-boot-env0 ethaddr)
;;
siemens,ws-ap3610)
ip link set dev eth0 address $(mtd_get_mac_ascii cfg1 ethaddr)
;;

View File

@ -630,6 +630,14 @@ define Device/engenius_ews511ap
endef
TARGET_DEVICES += engenius_ews511ap
define Device/enterasys_ws-ap3705i
SOC := ar9344
DEVICE_VENDOR := Enterasys
DEVICE_MODEL := WS-AP3705i
IMAGE_SIZE := 30528k
endef
TARGET_DEVICES += enterasys_ws-ap3705i
define Device/etactica_eg200
SOC := ar9331
DEVICE_VENDOR := eTactica

View File

@ -7,7 +7,10 @@
board_config_update
case "$(board_name)" in
board=$(board_name)
model="${board##*,}"
case "$board" in
actiontec,r1000h)
ucidef_set_led_usbport "usb" "USB" "R1000H:green:usb" "usb1-port1" "usb2-port1"
;;
@ -18,6 +21,12 @@ adb,a4001n1)
ucidef_set_led_netdev "lan" "LAN" "A4001N1:green:eth" "eth0"
ucidef_set_led_usbdev "usb" "USB" "A4001N1:green:3g" "1-1"
;;
adb,pdg-a4001n-a-000-1a1-ax)
ucidef_set_led_netdev "lan" "LAN" "$model:green:internet" "eth0.1"
ucidef_set_led_netdev "wan" "WAN" "$model:green:adsl" "eth0.2"
ucidef_set_led_netdev "wlan0" "WIFI" "$model:green:wifi" "wlan0"
ucidef_set_led_usbdev "usb" "USB" "$model:green:service" "1-1"
;;
adb,av4202n)
ucidef_set_led_netdev "wlan0" "WLAN" "AV4202N:blue:wifi" "wlan0"
;;
@ -30,8 +39,9 @@ bt,home-hub-2-a)
comtrend,ar-5315u)
ucidef_set_led_usbdev "usb" "USB" "AR-5315u:green:usb" "1-1"
;;
comtrend,vr-3032u)
ucidef_set_led_usbdev "usb" "USB" "vr-3032u:green:usb" "1-1"
comtrend,vr-3032u|\
huawei,hg253s-v2)
ucidef_set_led_usbdev "usb" "USB" "$model:green:usb" "1-1"
;;
huawei,echolife-hg553)
ucidef_set_led_netdev "lan" "LAN" "HW553:blue:lan" "eth0"
@ -50,9 +60,6 @@ huawei,echolife-hg622)
huawei,echolife-hg655b)
ucidef_set_led_usbdev "usb" "USB" "HW65x:green:usb" "1-2"
;;
huawei,hg253s-v2)
ucidef_set_led_usbdev "usb" "USB" "hg253s-v2:green:usb" "1-1"
;;
inventel,livebox-1)
ucidef_set_led_netdev "lan" "LAN" "Livebox1:red:traffic" "eth0"
ucidef_set_led_netdev "wan" "WAN" "Livebox1:red:adsl" "eth1"
@ -67,9 +74,9 @@ netgear,dgnd3700-v1)
ucidef_set_led_usbdev "usb2" "USB2" "DGND3700v1_3800B:green:usb-front" "1-2"
;;
netgear,dgnd3700-v2)
ucidef_set_led_netdev "lan" "LAN" "dgnd3700-v2:green:ethernet" "eth0"
ucidef_set_led_usbdev "usb1" "USB1" "dgnd3700-v2:green:usb1" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "dgnd3700-v2:green:usb2" "1-2"
ucidef_set_led_netdev "lan" "LAN" "$model:green:ethernet" "eth0"
ucidef_set_led_usbdev "usb1" "USB1" "$model:green:usb1" "1-1"
ucidef_set_led_usbdev "usb2" "USB2" "$model:green:usb2" "1-2"
;;
netgear,evg2000)
ucidef_set_led_netdev "lan" "LAN" "EVG2000:green:lan" "eth0"
@ -88,7 +95,7 @@ sagem,fast-2704-v2)
ucidef_set_led_usbdev "usb" "USB" "F@ST2704V2:green:usb" "1-1"
;;
sercomm,ad1018)
ucidef_set_led_netdev "wlan0" "WLAN" "ad1018:green:wifi" "wlan0"
ucidef_set_led_netdev "wlan0" "WLAN" "$model:green:wifi" "wlan0"
;;
sercomm,ad1018-nor)
ucidef_set_led_netdev "wlan0" "WLAN" "AD1018:green:wifi" "wlan0"

View File

@ -20,6 +20,7 @@ t-com,speedport-w-500v)
;;
adb,a4001n1|\
adb,a4001n|\
adb,pdg-a4001n-a-000-1a1-ax|\
adb,av4202n|\
brcm,bcm963281tan|\
brcm,bcm96328avng|\

View File

@ -14,6 +14,7 @@ case "$(board_name)" in
actiontec,r1000h|\
adb,a4001n|\
adb,a4001n1|\
adb,pdg-a4001n-a-000-1a1-ax|\
brcm,bcm96328avng|\
brcm,bcm963281tan|\
bt,voyager-2110|\

View File

@ -45,7 +45,7 @@
};
&leds {
status = "ok";
status = "okay";
brcm,serial-leds;
brcm,serial-dat-low;
brcm,serial-shift-inv;
@ -194,5 +194,5 @@
};
&uart0 {
status = "ok";
status = "okay";
};

View File

@ -0,0 +1,166 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "bcm6328.dtsi"
#include <dt-bindings/input/input.h>
/ {
model = "ADB P.DG A4001N A-000-1A1-AX";
compatible = "adb,pdg-a4001n-a-000-1a1-ax", "brcm,bcm6328";
aliases {
led-boot = &led_power_green;
led-failsafe = &led_power_green;
led-running = &led_power_green;
led-upgrade = &led_power_green;
};
chosen {
bootargs = "rootfstype=squashfs,jffs2 noinitrd console=ttyS0,115200";
stdout-path = "serial0:115200n8";
};
keys {
compatible = "gpio-keys-polled";
#address-cells = <1>;
#size-cells = <0>;
poll-interval = <20>;
reset {
label = "reset";
gpios = <&pinctrl 23 1>;
linux,code = <KEY_RESTART>;
debounce-interval = <60>;
};
wps {
label = "wifi-led";
gpios = <&pinctrl 24 1>;
linux,code = <KEY_WPS_BUTTON>;
debounce-interval = <60>;
};
};
};
&leds {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_leds>;
led@2 {
reg = <2>;
active-low;
label = "pdg-a4001n-a-000-1a1-ax:red:internet";
};
led@3 {
reg = <3>;
active-low;
label = "pdg-a4001n-a-000-1a1-ax:green:adsl";
};
led@5 {
reg = <5>;
active-low;
label = "pdg-a4001n-a-000-1a1-ax:red:adsl";
};
led@6 {
reg = <6>;
active-low;
label = "pdg-a4001n-a-000-1a1-ax:green:service";
};
led@7 {
reg = <7>;
active-low;
label = "pdg-a4001n-a-000-1a1-ax:red:service";
};
led@8 {
reg = <8>;
active-low;
label = "pdg-a4001n-a-000-1a1-ax:red:power";
};
led@9 {
reg = <9>;
active-low;
label = "pdg-a4001n-a-000-1a1-ax:green:wifi";
};
led@10 {
reg = <10>;
active-low;
label = "pdg-a4001n-a-000-1a1-ax:red:wifi";
};
led@11 {
reg = <11>;
active-low;
label = "pdg-a4001n-a-000-1a1-ax:green:internet";
};
led_power_green: led@12 {
reg = <12>;
active-low;
label = "pdg-a4001n-a-000-1a1-ax:green:power";
default-state = "on";
};
};
&hsspi {
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
spi-max-frequency = <16666667>;
spi-tx-bus-width = <2>;
spi-rx-bus-width = <2>;
reg = <0>;
#address-cells = <1>;
#size-cells = <1>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
reg = <0x000000 0x010000>;
label = "cfe";
read-only;
};
partition@10000 {
reg = <0x010000 0xfe0000>;
label = "linux";
compatible = "brcm,bcm963xx-imagetag";
};
partition@ff0000 {
reg = <0xff0000 0x010000>;
label = "nvram";
};
};
};
};
&pinctrl {
pinctrl_leds: leds {
function = "led";
pins = "gpio2", "gpio3",
"gpio5", "gpio6",
"gpio7", "gpio8",
"gpio9", "gpio10",
"gpio11", "gpio12";
};
};
&uart0 {
status = "okay";
};

View File

@ -52,7 +52,7 @@
};
&leds {
status = "ok";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_leds &pinctrl_serial_led
@ -206,5 +206,5 @@
};
&uart0 {
status = "ok";
status = "okay";
};

View File

@ -63,7 +63,7 @@
};
&leds {
status = "ok";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_leds>;
@ -129,7 +129,7 @@
};
&nflash {
status = "ok";
status = "okay";
nandcs@0 {
compatible = "brcm,nandcs";
@ -174,5 +174,5 @@
};
&uart0 {
status = "ok";
status = "okay";
};

View File

@ -143,7 +143,7 @@
};
&nflash {
status = "ok";
status = "okay";
nandcs@0 {
compatible = "brcm,nandcs";
@ -212,5 +212,5 @@
};
&uart0 {
status = "ok";
status = "okay";
};

View File

@ -220,6 +220,18 @@ define Device/adb_a4001n1
endef
TARGET_DEVICES += adb_a4001n1
define Device/adb_pdg-a4001n-a-000-1a1-ax
$(Device/bcm63xx)
DEVICE_VENDOR := ADB
DEVICE_MODEL := P.DG A4001N A-000-1A1-AX
IMAGES += sysupgrade.bin
CFE_BOARD_ID := 96328avng
CHIP_ID := 6328
FLASH_MB := 16
DEVICE_PACKAGES := $(USB2_PACKAGES) $(B43_PACKAGES)
endef
TARGET_DEVICES += adb_pdg-a4001n-a-000-1a1-ax
define Device/adb_av4202n
$(Device/bcm63xx)
DEVICE_VENDOR := ADB

View File

@ -0,0 +1,68 @@
--- a/arch/mips/bcm63xx/boards/board_bcm963xx.c
+++ b/arch/mips/bcm63xx/boards/board_bcm963xx.c
@@ -627,6 +627,49 @@ static struct board_info __initdata boar
},
};
+static struct board_info __initdata board_PDG_A4001N_A_000_1A1_AX = {
+ .name = "96328avng",
+ .expected_cpu_id = 0x6328,
+
+ .has_pci = 1,
+ .use_fallback_sprom = 1,
+ .has_ohci0 = 1,
+ .has_ehci0 = 1,
+ .num_usbh_ports = 1,
+ .has_enetsw = 1,
+
+ .enetsw = {
+ .used_ports = {
+ [0] = {
+ .used = 1,
+ .phy_id = 1,
+ .name = "Port 1",
+ },
+ [1] = {
+ .used = 1,
+ .phy_id = 2,
+ .name = "Port 2",
+ },
+ [2] = {
+ .used = 1,
+ .phy_id = 3,
+ .name = "Port 3",
+ },
+ [3] = {
+ .used = 1,
+ .phy_id = 4,
+ .name = "Port 4",
+ },
+ },
+ },
+
+ .fallback_sprom = {
+ .type = SPROM_BCM43225,
+ .pci_bus = 1,
+ .pci_dev = 0,
+ },
+};
+
static struct board_info __initdata board_A4001N1 = {
.name = "963281T_TEF",
.expected_cpu_id = 0x6328,
@@ -2849,6 +2892,7 @@ static const struct board_info __initcon
&board_AR5387un,
&board_963281TAN,
&board_A4001N,
+ &board_PDG_A4001N_A_000_1A1_AX,
&board_A4001N1,
&board_dsl_274xb_f1,
&board_FAST2704V2,
@@ -2957,6 +3001,7 @@ static struct of_device_id const bcm963x
#ifdef CONFIG_BCM63XX_CPU_6328
{ .compatible = "adb,a4001n", .data = &board_A4001N, },
{ .compatible = "adb,a4001n1", .data = &board_A4001N1, },
+ { .compatible = "adb,pdg-a4001n-a-000-1a1-ax", .data = &board_PDG_A4001N_A_000_1A1_AX, },
{ .compatible = "brcm,bcm963281tan", .data = &board_963281TAN, },
{ .compatible = "brcm,bcm96328avng", .data = &board_96328avng, },
{ .compatible = "comtrend,ar-5381u", .data = &board_AR5381u, },

View File

@ -9,14 +9,16 @@ boardonly="${board##*,}"
case "$board" in
mikrotik,routerboard-750gr3)
migrate_leds "^rb750gr3:=$boardonly:"
;;
mikrotik,routerboard-m11g)
migrate_leds "^rbm11g:=$boardonly:"
;;
mikrotik,routerboard-m33g)
migrate_leds "^rbm33g:=$boardonly:"
;;
netgear,wndr3700-v5)
migrate_leds "^wndr3700v5:=$boardonly:"
;;
esac
migrations_apply system