From 7a6e910f3dafdfd0b731953bfcda4037c920410d Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Wed, 13 Feb 2019 18:38:22 +0800 Subject: [PATCH] ath79: add support for qca9563 soc --- target/linux/ar71xx/generic/target.mk | 2 +- .../ath79/base-files/etc/board.d/01_leds | 16 +- .../ath79/base-files/etc/board.d/02_network | 38 ++- .../etc/hotplug.d/firmware/11-ath10k-caldata | 10 +- .../dts/ar7161_buffalo_wzr-hp-ag300h.dts | 2 +- .../ath79/dts/ar7161_netgear_wndr3700.dtsi | 2 +- .../ath79/dts/ar7161_ubnt_routerstation.dtsi | 4 +- .../ath79/dts/ar7240_buffalo_whr-g301n.dts | 2 +- .../ath79/dts/ar7240_netgear_wnr612-v2.dtsi | 4 +- .../ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi | 2 +- target/linux/ath79/dts/ar7241_tplink.dtsi | 2 +- .../linux/ath79/dts/ar7242_avm_fritz300e.dts | 2 +- .../ath79/dts/ar7242_tplink_tl-wr2543-v1.dts | 2 +- .../linux/ath79/dts/ar9331_pisen_wmm003n.dts | 4 +- .../dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi | 4 +- .../dts/ar9331_tplink_tl-wr741nd-v4.dtsi | 4 +- .../ath79/dts/ar9342_ubnt_nanostation-ac.dts | 2 +- target/linux/ath79/dts/ar9342_ubnt_xw.dtsi | 2 +- .../ath79/dts/qca9531_glinet_gl-ar300m.dtsi | 16 +- .../ath79/dts/qca9557_buffalo_bhr-4grv2.dts | 4 +- .../ath79/dts/qca9558_devolo_dvl1200i.dts | 51 ++++ .../ath79/dts/qca9558_devolo_dvl1750e.dts | 83 ++++++ .../ath79/dts/qca9558_devolo_dvl1750i.dts | 51 ++++ .../ath79/dts/qca9561_xiaomi_mi-router-4q.dts | 153 ++++++++++ .../ath79/dts/qca9563_tplink_archer-c2-v3.dts | 185 ++++++++++++ .../ath79/dts/qca9563_tplink_archer-c7-v4.dts | 271 ++++++++++++++++++ .../ethernet/atheros/ag71xx/ag71xx_ar7240.c | 4 + .../net/ethernet/atheros/ag71xx/ag71xx_main.c | 9 + target/linux/ath79/image/generic-tp-link.mk | 22 ++ target/linux/ath79/image/generic.mk | 31 ++ 30 files changed, 928 insertions(+), 56 deletions(-) create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts create mode 100644 target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts create mode 100644 target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts create mode 100644 target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts create mode 100644 target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts diff --git a/target/linux/ar71xx/generic/target.mk b/target/linux/ar71xx/generic/target.mk index 64eb205e4..c0e6069f0 100644 --- a/target/linux/ar71xx/generic/target.mk +++ b/target/linux/ar71xx/generic/target.mk @@ -1,5 +1,5 @@ BOARDNAME:=Generic -FEATURES += squashfs +FEATURES += squashfs small_flash define Target/Description Build firmware images for generic Atheros AR71xx/AR913x/AR934x based boards. diff --git a/target/linux/ath79/base-files/etc/board.d/01_leds b/target/linux/ath79/base-files/etc/board.d/01_leds index c5ea726ce..2f65a8948 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -74,6 +74,7 @@ pcs,cr3000) ucidef_set_led_switch "lan4" "LAN4" "pcs:blue:lan4" "switch0" "0x02" ;; tplink,archer-a7-v5|\ +tplink,archer-c7-v4|\ tplink,archer-c7-v5) ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x02" ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x04" @@ -81,6 +82,14 @@ tplink,archer-c7-v5) ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x10" ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x20" ;; +tplink,archer-c2-v3|\ +tplink,tl-wr1043nd-v4) + ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20" + ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10" + ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08" + ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04" + ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02" + ;; tplink,archer-c58-v1|\ tplink,archer-c59-v1) ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x1E" @@ -98,13 +107,6 @@ tplink,tl-mr3020-v1|\ tplink,tl-mr3040-v2) ucidef_set_led_netdev "lan" "LAN" "tp-link:green:lan" "eth0" ;; -tplink,tl-wr1043nd-v4) - ucidef_set_led_switch "wan" "WAN" "tp-link:green:wan" "switch0" "0x20" - ucidef_set_led_switch "lan1" "LAN1" "tp-link:green:lan1" "switch0" "0x10" - ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08" - ucidef_set_led_switch "lan3" "LAN3" "tp-link:green:lan3" "switch0" "0x04" - ucidef_set_led_switch "lan4" "LAN4" "tp-link:green:lan4" "switch0" "0x02" - ;; tplink,tl-wr740n-v1|\ tplink,tl-wr740n-v3|\ tplink,tl-wr741-v1|\ diff --git a/target/linux/ath79/base-files/etc/board.d/02_network b/target/linux/ath79/base-files/etc/board.d/02_network index 97d139010..6bcb7f995 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -10,7 +10,9 @@ ath79_setup_interfaces() case "$board" in avm,fritz300e|\ + devolo,dvl1200i|\ devolo,dvl1750c|\ + devolo,dvl1750i|\ ocedo,koala|\ ocedo,raccoon|\ pcs,cap324|\ @@ -60,7 +62,8 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "1:lan:1" "3:lan:4" "4:lan:3" "5:lan:2" "2:wan" ;; - devolo,dvl1200e) + devolo,dvl1200e|\ + devolo,dvl1750e) ucidef_set_interface_lan "eth0 eth1" ;; dlink,dir-825-b1) @@ -70,13 +73,11 @@ ath79_setup_interfaces() ;; dlink,dir-825-c1|\ dlink,dir-835-a1|\ - iodata,etg3-r|\ - iodata,wn-ac1167dgr|\ - iodata,wn-ac1600dgr2|\ - iodata,wn-ag300dgr|\ - pcs,cr5000) + dlink,dir-859-a1|\ + tplink,archer-c2-v3|\ + tplink,tl-wr1043nd-v4) ucidef_add_switch "switch0" \ - "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" + "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" ;; elecom,wrc-1750ghbk2-i|\ elecom,wrc-300ghbk2-i) @@ -106,6 +107,14 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "2:lan:2" "3:lan:1" "1:wan" ;; + iodata,etg3-r|\ + iodata,wn-ac1167dgr|\ + iodata,wn-ac1600dgr2|\ + iodata,wn-ag300dgr|\ + pcs,cr5000) + ucidef_add_switch "switch0" \ + "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" + ;; nec,wg800hp) ucidef_add_switch "switch0" \ "0@eth0" "2:lan" "3:lan" "4:lan" "1:wan" @@ -155,6 +164,7 @@ ath79_setup_interfaces() ;; tplink,archer-a7-v5|\ tplink,archer-c6-v2|\ + tplink,archer-c7-v4|\ tplink,archer-c7-v5|\ tplink,tl-wdr3600|\ tplink,tl-wdr4300) @@ -170,11 +180,6 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "6@eth0" ;; - dlink,dir-859-a1|\ - tplink,tl-wr1043nd-v4) - ucidef_add_switch "switch0" \ - "0@eth0" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" - ;; tplink,tl-wr2543-v1) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "9@eth0" @@ -211,6 +216,11 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth0" "2:lan" "3:wan" ;; + xiaomi,mi-router-4q) + ucidef_set_interface_wan "eth0" + ucidef_add_switch "switch0" \ + "0@eth1" "3:lan:1" "4:lan:2" + ;; *) ucidef_set_interfaces_lan_wan "eth0" "eth1" ;; @@ -279,6 +289,10 @@ ath79_setup_macs() wan_mac=$(mtd_get_mac_binary factory 0) lan_mac=$(macaddr_setbit_la "$wan_mac") ;; + tplink,archer-c7-v4) + base_mac=$(mtd_get_mac_binary config 8) + wan_mac=$(macaddr_add "$base_mac" 1) + ;; tplink,tl-wr1043nd-v4) base_mac=$(mtd_get_mac_binary product-info 8) wan_mac=$(macaddr_add "$base_mac" 1) diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata index faee78197..f4741fa3e 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/11-ath10k-caldata @@ -88,7 +88,10 @@ case "$FIRMWARE" in "ath10k/cal-pci-0000:00:00.0.bin") case $board in devolo,dvl1200e|\ - devolo,dvl1750c) + devolo,dvl1200i|\ + devolo,dvl1750c|\ + devolo,dvl1750e|\ + devolo,dvl1750i) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac_crc $(macaddr_add $(mtd_get_mac_binary art 0) -1) ;; @@ -123,11 +126,16 @@ case "$FIRMWARE" in ath10kcal_extract "ART" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) ;; + tplink,archer-c2-v3) + ath10kcal_extract "ART" 20480 2116 + ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1) + ;; tplink,archer-c7-v2) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1) ;; tplink,archer-a7-v5|\ + tplink,archer-c7-v4|\ tplink,archer-c7-v5) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) -1) diff --git a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts index fecdf73a8..df22eb8dc 100644 --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts @@ -80,7 +80,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi index c8ee985f3..b1c4d87bc 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi +++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi @@ -80,7 +80,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; diff --git a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi index 97e209980..6e4361f10 100644 --- a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi +++ b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi @@ -25,7 +25,7 @@ clock-frequency = <40000000>; }; - gpio-leds { + leds { compatible = "gpio-leds"; rf: rf_green { @@ -34,7 +34,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts index 31053e39b..042219b23 100644 --- a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts +++ b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts @@ -16,7 +16,7 @@ led-upgrade = &diag; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi index 02d18f9f4..8e934429a 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi +++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi @@ -14,7 +14,7 @@ led-upgrade = &power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -26,7 +26,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; power: power { label = "netgear:green:power"; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi b/target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi index cf63fe316..b7db74d93 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi @@ -13,7 +13,7 @@ led-upgrade = &led_system; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ath79/dts/ar7241_tplink.dtsi b/target/linux/ath79/dts/ar7241_tplink.dtsi index d646c312f..fa6ba7192 100644 --- a/target/linux/ath79/dts/ar7241_tplink.dtsi +++ b/target/linux/ath79/dts/ar7241_tplink.dtsi @@ -13,7 +13,7 @@ led-upgrade = &led_system; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ath79/dts/ar7242_avm_fritz300e.dts b/target/linux/ath79/dts/ar7242_avm_fritz300e.dts index fb6b0ff30..3621714d9 100644 --- a/target/linux/ath79/dts/ar7242_avm_fritz300e.dts +++ b/target/linux/ath79/dts/ar7242_avm_fritz300e.dts @@ -17,7 +17,7 @@ led-upgrade = &power; }; - gpio-keys { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts index 337785041..9a135df1a 100644 --- a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts +++ b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts @@ -27,7 +27,7 @@ clock-frequency = <40000000>; }; - gpio-keys { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts b/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts index 3573665b3..b3bc2e4c4 100644 --- a/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts +++ b/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts @@ -18,7 +18,7 @@ led-upgrade = &led_system; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -30,7 +30,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi index d7b23f988..ffd3d71a6 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi @@ -15,7 +15,7 @@ led-upgrade = &system; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -27,7 +27,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; system: system { diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi index 5b8ce9eb2..02c647c17 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi @@ -18,7 +18,7 @@ led-upgrade = &system; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -37,7 +37,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; pinctrl-names = "default"; pinctrl-0 = <&switch_led_pins>; diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts index 29b6fdab5..2ace37ad6 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts @@ -10,7 +10,7 @@ compatible = "ubnt,nanostation-ac","ubnt,wa", "qca,ar9342"; model = "Ubiquiti Nanostation AC (WA)"; - gpio-leds { + leds { compatible = "gpio-leds"; rssi0 { diff --git a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi index 01ea7c9eb..84fc22215 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi @@ -16,7 +16,7 @@ led-failsafe = &system; }; - gpio-leds { + leds { compatible = "gpio-leds"; link1 { diff --git a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi index 2a0c4385c..fe986bdde 100644 --- a/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi +++ b/target/linux/ath79/dts/qca9531_glinet_gl-ar300m.dtsi @@ -41,13 +41,6 @@ leds { compatible = "gpio-leds"; - usb { - label = "gl-ar300m:green:usb"; - gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - trigger-sources = <&hub_port>; - linux,default-trigger = "usbport"; - }; - wlan { label = "gl-ar300m:green:wlan"; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; @@ -60,8 +53,8 @@ }; led_status: status { - label = "gl-ar300m:green:status"; - gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + label = "gl-ar300m:red:status"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; }; }; }; @@ -78,11 +71,6 @@ #address-cells = <1>; #size-cells = <0>; status = "okay"; - - hub_port: port@1 { - reg = <1>; - #trigger-source-cells = <0>; - }; }; &usb_phy { diff --git a/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts b/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts index 26d969b59..995ecb3b7 100644 --- a/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts +++ b/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts @@ -21,7 +21,7 @@ bootargs = "console=ttyS0,115200n8"; }; - gpio-leds { + leds { compatible = "gpio-leds"; power: power { @@ -46,7 +46,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts new file mode 100644 index 000000000..5900d8b48 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1200i.dts @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_devolo_dvl1xxx.dtsi" + +/ { + compatible = "devolo,dvl1200i", "qca,qca9557"; + model = "devolo WiFi pro 1200i"; + + aliases { + led-boot = &status_blue; + led-failsafe = &status_red; + led-running = &status_blue; + led-upgrade = &status_red; + }; + + leds { + compatible = "gpio-leds"; + + status_blue: status_blue { + label = "dvl1200i:blue:status"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + status_red: status_red { + label = "dvl1200i:red:status"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + }; + + beeper { + compatible = "gpio-beeper"; + gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; + }; +}; + +ð0 { + pll-data = <0xbe000000 0x80000101 0x80001313>; +}; + +&gmac_config { + rxdv-delay = <3>; + rxd-delay = <3>; + txen-delay = <3>; + txd-delay = <3>; + rgmii-enabled = <1>; +}; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts new file mode 100644 index 000000000..2570eb7ce --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750e.dts @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_devolo_dvl1xxx.dtsi" + +/ { + compatible = "devolo,dvl1750e", "qca,qca9557"; + model = "devolo WiFi pro 1750e"; + + aliases { + led-boot = &status_blue; + led-failsafe = &status_red; + led-running = &status_blue; + led-upgrade = &status_red; + }; + + keys { + wps { + label = "WPS Button"; + linux,code = ; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + usb_eject { + label = "USB Eject Button"; + linux,code = ; + linux,input-type = ; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + status_blue: status_blue { + label = "dvl1750e:blue:status"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + status_red: status_red { + label = "dvl1750e:red:status"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + }; + + beeper { + compatible = "gpio-beeper"; + gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; + }; + + + gpio_export { + compatible = "gpio-export"; + + gpio_usb_power { + gpio-export,name = "devolo:power:usb"; + gpio-export,output = <1>; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&usb_phy0 { + status = "okay"; +}; + +&usb0 { + status = "okay"; +}; + +&mdio1 { + status = "okay"; +}; + +ð1 { + status = "okay"; +}; diff --git a/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts b/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts new file mode 100644 index 000000000..bd3702eb3 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_devolo_dvl1750i.dts @@ -0,0 +1,51 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9558_devolo_dvl1xxx.dtsi" + +/ { + compatible = "devolo,dvl1750i", "qca,qca9557"; + model = "devolo WiFi pro 1750i"; + + aliases { + led-boot = &status_blue; + led-failsafe = &status_red; + led-running = &status_blue; + led-upgrade = &status_red; + }; + + leds { + compatible = "gpio-leds"; + + status_blue: status_blue { + label = "dvl1750i:blue:status"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + status_red: status_red { + label = "dvl1750i:red:status"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + }; + + beeper { + compatible = "gpio-beeper"; + gpios = <&gpio 4 GPIO_ACTIVE_HIGH>; + }; +}; + +ð0 { + pll-data = <0xbe000000 0x80000101 0x80001313>; +}; + +&gmac_config { + rxdv-delay = <3>; + rxd-delay = <3>; + txen-delay = <3>; + txd-delay = <3>; + rgmii-enabled = <1>; +}; diff --git a/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts b/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts new file mode 100644 index 000000000..8b8818c82 --- /dev/null +++ b/target/linux/ath79/dts/qca9561_xiaomi_mi-router-4q.dts @@ -0,0 +1,153 @@ +// SPDX-License-Identifier: GPL-2.0+ OR MIT +/dts-v1/; + +#include +#include + +#include "qca956x.dtsi" + +/ { + compatible = "xiaomi,mi-router-4q", "qca,qca9560"; + model = "Xiaomi Mi Router 4Q"; + + aliases { + led-boot = &led_yellow; + led-failsafe = &led_red; + led-running = &led_blue; + led-upgrade = &led_red; + }; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <100>; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 21 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "WPS/MI button"; + linux,code = ; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_red: led_red { + label = "mi-router-4q:red:led"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + + led_yellow: led_yellow { + label = "mi-router-4q:yellow:led"; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + }; + + led_blue: led_blue { + label = "mi-router-4q:blue:led"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&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 0x30000>; + read-only; + }; + + partition@30000 { + label = "nvram"; + reg = <0x030000 0x10000>; + read-only; + }; + + partition@40000 { + label = "boarddata"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "crash"; + reg = <0x50000 0x10000>; + read-only; + }; + + art: partition@60000 { + label = "art"; + reg = <0x60000 0x10000>; + read-only; + }; + + partition@70000 { + label = "cfg_bak"; + reg = <0x70000 0x20000>; + read-only; + }; + + partition@90000 { + label = "overlay"; + reg = <0x90000 0x170000>; + read-only; + }; + + partition@200000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x200000 0xe00000>; + }; + }; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&swphy4>; + mtd-mac-address = <&art 0x0>; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&art 0x6>; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&art 0x0>; + mtd-mac-address-increment = <1>; +}; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts new file mode 100644 index 000000000..9686290e7 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c2-v3.dts @@ -0,0 +1,185 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca956x.dtsi" + +/ { + compatible = "tplink,archer-c2-v3", "qca,qca9563"; + model = "TP-Link Archer C2 Version 3"; + + 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 = "tp-link:green:system"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + wifi2g { + label = "tp-link:green:wifi2g"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wifi5g { + label = "tp-link:green:wifi5g"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wifi_wps { + label = "tp-link:green:wps"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "tp-link:green:wan"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + wan_fail { + label = "tp-link:orange:wan"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + lan1 { + label = "tp-link:green:lan1"; + gpios = <&gpio 9 GPIO_ACTIVE_LOW>; + }; + + lan2 { + label = "tp-link:green:lan2"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + lan3 { + label = "tp-link:green:lan3"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + lan4 { + label = "tp-link:green:lan4"; + gpios = <&gpio 21 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wps { + label = "WPS button"; + linux,code = ; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; +}; + +&uart { + 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 = "factory-uboot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + label = "uboot"; + reg = <0x020000 0x10000>; + }; + + partition@30000 { + label = "firmware"; + reg = <0x030000 0x7A0000>; + compatible = "denx,uimage"; + }; + + info: partition@7e0000 { + label = "product-info"; + reg = <0x7e0000 0x010000>; + read-only; + }; + + art: partition@7f0000 { + label = "ART"; + reg = <0x7f0000 0x010000>; + read-only; + }; + }; + }; +}; + +&gpio { + status = "okay"; +}; + +&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 */ + >; + }; +}; + +&pcie { + status = "okay"; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&info 0x8>; + phy-mode = "sgmii"; + phy-handle = <&phy0>; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&info 0x8>; +}; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts new file mode 100644 index 000000000..5a25ce3f1 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_archer-c7-v4.dts @@ -0,0 +1,271 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca956x.dtsi" + +/ { + compatible = "tplink,archer-c7-v4", "qca,qca9563"; + model = "TP-Link Archer C7 v4"; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-boot = &system; + led-failsafe = &system; + led-running = &system; + led-upgrade = &system; + }; + + led_spi { + compatible = "spi-gpio"; + #address-cells = <1>; + #size-cells = <0>; + + gpio-sck = <&gpio 15 GPIO_ACTIVE_HIGH>; // 74HC595 SRCLK (Serial Clock) + gpio-mosi = <&gpio 14 GPIO_ACTIVE_HIGH>; // 74HC595 SER (Serial) + cs-gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; // 74HC595 RCLK (Register Clock) + 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>; + }; + }; + + gpio-export { + compatible = "gpio-export"; + + gpio_shift_register_oe { + gpio-export,name = "tp-link:oe:sr"; + gpio-export,output = <0>; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; // 74HC595 /OE (Output Enable) + }; + + gpio_shift_register_reset { + gpio-export,name = "tp-link:reset:sr"; + gpio-export,output = <1>; + gpios = <&gpio 21 GPIO_ACTIVE_LOW>; // 74HC595 /SRCLR (Serial Clear) + }; + }; + + leds { + compatible = "gpio-leds"; + + system: system { + label = "tp-link:green:system"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + usb1 { + label = "tp-link:green:usb1"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + trigger-sources = <&hub_port0>; + linux,default-trigger = "usbport"; + }; + + usb2 { + label = "tp-link:green:usb2"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + trigger-sources = <&hub_port1>; + linux,default-trigger = "usbport"; + }; + + wlan5g { + label = "tp-link:green:wlan5g"; + gpios = <&gpio 9 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wlan2g { + label = "tp-link:green:wlan2g"; + gpios = <&led_gpio 7 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + wan { + label = "tp-link:green:wan"; + gpios = <&led_gpio 5 GPIO_ACTIVE_LOW>; + }; + + wan_fail { + label = "tp-link:orange:wan"; + gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>; + }; + + lan1 { + label = "tp-link:green:lan1"; + gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>; + }; + + lan2 { + label = "tp-link:green:lan2"; + gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>; + }; + + lan3 { + label = "tp-link:green:lan3"; + gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>; + }; + + lan4 { + label = "tp-link:green:lan4"; + gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "tp-link:green:wps"; + gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 5 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wps { + label = "WPS button"; + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + +}; + +&pcie { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&usb_phy0 { + status = "okay"; +}; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hub_port0: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy1 { + status = "okay"; +}; + +&usb1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hub_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&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 = "factory-uboot"; + reg = <0x000000 0x020000>; + read-only; + }; + + partition@20000 { + label = "u-boot"; + reg = <0x020000 0x020000>; + read-only; + }; + + partition@40000 { + label = "firmware"; + reg = <0x040000 0xec0000>; + compatible = "denx,uimage"; + }; + + info: partition@f00000 { + label = "config"; + reg = <0xf00000 0x0f0000>; + 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 0x80080080 /* PORT0 PAD MODE CTRL */ + 0x7c 0x0000007e /* PORT0_STATUS */ + 0x94 0x00000200 /* PORT6_STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + pll-data = <0x03000101 0x00000101 0x00001919>; + + phy-mode = "sgmii"; + mtd-mac-address = <&info 0x8>; + phy-handle = <&phy0>; +}; + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&info 0x8>; +}; diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c index 173c16a53..77f7670c2 100644 --- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c +++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_ar7240.c @@ -742,6 +742,10 @@ static void ar7240sw_setup_port(struct ar7240sw *as, unsigned port, u8 portmask) portmask = ar7240sw_port_mask(as, AR7240_PORT_CPU); } + /* preserve mirror rx&tx flags */ + ctrl |= ar7240sw_reg_read(mii, AR7240_REG_PORT_CTRL(port)) & + (AR7240_PORT_CTRL_MIRROR_RX | AR7240_PORT_CTRL_MIRROR_TX); + /* allow the port to talk to all other ports, but exclude its * own ID to prevent frames from being reflected back to the * port that they came from */ diff --git a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c index 70ca0248c..d809bbee8 100644 --- a/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c +++ b/target/linux/ath79/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_main.c @@ -805,10 +805,19 @@ err: static int ag71xx_stop(struct net_device *dev) { + unsigned long flags; struct ag71xx *ag = netdev_priv(dev); netif_carrier_off(dev); phy_stop(ag->phy_dev); + + spin_lock_irqsave(&ag->lock, flags); + if (ag->link) { + ag->link = 0; + ag71xx_link_adjust(ag); + } + spin_unlock_irqrestore(&ag->lock, flags); + ag71xx_hw_disable(ag); return 0; diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index be755c7ec..420887821 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -12,6 +12,16 @@ define Device/tplink_archer-a7-v5 endef TARGET_DEVICES += tplink_archer-a7-v5 +define Device/tplink_archer-c2-v3 + $(Device/tplink-safeloader-uimage) + ATH_SOC := qca9563 + IMAGE_SIZE := 7808k + DEVICE_TITLE := TP-LINK Archer C2 v3 + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca9887-ct + TPLINK_BOARD_ID := ARCHER-C2-V3 +endef +TARGET_DEVICES += tplink_archer-c2-v3 + define Device/tplink_archer-c58-v1 $(Device/tplink-safeloader-uimage) ATH_SOC := qca9561 @@ -65,6 +75,18 @@ define Device/tplink_archer-c7-v2 endef TARGET_DEVICES += tplink_archer-c7-v2 +define Device/tplink_archer-c7-v4 + $(Device/tplink-safeloader-uimage) + ATH_SOC := qca9563 + IMAGE_SIZE := 15104k + DEVICE_TITLE := TP-LINK Archer C7 v4 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct + TPLINK_BOARD_ID := ARCHER-C7-V4 + BOARDNAME := ARCHER-C7-V4 + SUPPORTED_DEVICES += archer-c7-v4 +endef +TARGET_DEVICES += tplink_archer-c7-v4 + define Device/tplink_archer-c7-v5 $(Device/tplink-safeloader-uimage) ATH_SOC := qca9563 diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 858c1662c..94dfe3d4d 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -170,6 +170,14 @@ define Device/devolo_dvl1200e endef TARGET_DEVICES += devolo_dvl1200e +define Device/devolo_dvl1200i + ATH_SOC := qca9558 + DEVICE_TITLE := devolo WiFi pro 1200i + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct + IMAGE_SIZE := 15936k +endef +TARGET_DEVICES += devolo_dvl1200i + define Device/devolo_dvl1750c ATH_SOC := qca9558 DEVICE_TITLE := devolo WiFi pro 1750c @@ -178,6 +186,22 @@ define Device/devolo_dvl1750c endef TARGET_DEVICES += devolo_dvl1750c +define Device/devolo_dvl1750e + ATH_SOC := qca9558 + DEVICE_TITLE := devolo WiFi pro 1750e + DEVICE_PACKAGES := kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca988x-ct + IMAGE_SIZE := 15936k +endef +TARGET_DEVICES += devolo_dvl1750e + +define Device/devolo_dvl1750i + ATH_SOC := qca9558 + DEVICE_TITLE := devolo WiFi pro 1750i + DEVICE_PACKAGES := kmod-ath10k-ct ath10k-firmware-qca988x-ct + IMAGE_SIZE := 15936k +endef +TARGET_DEVICES += devolo_dvl1750i + define Device/dlink_dir-825-b1 ATH_SOC := ar7161 DEVICE_TITLE := D-LINK DIR-825 B1 @@ -504,3 +528,10 @@ define Device/winchannel_wb2000 DEVICE_PACKAGES := kmod-i2c-core kmod-i2c-gpio kmod-rtc-ds1307 kmod-usb2 kmod-usb-ledtrig-usbport endef TARGET_DEVICES += winchannel_wb2000 + +define Device/xiaomi_mi-router-4q + ATH_SOC := qca9561 + DEVICE_TITLE := Xiaomi Mi Router 4Q + IMAGE_SIZE := 14336k +endef +TARGET_DEVICES += xiaomi_mi-router-4q