ath79: add support for ROSINSON WR818 board

This commit is contained in:
coolsnowwolf 2018-11-28 18:38:01 +08:00
parent bcee90c6d4
commit ff0173989f
33 changed files with 980 additions and 37 deletions

View File

@ -6,7 +6,7 @@ BOARDNAME:=Atheros ATH79 (DTS)
CPU_TYPE:=24kc
SUBTARGETS:=generic nand tiny
FEATURES:=ramdisk source-only
FEATURES:=ramdisk
KERNEL_PATCHVER:=4.14

View File

@ -33,6 +33,9 @@ etactica,eg200)
ucidef_set_led_oneshot "modbus" "Modbus" "$boardname:red:modbus" "100" "33"
ucidef_set_led_default "etactica" "etactica" "$boardname:red:etactica" "ignore"
;;
glinet,gl-x750)
ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0"
;;
netgear,wnr612-v2|\
on,n150r)
ucidef_set_led_netdev "wan" "WAN" "netgear:green:wan" "eth0"
@ -49,6 +52,11 @@ pcs,cr3000)
ucidef_set_led_switch "lan3" "LAN3" "pcs:blue:lan3" "switch0" "0x10"
ucidef_set_led_switch "lan4" "LAN4" "pcs:blue:lan4" "switch0" "0x02"
;;
tplink,archer-c58-v1|\
tplink,archer-c59-v1)
ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x1E"
ucidef_set_led_netdev "wan" "WAN" "tp-link:green:wan" "eth0"
;;
tplink,re450-v2)
ucidef_set_led_netdev "lan_data" "LAN Data" "tp-link:green:lan_data" "eth0" "tx rx"
ucidef_set_led_netdev "lan_link" "LAN Link" "tp-link:green:lan_link" "eth0" "link"
@ -94,6 +102,7 @@ tplink,tl-wr841-v11)
ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02"
;;
ubnt,bullet-m|\
ubnt,bullet-m-xw|\
ubnt,nano-m|\
ubnt,rocket-m)
ucidef_set_rssimon "wlan0" "200000" "1"

View File

@ -22,6 +22,7 @@ ath79_setup_interfaces()
tplink,tl-wa901nd-v2|\
tplink,tl-wr703n|\
ubnt,bullet-m|\
ubnt,bullet-m-xw|\
ubnt,lap-120|\
ubnt,nanostation-ac-loco|\
ubnt,rocket-m|\
@ -31,7 +32,9 @@ ath79_setup_interfaces()
wd,mynet-wifi-rangeextender)
ucidef_set_interface_lan "eth0"
;;
avm,fritz4020)
avm,fritz4020|\
tplink,archer-c58-v1|\
tplink,archer-c59-v1)
ucidef_set_interface_wan "eth0"
ucidef_add_switch "switch0" \
"0@eth1" "1:lan:1" "2:lan:4" "3:lan:3" "4:lan:2"
@ -71,7 +74,8 @@ ath79_setup_interfaces()
ucidef_set_interface_lan "eth0" "dhcp"
;;
glinet,ar150|\
glinet,ar300m)
glinet,ar300m|\
glinet,gl-x750)
ucidef_set_interfaces_lan_wan "eth1" "eth0"
;;
iodata,etg3-r|\
@ -107,6 +111,10 @@ ath79_setup_interfaces()
ucidef_add_switch "switch0" \
"0@eth0" "3:lan:1" "5:lan:2" "4:wan"
;;
rosinson,wr818)
ucidef_add_switch "switch0" \
"0@eth0" "1:lan" "2:lan" "3:wan"
;;
tplink,archer-c7-v1|\
tplink,archer-c7-v2|\
tplink,tl-wdr4900-v2)
@ -226,6 +234,10 @@ ath79_setup_macs()
lan_mac=$(k2t_get_mac "lan_mac")
wan_mac=$(k2t_get_mac "wan_mac")
;;
rosinson,wr818)
wan_mac=$(mtd_get_mac_binary factory 0)
lan_mac=$(macaddr_setbit_la "$wan_mac")
;;
tplink,tl-wr1043nd-v4)
base_mac=$(mtd_get_mac_binary product-info 8)
wan_mac=$(macaddr_add "$base_mac" 1)

View File

