ath79: add more ar71xx 4.14 models support

This commit is contained in:
coolsnowwolf 2018-11-24 16:13:03 +08:00
parent 7b05c2ee4f
commit d524395b9d
28 changed files with 1479 additions and 120 deletions

View File

@ -14,6 +14,6 @@ include $(INCLUDE_DIR)/target.mk
DEFAULT_PACKAGES += \
kmod-gpio-button-hotplug swconfig \
kmod-ath9k wpad-basic uboot-envtools
kmod-ath9k uboot-envtools
$(eval $(call BuildTarget))

View File

@ -77,7 +77,8 @@ tplink,tl-wr941-v4)
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x10"
;;
tplink,tl-wr740nd-v4|\
tplink,tl-wr741nd-v4)
tplink,tl-wr741nd-v4|\
tplink,tl-wr842n-v2)
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04"
ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08"
@ -101,6 +102,13 @@ ubnt,rocket-m)
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:green:link3" "wlan0" "51" "100"
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:green:link4" "wlan0" "76" "100"
;;
ubnt,nanostation-ac)
ucidef_set_rssimon "wlan0" "200000" "1"
ucidef_set_led_rssi "rssilow" "RSSILOW" "ubnt:blue:rssi0" "wlan0" "1" "100"
ucidef_set_led_rssi "rssimediumlow" "RSSIMEDIUMLOW" "ubnt:blue:rssi1" "wlan0" "26" "100"
ucidef_set_led_rssi "rssimediumhigh" "RSSIMEDIUMHIGH" "ubnt:blue:rssi2" "wlan0" "51" "100"
ucidef_set_led_rssi "rssihigh" "RSSIHIGH" "ubnt:blue:rssi3" "wlan0" "76" "100"
;;
wd,mynet-wifi-rangeextender)
ucidef_set_led_netdev "lan" "LAN" "$boardname:green:lan" "eth0"
ucidef_set_rssimon "wlan0" "200000" "1"

View File

@ -14,12 +14,16 @@ ath79_setup_interfaces()
ocedo,raccoon|\
pcs,cap324|\
pisen,wmm003n|\
pqi,air-pen|\
tplink,re450-v2|\
tplink,tl-mr10u|\
tplink,tl-mr3020-v1|\
tplink,tl-mr3040-v2|\
tplink,tl-wa901nd-v2|\
tplink,tl-wr703n|\
ubnt,bullet-m|\
ubnt,lap-120|\
ubnt,nanostation-ac-loco|\
ubnt,rocket-m|\
ubnt,unifiac-lite|\
ubnt,unifiac-mesh|\
@ -27,11 +31,12 @@ ath79_setup_interfaces()
wd,mynet-wifi-rangeextender)
ucidef_set_interface_lan "eth0"
;;
buffalo,wzr-hp-ag300h)
ucidef_set_interface_wan "eth1"
avm,fritz4020)
ucidef_set_interface_wan "eth0"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
"0@eth1" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2"
;;
buffalo,bhr-4grv|\
buffalo,wzr-hp-g450h)
ucidef_add_switch "switch0" \
"0@eth0" "2:lan" "3:lan" "4:lan" "5:lan" "1:wan"
@ -40,6 +45,15 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth1" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "6@eth0"
;;
buffalo,wzr-hp-ag300h)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
;;
buffalo,wzr-hp-g302h-a1a0)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan:1" "3:lan:4" "4:lan:3" "5:lan:2" "2:wan"
;;
dlink,dir-825-b1)
ucidef_set_interface_wan "eth1"
ucidef_add_switch "switch0" \
@ -56,7 +70,6 @@ ath79_setup_interfaces()
etactica,eg200)
ucidef_set_interface_lan "eth0" "dhcp"
;;
avm,fritz4020|\
glinet,ar150|\
glinet,ar300m)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
@ -148,6 +161,11 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1"
;;
tplink,tl-wr842n-v2)
ucidef_set_interface_wan "eth0"
ucidef_add_switch "switch0" \
"0@eth1" "1:lan:4" "2:lan:1" "3:lan:2" "4:lan:3"
;;
tplink,tl-wr941-v2)
ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
;;
@ -159,6 +177,7 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth1" "2:lan:3" "3:lan:2" "4:lan:1"
;;
ubnt,nanostation-ac|\
ubnt,unifiac-mesh-pro|\
ubnt,unifiac-pro)
ucidef_add_switch "switch0" \

View File

@ -0,0 +1,20 @@
#!/bin/sh
#
# Copyright (C) 2018 OpenWrt.org
#
. /lib/functions/uci-defaults.sh
board_config_update
board=$(board_name)
case "$board" in
ubnt,nanostation-ac)
ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "3"
;;
esac
board_config_flush
exit 0

View File

@ -116,10 +116,14 @@ case "$FIRMWARE" in
ath9k_eeprom_extract_reverse "urloader" 5441 1088
;;
buffalo,whr-g301n|\
buffalo,wzr-hp-g302h-a1a0|\
tplink,tl-wr841-v5|\
tplink,tl-wr941-v4)
ath9k_eeprom_extract "art" 4096 3768
;;
buffalo,wzr-hp-g450h)
ath9k_eeprom_extract "ART" 4096 1088
;;
ocedo,raccoon|\
tplink,tl-wdr3600|\
tplink,tl-wdr4300|\
@ -142,6 +146,9 @@ case "$FIRMWARE" in
ubnt,rocket-m)
ath9k_eeprom_extract "art" 4096 4096
;;
pqi,air-pen)
ath9k_eeprom_extract "art" 4096 2002
;;
ubnt,unifi)
ath9k_eeprom_extract "art" 4096 2048
;;

View File

