From 6b8ddb276b9d40a60be680319db5591a46dd464b Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Mon, 24 Dec 2018 14:06:55 +0800 Subject: [PATCH] fix k2t bootup mtd mount --- .../ath79/base-files/etc/board.d/01_leds | 7 + .../ath79/base-files/etc/board.d/02_network | 33 ++- .../base-files/etc/board.d/03_gpio_switches | 4 + target/linux/ath79/base-files/etc/diag.sh | 45 ---- .../etc/hotplug.d/firmware/10-ath9k-eeprom | 18 +- .../etc/hotplug.d/firmware/11-ath10k-caldata | 1 + .../etc/hotplug.d/ieee80211/10_fix_wifi_mac | 6 + target/linux/ath79/config-4.14 | 2 - .../ath79/dts/ar1022_iodata_wn-ag300dgr.dts | 217 +++++++++++++++++ target/linux/ath79/dts/ar7100.dtsi | 2 +- .../dts/ar7161_buffalo_wzr-hp-ag300h.dts | 8 - .../ath79/dts/ar7161_dlink_dir-825-b1.dts | 8 +- .../ath79/dts/ar7161_netgear_wndr3700.dtsi | 6 - .../ath79/dts/ar7161_ubnt_routerstation.dtsi | 3 +- .../ath79/dts/ar7240_buffalo_whr-g301n.dts | 1 - .../ath79/dts/ar7240_netgear_wnr612-v2.dts | 2 +- .../ath79/dts/ar7240_netgear_wnr612-v2.dtsi | 5 +- target/linux/ath79/dts/ar7240_on_n150r.dts | 2 +- .../ath79/dts/ar7240_tplink_tl-wr740n-v1.dts | 2 +- .../ath79/dts/ar7240_tplink_tl-wr740n-v3.dts | 2 +- .../ath79/dts/ar7240_tplink_tl-wr741-v1.dts | 2 +- .../ath79/dts/ar7240_tplink_tl-wr743nd-v1.dts | 2 +- .../ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi | 2 +- .../ath79/dts/ar7240_tplink_tl-wr841-v5.dts | 2 +- .../ath79/dts/ar7240_tplink_tl-wr941-v4.dts | 2 +- target/linux/ath79/dts/ar7241_tplink.dtsi | 1 + .../ath79/dts/ar7241_tplink_tl-mr3220-v1.dts | 1 - .../ath79/dts/ar7241_tplink_tl-mr3420-v1.dts | 1 - .../ath79/dts/ar7241_tplink_tl-mr3x20.dtsi | 1 - .../ath79/dts/ar7241_tplink_tl-wr841-v7.dts | 1 - .../ath79/dts/ar7241_tplink_tl-wr842n-v1.dts | 164 +++++++++++++ .../linux/ath79/dts/ar7241_ubnt_airrouter.dts | 38 +++ .../linux/ath79/dts/ar7241_ubnt_bullet-m.dts | 4 +- target/linux/ath79/dts/ar7241_ubnt_nano-m.dts | 4 +- .../linux/ath79/dts/ar7241_ubnt_rocket-m.dts | 4 +- target/linux/ath79/dts/ar7241_ubnt_unifi.dts | 1 + target/linux/ath79/dts/ar7241_ubnt_xm.dtsi | 29 +-- .../ath79/dts/ar7241_ubnt_xm_outdoor.dtsi | 36 +++ .../linux/ath79/dts/ar7242_avm_fritz300e.dts | 1 + .../ath79/dts/ar7242_buffalo_wzr-bhr.dtsi | 3 - .../dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts | 7 - .../ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts | 3 - .../ath79/dts/ar7242_tplink_tl-wr2543-v1.dts | 5 +- .../ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts | 3 +- .../dts/ar9132_tplink_tl-wr1043nd-v1.dts | 3 +- .../ath79/dts/ar9132_tplink_tl-wr941-v2.dts | 2 +- .../linux/ath79/dts/ar9330_glinet_ar150.dts | 4 +- target/linux/ath79/dts/ar9330_pqi_air-pen.dts | 3 +- .../dts/ar9331_dptechnics_dpt-module.dts | 1 - .../linux/ath79/dts/ar9331_dragino_ms14.dts | 4 - .../dts/ar9331_embeddedwireless_dorin.dts | 2 +- .../linux/ath79/dts/ar9331_etactica_eg200.dts | 7 +- target/linux/ath79/dts/ar9331_onion_omega.dts | 1 - .../linux/ath79/dts/ar9331_pisen_wmm003n.dts | 1 + .../ath79/dts/ar9331_tplink_tl-mr3020-v1.dts | 5 +- .../ath79/dts/ar9331_tplink_tl-mr3040-v2.dts | 4 +- .../dts/ar9331_tplink_tl-wr703n_tl-mr10u.dtsi | 1 + .../ath79/dts/ar9331_tplink_tl-wr740nd-v4.dts | 2 +- .../ath79/dts/ar9331_tplink_tl-wr741nd-v4.dts | 2 +- .../dts/ar9331_tplink_tl-wr741nd-v4.dtsi | 2 +- target/linux/ath79/dts/ar9341_pcs_cr3000.dts | 7 +- .../ath79/dts/ar9341_tplink_tl-wr842n-v2.dts | 11 +- .../linux/ath79/dts/ar9342_iodata_etg3-r.dts | 15 +- .../ath79/dts/ar9342_ubnt_bullet-m-xw.dts | 4 +- .../linux/ath79/dts/ar9342_ubnt_lap-120.dts | 2 +- .../dts/ar9342_ubnt_nanostation-ac-loco.dts | 2 +- .../ath79/dts/ar9342_ubnt_nanostation-ac.dts | 2 +- target/linux/ath79/dts/ar9342_ubnt_wa.dtsi | 3 +- target/linux/ath79/dts/ar9342_ubnt_xw.dtsi | 3 +- .../ath79/dts/ar9344_dlink_dir-825-c1.dts | 79 +++++++ .../ath79/dts/ar9344_dlink_dir-835-a1.dts | 47 ++++ .../linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi | 151 ++++++++++++ .../linux/ath79/dts/ar9344_ocedo_raccoon.dts | 2 - target/linux/ath79/dts/ar9344_pcs_cap324.dts | 12 +- target/linux/ath79/dts/ar9344_pcs_cr5000.dts | 3 +- .../ath79/dts/ar9344_tplink_tl-wdr3600.dts | 2 +- .../ath79/dts/ar9344_tplink_tl-wdr4300.dts | 2 +- .../ath79/dts/ar9344_tplink_tl-wdr4300.dtsi | 9 +- .../ath79/dts/ar9344_winchannel_wb2000.dts | 220 ++++++++++++++++++ ...and.dts => qca9531_glinet_ar300m-nand.dts} | 7 +- ..._nor.dts => qca9531_glinet_ar300m-nor.dts} | 8 +- ...ar300m.dtsi => qca9531_glinet_ar300m.dtsi} | 5 +- ...gl-x750.dts => qca9531_glinet_gl-x750.dts} | 7 +- .../ath79/dts/qca9533_tplink_tl-wr841-v11.dts | 2 - .../ath79/dts/qca9533_tplink_tl-wr841.dtsi | 10 +- .../ath79/dts/{qca9533.dtsi => qca953x.dtsi} | 2 +- target/linux/ath79/dts/qca9557.dtsi | 9 +- .../ath79/dts/qca9557_buffalo_bhr-4grv2.dts | 3 - .../ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi | 5 - .../linux/ath79/dts/qca9558_ocedo_koala.dts | 3 - .../ath79/dts/qca9558_openmesh_om5p-ac-v2.dts | 5 +- .../ath79/dts/qca9558_tplink_archer-c7-v1.dts | 2 +- .../ath79/dts/qca9558_tplink_archer-c7-v2.dts | 1 - .../ath79/dts/qca9558_tplink_archer-c7.dtsi | 4 - .../dts/qca9558_tplink_tl-wdr4900-v2.dts | 6 +- .../ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi | 4 +- .../linux/ath79/dts/qca9561_avm_fritz4020.dts | 6 +- .../dts/qca9561_tplink_archer-c58-v1.dts | 6 - .../dts/qca9561_tplink_archer-c59-v1.dts | 7 - .../dts/qca9563_elecom_wrc-300ghbk2-i.dts | 2 - .../linux/ath79/dts/qca9563_phicomm_k2t.dts | 6 +- .../ath79/dts/qca9563_rosinson_wr818.dts | 1 + .../ath79/dts/qca9563_tplink_archer-a7-v5.dts | 50 ++++ .../dts/qca9563_tplink_archer-x7-v5.dtsi | 192 +++++++++++++++ .../ath79/dts/qca9563_tplink_re450-v2.dts | 7 +- .../ath79/dts/qca9563_tplink_tl-wr1043n.dtsi | 9 +- .../dts/qca9563_tplink_tl-wr1043nd-v4.dts | 1 - .../linux/ath79/dts/qca9563_ubnt_unifiac.dtsi | 2 - target/linux/ath79/dts/qca956x.dtsi | 3 +- .../net/ethernet/atheros/ag71xx/ag71xx_main.c | 52 +++-- target/linux/ath79/image/common-tp-link.mk | 2 +- target/linux/ath79/image/generic-tp-link.mk | 23 +- target/linux/ath79/image/generic-ubnt.mk | 17 +- target/linux/ath79/image/generic.mk | 70 ++++-- target/linux/ath79/image/nand.mk | 10 +- target/linux/ath79/image/tiny-netgear.mk | 4 +- 116 files changed, 1489 insertions(+), 375 deletions(-) delete mode 100755 target/linux/ath79/base-files/etc/diag.sh create mode 100644 target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts create mode 100644 target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts create mode 100644 target/linux/ath79/dts/ar7241_ubnt_airrouter.dts create mode 100644 target/linux/ath79/dts/ar7241_ubnt_xm_outdoor.dtsi create mode 100644 target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts create mode 100644 target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts create mode 100644 target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi create mode 100644 target/linux/ath79/dts/ar9344_winchannel_wb2000.dts rename target/linux/ath79/dts/{qca9533_glinet_ar300m_nand.dts => qca9531_glinet_ar300m-nand.dts} (87%) rename target/linux/ath79/dts/{qca9533_glinet_ar300m_nor.dts => qca9531_glinet_ar300m-nor.dts} (80%) rename target/linux/ath79/dts/{qca9533_glinet_ar300m.dtsi => qca9531_glinet_ar300m.dtsi} (93%) rename target/linux/ath79/dts/{qca9533_glinet_gl-x750.dts => qca9531_glinet_gl-x750.dts} (94%) rename target/linux/ath79/dts/{qca9533.dtsi => qca953x.dtsi} (99%) create mode 100644 target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts create mode 100644 target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi 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 06fb8f479..96cc5d5c1 100755 --- a/target/linux/ath79/base-files/etc/board.d/01_leds +++ b/target/linux/ath79/base-files/etc/board.d/01_leds @@ -52,6 +52,13 @@ 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-a7-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" + ucidef_set_led_switch "lan2" "LAN2" "tp-link:green:lan2" "switch0" "0x08" + 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-c58-v1|\ tplink,archer-c59-v1) ucidef_set_led_switch "lan" "LAN" "tp-link:green:lan" "switch0" "0x1E" 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 b9d6c709e..1d6cd4e77 100755 --- a/target/linux/ath79/base-files/etc/board.d/02_network +++ b/target/linux/ath79/base-files/etc/board.d/02_network @@ -29,7 +29,8 @@ ath79_setup_interfaces() ubnt,unifiac-lite|\ ubnt,unifiac-mesh|\ ubnt,unifi|\ - wd,mynet-wifi-rangeextender) + wd,mynet-wifi-rangeextender|\ + winchannel,wb2000) ucidef_set_interface_lan "eth0" ;; avm,fritz4020|\ @@ -62,6 +63,16 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "5@eth0" ;; + dlink,dir-825-c1|\ + dlink,dir-835-a1|\ + 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" + ;; elecom,wrc-300ghbk2-i) ucidef_add_switch "switch0" \ "0@eth0" "2:lan:4" "3:lan:3" "4:lan:2" "5:lan:1" "1:wan" @@ -78,13 +89,6 @@ ath79_setup_interfaces() glinet,gl-x750) ucidef_set_interfaces_lan_wan "eth1" "eth0" ;; - iodata,etg3-r|\ - iodata,wn-ac1167dgr|\ - iodata,wn-ac1600dgr2|\ - pcs,cr5000) - ucidef_add_switch "switch0" \ - "0@eth0" "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" - ;; netgear,wndr3700|\ netgear,wndr3700v2|\ netgear,wndr3800) @@ -124,11 +128,13 @@ ath79_setup_interfaces() buffalo,whr-g301n|\ tplink,tl-mr3220-v1|\ tplink,tl-mr3420-v1|\ - tplink,tl-wr841-v7) + tplink,tl-wr841-v7|\ + ubnt,airrouter) ucidef_set_interface_wan "eth0" ucidef_add_switch "switch0" \ "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" ;; + tplink,archer-a7-v5|\ tplink,tl-wdr3600|\ tplink,tl-wdr4300) ucidef_add_switch "switch0" \ @@ -169,6 +175,7 @@ ath79_setup_interfaces() ucidef_add_switch "switch0" \ "0@eth1" "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" ;; + tplink,tl-wr842n-v1|\ tplink,tl-wr842n-v2) ucidef_set_interface_wan "eth0" ucidef_add_switch "switch0" \ @@ -213,6 +220,11 @@ ath79_setup_macs() lan_mac=$(mtd_get_mac_text "caldata" 65440) wan_mac=$(mtd_get_mac_text "caldata" 65460) ;; + dlink,dir-825-c1|\ + dlink,dir-835-a1) + lan_mac=$(mtd_get_mac_text "mac" 4) + wan_mac=$(mtd_get_mac_text "mac" 24) + ;; elecom,wrc-300ghbk2-i) wan_mac=$(macaddr_add "$(mtd_get_mac_binary ART 4098)" -2) ;; @@ -221,7 +233,8 @@ ath79_setup_macs() wan_mac=$(macaddr_add "$lan_mac" -1) ;; iodata,wn-ac1167dgr|\ - iodata,wn-ac1600dgr2) + iodata,wn-ac1600dgr2|\ + iodata,wn-ag300dgr) lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr) wan_mac=$(mtd_get_mac_ascii u-boot-env wanaddr) ;; diff --git a/target/linux/ath79/base-files/etc/board.d/03_gpio_switches b/target/linux/ath79/base-files/etc/board.d/03_gpio_switches index 4af9845b6..4f08fab52 100755 --- a/target/linux/ath79/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ath79/base-files/etc/board.d/03_gpio_switches @@ -10,6 +10,10 @@ board_config_update board=$(board_name) case "$board" in +dlink,dir-825-c1|\ +dlink,dir-835-a1) + ucidef_add_gpio_switch "wan_led_auto" "WAN LED Auto" "20" "0" + ;; ubnt,nanostation-ac) ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "3" ;; diff --git a/target/linux/ath79/base-files/etc/diag.sh b/target/linux/ath79/base-files/etc/diag.sh deleted file mode 100755 index 3ea7ac1a1..000000000 --- a/target/linux/ath79/base-files/etc/diag.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/sh - -. /lib/functions/leds.sh - -boot="$(get_dt_led boot)" -failsafe="$(get_dt_led failsafe)" -running="$(get_dt_led running)" -upgrade="$(get_dt_led upgrade)" - -set_state() { - status_led="$boot" - - case "$1" in - preinit) - status_led_blink_preinit - ;; - failsafe) - status_led_off - [ -n "$running" ] && { - status_led="$running" - status_led_off - } - status_led="$failsafe" - status_led_blink_failsafe - ;; - preinit_regular) - status_led_blink_preinit_regular - ;; - upgrade) - [ -n "$running" ] && { - status_led="$running" - status_led_off - } - status_led="$upgrade" - status_led_blink_preinit_regular - ;; - done) - status_led_off - [ -n "$running" ] && { - status_led="$running" - status_led_on - } - ;; - esac -} diff --git a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom index 020abe291..bf61ecf5d 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom +++ b/target/linux/ath79/base-files/etc/hotplug.d/firmware/10-ath9k-eeprom @@ -100,8 +100,14 @@ case "$FIRMWARE" in avm,fritz4020) ath9k_eeprom_extract_reverse "urlader" 5441 1088 ;; + dlink,dir-825-c1|\ + dlink,dir-835-a1) + ath9k_eeprom_extract "art" 4096 1088 + ath9k_patch_fw_mac_crc $(mtd_get_mac_text "mac" 4) 2 + ;; iodata,wn-ac1167dgr|\ - iodata,wn-ac1600dgr2) + iodata,wn-ac1600dgr2|\ + iodata,wn-ag300dgr) ath9k_eeprom_extract "art" 4096 1088 ath9k_patch_fw_mac $(mtd_get_mac_ascii u-boot-env ethaddr) 2 ;; @@ -124,10 +130,16 @@ case "$FIRMWARE" in buffalo,wzr-hp-g450h) ath9k_eeprom_extract "ART" 4096 1088 ;; + dlink,dir-825-c1|\ + dlink,dir-835-a1) + ath9k_eeprom_extract "art" 20480 1088 + ath9k_patch_fw_mac_crc $(macaddr_add $(mtd_get_mac_text "mac" 24) 1) 2 + ;; ocedo,raccoon|\ tplink,tl-wdr3600|\ tplink,tl-wdr4300|\ - tplink,tl-wdr4900-v2) + tplink,tl-wdr4900-v2|\ + winchannel,wb2000) ath9k_eeprom_extract "art" 20480 1088 ;; netgear,wnr612-v2|\ @@ -141,6 +153,8 @@ case "$FIRMWARE" in tplink,tl-wr741-v1|\ tplink,tl-wr743nd-v1|\ tplink,tl-wr841-v7|\ + tplink,tl-wr842n-v1|\ + ubnt,airrouter|\ ubnt,bullet-m|\ ubnt,nano-m|\ ubnt,rocket-m) 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 82c23e307..9ecda2224 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 @@ -104,6 +104,7 @@ case "$FIRMWARE" in ath10kcal_extract "ART" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth0/address) +16) ;; + tplink,archer-a7-v5|\ tplink,archer-c7-v2) ath10kcal_extract "art" 20480 2116 ath10kcal_patch_mac $(macaddr_add $(cat /sys/class/net/eth1/address) -1) diff --git a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac index fe5aa64a1..bb55b1c11 100644 --- a/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac +++ b/target/linux/ath79/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac @@ -13,6 +13,12 @@ PHYNBR=${DEVPATH##*/phy} board=$(board_name) case "$board" in + iodata,wn-ag300dgr) + # There is no eeprom data for 5 GHz wlan in "art" partition + # which would allow to patch the macaddress + [ "$PHYNBR" -eq 1 ] && \ + echo $(macaddr_add "$(mtd_get_mac_ascii u-boot-env ethaddr)" 1) > /sys${DEVPATH}/macaddress + ;; phicomm,k2t) # The K2T factory firmware does use LAN mac address as the 2.4G wifi mac address [ "$PHYNBR" -eq 1 ] && \ diff --git a/target/linux/ath79/config-4.14 b/target/linux/ath79/config-4.14 index f0365e95f..969136ddd 100644 --- a/target/linux/ath79/config-4.14 +++ b/target/linux/ath79/config-4.14 @@ -168,10 +168,8 @@ CONFIG_MTD_PHYSMAP=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_LZMA_FW=y -CONFIG_MTD_SPLIT_SEAMA_FW=y CONFIG_MTD_SPLIT_TPLINK_FW=y CONFIG_MTD_SPLIT_UIMAGE_FW=y -CONFIG_MTD_SPLIT_WRGG_FW=y CONFIG_MTD_TPLINK_PARTS=y CONFIG_MTD_VIRT_CONCAT=y CONFIG_NEED_DMA_MAP_STATE=y diff --git a/target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts b/target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts new file mode 100644 index 000000000..5ad8196a1 --- /dev/null +++ b/target/linux/ath79/dts/ar1022_iodata_wn-ag300dgr.dts @@ -0,0 +1,217 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar9344.dtsi" + +/ { + compatible = "iodata,wn-ag300dgr", "qca,ar9344"; + model = "I-O DATA WN-AG300DGR"; + + aliases { + led-boot = &router; + led-failsafe = &router; + led-running = &router; + led-upgrade = &router; + }; + + leds { + compatible = "gpio-leds"; + + router: router { + label = "wn-ag300dgr:green:router"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + children { + label = "wn-ag300dgr:green:children"; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + }; + + eco { + label = "wn-ag300dgr:green:eco"; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + }; + + notification { + label = "wn-ag300dgr:amber:notification"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + }; + + wlan2g { + label = "wn-ag300dgr:green:wlan2g"; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wlan5g { + label = "wn-ag300dgr:green:wlan5g"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + eco { + label = "eco"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + router { + label = "router"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + linux,code = ; + linux,input-type = ; + debounce-interval = <60>; + }; + + auto { + label = "auto"; + gpios = <&gpio 4 GPIO_ACTIVE_LOW>; + linux,code = ; + linux,input-type = ; + debounce-interval = <60>; + }; + + wps { + label = "wps"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + reset { + label = "reset"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + + children { + label = "children"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + linux,code = ; + debounce-interval = <60>; + }; + }; +}; + +&ref { + clock-frequency = <25000000>; +}; + +&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 0x030000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x030000 0x010000>; + read-only; + }; + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x040000 0xf10000>; + }; + + partition@f50000 { + label = "manufacture"; + reg = <0xf50000 0x40000>; + read-only; + }; + + partition@f90000 { + label = "backup"; + reg = <0xf90000 0x10000>; + read-only; + }; + + partition@fa0000 { + label = "storage"; + reg = <0xfa0000 0x50000>; + read-only; + }; + + partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "rgmii"; + + qca,ar8327-initvals = < + 0x04 0x07a00000 /* PORT0 PAD MODE CTRL */ + 0x7c 0x000000fe /* PORT0_STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + pll-data = <0x06000000 0x00000101 0x00001616>; + + phy-mode = "rgmii"; + phy-handle = <&phy0>; + + gmac-config { + device = <&gmac>; + rgmii-gmac0 = <1>; + }; +}; + +&pcie { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&usb { + status = "okay"; +}; + +&usb_phy { + status = "okay"; +}; + +&wmac { + status = "okay"; + qca,no-eeprom; +}; diff --git a/target/linux/ath79/dts/ar7100.dtsi b/target/linux/ath79/dts/ar7100.dtsi index 982ad9648..e3f0edccf 100644 --- a/target/linux/ath79/dts/ar7100.dtsi +++ b/target/linux/ath79/dts/ar7100.dtsi @@ -104,7 +104,7 @@ #reset-cells = <1>; }; - pcie0: pcie-controller@180c0000 { + pcie0: pcie-controller@17010000 { compatible = "qca,ar7100-pci"; #address-cells = <3>; #size-cells = <2>; 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 847458d08..fecdf73a8 100644 --- a/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts +++ b/target/linux/ath79/dts/ar7161_buffalo_wzr-hp-ag300h.dts @@ -33,7 +33,6 @@ diag: diag { label = "buffalo:red:diag"; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -44,13 +43,11 @@ band2g_a { label = "buffalo:amber:band2g"; gpios = <&ath9k0 1 GPIO_ACTIVE_LOW>; - default-state = "off"; }; usb { label = "buffalo:green:usb"; gpios = <&ath9k0 3 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&usb_ochi_port>, <&usb_echi_port>; linux,default-trigger = "usbport"; }; @@ -58,33 +55,28 @@ band2g_g { label = "buffalo:green:band2g"; gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; band5g_g { label = "buffalo:green:band5g"; gpios = <&ath9k1 1 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy1tpt"; }; router { label = "buffalo:green:router"; gpios = <&ath9k1 3 GPIO_ACTIVE_LOW>; - default-state = "off"; }; movie_engine { label = "buffalo:blue:movie_engine"; gpios = <&ath9k1 4 GPIO_ACTIVE_LOW>; - default-state = "off"; }; band5g_a { label = "buffalo:amber:band5g"; gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; diff --git a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts index a28ff4444..da1992197 100644 --- a/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts +++ b/target/linux/ath79/dts/ar7161_dlink_dir-825-b1.dts @@ -33,7 +33,6 @@ blue_usb { label = "d-link:blue:usb"; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&usb_ochi_port>, <&usb_echi_port>; linux,default-trigger = "usbport"; }; @@ -47,25 +46,21 @@ blue_power: blue_power { label = "d-link:blue:power"; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - default-state = "off"; }; blue_wps { label = "d-link:blue:wps"; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; - default-state = "off"; }; orange_planet { label = "d-link:orange:planet"; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; - default-state = "off"; }; blue_planet { label = "d-link:blue:planet"; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -75,14 +70,12 @@ wlan2g { label = "d-link:blue:wlan2g"; gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; wlan5g { label = "d-link:blue:wlan5g"; gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy1tpt"; }; }; @@ -209,6 +202,7 @@ }; partition@50000 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x050000 0x610000>; }; diff --git a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi index e05e8599b..c8ee985f3 100644 --- a/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi +++ b/target/linux/ath79/dts/ar7161_netgear_wndr3700.dtsi @@ -42,13 +42,11 @@ wps { label = "netgear:orange:wps"; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; - default-state = "off"; }; power_green: power_green { label = "netgear:green:power"; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - default-state = "off"; }; power_orange: power_orange { @@ -60,13 +58,11 @@ wps_green { label = "netgear:green:wps"; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wan_green { label = "netgear:green:wan"; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -75,13 +71,11 @@ wlan2g { label = "netgear:green:wlan2g"; gpios = <&ath9k0 5 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; wlan5g { label = "netgear:blue:wlan5g"; gpios = <&ath9k1 5 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy1tpt"; }; }; diff --git a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi index 143a4b7e8..97e209980 100644 --- a/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi +++ b/target/linux/ath79/dts/ar7161_ubnt_routerstation.dtsi @@ -31,19 +31,18 @@ rf: rf_green { label = "ubnt:green:rf"; gpios = <&gpio 2 GPIO_ACTIVE_HIGH>; - default-state = "off"; }; }; gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; - debounce-interval = <60>; wps { label = "sw4"; linux,code = ; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; }; }; }; diff --git a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts index a3ab92c01..31053e39b 100644 --- a/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts +++ b/target/linux/ath79/dts/ar7240_buffalo_whr-g301n.dts @@ -103,7 +103,6 @@ wlan { label = "whr-g301n:green:wlan"; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts index d80406433..b3ceecf93 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts +++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dts @@ -5,6 +5,6 @@ / { model = "Netgear WNR612 v2"; - compatible = "netgear,wnr612-v2"; + compatible = "netgear,wnr612-v2", "qca,ar7240"; }; diff --git a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi index f48115700..02d18f9f4 100644 --- a/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi +++ b/target/linux/ath79/dts/ar7240_netgear_wnr612-v2.dtsi @@ -7,9 +7,6 @@ #include "ar7240.dtsi" / { - compatible = "netgear,wnr612-v2", "qca,ar7240"; - model = "Netgear WNR612 V2"; - aliases { led-boot = &power; led-failsafe = &power; @@ -54,7 +51,6 @@ wlan: wlan { label = "netgear:green:wlan"; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; @@ -86,6 +82,7 @@ }; partition@50000 { + compatible = "netgear,uimage"; reg = <0x50000 0x3a0000>; label = "firmware"; }; diff --git a/target/linux/ath79/dts/ar7240_on_n150r.dts b/target/linux/ath79/dts/ar7240_on_n150r.dts index cb4cf9286..a318846a8 100644 --- a/target/linux/ath79/dts/ar7240_on_n150r.dts +++ b/target/linux/ath79/dts/ar7240_on_n150r.dts @@ -5,6 +5,6 @@ / { model = "ON Network N150R"; - compatible = "on,n150r"; + compatible = "on,n150r", "qca,ar7240"; }; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v1.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v1.dts index a87e105c8..be18fdd05 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v1.dts +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v1.dts @@ -5,5 +5,5 @@ / { model = "TP-Link TL-WR740N v1/v2"; - compatible = "tplink,tl-wr740n-v1"; + compatible = "tplink,tl-wr740n-v1", "qca,ar7240"; }; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v3.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v3.dts index 4c1aa57c4..d0addda44 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v3.dts +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr740n-v3.dts @@ -5,5 +5,5 @@ / { model = "TP-Link TL-WR740N v3"; - compatible = "tplink,tl-wr740n-v3"; + compatible = "tplink,tl-wr740n-v3", "qca,ar7240"; }; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr741-v1.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr741-v1.dts index 1d795be23..af9c90755 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr741-v1.dts +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr741-v1.dts @@ -5,5 +5,5 @@ / { model = "TP-Link TL-WR741N/ND v1/v2"; - compatible = "tplink,tl-wr741-v1"; + compatible = "tplink,tl-wr741-v1", "qca,ar7240"; }; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr743nd-v1.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr743nd-v1.dts index 5fff1a598..2c55dff97 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr743nd-v1.dts +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr743nd-v1.dts @@ -5,5 +5,5 @@ / { model = "TP-Link TL-WR743ND v1"; - compatible = "tplink,tl-wr743nd-v1"; + compatible = "tplink,tl-wr743nd-v1", "qca,ar7240"; }; 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 788d265cd..cf63fe316 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr74xn-v1.dtsi @@ -79,7 +79,6 @@ wlan { label = "tp-link:green:wlan"; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; @@ -106,6 +105,7 @@ }; firmware: partition@20000 { + compatible = "tplink,firmware"; reg = <0x20000 0x3d0000>; label = "firmware"; }; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr841-v5.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr841-v5.dts index bcb82f3c8..e881821d6 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr841-v5.dts +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr841-v5.dts @@ -5,5 +5,5 @@ / { model = "TP-Link TL-WR841N/ND v5/v6"; - compatible = "tplink,tl-wr841-v5"; + compatible = "tplink,tl-wr841-v5", "qca,ar7240"; }; diff --git a/target/linux/ath79/dts/ar7240_tplink_tl-wr941-v4.dts b/target/linux/ath79/dts/ar7240_tplink_tl-wr941-v4.dts index c67d80365..8d844d54f 100644 --- a/target/linux/ath79/dts/ar7240_tplink_tl-wr941-v4.dts +++ b/target/linux/ath79/dts/ar7240_tplink_tl-wr941-v4.dts @@ -5,5 +5,5 @@ / { model = "TP-Link TL-WR941N/ND v4"; - compatible = "tplink,tl-wr941-v4"; + compatible = "tplink,tl-wr941-v4", "qca,ar7240"; }; diff --git a/target/linux/ath79/dts/ar7241_tplink.dtsi b/target/linux/ath79/dts/ar7241_tplink.dtsi index 4078ced7d..d646c312f 100644 --- a/target/linux/ath79/dts/ar7241_tplink.dtsi +++ b/target/linux/ath79/dts/ar7241_tplink.dtsi @@ -68,6 +68,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; reg = <0x20000 0x3d0000>; label = "firmware"; }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts index 3445fba55..7a16d0fad 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-mr3220-v1.dts @@ -13,7 +13,6 @@ wlan { label = "tp-link:green:wlan"; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts index 06b0264e3..7d36ed55d 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-mr3420-v1.dts @@ -13,7 +13,6 @@ wlan { label = "tp-link:green:wlan"; gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi b/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi index 4b3b46d8c..04403637b 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi +++ b/target/linux/ath79/dts/ar7241_tplink_tl-mr3x20.dtsi @@ -19,7 +19,6 @@ led3g { label = "tp-link:green:3g"; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts index 1aeeab7e2..4a3fc5962 100644 --- a/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr841-v7.dts @@ -13,7 +13,6 @@ wlan { label = "tp-link:green:wlan"; gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; diff --git a/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts new file mode 100644 index 000000000..282446b1e --- /dev/null +++ b/target/linux/ath79/dts/ar7241_tplink_tl-wr842n-v1.dts @@ -0,0 +1,164 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar7241.dtsi" + +/ { + compatible = "tplink,tl-wr842n-v1", "qca,ar7241"; + model = "TP-Link TL-WR842N/ND v1"; + + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + rfkill { + label = "rfkill"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 12 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + gpio-leds { + compatible = "gpio-leds"; + + led_system: system { + label = "tp-link:green:system"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; + + qss { + label = "tp-link:green:qss"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + + led3g { + label = "tp-link:green:3g"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + trigger-sources = <&hub_port>; + linux,default-trigger = "usbport"; + }; + }; + + ath9k-leds { + compatible = "gpio-leds"; + + wlan { + label = "tp-link:green:wlan"; + gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; + + gpio-export { + compatible = "gpio-export"; + + gpio_usb_power { + gpio-export,name = "tp-link:power:usb"; + gpio-export,output = <1>; + gpios = <&gpio 6 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&usb { + #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 = <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 { + reg = <0x0 0x20000>; + label = "u-boot"; + read-only; + }; + + partition@20000 { + compatible = "tplink,firmware"; + reg = <0x20000 0x7d0000>; + label = "firmware"; + }; + + partition@7f0000 { + reg = <0x7f0000 0x10000>; + label = "art"; + read-only; + }; + }; + }; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0,0 { + compatible = "pci168c,002e"; + reg = <0x0000 0 0 0 0>; + #gpio-cells = <2>; + gpio-controller; + qca,no-eeprom; + mtd-mac-address = <&uboot 0x1fc00>; + }; +}; + +ð0 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <(-1)>; +}; + +ð1 { + status = "okay"; + + mtd-mac-address = <&uboot 0x1fc00>; + mtd-mac-address-increment = <1>; +}; + +&gpio { + status = "okay"; +}; + +&uart { + status = "okay"; +}; diff --git a/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts b/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts new file mode 100644 index 000000000..9e38bf808 --- /dev/null +++ b/target/linux/ath79/dts/ar7241_ubnt_airrouter.dts @@ -0,0 +1,38 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar7241_ubnt_xm.dtsi" + +/ { + compatible = "ubnt,airrouter", "ubnt,xm", "qca,ar7241"; + model = "Ubiquiti AirRouter"; + + aliases { + led-boot = &globe; + led-failsafe = &globe; + led-running = &globe; + led-upgrade = &globe; + }; + + airrouter-leds { + compatible = "gpio-leds"; + + globe: globe { + label = "ubnt:green:globe"; + gpios = <&gpio 0 GPIO_ACTIVE_LOW>; + }; + + power { + label = "ubnt:green:power"; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&usb { + status = "okay"; +}; diff --git a/target/linux/ath79/dts/ar7241_ubnt_bullet-m.dts b/target/linux/ath79/dts/ar7241_ubnt_bullet-m.dts index 33790f2e1..e16b5fa0b 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_bullet-m.dts +++ b/target/linux/ath79/dts/ar7241_ubnt_bullet-m.dts @@ -1,10 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "ar7241_ubnt_xm.dtsi" +#include "ar7241_ubnt_xm_outdoor.dtsi" / { - compatible = "ubnt,bullet-m", "qca,ar7241"; + compatible = "ubnt,bullet-m", "ubnt,xm", "qca,ar7241"; model = "Ubiquiti Bullet M"; }; diff --git a/target/linux/ath79/dts/ar7241_ubnt_nano-m.dts b/target/linux/ath79/dts/ar7241_ubnt_nano-m.dts index 417e50312..ebdc4306e 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_nano-m.dts +++ b/target/linux/ath79/dts/ar7241_ubnt_nano-m.dts @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "ar7241_ubnt_xm.dtsi" +#include "ar7241_ubnt_xm_outdoor.dtsi" / { - compatible = "ubnt,nano-m", "qca,ar7241"; + compatible = "ubnt,nano-m", "ubnt,xm", "qca,ar7241"; model = "Ubiquiti Nanostation M"; }; diff --git a/target/linux/ath79/dts/ar7241_ubnt_rocket-m.dts b/target/linux/ath79/dts/ar7241_ubnt_rocket-m.dts index 4053147c9..35f5205b4 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_rocket-m.dts +++ b/target/linux/ath79/dts/ar7241_ubnt_rocket-m.dts @@ -1,10 +1,10 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "ar7241_ubnt_xm.dtsi" +#include "ar7241_ubnt_xm_outdoor.dtsi" / { - compatible = "ubnt,rocket-m", "qca,ar7241"; + compatible = "ubnt,rocket-m", "ubnt,xm", "qca,ar7241"; model = "Ubiquiti Rocket M"; }; diff --git a/target/linux/ath79/dts/ar7241_ubnt_unifi.dts b/target/linux/ath79/dts/ar7241_ubnt_unifi.dts index 2cb02503b..27aec88cc 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_unifi.dts +++ b/target/linux/ath79/dts/ar7241_ubnt_unifi.dts @@ -81,6 +81,7 @@ }; partition@2 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x050000 0x750000>; }; diff --git a/target/linux/ath79/dts/ar7241_ubnt_xm.dtsi b/target/linux/ath79/dts/ar7241_ubnt_xm.dtsi index f6cefdabd..546657522 100644 --- a/target/linux/ath79/dts/ar7241_ubnt_xm.dtsi +++ b/target/linux/ath79/dts/ar7241_ubnt_xm.dtsi @@ -9,11 +9,6 @@ compatible = "ubnt,xm", "qca,ar7241"; model = "Ubiquiti Networks XM (rev 1.0) board"; - aliases { - led-boot = &link4; - led-failsafe = &link4; - }; - /* extosc: ref { compatible = "fixed-clock"; #clock-cells = <0>; @@ -29,29 +24,6 @@ debounce-interval = <60>; }; }; - - leds { - compatible = "gpio-leds"; - link1 { - label = "ubnt:red:link1"; - gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; - }; - - link2 { - label = "ubnt:orange:link2"; - gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; - }; - - link3 { - label = "ubnt:green:link3"; - gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; - }; - - link4: link4 { - label = "ubnt:green:link4"; - gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; - }; - }; }; &uart { @@ -88,6 +60,7 @@ }; partition@2 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x050000 0x750000>; }; diff --git a/target/linux/ath79/dts/ar7241_ubnt_xm_outdoor.dtsi b/target/linux/ath79/dts/ar7241_ubnt_xm_outdoor.dtsi new file mode 100644 index 000000000..c773f1aac --- /dev/null +++ b/target/linux/ath79/dts/ar7241_ubnt_xm_outdoor.dtsi @@ -0,0 +1,36 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include +#include + +#include "ar7241_ubnt_xm.dtsi" + +/ { + aliases { + led-boot = &link4; + led-failsafe = &link4; + }; + + leds { + compatible = "gpio-leds"; + link1 { + label = "ubnt:red:link1"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + }; + + link2 { + label = "ubnt:orange:link2"; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; + + link3 { + label = "ubnt:green:link3"; + gpios = <&gpio 11 GPIO_ACTIVE_HIGH>; + }; + + link4: link4 { + label = "ubnt:green:link4"; + gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; + }; + }; +}; diff --git a/target/linux/ath79/dts/ar7242_avm_fritz300e.dts b/target/linux/ath79/dts/ar7242_avm_fritz300e.dts index 0a142666a..fb6b0ff30 100644 --- a/target/linux/ath79/dts/ar7242_avm_fritz300e.dts +++ b/target/linux/ath79/dts/ar7242_avm_fritz300e.dts @@ -115,6 +115,7 @@ }; partition@20000 { + compatible = "avm,eva-firmware"; reg = <0x20000 0xee0000>; label = "firmware"; }; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi b/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi index 4ef9323b6..5165efa85 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-bhr.dtsi @@ -43,19 +43,16 @@ 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"; }; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts index 3e2c80e05..97bfd0f84 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g302h-a1a0.dts @@ -70,7 +70,6 @@ diag: diag { label = "buffalo:red:diag"; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -80,7 +79,6 @@ usb { label = "buffalo:blue:usb"; gpios = <&ath9k 4 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; }; @@ -88,32 +86,27 @@ 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"; }; }; diff --git a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts index 7daf05155..ea30a4d0d 100644 --- a/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts +++ b/target/linux/ath79/dts/ar7242_buffalo_wzr-hp-g450h.dts @@ -16,19 +16,16 @@ led_movie_engine { label = "buffalo:blue:movie_engine"; gpios = <&ath9k 13 GPIO_ACTIVE_LOW>; - default-state = "off"; }; router { label = "buffalo:green:router"; gpios = <&ath9k 14 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wireless { label = "buffalo:green:wireless"; gpios = <&ath9k 15 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; 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 e4bd7c209..337785041 100644 --- a/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts +++ b/target/linux/ath79/dts/ar7242_tplink_tl-wr2543-v1.dts @@ -52,13 +52,11 @@ system: wps { label = "tplink:green:wps"; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; - default-state = "off"; }; usb { label = "tplink:green:usb"; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; }; @@ -70,14 +68,12 @@ wlan2g { label = "tplink:green:wlan2g"; gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; wlan5g { label = "tplink:green:wlan5g"; gpios = <&ath9k 1 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; @@ -125,6 +121,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0x7d0000>; }; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts index 150b76e7a..6551d0a7f 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wa901nd-v2.dts @@ -52,13 +52,11 @@ 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"; }; }; @@ -93,6 +91,7 @@ }; partition@1 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0x3D0000>; }; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts index 5c6cb634d..23eba5bb3 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr1043nd-v1.dts @@ -46,7 +46,6 @@ usb { label = "tp-link:green:usb"; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; }; @@ -65,7 +64,6 @@ wlan { label = "tp-link:green:wlan"; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; @@ -124,6 +122,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0x7D0000>; }; diff --git a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts index f3927cc32..93b99beb6 100644 --- a/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts +++ b/target/linux/ath79/dts/ar9132_tplink_tl-wr941-v2.dts @@ -56,7 +56,6 @@ wlan { label = "tp-link:green:wlan"; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; @@ -131,6 +130,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0x3d0000>; }; diff --git a/target/linux/ath79/dts/ar9330_glinet_ar150.dts b/target/linux/ath79/dts/ar9330_glinet_ar150.dts index 34240f49a..fbc3acdd1 100644 --- a/target/linux/ath79/dts/ar9330_glinet_ar150.dts +++ b/target/linux/ath79/dts/ar9330_glinet_ar150.dts @@ -23,20 +23,17 @@ wlan: wlan { label = "gl-ar150:orange:wlan"; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; lan { label = "gl-ar150:green:lan"; gpios = <&gpio 13 GPIO_ACTIVE_HIGH>; - default-state = "off"; }; wan { label = "gl-ar150:green:wan"; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; - default-state = "off"; }; }; @@ -108,6 +105,7 @@ }; partition@2 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x050000 0xfa0000>; }; diff --git a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts index 6c662d220..06f728b26 100644 --- a/target/linux/ath79/dts/ar9330_pqi_air-pen.dts +++ b/target/linux/ath79/dts/ar9330_pqi_air-pen.dts @@ -23,14 +23,12 @@ 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"; }; }; @@ -109,6 +107,7 @@ }; partition@70000 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x070000 0x780000>; }; diff --git a/target/linux/ath79/dts/ar9331_dptechnics_dpt-module.dts b/target/linux/ath79/dts/ar9331_dptechnics_dpt-module.dts index 4159cb2fb..971c92705 100644 --- a/target/linux/ath79/dts/ar9331_dptechnics_dpt-module.dts +++ b/target/linux/ath79/dts/ar9331_dptechnics_dpt-module.dts @@ -20,7 +20,6 @@ system { label = "dpt-module:green:system"; gpios = <&gpio 27 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; diff --git a/target/linux/ath79/dts/ar9331_dragino_ms14.dts b/target/linux/ath79/dts/ar9331_dragino_ms14.dts index 963e9f6e1..713fe4103 100644 --- a/target/linux/ath79/dts/ar9331_dragino_ms14.dts +++ b/target/linux/ath79/dts/ar9331_dragino_ms14.dts @@ -20,25 +20,21 @@ wlan { label = "dragino2:red:wlan"; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; - default-state = "off"; }; lan { label = "dragino2:red:lan"; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wan { label = "dragino2:red:wan"; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - default-state = "off"; }; system { label = "dragino2:red:system"; gpios = <&gpio 28 GPIO_ACTIVE_HIGH>; - default-state = "off"; }; }; diff --git a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts index 13333d7ca..43bec35fa 100644 --- a/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts +++ b/target/linux/ath79/dts/ar9331_embeddedwireless_dorin.dts @@ -24,7 +24,6 @@ status: status { label = "dorin:green:status"; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -89,6 +88,7 @@ }; partition@2 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x050000 0xfa0000>; }; diff --git a/target/linux/ath79/dts/ar9331_etactica_eg200.dts b/target/linux/ath79/dts/ar9331_etactica_eg200.dts index 569ab11e6..d566647a0 100644 --- a/target/linux/ath79/dts/ar9331_etactica_eg200.dts +++ b/target/linux/ath79/dts/ar9331_etactica_eg200.dts @@ -8,7 +8,7 @@ / { model = "eTactica EG200"; - compatible = "etactica,eg200", "rme-eg200"; + compatible = "etactica,eg200", "qca,ar9331"; aliases { serial0 = &uart; @@ -30,25 +30,21 @@ modbus { label = "eg200:red:modbus"; gpios = <&gpio 16 GPIO_ACTIVE_HIGH>; - default-state = "off"; }; etactica { label = "eg200:red:etactica"; gpios = <&gpio 15 GPIO_ACTIVE_HIGH>; - default-state = "off"; }; eth0 { label = "eg200:red:eth0"; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wlan { label = "eg200:red:wlan"; gpios = <&gpio 0 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; @@ -112,6 +108,7 @@ }; firmware@50000 { + compatible = "denx,uimage"; reg = <0x50000 0xfa0000>; }; diff --git a/target/linux/ath79/dts/ar9331_onion_omega.dts b/target/linux/ath79/dts/ar9331_onion_omega.dts index a93c7d748..5d0fe33ee 100644 --- a/target/linux/ath79/dts/ar9331_onion_omega.dts +++ b/target/linux/ath79/dts/ar9331_onion_omega.dts @@ -20,7 +20,6 @@ system { label = "onion:amber:system"; gpios = <&gpio 27 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; diff --git a/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts b/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts index 5e763df51..3573665b3 100644 --- a/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts +++ b/target/linux/ath79/dts/ar9331_pisen_wmm003n.dts @@ -70,6 +70,7 @@ }; firmware: partition@20000 { + compatible = "tplink,firmware"; reg = <0x20000 0x7d0000>; label = "firmware"; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts index 5f7519ef1..918237423 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3020-v1.dts @@ -24,26 +24,22 @@ wlan { label = "tp-link:green:wlan"; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; lan { label = "tp-link:green:lan"; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - default-state = "off"; }; system: wps { label = "tp-link:green:wps"; gpios = <&gpio 26 GPIO_ACTIVE_LOW>; - default-state = "off"; }; led3g { label = "tp-link:green:3g"; gpios = <&gpio 27 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; }; @@ -137,6 +133,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0x3c0000>; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts index ff7ed9f21..fe15157f8 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-mr3040-v2.dts @@ -21,20 +21,17 @@ wlan { label = "tp-link:green:wlan"; gpios = <&gpio 26 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; led_lan: lan { label = "tp-link:green:lan"; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - default-state = "off"; }; led3g { label = "tp-link:green:3g"; gpios = <&gpio 27 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port>; linux,default-trigger = "usbport"; }; @@ -128,6 +125,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0x3d0000>; }; 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 213a96556..d7b23f988 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 @@ -67,6 +67,7 @@ }; firmware: partition@20000 { + compatible = "tplink,firmware"; reg = <0x20000 0x3d0000>; label = "firmware"; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr740nd-v4.dts b/target/linux/ath79/dts/ar9331_tplink_tl-wr740nd-v4.dts index f3683f858..1b0283ebf 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr740nd-v4.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr740nd-v4.dts @@ -5,5 +5,5 @@ / { model = "TP-Link TL-WR740N/ND v4"; - compatible = "tplink,tl-wr740nd-v4"; + compatible = "tplink,tl-wr740nd-v4", "qca,ar9331"; }; diff --git a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dts b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dts index 46c140763..31c5a0b1b 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dts +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dts @@ -5,5 +5,5 @@ / { model = "TP-Link TL-WR741N/ND v4"; - compatible = "tplink,tl-wr741nd-v4"; + compatible = "tplink,tl-wr741nd-v4", "qca,ar9331"; }; 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 f28e56b53..abaaca875 100644 --- a/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi +++ b/target/linux/ath79/dts/ar9331_tplink_tl-wr741nd-v4.dtsi @@ -80,7 +80,6 @@ wlan { label = "tp-link:green:wlan"; gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; @@ -107,6 +106,7 @@ }; firmware: partition@20000 { + compatible = "tplink,firmware"; reg = <0x20000 0x3d0000>; label = "firmware"; }; diff --git a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts index 5dcfd89ae..9a0b084a7 100644 --- a/target/linux/ath79/dts/ar9341_pcs_cr3000.dts +++ b/target/linux/ath79/dts/ar9341_pcs_cr3000.dts @@ -52,38 +52,32 @@ wlan2g { label = "pcs:blue:wlan"; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; wan { label = "pcs:blue:wan"; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - default-state = "off"; }; lan1 { label = "pcs:blue:lan1"; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; - default-state = "off"; }; lan2 { label = "pcs:blue:lan2"; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; - default-state = "off"; }; lan3 { label = "pcs:blue:lan3"; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; - default-state = "off"; }; lan4 { label = "pcs:blue:lan4"; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; }; @@ -128,6 +122,7 @@ }; partition@50000 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x050000 0x07a0000>; }; diff --git a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts index f2dbac3c7..c7a251cbf 100644 --- a/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts +++ b/target/linux/ath79/dts/ar9341_tplink_tl-wr842n-v2.dts @@ -8,7 +8,7 @@ / { model = "TP-Link TL-WR842N/ND v2"; - compatible = "tplink,tl-wr842n-v2"; + compatible = "tplink,tl-wr842n-v2", "qca,ar9341"; aliases { serial0 = &uart; @@ -52,50 +52,42 @@ 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"; }; @@ -146,6 +138,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0x7d0000>; }; diff --git a/target/linux/ath79/dts/ar9342_iodata_etg3-r.dts b/target/linux/ath79/dts/ar9342_iodata_etg3-r.dts index a2d442a5d..9fce43fd4 100644 --- a/target/linux/ath79/dts/ar9342_iodata_etg3-r.dts +++ b/target/linux/ath79/dts/ar9342_iodata_etg3-r.dts @@ -29,7 +29,6 @@ notification { label = "etg3-r:green:notification"; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -46,6 +45,10 @@ }; }; +&ref { + clock-frequency = <40000000>; +}; + &spi { num-cs = <1>; status = "okay"; @@ -119,10 +122,18 @@ ð0 { status = "okay"; - pll-data = <0x06000000 0x00000101 0x00001616>; + pll-data = <0x0e000000 0x00000101 0x00001616>; phy-mode = "rgmii"; phy-handle = <&phy0>; + + gmac-config { + device = <&gmac>; + + rgmii-gmac0 = <1>; + rxd-delay = <3>; + rxdv-delay = <3>; + }; }; &uart { diff --git a/target/linux/ath79/dts/ar9342_ubnt_bullet-m-xw.dts b/target/linux/ath79/dts/ar9342_ubnt_bullet-m-xw.dts index cc0940fb6..ad9807561 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_bullet-m-xw.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_bullet-m-xw.dts @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; #include @@ -7,7 +7,7 @@ #include "ar9342_ubnt_xw.dtsi" / { - compatible = "ubnt,bullet-m-xw", "ubnt,xw"; + compatible = "ubnt,bullet-m-xw", "ubnt,xw", "qca,ar9342"; model = "Ubiquiti Bullet M (XW)"; }; diff --git a/target/linux/ath79/dts/ar9342_ubnt_lap-120.dts b/target/linux/ath79/dts/ar9342_ubnt_lap-120.dts index 26b734e62..82f864b8e 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_lap-120.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_lap-120.dts @@ -6,7 +6,7 @@ #include "ar9342_ubnt_wa.dtsi" / { - compatible = "ubnt,lap-120", "ubnt,wa"; + compatible = "ubnt,lap-120", "ubnt,wa", "qca,ar9342"; model = "Ubiquiti LiteAP ac (LAP-120)"; }; diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts index ea6e1cb6a..9b26d1a62 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac-loco.dts @@ -7,7 +7,7 @@ #include "ar9342_ubnt_wa.dtsi" / { - compatible = "ubnt,nanostation-ac-loco", "ubnt,wa"; + compatible = "ubnt,nanostation-ac-loco", "ubnt,wa", "qca,ar9342"; model = "Ubiquiti Nanostation AC loco (WA)"; }; diff --git a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts index 164587dc3..29b6fdab5 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts +++ b/target/linux/ath79/dts/ar9342_ubnt_nanostation-ac.dts @@ -7,7 +7,7 @@ #include "ar9342_ubnt_wa.dtsi" / { - compatible = "ubnt,nanostation-ac", "ubnt,wa"; + compatible = "ubnt,nanostation-ac","ubnt,wa", "qca,ar9342"; model = "Ubiquiti Nanostation AC (WA)"; gpio-leds { diff --git a/target/linux/ath79/dts/ar9342_ubnt_wa.dtsi b/target/linux/ath79/dts/ar9342_ubnt_wa.dtsi index b684ad87e..df5cb4be6 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_wa.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_wa.dtsi @@ -6,7 +6,7 @@ #include "ar9344.dtsi" / { - compatible = "ubnt,wa", "qca,ar9344"; + compatible = "ubnt,wa", "qca,ar9342"; model = "Ubiquiti Networks WA board"; keys { @@ -64,6 +64,7 @@ }; partition@50000 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x050000 0xf60000>; }; diff --git a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi index 8db565e8b..b104bc6d3 100644 --- a/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi +++ b/target/linux/ath79/dts/ar9342_ubnt_xw.dtsi @@ -1,4 +1,4 @@ -// SPDX-License-Identifier: GPL-2.0 +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT #include #include @@ -84,6 +84,7 @@ }; partition@50000 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x050000 0x760000>; }; diff --git a/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts b/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts new file mode 100644 index 000000000..89603aaff --- /dev/null +++ b/target/linux/ath79/dts/ar9344_dlink_dir-825-c1.dts @@ -0,0 +1,79 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar9344_dlink_dir-8x5.dtsi" + +/ { + model = "D-LINK DIR-825 C1"; + compatible = "dlink,dir-825-c1", "qca,ar9344"; + + aliases { + led-boot = &orange_power; + led-failsafe = &orange_power; + led-running = &blue_power; + led-upgrade = &orange_power; + serial0 = &uart; + }; + + leds { + compatible = "gpio-leds"; + + pinctrl-names = "default"; + pinctrl-0 = <&enable_gpio_11>; + + blue_power: blue_power { + label = "d-link:blue:power"; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + }; + + blue_usb { + label = "d-link:blue:usb"; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + linux,default-trigger = "usbport"; + trigger-sources = <&hub_port1>; + }; + + blue_wan { + label = "d-link:blue:wan"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + }; + + blue_wlan2g { + label = "d-link:blue:wlan2g"; + gpios = <&gpio 13 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + blue_wps { + label = "d-link:blue:wps"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + orange_power: orange_power { + label = "d-link:orange:power"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + orange_wan { + label = "d-link:orange:wan"; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + }; + }; + + leds-ath9k { + compatible = "gpio-leds"; + + blue_wlan5g { + label = "d-link:blue:wlan5g"; + gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; +}; + +&pinmux { + enable_gpio_11: pinmux_enable_gpio_11 { + pinctrl-single,bits = <0x8 0x0 0xff000000>; + }; +}; + diff --git a/target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts b/target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts new file mode 100644 index 000000000..4f0c1e58e --- /dev/null +++ b/target/linux/ath79/dts/ar9344_dlink_dir-835-a1.dts @@ -0,0 +1,47 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ar9344_dlink_dir-8x5.dtsi" + +/ { + model = "D-LINK DIR-835 A1"; + compatible = "dlink,dir-835-a1", "qca,ar9344"; + + aliases { + led-boot = &orange_power; + led-failsafe = &orange_power; + led-running = &green_power; + led-upgrade = &orange_power; + serial0 = &uart; + }; + + leds { + compatible = "gpio-leds"; + + green_power: green_power { + label = "d-link:green:power"; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + }; + + green_wan { + label = "d-link:green:wan"; + gpios = <&gpio 18 GPIO_ACTIVE_LOW>; + }; + + green_wps { + label = "d-link:green:wps"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + orange_power: orange_power { + label = "d-link:orange:power"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + orange_wan { + label = "d-link:orange:wan"; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + }; + }; +}; + diff --git a/target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi b/target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi new file mode 100644 index 000000000..b49d3458f --- /dev/null +++ b/target/linux/ath79/dts/ar9344_dlink_dir-8x5.dtsi @@ -0,0 +1,151 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar9344.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys"; + + reset { + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wps { + linux,code = ; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; +}; + +ð0 { + status = "okay"; + + /* default for ar934x, except for 1000M */ + pll-data = <0x06000000 0x00000101 0x00001616>; + + phy-mode = "rgmii"; + phy-handle = <&phy0>; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0>; + + phy0: ethernet-phy@0 { + reg = <0>; + qca,ar8327-initvals = < + /* GPL code drop (bsp.h & athrs17_phy.c) */ + 0x10 0xc1000000 /* PWS_REG_VALUE */ + 0x04 0x07600000 /* PORT0 PAD Mode */ + 0x0c 0x01000000 /* PORT6 PAD Mode */ + 0x7c 0x0000007e /* PORT0_STATUS */ + 0x94 0x0000007e /* PORT6_STATUS */ + >; + }; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0,0 { + compatible = "pci168c,0030"; + reg = <0x0000 0 0 0 0>; + qca,no-eeprom; + gpio-controller; + #gpio-cells = <2>; + }; +}; + +&ref { + clock-frequency = <40000000>; +}; + +&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 = "uboot"; + reg = <0x000000 0x010000>; + read-only; + }; + + partition@10000 { + label = "nvram"; + reg = <0x010000 0x010000>; + read-only; + }; + + partition@20000 { + label = "firmware"; + reg = <0x020000 0xF90000>; + compatible = "denx,uimage"; + }; + + partition@fb0000 { + label = "lang"; + reg = <0xfb0000 0x030000>; + read-only; + }; + + partition@fe0000 { + label = "mac"; + reg = <0xfe0000 0x010000>; + read-only; + }; + + partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&usb { + status = "okay"; + #address-cells = <1>; + #size-cells = <0>; + + hub_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&wmac { + status = "okay"; + qca,no-eeprom; +}; + diff --git a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts index eb7219b6f..0875c319b 100644 --- a/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts +++ b/target/linux/ath79/dts/ar9344_ocedo_raccoon.dts @@ -33,7 +33,6 @@ wlan2g { label = "raccoon:yellow:wlan24"; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; @@ -49,7 +48,6 @@ wlan5g { label = "raccoon:red:wlan5"; gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy1tpt"; }; }; diff --git a/target/linux/ath79/dts/ar9344_pcs_cap324.dts b/target/linux/ath79/dts/ar9344_pcs_cap324.dts index bd7c2a60d..7a211e908 100644 --- a/target/linux/ath79/dts/ar9344_pcs_cap324.dts +++ b/target/linux/ath79/dts/ar9344_pcs_cap324.dts @@ -14,7 +14,7 @@ serial0 = &uart; led-boot = &status; led-failsafe = &status; - led-running = &status; + led-running = &running; led-upgrade = &status; }; @@ -36,13 +36,12 @@ leds { compatible = "gpio-leds"; - power_amber { + status: power_amber { label = "pcs:amber:power"; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - default-state = "off"; }; - status: power_green { + running: power_green { label = "pcs:green:power"; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; default-state = "on"; @@ -51,27 +50,23 @@ wlan_amber { label = "pcs:amber:wlan"; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy1tpt"; }; wlan_green { label = "pcs:green:wlan"; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; lan_amber { label = "pcs:lan:amber"; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; }; lan_green { label = "pcs:lan:green"; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; }; @@ -116,6 +111,7 @@ }; partition@50000 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x050000 0x0fa0000>; }; diff --git a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts index 826230314..0b4a0ea37 100644 --- a/target/linux/ath79/dts/ar9344_pcs_cr5000.dts +++ b/target/linux/ath79/dts/ar9344_pcs_cr5000.dts @@ -53,14 +53,12 @@ wlan2g { label = "pcs:blue:wlan"; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; wps_white { label = "pcs:white:wps"; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; }; @@ -105,6 +103,7 @@ }; partition@50000 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x050000 0x07a0000>; }; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3600.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3600.dts index 95ee3490a..9f708242f 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr3600.dts +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr3600.dts @@ -5,5 +5,5 @@ / { model = "TP-Link WDR3600"; - compatible = "tplink,tl-wdr3600"; + compatible = "tplink,tl-wdr3600", "qca,ar9344"; }; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dts b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dts index a6359309d..ba6b4f846 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dts +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dts @@ -5,5 +5,5 @@ / { model = "TP-Link WDR4300"; - compatible = "tplink,tl-wdr4300"; + compatible = "tplink,tl-wdr4300", "qca,ar9344"; }; diff --git a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi index 268df4700..6be197c0c 100644 --- a/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi +++ b/target/linux/ath79/dts/ar9344_tplink_tl-wdr4300.dtsi @@ -6,9 +6,6 @@ #include "ar9344.dtsi" / { - model = "TP-Link WDR4300"; - compatible = "tplink,tl-wdr4300"; - aliases { led-boot = &system; led-failsafe = &system; @@ -22,7 +19,6 @@ usb1 { label = "tp-link:green:usb1"; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port1>; linux,default-trigger = "usbport"; }; @@ -30,7 +26,6 @@ usb2 { label = "tp-link:green:usb2"; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port2>; linux,default-trigger = "usbport"; }; @@ -38,7 +33,6 @@ wlan2g { label = "tp-link:green:wlan2g"; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; @@ -51,7 +45,6 @@ qss { label = "tp-link:green:qss"; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -61,7 +54,6 @@ wlan5g { label = "tp-link:green:wlan5g"; gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy1tpt"; }; }; @@ -147,6 +139,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0x7d0000>; }; diff --git a/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts new file mode 100644 index 000000000..6895a22e1 --- /dev/null +++ b/target/linux/ath79/dts/ar9344_winchannel_wb2000.dts @@ -0,0 +1,220 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "ar9344.dtsi" + +/ { + model = "Winchannel WB2000"; + compatible = "winchannel,wb2000", "qca,ar9344"; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + i2c { + compatible = "i2c-gpio"; + gpios = <&gpio 17 GPIO_ACTIVE_HIGH + &gpio 16 GPIO_ACTIVE_HIGH + >; + #address-cells = <1>; + #size-cells = <0>; + + rtc@68 { + compatible = "dallas,ds1339"; + reg = <0x68>; + }; + }; + + leds { + compatible = "gpio-leds"; + + wlan2g { + label = "wb2000:green:2g"; + gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tpt"; + }; + + usb { + label = "wb2000:green:usb"; + gpios = <&gpio 21 GPIO_ACTIVE_HIGH>; + trigger-sources = <&hub_port1>, <&hub_port2>; + linux,default-trigger = "usbport"; + }; + + led_system: system { + label = "wb2000:green:system"; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <50>; + + reset { + linux,code = ; + gpios = <&gpio 3 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + ath9k-leds { + compatible = "gpio-leds"; + + wlan { + label = "wb2000:green:5g"; + gpios = <&ath9k 6 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + }; +}; + +&ref { + clock-frequency = <40000000>; +}; + +&uart { + 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 = <0x0 0x40000>; + read-only; + }; + + partition@40000 { + label = "u-boot-env"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "firmware"; + reg = <0x50000 0xf80000>; + compatible = "denx,uimage"; + }; + + partition@fd0000 { + label = "nvram"; + reg = <0xfd0000 0x10000>; + read-only; + }; + + art: partition@fe0000 { + label = "art"; + reg = <0xfe0000 0x10000>; + read-only; + }; + + addr: partition@ff0000 { + label = "addr"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +&pcie { + status = "okay"; + + ath9k: wifi@0,0 { + compatible = "pci168c,0030"; + reg = <0x0000 0 0 0 0>; + qca,no-eeprom; + mtd-mac-address = <&addr 0x0>; + mtd-mac-address-increment = <0x10>; + #gpio-cells = <2>; + gpio-controller; + }; +}; + +&usb { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + port@1 { + #address-cells = <1>; + #size-cells = <0>; + reg = <1>; + #trigger-source-cells = <0>; + + hub_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; + + hub_port2: port@2 { + reg = <2>; + #trigger-source-cells = <0>; + }; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; + mtd-mac-address = <&addr 0x0>; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0x10>; + + phy4: ethernet-phy@4 { + reg = <4>; + }; +}; + +ð0 { + status = "okay"; + + pll-data = <0xe000000 0x04000101 0x04001313>; + + mtd-mac-address = <&addr 0x0>; + mtd-mac-address-increment = <0x21>; + + phy-mode = "rgmii-rxid"; + phy-handle = <&phy4>; + + gmac-config { + device = <&gmac>; + rgmii-gmac0 = <1>; + rxd-delay = <1>; + rxdv-delay = <1>; + }; +}; diff --git a/target/linux/ath79/dts/qca9533_glinet_ar300m_nand.dts b/target/linux/ath79/dts/qca9531_glinet_ar300m-nand.dts similarity index 87% rename from target/linux/ath79/dts/qca9533_glinet_ar300m_nand.dts rename to target/linux/ath79/dts/qca9531_glinet_ar300m-nand.dts index 33226b988..82f8418b3 100644 --- a/target/linux/ath79/dts/qca9533_glinet_ar300m_nand.dts +++ b/target/linux/ath79/dts/qca9531_glinet_ar300m-nand.dts @@ -1,6 +1,11 @@ /dts-v1/; -#include "qca9533_glinet_ar300m.dtsi" +#include "qca9531_glinet_ar300m.dtsi" + +/ { + compatible = "glinet,ar300m-nand", "qca,qca9531"; + model = "GL.iNet GL-AR300M (NAND)"; +}; &spi { status = "okay"; diff --git a/target/linux/ath79/dts/qca9533_glinet_ar300m_nor.dts b/target/linux/ath79/dts/qca9531_glinet_ar300m-nor.dts similarity index 80% rename from target/linux/ath79/dts/qca9533_glinet_ar300m_nor.dts rename to target/linux/ath79/dts/qca9531_glinet_ar300m-nor.dts index 9357ea66d..36903bdb9 100644 --- a/target/linux/ath79/dts/qca9533_glinet_ar300m_nor.dts +++ b/target/linux/ath79/dts/qca9531_glinet_ar300m-nor.dts @@ -3,7 +3,12 @@ #include #include -#include "qca9533_glinet_ar300m.dtsi" +#include "qca9531_glinet_ar300m.dtsi" + +/ { + compatible = "glinet,ar300m-nor", "qca,qca9531"; + model = "GL.iNet GL-AR300M (NOR)"; +}; &spi { status = "okay"; @@ -31,6 +36,7 @@ }; partition@2 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x050000 0xfa0000>; }; diff --git a/target/linux/ath79/dts/qca9533_glinet_ar300m.dtsi b/target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi similarity index 93% rename from target/linux/ath79/dts/qca9533_glinet_ar300m.dtsi rename to target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi index 35de594bf..34fcfb32c 100644 --- a/target/linux/ath79/dts/qca9533_glinet_ar300m.dtsi +++ b/target/linux/ath79/dts/qca9531_glinet_ar300m.dtsi @@ -3,12 +3,9 @@ #include #include -#include "qca9533.dtsi" +#include "qca953x.dtsi" / { - compatible = "glinet,ar300m", "qca,qca9533"; - model = "GL.iNet GL-AR300M"; - keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ath79/dts/qca9533_glinet_gl-x750.dts b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts similarity index 94% rename from target/linux/ath79/dts/qca9533_glinet_gl-x750.dts rename to target/linux/ath79/dts/qca9531_glinet_gl-x750.dts index 14bad8aab..f8a511933 100644 --- a/target/linux/ath79/dts/qca9533_glinet_gl-x750.dts +++ b/target/linux/ath79/dts/qca9531_glinet_gl-x750.dts @@ -4,10 +4,10 @@ #include #include -#include "qca9533.dtsi" +#include "qca953x.dtsi" / { - compatible = "glinet,gl-x750", "qca,qca9533"; + compatible = "glinet,gl-x750", "qca,qca9531"; model = "GL.iNet GL-X750"; keys { @@ -48,13 +48,11 @@ 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"; }; }; }; @@ -113,6 +111,7 @@ }; partition@60000 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x060000 0xfa0000>; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dts b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dts index d73eae425..e451b7d67 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dts +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841-v11.dts @@ -22,12 +22,10 @@ system_led: system { label = "tp-link:green:system"; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wan_orange { label = "tp-link:orange:wan"; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; diff --git a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi index 3621b7e1e..34f242ac5 100644 --- a/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi +++ b/target/linux/ath79/dts/qca9533_tplink_tl-wr841.dtsi @@ -4,7 +4,7 @@ #include #include -#include "qca9533.dtsi" +#include "qca953x.dtsi" / { chosen { @@ -17,44 +17,37 @@ wifi { label = "tp-link:green:wlan"; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; qss_led: qss { label = "tp-link:green:qss"; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wan { label = "tp-link:green:wan"; gpios = <&gpio 4 GPIO_ACTIVE_LOW>; - default-state = "off"; }; lan1 { label = "tp-link:green:lan1"; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - default-state = "off"; }; lan2 { label = "tp-link:green:lan2"; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; }; lan3 { label = "tp-link:green:lan3"; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - default-state = "off"; }; lan4 { label = "tp-link:green:lan4"; gpios = <&gpio 11 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -102,6 +95,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0x3d0000>; }; diff --git a/target/linux/ath79/dts/qca9533.dtsi b/target/linux/ath79/dts/qca953x.dtsi similarity index 99% rename from target/linux/ath79/dts/qca9533.dtsi rename to target/linux/ath79/dts/qca953x.dtsi index 97179a391..4ce5bfe0a 100644 --- a/target/linux/ath79/dts/qca9533.dtsi +++ b/target/linux/ath79/dts/qca953x.dtsi @@ -3,7 +3,7 @@ #include "ath79.dtsi" / { - compatible = "qca,qca9533"; + compatible = "qca,qca9530"; #address-cells = <1>; #size-cells = <1>; diff --git a/target/linux/ath79/dts/qca9557.dtsi b/target/linux/ath79/dts/qca9557.dtsi index 379e257d0..0357be9b5 100644 --- a/target/linux/ath79/dts/qca9557.dtsi +++ b/target/linux/ath79/dts/qca9557.dtsi @@ -53,8 +53,9 @@ status = "disabled"; }; - usb_phy0: usb-phy0 { + usb_phy0: usb-phy0@18030000 { compatible ="qca,qca9550-usb-phy", "qca,ar7200-usb-phy"; + reg = <0x18030000 4>, <0x18030004 4>; reset-names = "usb-phy", "usb-suspend-override"; resets = <&rst 4>, <&rst 3>; @@ -64,8 +65,9 @@ status = "disabled"; }; - usb_phy1: usb-phy1 { + usb_phy1: usb-phy1@18030010 { compatible = "qca,qca9550-usb-phy", "qca,ar7200-usb-phy"; + reg = <0x18030010 4>, <0x18030014 4>; reset-names = "usb-phy", "usb-suspend-override"; resets = <&rst2 4>, <&rst2 3>; @@ -130,8 +132,7 @@ rst: reset-controller@1806001c { compatible = "qca,qca9550-reset", - "qca,ar7100-reset", - "simple-bus"; + "qca,ar7100-reset"; reg = <0x1806001c 0x4>; #reset-cells = <1>; diff --git a/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts b/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts index 6a3a5da6d..26d969b59 100644 --- a/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts +++ b/target/linux/ath79/dts/qca9557_buffalo_bhr-4grv2.dts @@ -33,19 +33,16 @@ diag { label = "bhr-4grv2:orange:diag"; gpios = <&gpio 20 GPIO_ACTIVE_LOW>; - default-state = "off"; }; vpn_orange { label = "bhr-4grv2:orange:vpn"; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - default-state = "off"; }; vpn_green { label = "bhr-4grv2:green:vpn"; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; diff --git a/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi b/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi index 35bc6d26b..22a23f97a 100644 --- a/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi +++ b/target/linux/ath79/dts/qca9557_iodata_wn-ac-dgr.dtsi @@ -30,33 +30,28 @@ copy { label = "iodata:green:copy"; gpios = <&gpio 2 GPIO_ACTIVE_LOW>; - default-state = "off"; }; eco { label = "iodata:green:eco"; gpios = <&gpio 3 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wlan5g { label = "iodata:green:wlan5g"; gpios = <&gpio 21 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; wlan2g { label = "iodata:green:wlan2g"; gpios = <&gpio 22 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy1tpt"; }; notification { label = "iodata:amber:notification"; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; diff --git a/target/linux/ath79/dts/qca9558_ocedo_koala.dts b/target/linux/ath79/dts/qca9558_ocedo_koala.dts index d87ddc48a..2c150971d 100644 --- a/target/linux/ath79/dts/qca9558_ocedo_koala.dts +++ b/target/linux/ath79/dts/qca9558_ocedo_koala.dts @@ -34,20 +34,17 @@ label = "koala:yellow:wlan2"; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy1tpt"; - default-state = "off"; }; wifi5 { label = "koala:red:wlan58"; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; - default-state = "off"; }; system: system { label = "koala:blue:sys"; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; diff --git a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts index 879471813..1e3cf40f7 100644 --- a/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts +++ b/target/linux/ath79/dts/qca9558_openmesh_om5p-ac-v2.dts @@ -23,25 +23,21 @@ power { label = "om5pac:blue:power"; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wifi_green { label = "om5pac:green:wifi"; gpios = <&gpio 13 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wifi_yellow { label = "om5pac:yellow:wifi"; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wifi_red { label = "om5pac:red:wifi"; gpios = <&gpio 23 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -121,6 +117,7 @@ }; partition@2 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x850000 0x7a0000>; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts b/target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts index 7228a2f46..7334a6e7e 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts +++ b/target/linux/ath79/dts/qca9558_tplink_archer-c7-v1.dts @@ -24,7 +24,6 @@ wlan5g { label = "tp-link:green:wlan5g"; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; @@ -36,6 +35,7 @@ }; firmware@20000 { + compatible = "tplink,firmware"; reg = <0x020000 0x7d0000>; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts b/target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts index f6e460460..f168a1779 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts +++ b/target/linux/ath79/dts/qca9558_tplink_archer-c7-v2.dts @@ -24,7 +24,6 @@ wlan5g { label = "tp-link:green:wlan5g"; gpios = <&gpio 17 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi b/target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi index 1d6e9a095..343d318e0 100644 --- a/target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_archer-c7.dtsi @@ -30,7 +30,6 @@ usb1 { label = "tp-link:green:usb1"; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port1>; linux,default-trigger = "usbport"; }; @@ -38,7 +37,6 @@ usb2 { label = "tp-link:green:usb2"; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; }; @@ -46,14 +44,12 @@ led_wlan2g: wlan2g { label = "tp-link:green:wlan2g"; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy1tpt"; }; qss { label = "tp-link:green:qss"; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts index d1cb6d8d1..3cc2d790d 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wdr4900-v2.dts @@ -33,7 +33,6 @@ usb1 { label = "tp-link:green:usb1"; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port1>; linux,default-trigger = "usbport"; }; @@ -41,7 +40,6 @@ usb2 { label = "tp-link:green:usb2"; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; }; @@ -49,14 +47,12 @@ wlan2g { label = "tp-link:blue:wlan2g"; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; qss { label = "tp-link:blue:qss"; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -66,7 +62,6 @@ wlan5g { label = "tp-link:blue:wlan5g"; gpios = <&ath9k 0 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy1tpt"; }; }; @@ -168,6 +163,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0x7d0000>; }; diff --git a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi index c91d3cce4..61d4aec62 100644 --- a/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi +++ b/target/linux/ath79/dts/qca9558_tplink_tl-wr1043nd.dtsi @@ -30,7 +30,6 @@ usb { label = "tp-link:green:usb"; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; }; @@ -38,14 +37,12 @@ wifi_green { label = "tp-link:green:wlan"; gpios = <&gpio 12 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; wifi_wps { label = "tp-link:green:wps"; gpios = <&gpio 18 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -123,6 +120,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0x7d0000>; }; diff --git a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts index 8489c8a1e..9d548353e 100644 --- a/target/linux/ath79/dts/qca9561_avm_fritz4020.dts +++ b/target/linux/ath79/dts/qca9561_avm_fritz4020.dts @@ -61,31 +61,26 @@ label = "fritz4020:green:wlan"; gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>; linux,default-trigger = "phy0tpt"; - default-state = "off"; }; lan { label = "fritz4020:green:lan"; gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wan { label = "fritz4020:green:wan"; gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>; - default-state = "off"; }; info { label = "fritz4020:green:info"; gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>; - default-state = "off"; }; info_red: info_red { label = "fritz4020:red:info"; gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -136,6 +131,7 @@ }; partition@1 { + compatible = "avm,eva-firmware"; label = "firmware"; reg = <0x020000 0xee0000>; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts index 0e122b4dd..59a81e497 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c58-v1.dts @@ -30,38 +30,32 @@ 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"; }; }; }; diff --git a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts index 64778df49..5470d9e49 100644 --- a/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts +++ b/target/linux/ath79/dts/qca9561_tplink_archer-c59-v1.dts @@ -30,44 +30,37 @@ 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>; }; diff --git a/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts b/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts index 34c48c628..bb1f35015 100644 --- a/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts +++ b/target/linux/ath79/dts/qca9563_elecom_wrc-300ghbk2-i.dts @@ -33,14 +33,12 @@ wlan2g { label = "wrc-300ghbk2-i:white:wlan2g"; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; wps { label = "wrc-300ghbk2-i:red:wps"; gpios = <&gpio 9 GPIO_ACTIVE_HIGH>; - default-state = "off"; }; }; diff --git a/target/linux/ath79/dts/qca9563_phicomm_k2t.dts b/target/linux/ath79/dts/qca9563_phicomm_k2t.dts index e99a1afbc..d819a76fd 100644 --- a/target/linux/ath79/dts/qca9563_phicomm_k2t.dts +++ b/target/linux/ath79/dts/qca9563_phicomm_k2t.dts @@ -8,7 +8,7 @@ / { model = "Phicomm K2T"; - compatible = "phicomm,k2t"; + compatible = "phicomm,k2t", "qca,qca9563"; aliases { led-boot = &status_red; @@ -27,19 +27,16 @@ status_blue { label = "phicomm:blue:status"; gpios = <&gpio 6 GPIO_ACTIVE_LOW>; - default-state = "off"; }; status_red: status_red { label = "phicomm:red:status"; gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; - default-state = "off"; }; status_yellow { label = "phicomm:yellow:status"; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -101,6 +98,7 @@ }; partition@90000 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x090000 0xf60000>; }; diff --git a/target/linux/ath79/dts/qca9563_rosinson_wr818.dts b/target/linux/ath79/dts/qca9563_rosinson_wr818.dts index ff853cc2c..a2595d8cd 100644 --- a/target/linux/ath79/dts/qca9563_rosinson_wr818.dts +++ b/target/linux/ath79/dts/qca9563_rosinson_wr818.dts @@ -84,6 +84,7 @@ }; partition@50000 { + compatible = "denx,uimage"; label = "firmware"; reg = <0x050000 0xf80000>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts b/target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts new file mode 100644 index 000000000..8cf86c0bc --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_archer-a7-v5.dts @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "qca9563_tplink_archer-x7-v5.dtsi" + +/ { + compatible = "tplink,archer-a7-v5", "qca,qca9563"; + model = "TP-Link Archer A7 v5"; +}; + +&mtdparts { + factory-uboot@0 { + label = "factory-uboot"; + reg = <0x000000 0x020000>; + read-only; + }; + + uboot: u-boot@20000 { + label = "u-boot"; + reg = <0x020000 0x020000>; + read-only; + }; + + firmware@40000 { + label = "firmware"; + reg = <0x040000 0xec0000>; + compatible = "denx,uimage"; + }; + + info: info@f40000 { + label = "info"; + reg = <0xf40000 0x020000>; + }; + + config: config@f60000 { + label = "config"; + reg = <0xf60000 0x050000>; + }; + + partition@fc0000 { + label = "partition-table"; + reg = <0xfc0000 0x010000>; + }; + + art: art@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; +}; diff --git a/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi b/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi new file mode 100644 index 000000000..afb33d647 --- /dev/null +++ b/target/linux/ath79/dts/qca9563_tplink_archer-x7-v5.dtsi @@ -0,0 +1,192 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca956x.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-status = &system; + }; + + gpio_leds: leds { + compatible = "gpio-leds"; + + system: system { + label = "tp-link:green:system"; + gpios = <&gpio 6 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + led_wlan2g: wlan2g { + label = "tp-link:green:wlan2g"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + usb { + label = "tp-link:green:usb"; + gpios = <&gpio 7 GPIO_ACTIVE_LOW>; + trigger-sources = <&hub_port0>; + linux,default-trigger = "usbport"; + }; + }; + + gpio_keys: keys { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 11 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wps { + label = "WPS button"; + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + gpio-export { + compatible = "gpio-export"; + + gpio_usb_power { + gpio-export,name = "tp-link:power:usb"; + gpio-export,output = <1>; + gpios = <&gpio 19 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&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>; + }; +}; + +&gpio_leds { + wlan5g { + label = "tp-link:green:wlan5g"; + gpios = <&gpio 9 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + wan { + label = "tp-link:green:wan"; + gpios = <&gpio 21 GPIO_ACTIVE_LOW>; + }; + + wan_fail { + label = "tp-link:orange:wan"; + gpios = <&gpio 20 GPIO_ACTIVE_LOW>; + }; + + lan1 { + label = "tp-link:green:lan1"; + gpios = <&gpio 8 GPIO_ACTIVE_LOW>; + }; + + lan2 { + label = "tp-link:green:lan2"; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + }; + + lan3 { + label = "tp-link:green:lan3"; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + }; + + lan4 { + label = "tp-link:green:lan4"; + gpios = <&gpio 15 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "tp-link:green:wps"; + gpios = <&gpio 1 GPIO_ACTIVE_LOW>; + }; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + mtdparts: partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy-mask = <0>; + + phy0: ethernet-phy@0 { + reg = <0>; + phy-mode = "sgmii"; + + qca,ar8327-initvals = < + 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ + 0x10 0x81000080 /* POWER_ON_STRIP */ + 0x50 0xcc35cc35 /* LED_CTRL0 */ + 0x54 0xcb37cb37 /* LED_CTRL1 */ + 0x58 0x00000000 /* LED_CTRL2 */ + 0x5c 0x00f3cf00 /* LED_CTRL3 */ + 0x7c 0x0000007e /* PORT0_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/dts/qca9563_tplink_re450-v2.dts b/target/linux/ath79/dts/qca9563_tplink_re450-v2.dts index c2e2910a1..ad55a55e5 100644 --- a/target/linux/ath79/dts/qca9563_tplink_re450-v2.dts +++ b/target/linux/ath79/dts/qca9563_tplink_re450-v2.dts @@ -33,39 +33,33 @@ wlan2g { label = "tp-link:blue:wlan2g"; gpios = <&gpio 14 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy1tpt"; }; wlan5g { label = "tp-link:blue:wlan5g"; gpios = <&gpio 5 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; lan_link { label = "tp-link:green:lan_link"; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - default-state = "off"; }; lan_data { label = "tp-link:green:lan_data"; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wps_blue { label = "tp-link:blue:wps"; gpios = <&gpio 17 GPIO_ACTIVE_HIGH>; - default-state = "off"; }; wps_red { label = "tp-link:red:wps"; gpios = <&gpio 20 GPIO_ACTIVE_HIGH>; - default-state = "off"; }; }; @@ -150,6 +144,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0x5e0000>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi index 3f6d48a78..fc23ee1dd 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043n.dtsi @@ -30,50 +30,42 @@ wifi_green { label = "tp-link:green:wlan"; gpios = <&gpio 19 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; wifi_wps { label = "tp-link:green:wps"; gpios = <&gpio 1 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wan { label = "tp-link:green:wan"; gpios = <&gpio 15 GPIO_ACTIVE_LOW>; - default-state = "off"; }; wan_fail { label = "tp-link:orange:wan"; gpios = <&gpio 16 GPIO_ACTIVE_LOW>; - default-state = "off"; }; lan1 { label = "tp-link:green:lan1"; gpios = <&gpio 9 GPIO_ACTIVE_LOW>; - default-state = "off"; }; lan2 { label = "tp-link:green:lan2"; gpios = <&gpio 14 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 20 GPIO_ACTIVE_LOW>; - default-state = "off"; }; }; @@ -136,6 +128,7 @@ }; partition@20000 { + compatible = "tplink,firmware"; label = "firmware"; reg = <0x020000 0xf30000>; }; diff --git a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts index ec10f085d..5a4c4e588 100644 --- a/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts +++ b/target/linux/ath79/dts/qca9563_tplink_tl-wr1043nd-v4.dts @@ -15,7 +15,6 @@ usb { label = "tp-link:green:usb"; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; - default-state = "off"; trigger-sources = <&hub_port0>; linux,default-trigger = "usbport"; }; diff --git a/target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi b/target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi index 9265cbdb1..ca216a25a 100644 --- a/target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi +++ b/target/linux/ath79/dts/qca9563_ubnt_unifiac.dtsi @@ -16,14 +16,12 @@ wifi_ac { label = "ubnt:white:dome"; gpios = <&gpio 7 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy0tpt"; }; wifi_n { label = "ubnt:blue:dome"; gpios = <&gpio 8 GPIO_ACTIVE_LOW>; - default-state = "off"; linux,default-trigger = "phy1tpt"; }; diff --git a/target/linux/ath79/dts/qca956x.dtsi b/target/linux/ath79/dts/qca956x.dtsi index 814537174..248c001cd 100644 --- a/target/linux/ath79/dts/qca956x.dtsi +++ b/target/linux/ath79/dts/qca956x.dtsi @@ -107,8 +107,7 @@ rst: reset-controller@1806001c { compatible = "qca,qca9560-reset", - "qca,ar7100-reset", - "simple-bus"; + "qca,ar7100-reset"; reg = <0x1806001c 0x4>; #reset-cells = <1>; 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 d029197d4..70ca0248c 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 @@ -56,6 +56,32 @@ static void ag71xx_dump_dma_regs(struct ag71xx *ag) ag71xx_rr(ag, AG71XX_REG_RX_STATUS)); } +static void ag71xx_dump_regs(struct ag71xx *ag) +{ + DBG("%s: mac_cfg1=%08x, mac_cfg2=%08x, ipg=%08x, hdx=%08x, mfl=%08x\n", + ag->dev->name, + ag71xx_rr(ag, AG71XX_REG_MAC_CFG1), + ag71xx_rr(ag, AG71XX_REG_MAC_CFG2), + ag71xx_rr(ag, AG71XX_REG_MAC_IPG), + ag71xx_rr(ag, AG71XX_REG_MAC_HDX), + ag71xx_rr(ag, AG71XX_REG_MAC_MFL)); + DBG("%s: mac_ifctl=%08x, mac_addr1=%08x, mac_addr2=%08x\n", + ag->dev->name, + ag71xx_rr(ag, AG71XX_REG_MAC_IFCTL), + ag71xx_rr(ag, AG71XX_REG_MAC_ADDR1), + ag71xx_rr(ag, AG71XX_REG_MAC_ADDR2)); + DBG("%s: fifo_cfg0=%08x, fifo_cfg1=%08x, fifo_cfg2=%08x\n", + ag->dev->name, + ag71xx_rr(ag, AG71XX_REG_FIFO_CFG0), + ag71xx_rr(ag, AG71XX_REG_FIFO_CFG1), + ag71xx_rr(ag, AG71XX_REG_FIFO_CFG2)); + DBG("%s: fifo_cfg3=%08x, fifo_cfg4=%08x, fifo_cfg5=%08x\n", + ag->dev->name, + ag71xx_rr(ag, AG71XX_REG_FIFO_CFG3), + ag71xx_rr(ag, AG71XX_REG_FIFO_CFG4), + ag71xx_rr(ag, AG71XX_REG_FIFO_CFG5)); +} + static inline void ag71xx_dump_intr(struct ag71xx *ag, char *label, u32 intr) { DBG("%s: %s intr=%08x %s%s%s%s%s%s\n", @@ -707,22 +733,7 @@ __ag71xx_link_adjust(struct ag71xx *ag, bool update) ag71xx_speed_str(ag), (DUPLEX_FULL == ag->duplex) ? "Full" : "Half"); - DBG("%s: fifo_cfg0=%#x, fifo_cfg1=%#x, fifo_cfg2=%#x\n", - ag->dev->name, - ag71xx_rr(ag, AG71XX_REG_FIFO_CFG0), - ag71xx_rr(ag, AG71XX_REG_FIFO_CFG1), - ag71xx_rr(ag, AG71XX_REG_FIFO_CFG2)); - - DBG("%s: fifo_cfg3=%#x, fifo_cfg4=%#x, fifo_cfg5=%#x\n", - ag->dev->name, - ag71xx_rr(ag, AG71XX_REG_FIFO_CFG3), - ag71xx_rr(ag, AG71XX_REG_FIFO_CFG4), - ag71xx_rr(ag, AG71XX_REG_FIFO_CFG5)); - - DBG("%s: mac_cfg2=%#x, mac_ifctl=%#x\n", - ag->dev->name, - ag71xx_rr(ag, AG71XX_REG_MAC_CFG2), - ag71xx_rr(ag, AG71XX_REG_MAC_IFCTL)); + ag71xx_dump_regs(ag); } void ag71xx_link_adjust(struct ag71xx *ag) @@ -1497,12 +1508,17 @@ static int ag71xx_probe(struct platform_device *pdev) netif_napi_add(dev, &ag->napi, ag71xx_poll, AG71XX_NAPI_WEIGHT); + ag71xx_dump_regs(ag); + ag71xx_wr(ag, AG71XX_REG_MAC_CFG1, 0); + ag71xx_hw_init(ag); - if(!of_device_is_compatible(np, "simple-mfd")) { + ag71xx_dump_regs(ag); + + if (!of_device_is_compatible(np, "simple-mfd")) { mdio_node = of_get_child_by_name(np, "mdio-bus"); - if(!IS_ERR(mdio_node)) + if (!IS_ERR(mdio_node)) of_platform_device_create(mdio_node, NULL, NULL); } diff --git a/target/linux/ath79/image/common-tp-link.mk b/target/linux/ath79/image/common-tp-link.mk index 1dd36ef52..720202de2 100644 --- a/target/linux/ath79/image/common-tp-link.mk +++ b/target/linux/ath79/image/common-tp-link.mk @@ -53,7 +53,7 @@ define Device/tplink LOADER_TYPE := gz KERNEL := kernel-bin | append-dtb | lzma KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | tplink-v1-header - IMAGES := sysupgrade.bin factory.bin + IMAGES += factory.bin IMAGE/sysupgrade.bin := append-rootfs | mktplinkfw sysupgrade | append-metadata IMAGE/factory.bin := append-rootfs | mktplinkfw factory endef diff --git a/target/linux/ath79/image/generic-tp-link.mk b/target/linux/ath79/image/generic-tp-link.mk index c89198621..2a883b253 100644 --- a/target/linux/ath79/image/generic-tp-link.mk +++ b/target/linux/ath79/image/generic-tp-link.mk @@ -1,5 +1,17 @@ include ./common-tp-link.mk +define Device/tplink_archer-a7-v5 + $(Device/tplink-safeloader-uimage) + ATH_SOC := qca9563 + IMAGE_SIZE := 15104k + DEVICE_TITLE := TP-LINK Archer A7 v5 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct ath10k-firmware-qca988x-ct + TPLINK_BOARD_ID := ARCHER-A7-V5 + BOARDNAME := ARCHER-A7-V5 + SUPPORTED_DEVICES += archer-a7-v5 +endef +TARGET_DEVICES += tplink_archer-a7-v5 + define Device/tplink_archer-c58-v1 $(Device/tplink-safeloader-uimage) ATH_SOC := qca9561 @@ -37,7 +49,7 @@ define Device/tplink_archer-c7-v2 DEVICE_TITLE := TP-LINK Archer C7 v2 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 + IMAGES += factory-us.bin factory-eu.bin IMAGE/factory-us.bin := append-rootfs | mktplinkfw factory -C US IMAGE/factory-eu.bin := append-rootfs | mktplinkfw factory -C EU endef @@ -99,6 +111,15 @@ define Device/tplink_tl-wr1043nd-v1 endef TARGET_DEVICES += tplink_tl-wr1043nd-v1 +define Device/tplink_tl-wr842n-v1 + $(Device/tplink-8m) + ATH_SOC := ar7241 + DEVICE_TITLE := TP-LINK TL-WR842N/ND v1 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport + TPLINK_HWID := 0x8420001 +endef +TARGET_DEVICES += tplink_tl-wr842n-v1 + define Device/tplink_tl-wr842n-v2 $(Device/tplink-8mlzma) ATH_SOC := ar9341 diff --git a/target/linux/ath79/image/generic-ubnt.mk b/target/linux/ath79/image/generic-ubnt.mk index 66c16e44b..681c14dfb 100644 --- a/target/linux/ath79/image/generic-ubnt.mk +++ b/target/linux/ath79/image/generic-ubnt.mk @@ -78,6 +78,13 @@ define Device/ubnt-xw ATH_SOC := ar9342 endef +define Device/ubnt_airrouter + $(Device/ubnt-xm) + DEVICE_TITLE := Ubiquiti AirRouter + SUPPORTED_DEVICES += airrouter +endef +TARGET_DEVICES += ubnt_airrouter + define Device/ubnt_bullet-m $(Device/ubnt-xm) DEVICE_TITLE := Ubiquiti Bullet-M @@ -109,7 +116,7 @@ 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 + DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct IMAGE_SIZE := 15744k IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split endef @@ -118,7 +125,7 @@ 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 + DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct IMAGE_SIZE := 15744k IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split endef @@ -127,7 +134,7 @@ 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 + DEVICE_PACKAGES += kmod-ath10k-ct ath10k-firmware-qca988x-ct IMAGE_SIZE := 15744k IMAGE/factory.bin := $$(IMAGE/sysupgrade.bin) | mkubntimage-split endef @@ -143,8 +150,6 @@ TARGET_DEVICES += ubnt_unifi define Device/ubnt_unifiac ATH_SOC := qca9563 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-ct ath10k-firmware-qca988x-ct endef @@ -182,7 +187,7 @@ define Device/ubnt_routerstation_common DEVICE_PACKAGES := -kmod-ath9k -wpad-mini -uboot-envtools kmod-usb-ohci kmod-usb2 fconfig ATH_SOC := ar7161 IMAGE_SIZE := 16128k - IMAGES := sysupgrade.bin factory.bin + IMAGES += factory.bin IMAGE/factory.bin := append-rootfs | pad-rootfs | mkubntimage | check-size $$$$(IMAGE_SIZE) IMAGE/sysupgrade.bin := append-rootfs | pad-rootfs | combined-image | check-size $$$$(IMAGE_SIZE) | append-metadata KERNEL := kernel-bin | append-dtb | lzma | pad-to $$(BLOCKSIZE) diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk index 2b4556bc7..c6cecc20d 100644 --- a/target/linux/ath79/image/generic.mk +++ b/target/linux/ath79/image/generic.mk @@ -138,6 +138,34 @@ define Device/dlink_dir-825-b1 endef TARGET_DEVICES += dlink_dir-825-b1 +define Device/dlink_dir-825-c1 + ATH_SOC := ar9344 + DEVICE_TITLE := D-LINK DIR-825 C1 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ledtrig-usbport kmod-leds-reset kmod-owl-loader + SUPPORTED_DEVICES += dir-825-c1 + IMAGE_SIZE := 15936k + IMAGES := factory.bin sysupgrade.bin + IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs + IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \ + append-string 00DB120AR9344-RT-101214-00 | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE) +endef +TARGET_DEVICES += dlink_dir-825-c1 + +define Device/dlink_dir-835-a1 + ATH_SOC := ar9344 + DEVICE_TITLE := D-LINK DIR-835 A1 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-leds-reset kmod-owl-loader + SUPPORTED_DEVICES += dir-835-a1 + IMAGE_SIZE := 15936k + IMAGES := factory.bin sysupgrade.bin + IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs + IMAGE/factory.bin := $$(IMAGE/default) | pad-offset $$$$(IMAGE_SIZE) 26 | \ + append-string 00DB120AR9344-RT-101214-00 | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE) +endef +TARGET_DEVICES += dlink_dir-835-a1 + define Device/elecom_wrc-300ghbk2-i ATH_SOC := qca9563 DEVICE_TITLE := ELECOM WRC-300GHBK2-I @@ -174,19 +202,19 @@ define Device/glinet_ar150 endef TARGET_DEVICES += glinet_ar150 -define Device/glinet_ar300m_nor - ATH_SOC := qca9533 +define Device/glinet_ar300m-nor + ATH_SOC := qca9531 DEVICE_TITLE := GL.iNet GL-AR300M DEVICE_PACKAGES := kmod-usb-core kmod-usb2 IMAGE_SIZE := 16000k SUPPORTED_DEVICES += gl-ar300m endef -TARGET_DEVICES += glinet_ar300m_nor +TARGET_DEVICES += glinet_ar300m-nor define Device/glinet_gl-x750 - ATH_SOC := qca9533 + ATH_SOC := qca9531 DEVICE_TITLE := GL.iNet GL-X750 - DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k ath10k-firmware-qca9887 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-ath10k-ct ath10k-firmware-qca9887-ct IMAGE_SIZE := 16000k endef TARGET_DEVICES += glinet_gl-x750 @@ -222,6 +250,18 @@ define Device/iodata_wn-ac1600dgr2 endef TARGET_DEVICES += iodata_wn-ac1600dgr2 +define Device/iodata_wn-ag300dgr + ATH_SOC := ar1022 + DEVICE_TITLE := I-O DATA WN-AG300DGR + IMAGE_SIZE := 15424k + IMAGES += factory.bin + IMAGE/factory.bin := append-kernel | pad-to $$$$(BLOCKSIZE) | \ + append-rootfs | pad-rootfs | check-size $$$$(IMAGE_SIZE) | \ + senao-header -r 0x30a -p 0x47 -t 2 + DEVICE_PACKAGES := kmod-usb-core kmod-usb2 +endef +TARGET_DEVICES += iodata_wn-ag300dgr + define Device/ocedo_koala ATH_SOC := qca9558 DEVICE_TITLE := OCEDO Koala @@ -253,7 +293,6 @@ define Device/pcs_cap324 ATH_SOC := ar9344 DEVICE_TITLE := PowerCloud Systems CAP324 IMAGE_SIZE := 16000k - IMAGES := sysupgrade.bin SUPPORTED_DEVICES += cap324 endef TARGET_DEVICES += pcs_cap324 @@ -262,7 +301,6 @@ define Device/pcs_cr3000 ATH_SOC := ar9341 DEVICE_TITLE := PowerCloud Systems CR3000 IMAGE_SIZE := 7808k - IMAGES := sysupgrade.bin SUPPORTED_DEVICES += cr3000 endef TARGET_DEVICES += pcs_cr3000 @@ -272,7 +310,6 @@ define Device/pcs_cr5000 DEVICE_TITLE := PowerCloud Systems CR5000 DEVICE_PACKAGES := kmod-usb2 kmod-usb-core IMAGE_SIZE := 7808k - IMAGES := sysupgrade.bin SUPPORTED_DEVICES += cr5000 endef TARGET_DEVICES += pcs_cr5000 @@ -280,7 +317,7 @@ TARGET_DEVICES += pcs_cr5000 define Device/netgear_wndr3x00 ATH_SOC := ar7161 KERNEL := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma - IMAGES := sysupgrade.bin factory.img + IMAGES += factory.img IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE) IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE) @@ -316,7 +353,6 @@ define Device/pisen_wmm003n DEVICE_TITLE := Pisen WMM003N (Cloud Easy Power) DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-chipidea2 TPLINK_HWID := 0x07030101 - IMAGES := sysupgrade.bin endef TARGET_DEVICES += pisen_wmm003n @@ -334,12 +370,8 @@ TARGET_DEVICES += netgear_wndr3800 define Device/phicomm_k2t ATH_SOC := qca9563 DEVICE_TITLE := Phicomm K2T - KERNEL := kernel-bin | append-dtb | lzma | uImage lzma - KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | uImage lzma IMAGE_SIZE := 15744k - IMAGES := sysupgrade.bin - IMAGE/default := append-kernel | append-rootfs | pad-rootfs - IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE) + IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) DEVICE_PACKAGES := kmod-leds-reset kmod-ath10k-ct ath10k-firmware-qca9888-ct endef TARGET_DEVICES += phicomm_k2t @@ -364,3 +396,11 @@ define Device/wd_mynet-wifi-rangeextender SUPPORTED_DEVICES += mynet-rext endef TARGET_DEVICES += wd_mynet-wifi-rangeextender + +define Device/winchannel_wb2000 + ATH_SOC := ar9344 + DEVICE_TITLE := Winchannel WB2000 + IMAGE_SIZE := 15872k + DEVICE_PACKAGES := kmod-i2c-core kmod-i2c-gpio kmod-rtc-ds1307 kmod-usb2 kmod-usb-ledtrig-usbport +endef +TARGET_DEVICES += winchannel_wb2000 diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk index 979afd2b2..5c7712308 100644 --- a/target/linux/ath79/image/nand.mk +++ b/target/linux/ath79/image/nand.mk @@ -1,13 +1,13 @@ -define Device/glinet_ar300m_nand - ATH_SOC := qca9533 +define Device/glinet_ar300m-nand + ATH_SOC := qca9531 DEVICE_TITLE := GL-AR300M (NAND) DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-storage kmod-usb-ledtrig-usbport KERNEL_SIZE := 2048k BLOCKSIZE := 128k PAGESIZE := 2048 VID_HDR_OFFSET := 512 - IMAGES := factory.ubi sysupgrade.tar - IMAGE/sysupgrade.tar := sysupgrade-tar + IMAGES += factory.ubi + IMAGE/sysupgrade.bin := sysupgrade-tar IMAGE/factory.ubi := append-kernel | pad-to $$$$(KERNEL_SIZE) | append-ubi endef -TARGET_DEVICES += glinet_ar300m_nand +TARGET_DEVICES += glinet_ar300m-nand diff --git a/target/linux/ath79/image/tiny-netgear.mk b/target/linux/ath79/image/tiny-netgear.mk index 00ed3e856..8d0de15a1 100644 --- a/target/linux/ath79/image/tiny-netgear.mk +++ b/target/linux/ath79/image/tiny-netgear.mk @@ -10,7 +10,7 @@ define Device/netgear_wnr612-v2 KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma NETGEAR_BOARD_ID := REALWNR612V2 IMAGE_SIZE := 3904k - IMAGES := sysupgrade.bin factory.img + IMAGES += factory.img IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE) IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE) @@ -26,7 +26,7 @@ define Device/on_n150r KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma -d20 | netgear-uImage lzma NETGEAR_BOARD_ID := N150R IMAGE_SIZE := 3904k - IMAGES := sysupgrade.bin factory.img + IMAGES += factory.img IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | netgear-squashfs | append-rootfs | pad-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE) IMAGE/factory.img := $$(IMAGE/default) | netgear-dni | check-size $$$$(IMAGE_SIZE)