@ -87,6 +87,10 @@ board=$(board_name)
case "$FIRMWARE" in
"ath10k/cal-pci-0000:00:00.0.bin")
case $board in
glinet,gl-x750)
ath10kcal_extract "art" 20480 2116
ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +1)
;;
iodata,wn-ac1167dgr|\
iodata,wn-ac1600dgr2)
ath10kcal_extract "art" 20480 2116
@ -127,6 +131,12 @@ case "$FIRMWARE" in
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
;;
tplink,archer-c58-v1|\
tplink,archer-c59-v1)
ath10kcal_extract "art" 20480 12064
ln -sf /lib/firmware/ath10k/pre-cal-pci-0000\:00\:00.0.bin \
/lib/firmware/ath10k/QCA9888/hw2.0/board.bin
;;
esac
;;
*)

View File

@ -18,6 +18,10 @@ case "$board" in
[ "$PHYNBR" -eq 1 ] && \
echo $(k2t_get_mac "lan_mac") > /sys${DEVPATH}/macaddress
;;
tplink,archer-c58-v1|\
tplink,archer-c59-v1)
echo $(macaddr_add $(mtd_get_mac_binary mac 8) $(($PHYNBR - 1)) ) > /sys${DEVPATH}/macaddress
;;
*)
;;
esac

View File

@ -22,10 +22,6 @@ platform_do_upgrade() {
local board=$(board_name)
case "$board" in
buffalo,bhr-4grv2)
PART_NAME="rootfs:kernel"
default_do_upgrade "$ARGV"
;;
ubnt,routerstation|\
ubnt,routerstation-pro)
routerstation_do_upgrade "$ARGV"

View File

@ -167,6 +167,7 @@
};
partition@60000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x0060000 0x1f90000>;
};

View File

@ -24,6 +24,7 @@
partition@70000 {
label = "firmware";
reg = <0x070000 0x780000>;
compatible = "netgear,uimage";
};
art: partition@7f0000 {

View File

@ -24,6 +24,7 @@
partition@70000 {
label = "firmware";
reg = <0x070000 0xf80000>;
compatible = "netgear,uimage";
};
art: partition@ff0000 {

View File

@ -24,6 +24,7 @@
partition@70000 {
label = "firmware";
reg = <0x070000 0xf80000>;
compatible = "netgear,uimage";
};
art: partition@ff0000 {

View File

@ -136,6 +136,7 @@
};
partition@40000 {
compatible = "denx,uimage";
reg = <0x40000 0x3a0000>;
label = "firmware";
};

View File

@ -99,6 +99,7 @@
};
partition@60000 {
compatible = "denx,uimage";
reg = <0x60000 0x1f80000>;
label = "firmware";
};

View File

@ -155,6 +155,7 @@
};
partition@60000 {
compatible = "denx,uimage";
reg = <0x60000 0x1f60000>;
label = "firmware";
};

View File

@ -72,6 +72,7 @@
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x050000 0x780000>;
};

View File

@ -0,0 +1,42 @@
// SPDX-License-Identifier: GPL-2.0
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "ar9342_ubnt_xw.dtsi"
/ {
compatible = "ubnt,bullet-m-xw", "ubnt,xw";
model = "Ubiquiti Bullet M (XW)";
};
&mdio0 {
status = "okay";
phy-mask = <4>;
phy4: ethernet-phy@4 {
phy-mode = "rgmii";
reg = <4>;
};
};
&eth0 {
status = "okay";
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>;
};
};
&eth1 {
status = "disabled";
};

View File

@ -0,0 +1,111 @@
// SPDX-License-Identifier: GPL-2.0
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "ar9344.dtsi"
/ {
compatible = "ubnt,xw", "qca,ar9342";
model = "Ubiquiti Networks XW board";
gpio-leds {
compatible = "gpio-leds";
link1 {
label = "ubnt:red:link1";
gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
};
link2 {
label = "ubnt:orange:link2";
gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
};
link3 {
label = "ubnt:green:link3";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
};
link4 {
label = "ubnt:green:link4";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
};
};
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";
};
&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 0x760000>;
};
partition@fb0000 {
label = "cfg";
reg = <0x7b0000 0x040000>;
read-only;
};
eeprom: partition@ff0000 {
label = "EEPROM";
reg = <0x7f0000 0x010000>;
read-only;
};
};
};
};
&wmac {
status = "okay";
mtd-cal-data = <&eeprom 0x1000>;
mtd-mac-address = <&eeprom 0x1002>;
};