@ -111,6 +111,9 @@ case "$FIRMWARE" in
ubnt,unifiac-lite|\
ubnt,unifiac-mesh|\
ubnt,unifiac-mesh-pro|\
ubnt,lap-120|\
ubnt,nanostation-ac|\
ubnt,nanostation-ac-loco|\
ubnt,unifiac-pro)
ath10kcal_extract "EEPROM" 20480 2116
;;

View File

@ -0,0 +1,17 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
/dts-v1/;
#include "ar7242_buffalo_wzr-bhr.dtsi"
/ {
compatible = "buffalo,bhr-4grv", "qca,ar7242";
model = "Buffalo BHR-4GRV";
};
&eth0 {
mtd-mac-address = <&ART 0x0>;
};
&sec_vpn {
label = "buffalo:orange:vpn";
};

View File

@ -0,0 +1,172 @@
// 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 "ar7242.dtsi"
/ {
aliases {
led-boot = &diag;
led-failsafe = &diag;
led-upgrade = &diag;
};
extosc: ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <40000000>;
};
keys: keys {
compatible = "gpio-keys-polled";
poll-interval = <20>;
usb {
label = "usb";
linux,code = <BTN_2>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
sec_vpn: sec_vpn {
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
default-state = "off";
};
diag: diag {
label = "buffalo:red:diag";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "off";
};
usb {
label = "buffalo:green:usb";
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
default-state = "off";
trigger-sources = <&hub_port>;
linux,default-trigger = "usbport";
};
};
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
gpio_usb_power {
gpio-export,name = "buffalo:usb-power";
gpio-export,output = <1>;
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
};
};
virtual_flash {
compatible = "mtd-concat";
devices = <&flash0 &flash1>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
reg = <0x0 0x40000>;
label = "u-boot";
read-only;
};
partition@40000 {
reg = <0x40000 0x10000>;
label = "u-boot-env";
};
ART: partition@50000 {
reg = <0x50000 0x10000>;
label = "ART";
read-only;
};
partition@60000 {
reg = <0x60000 0x1f80000>;
label = "firmware";
};
partition@1fe0000 {
reg = <0x1fe0000 0x20000>;
label = "user_property";
read-only;
};
};
};
};
&spi {
status = "okay";
cs-gpios = <0>, <0>;
num-cs = <2>;
flash0: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
};
flash1: flash@1 {
compatible = "jedec,spi-nor";
reg = <1>;
spi-max-frequency = <25000000>;
};
};
&mdio0 {
status = "okay";
phy-mask = <0x1>;
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
};
&eth0 {
status = "okay";
phy-mode = "rgmii";
phy-handle = <&phy0>;
};
&pll {
clocks = <&extosc>;
};
&uart {
status = "okay";
};
&usb_phy {
status = "okay";
};
&usb {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
hub_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};

View File

@ -0,0 +1,245 @@
// 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 "ar7242.dtsi"
/ {
compatible = "buffalo,wzr-hp-g302h-a1a0", "qca,ar7242";
model = "Buffalo WZR-HP-G302H A1A0";
aliases {
led-boot = &diag;
led-failsafe = &diag;
led-upgrade = &diag;
};
extosc: ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <40000000>;
};
keys {
compatible = "gpio-keys-polled";
poll-interval = <20>;
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
button_usb {
label = "usb";
linux,code = <BTN_2>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
router_on {
label = "router_on";
linux,code = <BTN_5>;
linux,input-type = <EV_SW>;
gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;
debounce-interval = <60>;
};
movie_engine {
label = "movie_engine";
linux,code = <BTN_3>;
linux,input-type = <EV_SW>;
gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
debounce-interval = <60>;
};
wps {
label = "wps";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
diag: diag {
label = "buffalo:red:diag";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
default-state = "off";
};
};
ath9k-leds {
compatible = "gpio-leds";
usb {
label = "buffalo:blue:usb";
gpios = <&ath9k 4 GPIO_ACTIVE_LOW>;
default-state = "off";
trigger-sources = <&hub_port>;
linux,default-trigger = "usbport";
};
wireless {
label = "buffalo:green:wireless";
gpios = <&ath9k 5 GPIO_ACTIVE_LOW>;
default-state = "off";
linux,default-trigger = "phy0tpt";
};
security {
label = "buffalo:orange:security";
gpios = <&ath9k 6 GPIO_ACTIVE_LOW>;
default-state = "off";
};
router {
label = "buffalo:green:router";
gpios = <&ath9k 7 GPIO_ACTIVE_LOW>;
default-state = "off";
};
movie_engine_on {
label = "buffalo:blue:movie_engine_on";
gpios = <&ath9k 8 GPIO_ACTIVE_LOW>;
default-state = "off";
};
movie_engine_off {
label = "buffalo:blue:movie_engine_off";
gpios = <&ath9k 9 GPIO_ACTIVE_LOW>;
default-state = "off";
};
};
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
gpio_usb_power {
gpio-export,name = "buffalo:usb-power";
gpio-export,output = <1>;
gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
};
};
virtual_flash {
compatible = "mtd-concat";
devices = <&flash0 &flash1>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
reg = <0x0 0x40000>;
label = "u-boot";
read-only;
};
partition@40000 {
reg = <0x40000 0x10000>;
label = "u-boot-env";
};
art: partition@50000 {
reg = <0x50000 0x10000>;
label = "art";
read-only;
};
partition@60000 {
reg = <0x60000 0x1f60000>;
label = "firmware";
};
partition@1fc0000 {
reg = <0x1fc0000 0x40000>;
label = "user_property";
read-only;
};
};
};
};
&spi {
status = "okay";
cs-gpios = <0>, <0>;
num-cs = <2>;
flash0: flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
};
flash1: flash@1 {
compatible = "jedec,spi-nor";
reg = <1>;
spi-max-frequency = <25000000>;
};
};
&mdio0 {
status = "okay";
phy-mask = <0x1>;
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
};
};
&eth0 {
status = "okay";
pll-data = <0x1c000000 0x00000101 0x00001616>;
mtd-mac-address = <&art 0x120c>;
phy-mode = "rgmii";
phy-handle = <&phy0>;
};
&pcie {
status = "okay";
ath9k: wifi@0,0 {
compatible = "pci168c,002a";
reg = <0x0000 0 0 0 0>;
mtd-mac-address = <&art 0x120c>;
qca,no-eeprom;
#gpio-cells = <2>;
gpio-controller;
};
};
&pll {
clocks = <&extosc>;
};
&uart {
status = "okay";
};
&usb_phy {
status = "okay";
};
&usb {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
hub_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};

View File

@ -4,111 +4,78 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "ar7242.dtsi"
#include "ar7242_buffalo_wzr-bhr.dtsi"
/ {
compatible = "buffalo,wzr-hp-g450h", "qca,ar7242";
model = "Buffalo WZR-HP-G450H";
model = "Buffalo WZR-HP-G450H/WZR-450HP";
keys {
compatible = "gpio-keys-polled";
poll-interval = <20>;
usb {
linux,code = <BTN_2>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
reset {
linux,code = <KEY_RESTART>;
gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
movie_engine {
linux,code = <KEY_RESTART>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
debounce-interval = <60>;
};
aoss {
linux,code = <KEY_WPS_BUTTON>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
router_off {
linux,code = <BTN_5>;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
debounce-interval = <60>;
};
};
leds {
ath9k-leds {
compatible = "gpio-leds";
security {
label = "buffalo:orange:security";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
led_movie_engine {
label = "buffalo:blue:movie_engine";
gpios = <&ath9k 13 GPIO_ACTIVE_LOW>;
default-state = "off";
};
diag {
label = "buffalo:red:diag";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
router {
label = "buffalo:green:router";
gpios = <&ath9k 14 GPIO_ACTIVE_LOW>;
default-state = "off";
};
};
gpio-export {
compatible = "gpio-export";
#size-cells = <0>;
gpio_usb_power {
gpio-export,name = "wzr-hp-g450h:usb-power";
gpio-export,output = <1>;
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
wireless {
label = "buffalo:green:wireless";
gpios = <&ath9k 15 GPIO_ACTIVE_LOW>;
default-state = "off";
linux,default-trigger = "phy0tpt";
};
};
};
&mdio0 {
status = "okay";
phy-mask = <0x1>;
&keys {
movie_engine {
label = "movie_engine";
linux,code = <BTN_6>;
linux,input-type = <EV_SW>;
gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
debounce-interval = <60>;
};
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "rgmii";
aoss {
label = "aoss";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
router_off {
label = "router_off";
linux,code = <BTN_5>;
linux,input-type = <EV_SW>;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
debounce-interval = <60>;
};
};
&eth0 {
status = "okay";
phy-mode = "rgmii";
pll-data = <0x62000000 0 0>;
fixed-link {
speed = <1000>;
full-duplex;
};
mtd-mac-address = <&ART 0x1002>;
};
&uart {
status = "okay";
};
&usb_phy {
status = "okay";
};
&usb {
status = "okay";
&sec_vpn {
label = "buffalo:orange:security";
};
&pcie {
status = "okay";
wifi@0,0 {
ath9k: wifi@0,0 {
compatible = "pci168c,0030";
reg = <0x0000 0 0 0 0>;
mtd-mac-address = <&ART 0x1002>;
qca,no-eeprom;
#gpio-cells = <2>;
gpio-controller;
};
};

View File

@ -0,0 +1,131 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "ar9132.dtsi"
/ {
compatible = "tplink,tl-wa901nd-v2", "qca,ar9132";
model = "TP-Link TL-WA901ND v2";
aliases {
led-boot = &system;
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
};
extosc: ref {
compatible = "fixed-clock";
#clock-cells = <0>;
clock-frequency = <40000000>;
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
qss {
label = "qss";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
system: system {
label = "tp-link:green:system";
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
qss {
label = "tp-link:green:qss";
gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
wlan {
label = "tp-link:green:wlan";
gpios = <&gpio 9 GPIO_ACTIVE_LOW>;
default-state = "off";
linux,default-trigger = "phy0tpt";
};
};
};
&uart {
status = "okay";
};
&pll {
clocks = <&extosc>;
};
&spi {
status = "okay";
num-cs = <1>;
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
uboot: partition@0 {
label = "u-boot";
reg = <0x000000 0x020000>;
read-only;
};
partition@1 {
label = "firmware";
reg = <0x020000 0x3D0000>;
};
art: partition@2 {
label = "art";
reg = <0x3F0000 0x010000>;
read-only;
};
};
};
};
&mdio0 {
status = "okay";
phy0: ethernet-phy@c {
reg = <0xc>;
phy-mode = "mii";
};
};
&eth0 {
status = "okay";
phy-mode = "mii";
mtd-mac-address = <&uboot 0x1fc00>;
phy-handle = <&phy0>;
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
mtd-mac-address = <&uboot 0x1fc00>;
};

View File

@ -0,0 +1,147 @@
// 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 "ar9330.dtsi"
/ {
model = "PQI Air-Pen";
compatible = "pqi,air-pen", "qca,ar9330";
aliases {
serial0 = &uart;
led-boot = &wlan;
led-failsafe = &wlan;
led-upgrade = &wlan;
};
leds {
compatible = "gpio-leds";
wlan: wlan {
label = "air-pen:blue:wlan";
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
default-state = "off";
linux,default-trigger = "phy0tpt";
};
wps {
label = "air-pen:blue:wps";
gpios = <&gpio 23 GPIO_ACTIVE_HIGH>;
default-state = "off";
};
};
keys {
compatible = "gpio-keys-polled";
poll-interval = <100>;
wps {
label = "wps";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
debounce-interval = <60>;
};
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
debounce-interval = <60>;
};
};
};
&uart {
status = "okay";
};
&gpio {
status = "okay";
};
&usb {
dr_mode = "host";
status = "okay";
};
&usb_phy {
status = "okay";
};
&spi {
num-cs = <1>;
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
spi-max-frequency = <104000000>;
reg = <0>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
partition@0 {
label = "u-boot";
reg = <0x000000 0x040000>;
read-only;
};
partition@40000 {
label = "u-boot-env";
reg = <0x040000 0x010000>;
};
art: partition@50000 {
label = "art";
reg = <0x050000 0x010000>;
read-only;
};
partition@60000 {
label = "NVRAM";
reg = <0x060000 0x010000>;
read-only;
};
partition@70000 {
label = "firmware";
reg = <0x070000 0x780000>;
};
partition@7f0000 {
label = "CONF";
reg = <0x7f0000 0x010000>;
read-only;
};
};
};
};
&eth0 {
status = "okay";
mtd-mac-address = <&art 0x1002>;
gmac-config {
device = <&gmac>;
switch-phy-addr-swap = <0>;
switch-phy-swap = <0>;
};
};
&eth1 {
status = "okay";
compatible = "syscon", "simple-mfd";
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
mtd-mac-address = <&art 0x2>;
};

View File

@ -0,0 +1,204 @@
// 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 "ar9341.dtsi"
/ {
model = "TP-Link TL-WR842N/ND v2";
compatible = "tplink,tl-wr842n-v2";
aliases {
serial0 = &uart;
led-boot = &system;
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
};
keys {
compatible = "gpio-keys-polled";
poll-interval = <20>;
pinctrl-names = "default";
pinctrl-0 = <&jtag_disable_pins>;
reset {
label = "Reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
rfkill {
label = "WiFi";
linux,code = <KEY_RFKILL>;
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
debounce-interval = <60>;
};
};
leds {
compatible = "gpio-leds";
system: power {
label = "tp-link:green:power";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan {
label = "tp-link:green:wlan";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
default-state = "off";
linux,default-trigger = "phy0tpt";
};
qss {
label = "tp-link:green:qss";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
default-state = "off";
};
wan {
label = "tp-link:green:wan";
gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
default-state = "off";
};
lan1 {
label = "tp-link:green:lan1";
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
default-state = "off";
};
lan2 {
label = "tp-link:green:lan2";
gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
default-state = "off";
};
lan3 {
label = "tp-link:green:lan3";
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
default-state = "off";
};
lan4 {
label = "tp-link:green:lan4";
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
default-state = "off";
};
usb {
label = "tp-link:green:usb";
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
default-state = "off";
trigger-sources = <&hub_port>;
linux,default-trigger = "usbport";
};
};
gpio-export {
compatible = "gpio-export";
gpio_usb_power {
gpio-export,name = "tp-link:power:usb";
gpio-export,output = <1>;
gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
};
};
};
&ref {
clock-frequency = <25000000>;
};
&uart {
status = "okay";
};
&gpio {
status = "okay";
};
&spi {
num-cs = <1>;
status = "okay";
flash@0 {
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <25000000>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
uboot: partition@0 {
label = "u-boot";
reg = <0x000000 0x020000>;
read-only;
};
partition@20000 {
label = "firmware";
reg = <0x020000 0x7d0000>;
};
art: partition@7f0000 {
label = "art";
reg = <0x7f0000 0x010000>;
read-only;
};
};
};
};
&usb {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
hub_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};
&usb_phy {
status = "okay";
};
&eth0 {
status = "okay";
phy-handle = <&swphy0>;
mtd-mac-address = <&uboot 0x1fc00>;
mtd-mac-address-increment = <(-1)>;
};
&eth1 {
status = "okay";
phy-handle = <&swphy4>;
mtd-mac-address = <&uboot 0x1fc00>;
phy-mode = "gmii";
pll-data = <0x06000000 0x00000101 0x00001616>;
gmac-config {
device = <&gmac>;
switch-phy-swap = <1>;
};
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
mtd-mac-address = <&uboot 0x1fc00>;
};

View File

@ -0,0 +1,43 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include <dt-bindings/input/input.h>
#include "ar9342_ubnt_wa.dtsi"
/ {
compatible = "ubnt,lap-120", "ubnt,wa";
model = "Ubiquiti LiteAP ac (LAP-120)";
};
&mdio0 {
status = "okay";
phy-mask = <4>;
phy4: ethernet-phy@4 {
phy-mode = "rgmii";
reg = <4>;
};
};
&eth0 {
status = "okay";
/* default for ar934x, except for 1000M and 10M */
pll-data = <0x06000000 0x00000101 0x00001313>;
mtd-mac-address = <&eeprom 0x0>;
phy-mode = "rgmii";
phy-handle = <&phy4>;
gmac-config {
device = <&gmac>;
rxd-delay = <3>;
rxdv-delay = <3>;
};
};
&wmac {
status = "disabled";
};

View File

@ -0,0 +1,40 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "ar9342_ubnt_wa.dtsi"
/ {
compatible = "ubnt,nanostation-ac-loco", "ubnt,wa";
model = "Ubiquiti Nanostation AC loco (WA)";
};
&mdio0 {
status = "okay";
phy-mask = <4>;
phy4: ethernet-phy@4 {
phy-mode = "rgmii";
reg = <4>;
};
};
&eth0 {
status = "okay";
/* default for ar934x, except for 1000M and 10M */
pll-data = <0x06000000 0x00000101 0x00001313>;
mtd-mac-address = <&eeprom 0x0>;
phy-mode = "rgmii";
phy-handle = <&phy4>;
gmac-config {
device = <&gmac>;
rxd-delay = <3>;
rxdv-delay = <3>;
};
};

View File

@ -0,0 +1,78 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "ar9342_ubnt_wa.dtsi"
/ {
compatible = "ubnt,nanostation-ac", "ubnt,wa";
model = "Ubiquiti Nanostation AC (WA)";
gpio-leds {
compatible = "gpio-leds";
rssi0 {
label = "ubnt:blue:rssi0";
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
rssi1 {
label = "ubnt:blue:rssi1";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
rssi2 {
label = "ubnt:blue:rssi2";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
rssi3 {
label = "ubnt:blue:rssi3";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
};
};
&mdio0 {
status = "okay";
phy-mask = <4>;
phy0: ethernet-phy@0 {
phy-mode = "rgmii";
reg = <0>;
qca,ar8327-initvals = <
0x04 0x07600000 /* PORT0 PAD MODE CTRL */
0x58 0xffb7ffb7 /* LED_CTRL2 */
0x5c 0x03ffff00 /* LED_CTRL3 */
0x7c 0x0000007e /* PORT0_STATUS */
>;
};
};
&eth0 {
status = "okay";
/* default for ar934x, except for 1000M and 10M */
pll-data = <0x06000000 0x00000101 0x00001313>;
mtd-mac-address = <&eeprom 0x0>;
phy-mode = "rgmii";
phy-handle = <&phy0>;
gmac-config {
device = <&gmac>;
rxd-delay = <2>;
rxdv-delay = <2>;
};
};
&wmac {
status = "okay";
mtd-cal-data = <&eeprom 0x1000>;
mtd-mac-address = <&eeprom 0x1002>;
};

View File

@ -0,0 +1,92 @@
// SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "ar9344.dtsi"
/ {
compatible = "ubnt,wa", "qca,ar9344";
model = "Ubiquiti Networks WA board";
keys {
compatible = "gpio-keys";
reset {
label = "Reset button";
linux,code = <KEY_RESTART>;
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
};
&ref {
clock-frequency = <40000000>;
};
&uart {
status = "okay";
};
&gpio {
status = "okay";
};
&pcie {
status = "okay";
};
&spi {
status = "okay";
num-cs = <1>;
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";
reg = <0x000000 0x040000>;
read-only;
};
partition@40000 {
label = "u-boot-env";
reg = <0x040000 0x010000>;
read-only;
};
partition@50000 {
label = "firmware";
reg = <0x050000 0xf60000>;
};
partition@fb0000 {
label = "cfg";
reg = <0xfb0000 0x040000>;
read-only;
};
eeprom: partition@ff0000 {
label = "EEPROM";
reg = <0xff0000 0x010000>;
read-only;
};
};
};
};
&wmac {
status = "okay";
qca,disable-5ghz;
mtd-cal-data = <&eeprom 0x1000>;
mtd-mac-address = <&eeprom 0x1002>;
};

View File

@ -184,7 +184,7 @@
&eth0 {
status = "okay";
pll-data = <0x56000000 0x00000101 0x00001616>;
pll-data = <0xa6000000 0x00000101 0x00001616>;
phy-handle = <&phy0>;
};

View File

@ -1,6 +1,8 @@
BOARDNAME:=Generic
FEATURES += squashfs
DEFAULT_PACKAGES += wpad-basic
define Target/Description
Build firmware images for generic Atheros AR71xx/AR913x/AR934x based boards.
endef

View File

@ -8,8 +8,9 @@ endef
define Build/buffalo-tag
$(eval product=$(word 1,$(1)))
$(eval hwver=$(word 2,$(1)))
$(STAGING_DIR_HOST)/bin/buffalo-tag \
-c 0x80041000 -d 0x801e8000 -w 3 \
-c 0x80041000 -d 0x801e8000 -w $(hwver) \
-a ath -v 1.99 -m 1.01 -f 1 \
-b $(product) -p $(product) \
-r M_ -l mlang8 \

View File

@ -4,7 +4,7 @@ define Device/tplink_archer-c7-v1
$(Device/tplink-8mlzma)
ATH_SOC := qca9558
DEVICE_TITLE := TP-LINK Archer C7 v1
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
TPLINK_HWID := 0x75000001
endef
TARGET_DEVICES += tplink_archer-c7-v1
@ -13,7 +13,7 @@ define Device/tplink_archer-c7-v2
$(Device/tplink-16mlzma)
ATH_SOC := qca9558
DEVICE_TITLE := TP-LINK Archer C7 v2
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k ath10k-firmware-qca988x
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct
TPLINK_HWID := 0xc7000002
IMAGES := sysupgrade.bin factory.bin factory-us.bin factory-eu.bin
IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US
@ -26,7 +26,7 @@ define Device/tplink_re450-v2
ATH_SOC := qca9563
IMAGE_SIZE := 6016k
DEVICE_TITLE := TP-LINK RE450 v2
DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
TPLINK_HWID := 0x0
TPLINK_HWREV := 0
TPLINK_BOARD_ID := RE450-V2
@ -77,6 +77,16 @@ define Device/tplink_tl-wr1043nd-v1
endef
TARGET_DEVICES += tplink_tl-wr1043nd-v1
define Device/tplink_tl-wr842n-v2
$(Device/tplink-8mlzma)
ATH_SOC := ar9341
DEVICE_TITLE := TP-LINK TL-WR842N/ND v2
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
TPLINK_HWID := 0x8420002
SUPPORTED_DEVICES += tl-wr842n-v2
endef
TARGET_DEVICES += tplink_tl-wr842n-v2
define Device/tplink_tl-wr1043nd-v2
$(Device/tplink-8mlzma)
ATH_SOC := qca9558

View File

@ -1,4 +1,4 @@
DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE
DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE UBNT_VERSION
# mkubntimage is using the kernel image direct
# routerboard creates partitions out of the ubnt header
@ -10,14 +10,14 @@ define Build/mkubntimage
-o $@
endef
# all UBNT XM device expect the kernel image to have 1024k while flash, when
# all UBNT XM/WA devices expect the kernel image to have 1024k while flash, when
# booting the image, the size doesn't matter.
define Build/mkubntimage-split
-[ -f $@ ] && ( \
dd if=$@ of=$@.old1 bs=1024k count=1; \
dd if=$@ of=$@.old2 bs=1024k skip=1; \
$(STAGING_DIR_HOST)/bin/mkfwimage \
-B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v6.0.0-$(VERSION_DIST)-$(REVISION) \
-B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v$(UBNT_VERSION)-$(VERSION_DIST)-$(REVISION) \
-k $@.old1 \
-r $@.old2 \
-o $@; \
@ -27,10 +27,12 @@ endef
# UBNT_BOARD e.g. one of (XS2, XS5, RS, XM)
# UBNT_TYPE e.g. one of (BZ, XM, XW)
# UBNT_CHIP e.g. one of (ar7240, ar933x, ar934x)
# UBNT_VERSION e.g. one of (6.0.0, 8.5.0)
define Device/ubnt
DEVICE_PACKAGES := kmod-usb-core kmod-usb2
IMAGE_SIZE := 7552k
UBNT_BOARD := XM
UBNT_VERSION := 6.0.0
IMAGES += factory.bin
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | mkubntimage-split
@ -52,6 +54,15 @@ define Device/ubnt-bz
ATH_SOC := ar7241
endef
define Device/ubnt-wa
$(Device/ubnt)
UBNT_TYPE := WA
UBNT_CHIP := ar934x
UBNT_BOARD := WA
UBNT_VERSION := 8.5.0
ATH_SOC := ar9342
endef
define Device/ubnt_bullet-m
$(Device/ubnt-xm)
DEVICE_TITLE := Ubiquiti Bullet-M
@ -73,6 +84,33 @@ define Device/ubnt_nano-m
endef
TARGET_DEVICES += ubnt_nano-m
define Device/ubnt_lap-120
$(Device/ubnt-wa)
DEVICE_TITLE := Ubiquiti LiteAP ac (LAP-120)
DEVICE_PACKAGES += kmod-ath10k ath10k-firmware-qca988x
IMAGE_SIZE := 15744k
IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
endef
TARGET_DEVICES += ubnt_lap-120
define Device/ubnt_nanostation-ac
$(Device/ubnt-wa)
DEVICE_TITLE := Ubiquiti Nanostation AC
DEVICE_PACKAGES += kmod-ath10k ath10k-firmware-qca988x
IMAGE_SIZE := 15744k
IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
endef
TARGET_DEVICES += ubnt_nanostation-ac
define Device/ubnt_nanostation-ac-loco
$(Device/ubnt-wa)
DEVICE_TITLE := Ubiquiti Nanostation AC loco
DEVICE_PACKAGES += kmod-ath10k ath10k-firmware-qca988x
IMAGE_SIZE := 15744k
IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split
endef
TARGET_DEVICES += ubnt_nanostation-ac-loco
define Device/ubnt_unifi
$(Device/ubnt-bz)
DEVICE_TITLE := Ubiquiti UniFi
@ -85,7 +123,7 @@ define Device/ubnt_unifiac
IMAGE_SIZE := 7744k
IMAGES := sysupgrade.bin
IMAGE/sysupgrade.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
endef

View File

@ -69,24 +69,54 @@ define Device/avm_fritz4020
endef
TARGET_DEVICES += avm_fritz4020
define Device/buffalo_bhr-4grv
ATH_SOC := ar7242
DEVICE_TITLE := Buffalo BHR-4GRV
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
IMAGE_SIZE := 32256k
IMAGES += factory.bin tftp.bin
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc BHR-4GRV 1.99 | buffalo-tag BHR-4GRV 3
IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
SUPPORTED_DEVICES += wzr-hp-g450h
endef
TARGET_DEVICES += buffalo_bhr-4grv
define Device/buffalo_wzr-hp-ag300h
ATH_SOC := ar7161
DEVICE_TITLE := Buffalo WZR-HP-AG300H
IMAGE_SIZE := 32256k
IMAGES += factory.bin tftp.bin
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-AG300H 1.99 | buffalo-tag WZR-HP-AG300H
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-AG300H 1.99 | buffalo-tag WZR-HP-AG300H 3
IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader
SUPPORTED_DEVICES += wzr-hp-ag300h
endef
TARGET_DEVICES += buffalo_wzr-hp-ag300h
define Device/buffalo_wzr-hp-g302h-a1a0
ATH_SOC := ar7242
DEVICE_TITLE := Buffalo WZR-HP-G302H A1A0
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
IMAGE_SIZE := 32128k
IMAGES += factory.bin tftp.bin
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G302H 1.99 | buffalo-tag WZR-HP-G302H 4
IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
SUPPORTED_DEVICES += wzr-hp-g300nh2
endef
TARGET_DEVICES += buffalo_wzr-hp-g302h-a1a0
define Device/buffalo_wzr-hp-g450h
ATH_SOC := ar7242
DEVICE_TITLE := Buffalo WZR-HP-G450H
DEVICE_TITLE := Buffalo WZR-HP-G450H/WZR-450HP
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
IMAGE_SIZE := 32256k
IMAGES += factory.bin tftp.bin
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WZR-HP-G450H 1.99 | buffalo-tag WZR-HP-G450H 3
IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
SUPPORTED_DEVICES += wzr-hp-g450h
endef
TARGET_DEVICES += buffalo_wzr-hp-g450h
@ -161,7 +191,7 @@ define Device/iodata_wn-ac1167dgr
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
senao-header -r 0x30a -p 0x61 -t 2
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
endef
TARGET_DEVICES += iodata_wn-ac1167dgr
@ -173,14 +203,14 @@ define Device/iodata_wn-ac1600dgr2
IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \
append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \
senao-header -r 0x30a -p 0x60 -t 2 -v 200
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca988x
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct
endef
TARGET_DEVICES += iodata_wn-ac1600dgr2
define Device/ocedo_koala
ATH_SOC := qca9558
DEVICE_TITLE := OCEDO Koala
DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct
SUPPORTED_DEVICES += koala
IMAGE_SIZE := 7424k
IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE)
@ -198,7 +228,7 @@ TARGET_DEVICES += ocedo_raccoon
define Device/openmesh_om5p-ac-v2
ATH_SOC := qca9558
DEVICE_TITLE := OpenMesh OM5P-AC v2
DEVICE_PACKAGES := kmod-ath10k ath10k-firmware-qca988x om-watchdog
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct om-watchdog
IMAGE_SIZE := 7808k
SUPPORTED_DEVICES += om5p-acv2
endef
@ -295,7 +325,7 @@ define Device/phicomm_k2t
IMAGES := sysupgrade.bin
IMAGE/default := append-kernel | append-rootfs | pad-rootfs
IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE)
DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k ath10k-firmware-qca9888
DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct ath10k-firmware-qca9888-ct
endef
TARGET_DEVICES += phicomm_k2t

View File

@ -2,7 +2,7 @@ include ./common-tp-link.mk
define Device/tplink_tl-mr10u
$(Device/tplink-8mlzma)
$(Device/tplink-4mlzma)
ATH_SOC := ar9331
DEVICE_TITLE := TP-Link TL-MR10U
DEVICE_PACKAGES := kmod-usb-chipidea2
@ -12,7 +12,7 @@ endef
TARGET_DEVICES += tplink_tl-mr10u
define Device/tplink_tl-mr3020-v1
$(Device/tplink-8mlzma)
$(Device/tplink-4mlzma)
ATH_SOC := ar9331
DEVICE_TITLE := TP-LINK TL-MR3020 v1
DEVICE_PACKAGES := kmod-usb-core kmod-usb-chipidea2 kmod-usb-ledtrig-usbport
@ -22,7 +22,7 @@ endef
TARGET_DEVICES += tplink_tl-mr3020-v1
define Device/tplink_tl-mr3040-v2
$(Device/tplink-8mlzma)
$(Device/tplink-4mlzma)
ATH_SOC := ar9331
DEVICE_TITLE := TP-LINK TL-MR3040 v2
DEVICE_PACKAGES := kmod-usb-core kmod-usb-chipidea2 kmod-usb-ledtrig-usbport
@ -32,7 +32,7 @@ endef
TARGET_DEVICES += tplink_tl-mr3040-v2
define Device/tplink_tl-mr3220-v1
$(Device/tplink-8m)
$(Device/tplink-4m)
ATH_SOC := ar7241
DEVICE_TITLE := TP-Link TL-MR3220 v1
TPLINK_HWID := 0x32200001
@ -42,7 +42,7 @@ endef
TARGET_DEVICES += tplink_tl-mr3220-v1
define Device/tplink_tl-mr3420-v1
$(Device/tplink-8m)
$(Device/tplink-4m)
ATH_SOC := ar7241
DEVICE_TITLE := TP-Link TL-MR3420 v1
TPLINK_HWID := 0x34200001
@ -51,8 +51,16 @@ define Device/tplink_tl-mr3420-v1
endef
TARGET_DEVICES += tplink_tl-mr3420-v1
define Device/tplink_tl-wa901nd-v2
$(Device/tplink-4m)
ATH_SOC := ar9132
DEVICE_TITLE := TP-Link TL-WA901ND v2
TPLINK_HWID := 0x09010002
endef
TARGET_DEVICES += tplink_tl-wa901nd-v2
define Device/tplink_tl-wr703n
$(Device/tplink-8mlzma)
$(Device/tplink-4mlzma)
ATH_SOC := ar9331
DEVICE_TITLE := TP-Link TL-WR703N
DEVICE_PACKAGES := kmod-usb-chipidea2
@ -62,7 +70,7 @@ endef
TARGET_DEVICES += tplink_tl-wr703n
define Device/tplink_tl-wr740n-v1
$(Device/tplink-8m)
$(Device/tplink-4m)
ATH_SOC := ar7240
DEVICE_TITLE := TP-Link TL-WR740N v1/v2
TPLINK_HWID := 0x07400001
@ -70,7 +78,7 @@ endef
TARGET_DEVICES += tplink_tl-wr740n-v1
define Device/tplink_tl-wr740n-v3
$(Device/tplink-8m)
$(Device/tplink-4m)
ATH_SOC := ar7240
DEVICE_TITLE := TP-Link TL-WR740N v3
TPLINK_HWID := 0x07400003
@ -78,7 +86,7 @@ endef
TARGET_DEVICES += tplink_tl-wr740n-v3
define Device/tplink_tl-wr740nd-v4
$(Device/tplink-8mlzma)
$(Device/tplink-4mlzma)
ATH_SOC := ar9331
DEVICE_TITLE := TP-LINK TL-WR740N/ND v4
TPLINK_HWID := 0x07400004
@ -87,7 +95,7 @@ endef
TARGET_DEVICES += tplink_tl-wr740nd-v4
define Device/tplink_tl-wr741-v1
$(Device/tplink-8m)
$(Device/tplink-4m)
ATH_SOC := ar7240
DEVICE_TITLE := TP-Link TL-WR741N/ND v1/v2
TPLINK_HWID := 0x07410001
@ -95,7 +103,7 @@ endef
TARGET_DEVICES += tplink_tl-wr741-v1
define Device/tplink_tl-wr741nd-v4
$(Device/tplink-8mlzma)
$(Device/tplink-4mlzma)
ATH_SOC := ar9331
DEVICE_TITLE := TP-LINK TL-WR741N/ND v4
TPLINK_HWID := 0x07410004
@ -104,7 +112,7 @@ endef
TARGET_DEVICES += tplink_tl-wr741nd-v4
define Device/tplink_tl-wr743nd-v1
$(Device/tplink-8m)
$(Device/tplink-4m)
ATH_SOC := ar7240
DEVICE_TITLE := TP-Link TL-WR743ND v1
TPLINK_HWID := 0x07430001
@ -112,7 +120,7 @@ endef
TARGET_DEVICES += tplink_tl-wr743nd-v1
define Device/tplink_tl-wr841-v5
$(Device/tplink-8m)
$(Device/tplink-4m)
ATH_SOC := ar7240
DEVICE_TITLE := TP-Link TL-WR841N/ND v5/v6
TPLINK_HWID := 0x08410005
@ -120,7 +128,7 @@ endef
TARGET_DEVICES += tplink_tl-wr841-v5
define Device/tplink_tl-wr841-v7
$(Device/tplink-8m)
$(Device/tplink-4m)
ATH_SOC := ar7241
DEVICE_TITLE := TP-LINK TL-WR841N/ND v7
TPLINK_HWID := 0x08410007
@ -129,7 +137,7 @@ endef
TARGET_DEVICES += tplink_tl-wr841-v7
define Device/tplink_tl-wr841-v9
$(Device/tplink-8mlzma)
$(Device/tplink-4mlzma)
ATH_SOC := qca9533
DEVICE_TITLE := TP-LINK TL-WR841N/ND v9
TPLINK_HWID := 0x08410009
@ -137,7 +145,7 @@ endef
TARGET_DEVICES += tplink_tl-wr841-v9
define Device/tplink_tl-wr841-v11
$(Device/tplink-8mlzma)
$(Device/tplink-4mlzma)
ATH_SOC := qca9533
DEVICE_TITLE := TP-LINK TL-WR841N/ND v11
TPLINK_HWID := 0x08410011
@ -148,7 +156,7 @@ endef
TARGET_DEVICES += tplink_tl-wr841-v11
define Device/tplink_tl-wr941-v2
$(Device/tplink-8m)
$(Device/tplink-4m)
ATH_SOC := ar9132
DEVICE_TITLE := TP-Link TL-WR941N/ND v2/v3
TPLINK_HWID := 0x09410002
@ -157,7 +165,7 @@ endef
TARGET_DEVICES += tplink_tl-wr941-v2
define Device/tplink_tl-wr941-v4
$(Device/tplink-8m)
$(Device/tplink-4m)
ATH_SOC := ar7240
DEVICE_TITLE := TP-Link TL-WR941N/ND v4
TPLINK_HWID := 0x09410004

View File

@ -25,8 +25,17 @@ define Device/buffalo_whr-g301n
IMAGE_SIZE := 3712k
IMAGES += factory.bin tftp.bin
IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WHR-G301N 1.99 | buffalo-tag WHR-G301N
IMAGE/factory.bin := $$(IMAGE/default) | buffalo-enc WHR-G301N 1.99 | buffalo-tag WHR-G301N 3
IMAGE/tftp.bin := $$(IMAGE/default) | buffalo-tftp-header
SUPPORTED_DEVICES += whr-g301n
endef
TARGET_DEVICES += buffalo_whr-g301n
define Device/pqi_air-pen
ATH_SOC := ar9330
DEVICE_TITLE := PQI Air-Pen
DEVICE_PACKAGES := kmod-usb-core kmod-usb2
IMAGE_SIZE := 7680k
SUPPORTED_DEVICES += pqi-air-pen
endef
TARGET_DEVICES += pqi_air-pen

View File

@ -1,6 +1,8 @@
BOARDNAME := Generic devices with NAND flash
FEATURES += squashfs nand rtc
DEFAULT_PACKAGES += wpad-basic
define Target/Description
Build firmware for Atheros AR71xx/AR913x based boards with
NAND flash, e.g. Netgear WNDR4300.

View File

@ -0,0 +1,64 @@
--- a/drivers/mtd/chips/cfi_cmdset_0002.c
+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
@@ -1635,8 +1635,8 @@ static int __xipram do_write_oneword(str
break;
}
- if (chip_ready(map, adr))
- break;
+ if (chip_good(map, adr, datum))
+ goto enable_xip;
/* Latency issues. Drop the lock, wait a while and retry */
UDELAY(map, chip, adr, 1);
@@ -1652,6 +1652,8 @@ static int __xipram do_write_oneword(str
ret = -EIO;
}
+
+ enable_xip:
xip_enable(map, chip, adr);
op_done:
if (mode == FL_OTP_WRITE)
@@ -2230,7 +2232,6 @@ static int cfi_amdstd_panic_write(struct
return 0;
}
-
/*
* Handle devices with one erase region, that only implement
* the chip erase command.
@@ -2298,7 +2299,7 @@ static int __xipram do_erase_chip(struct
}
if (chip_good(map, adr, map_word_ff(map)))
- break;
+ goto op_done;
if (time_after(jiffies, timeo)) {
printk(KERN_WARNING "MTD %s(): software timeout\n",
@@ -2322,6 +2323,7 @@ static int __xipram do_erase_chip(struct
}
}
+ op_done:
chip->state = FL_READY;
xip_enable(map, chip, adr);
DISABLE_VPP(map);
@@ -2395,7 +2397,7 @@ static int __xipram do_erase_oneblock(st
if (chip_good(map, adr, map_word_ff(map))) {
xip_enable(map, chip, adr);
- break;
+ goto op_done;
}
if (time_after(jiffies, timeo)) {
@@ -2421,6 +2423,7 @@ static int __xipram do_erase_oneblock(st
}
}
+ op_done:
chip->state = FL_READY;
DISABLE_VPP(map);
put_chip(map, chip, adr);

View File

@ -1,6 +1,8 @@
BOARDNAME:=Devices with small flash
FEATURES += squashfs small_flash
DEFAULT_PACKAGES += wpad-mini
define Target/Description
Build firmware images for Atheros AR71xx/AR913x/AR934x based boards with small flash
endef