View File

@ -105,6 +105,7 @@
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x050000 0x740000>;
};

View File

@ -0,0 +1,137 @@
// 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 "qca9533.dtsi"
/ {
compatible = "glinet,gl-x750", "qca,qca9533";
model = "GL.iNet GL-X750";
keys {
compatible = "gpio-keys-polled";
poll-interval = <20>;
pinctrl-names = "default";
pinctrl-0 = <&jtag_disable_pins>;
button0 {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
};
};
leds {
compatible = "gpio-leds";
power {
label = "gl-x750:green:power";
gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan2g {
label = "gl-x750:green:wlan2g";
gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
};
wlan5g {
label = "gl-x750:green:wlan5g";
gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
wan {
label = "gl-x750:green:wan";
gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
default-state = "off";
};
4g {
label = "gl-x750:green:4g";
gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
default-state = "off";
};
};
};
&pcie0 {
status = "okay";
};
&uart {
status = "okay";
};
&usb0 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
hub_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};
&usb_phy {
status = "okay";
};
&spi {
status = "okay";
num-cs = <0>;
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>;
};
art: partition@50000 {
label = "art";
reg = <0x050000 0x010000>;
};
partition@60000 {
label = "firmware";
reg = <0x060000 0xfa0000>;
};
};
};
};
&eth0 {
status = "okay";
mtd-mac-address = <&art 0x0>;
phy-handle = <&swphy4>;
};
&eth1 {
mtd-mac-address = <&art 0x6>;
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
mtd-mac-address = <&art 0x1002>;
};

View File

@ -93,17 +93,12 @@
partition@40000 {
label = "u-boot-env";
reg = <0x040000 0x010000>;
read-only;
};
partition@50000 {
label = "rootfs";
reg = <0x050000 0xe30000>;
};
partition@e80000 {
label = "kernel";
reg = <0xe80000 0x170000>;
compatible = "denx,uimage";
label = "firmware";
reg = <0x050000 0xfa0000>;
};
art: partition@ff0000 {

View File

@ -137,6 +137,7 @@
};
partition@40000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x040000 0xe50000>;
};

View File

@ -101,6 +101,7 @@
};
partition@50000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x050000 0x740000>;
};

View File

@ -37,10 +37,11 @@
firmware@20000 {
reg = <0x020000 0xfd0000>;
compatible = "tplink,firmware";
};
art: art@ff0000 {
reg = <0xff0000 0x010000>;
read-only;
};
};
};

View File

@ -0,0 +1,131 @@
// 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 "qca9561_tplink_archer-c5x.dtsi"
/ {
compatible = "tplink,archer-c58-v1", "qca,qca9560";
model = "TP-LINK Archer C58 v1";
aliases {
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
};
leds {
compatible = "gpio-leds";
power: power {
label = "tp-link:green:power";
gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan2g {
label = "tp-link:green:wlan2g";
gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
default-state = "off";
};
wlan5g {
label = "tp-link:green:wlan5g";
gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
default-state = "off";
};
wan_green {
label = "tp-link:green:wan";
gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
default-state = "off";
};
wan_amber {
label = "tp-link:amber:wan";
gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
default-state = "off";
};
lan {
label = "tp-link:green:lan";
gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
default-state = "off";
};
wps {
label = "tp-link:green:wps";
gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
default-state = "off";
};
};
};
&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 0x010000>;
read-only;
};
mac: partition@10000 {
label = "mac";
reg = <0x010000 0x010000>;
read-only;
};
partition@20000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x020000 0x7c0000>;
};
partition@7e0000 {
label = "tplink";
reg = <0x7e0000 0x010000>;
read-only;
};
art: partition@7f0000 {
label = "art";
reg = <0x7f0000 0x010000>;
read-only;
};
};
};
};
&eth0 {
status = "okay";
mtd-mac-address = <&mac 0x8>;
mtd-mac-address-increment = <1>;
};
&eth1 {
status = "okay";
mtd-mac-address = <&mac 0x8>;
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
mtd-mac-address = <&mac 0x8>;
};

View File

@ -0,0 +1,154 @@
// 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 "qca9561_tplink_archer-c5x.dtsi"
/ {
compatible = "tplink,archer-c59-v1", "qca,qca9560";
model = "TP-LINK Archer C59 v1";
aliases {
led-boot = &power;
led-failsafe = &power;
led-running = &power;
led-upgrade = &power;
};
leds {
compatible = "gpio-leds";
power: power {
label = "tp-link:green:power";
gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
default-state = "on";
};
wlan2g {
label = "tp-link:green:wlan2g";
gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy1tpt";
default-state = "off";
};
wlan5g {
label = "tp-link:green:wlan5g";
gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
default-state = "off";
};
wan_green {
label = "tp-link:green:wan";
gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
default-state = "off";
};
wan_amber {
label = "tp-link:amber:wan";
gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>;
default-state = "off";
};
lan {
label = "tp-link:green:lan";
gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
default-state = "off";
};
wps {
label = "tp-link:green:wps";
gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
default-state = "off";
};
usb {
label = "tp-link:green:usb";
gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>;
default-state = "off";
linux,default-trigger = "usbport";
trigger-sources = <&hub_port>;
};
};
};
&usb0 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
hub_port: port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};
&usb_phy0 {
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 0x010000>;
read-only;
};
mac: partition@10000 {
label = "mac";
reg = <0x010000 0x010000>;
read-only;
};
partition@20000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x020000 0xe30000>;
};
partition@e50000 {
label = "tplink";
reg = <0xe50000 0x1a0000>;
read-only;
};
art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
};
};
};
};
&eth0 {
status = "okay";
mtd-mac-address = <&mac 0x8>;
mtd-mac-address-increment = <1>;
};
&eth1 {
status = "okay";
mtd-mac-address = <&mac 0x8>;
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
mtd-mac-address = <&mac 0x8>;
};

View File

@ -0,0 +1,98 @@
// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include "qca956x.dtsi"
/ {
compatible = "tplink,archer-c5x", "qca,qca9560";
chosen {
bootargs = "console=ttyS0,115200n8";
};
led_spi {
compatible = "spi-gpio";
#address-cells = <1>;
#size-cells = <0>;
gpio-sck = <&gpio 18 GPIO_ACTIVE_HIGH>;
gpio-mosi = <&gpio 17 GPIO_ACTIVE_HIGH>;
cs-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
num-chipselects = <1>;
led_gpio: led_gpio@0 {
compatible = "fairchild,74hc595";
reg = <0>;
gpio-controller;
#gpio-cells = <2>;
registers-number = <1>;
spi-max-frequency = <10000000>;
};
};
keys {
compatible = "gpio-keys-polled";
poll-interval = <100>;
wps_button {
label = "WPS button";
linux,code = <KEY_WPS_BUTTON>;
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};
wifi_button {
label = "WiFi button";
linux,code = <KEY_RFKILL>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
};
reset_button {
label = "Reset button";
linux,code = <KEY_RESTART>;
gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
};
};
gpio-export {
compatible = "gpio-export";
gpio_shift_register_oe {
gpio-export,name = "tp-link:oe:sr";
gpio-export,output = <0>;
gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
};
gpio_shift_register_reset {
gpio-export,name = "tp-link:reset:sr";
gpio-export,output = <1>;
gpios = <&gpio 19 GPIO_ACTIVE_HIGH>;
};
};
};
&uart {
status = "okay";
};
&gpio {
status = "okay";
};
&pcie {
status = "okay";
};
&eth0 {
phy-mode = "mii";
phy-handle = <&swphy0>;
gmac-config {
device = <&gmac>;
switch-phy-addr-swap = <1>;
switch-phy-swap = <1>;
};
};

View File

@ -104,6 +104,7 @@
};
partition@70000 {
compatible = "denx,uimage";
label = "firmware";
reg = <0x070000 0x770000>;
};

View File

@ -0,0 +1,162 @@
// 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 "qca956x.dtsi"
/ {
model = "ROSINSON WR818";
compatible = "rosinson,wr818", "qca,qca9560";
chosen {
bootargs = "console=ttyS0,115200n8";
};
aliases {
led-boot = &system;
led-failsafe = &system;
led-running = &system;
led-upgrade = &system;
};
gpio_leds: leds {
compatible = "gpio-leds";
system: system {
label = "wr818:red:system";
gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
};
wifi_2g {
label = "wr818:red:wifi2g";
gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
linux,default-trigger = "phy0tpt";
};
};
keys {
compatible = "gpio-keys";
reset {
label = "reset";
linux,code = <KEY_RESTART>;
gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
debounce-interval = <60>;
};
};
};
&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>;
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 0xf80000>;
};
info: partition@fd0000 {
label = "factory";
reg = <0xfd0000 0x010000>;
read-only;
};
art: partition@ff0000 {
label = "art";
reg = <0xff0000 0x010000>;
read-only;
};
};
};
};
&mdio0 {
status = "okay";
phy-mask = <0>;
phy0: ethernet-phy@0 {
reg = <0>;
phy-mode = "sgmii";
qca,ar8327-initvals = <
0x04 0x00080080 /* PORT0 PAD MODE CTRL */
0x7c 0x0000007e /* PORT0_STATUS */
>;
};
};
&eth0 {
status = "okay";
mtd-mac-address = <&info 0x0>;
phy-mode = "sgmii";
phy-handle = <&phy0>;
};
&wmac {
status = "okay";
mtd-cal-data = <&art 0x1000>;
};
&usb_phy0 {
status = "okay";
};
&usb0 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@1 {
reg = <1>;
#trigger-source-cells = <0>;
};
};
&usb_phy1 {
status = "okay";
};
&usb1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@2 {
reg = <2>;
#trigger-source-cells = <0>;
};
};

View File

@ -82,6 +82,7 @@
partition@70000 {
label = "firmware";
reg = <0x070000 0x790000>;
compatible = "denx,uimage";
};
partition@800000 {

View File

@ -39,6 +39,14 @@ define Build/mktplinkfw-combined
@mv $@.new $@
endef
define Build/uImageArcher
mkimage -A $(LINUX_KARCH) \
-O linux -T kernel \
-C $(1) -a $(KERNEL_LOADADDR) -e $(if $(KERNEL_ENTRY),$(KERNEL_ENTRY),$(KERNEL_LOADADDR)) \
-n '$(call toupper,$(LINUX_KARCH)) OpenWrt Linux-$(LINUX_VERSION)' -d $@ $@.new
@mv $@.new $@
endef
define Device/tplink
TPLINK_HWREV := 0x1
TPLINK_HEADER_VERSION := 1
@ -88,3 +96,15 @@ define Device/tplink-16mlzma
TPLINK_FLASHLAYOUT := 16Mlzma
IMAGE_SIZE := 15872k
endef
define Device/tplink-safeloader
$(Device/tplink)
KERNEL := kernel-bin | append-dtb | lzma | tplink-v1-header
IMAGE/sysupgrade.bin := append-rootfs | tplink-safeloader sysupgrade | append-metadata
IMAGE/factory.bin := append-rootfs | tplink-safeloader factory
endef
define Device/tplink-safeloader-uimage
$(Device/tplink-safeloader)
KERNEL := kernel-bin | append-dtb | lzma | uImageArcher lzma
endef

View File

@ -1,5 +1,27 @@
include ./common-tp-link.mk
define Device/tplink_archer-c58-v1
$(Device/tplink-safeloader-uimage)
ATH_SOC := qca9561
IMAGE_SIZE := 7936k
DEVICE_TITLE := TP-LINK Archer C58 v1
TPLINK_BOARD_ID := ARCHER-C58-V1
DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9888-ct
SUPPORTED_DEVICES += archer-c58-v1
endef
TARGET_DEVICES += tplink_archer-c58-v1
define Device/tplink_archer-c59-v1
$(Device/tplink-safeloader-uimage)
ATH_SOC := qca9561
IMAGE_SIZE := 14528k
DEVICE_TITLE := TP-LINK Archer C59 v1
TPLINK_BOARD_ID := ARCHER-C59-V1
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca9888-ct
SUPPORTED_DEVICES += archer-c59-v1
endef
TARGET_DEVICES += tplink_archer-c59-v1
define Device/tplink_archer-c7-v1
$(Device/tplink-8mlzma)
ATH_SOC := qca9558

View File

@ -1,4 +1,9 @@
DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE UBNT_VERSION
DEVICE_VARS += UBNT_BOARD UBNT_CHIP UBNT_TYPE UBNT_VERSION UBNT_REVISION
# On M (XW) devices the U-Boot as of version 1.1.4-s1039 doesn't like
# VERSION_DIST being on the place of major(?) version number, so we need to
# use some number.
UBNT_REVISION := $(VERSION_DIST)-$(REVISION)
# mkubntimage is using the kernel image direct
# routerboard creates partitions out of the ubnt header
@ -17,7 +22,7 @@ define Build/mkubntimage-split
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).v$(UBNT_VERSION)-$(VERSION_DIST)-$(REVISION) \
-B $(UBNT_BOARD) -v $(UBNT_TYPE).$(UBNT_CHIP).v$(UBNT_VERSION)-$(UBNT_REVISION) \
-k $@.old1 \
-r $@.old2 \
-o $@; \
@ -63,6 +68,16 @@ define Device/ubnt-wa
ATH_SOC := ar9342
endef
define Device/ubnt-xw
$(Device/ubnt)
UBNT_TYPE := XW
UBNT_CHIP := ar934x
UBNT_BOARD := XM
UBNT_VERSION := 6.0.4
UBNT_REVISION := 42.$(UBNT_REVISION)
ATH_SOC := ar9342
endef
define Device/ubnt_bullet-m
$(Device/ubnt-xm)
DEVICE_TITLE := Ubiquiti Bullet-M
@ -70,6 +85,13 @@ define Device/ubnt_bullet-m
endef
TARGET_DEVICES += ubnt_bullet-m
define Device/ubnt_bullet-m-xw
$(Device/ubnt-xw)
DEVICE_TITLE := Ubiquiti Bullet-M (XW)
SUPPORTED_DEVICES += bullet-m-xw
endef
TARGET_DEVICES += ubnt_bullet-m-xw
define Device/ubnt_rocket-m
$(Device/ubnt-xm)
DEVICE_TITLE := Ubiquiti Rocket-M

View File

@ -82,6 +82,13 @@ define Device/buffalo_bhr-4grv
endef
TARGET_DEVICES += buffalo_bhr-4grv
define Device/buffalo_bhr-4grv2
ATH_SOC := qca9557
DEVICE_TITLE := Buffalo BHR-4GRV2
IMAGE_SIZE := 16000k
endef
TARGET_DEVICES += buffalo_bhr-4grv2
define Device/buffalo_wzr-hp-ag300h
ATH_SOC := ar7161
DEVICE_TITLE := Buffalo WZR-HP-AG300H
@ -176,6 +183,14 @@ define Device/glinet_ar300m_nor
endef
TARGET_DEVICES += glinet_ar300m_nor
define Device/glinet_gl-x750
ATH_SOC := qca9533
DEVICE_TITLE := GL.iNet GL-X750
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca9887
IMAGE_SIZE := 16000k
endef
TARGET_DEVICES += glinet_gl-x750
define Device/iodata_etg3-r
ATH_SOC := ar9342
DEVICE_TITLE := I-O DATA ETG3-R
@ -329,6 +344,14 @@ define Device/phicomm_k2t
endef
TARGET_DEVICES += phicomm_k2t
define Device/rosinson_wr818
ATH_SOC := qca9563
DEVICE_TITLE := ROSINSON WR818
IMAGE_SIZE := 15872k
DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport
endef
TARGET_DEVICES += rosinson_wr818
define Device/wd_mynet-wifi-rangeextender
ATH_SOC := ar9344
DEVICE_TITLE := Western Digital My Net Wi-Fi Range Extender

View File

@ -1,24 +1,5 @@
include ./common-buffalo.mk
DEVICE_VARS += ROOTFS_SIZE
define Device/buffalo_bhr-4grv2
ATH_SOC := qca9558
DEVICE_TITLE := Buffalo BHR-4GRV2
BOARDNAME := BHR-4GRV2
ROOTFS_SIZE := 14528k
KERNEL_SIZE := 1472k
IMAGE_SIZE := 16000k
IMAGES += factory.bin
IMAGE/sysupgrade.bin := \
append-rootfs | pad-rootfs | pad-to $$$$(ROOTFS_SIZE) | \
append-kernel | append-metadata | check-size $$$$(IMAGE_SIZE)
IMAGE/factory.bin := append-kernel | \
pad-to $$$$(KERNEL_SIZE) | append-rootfs | pad-rootfs | mkbuffaloimg
SUPPORTED_DEVICES += bhr-4grv2
endef
TARGET_DEVICES += buffalo_bhr-4grv2
define Device/buffalo_whr-g301n
ATH_SOC := ar7240
DEVICE_TITLE := Buffalo WHR-G301N