diff --git a/target/linux/ramips/base-files/etc/board.d/01_leds b/target/linux/ramips/base-files/etc/board.d/01_leds index 6f2e624a1d..83cb88ad5c 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -13,31 +13,40 @@ boardname="${board##*,}" board_config_update case $board in -3g-6200n) - set_wifi_led "$boardname:amber:wlan" - ;; -3g-6200nl|\ -skylab,skw92a|\ -wnce2001) - set_wifi_led "$boardname:green:wlan" - ;; +3g-6200n|\ br-6475nd|\ mzk-w300nh2) set_wifi_led "$boardname:amber:wlan" ;; +3g-6200nl|\ +air3gii|\ +hilink,hlk-7628n|\ +mr-102n|\ +skylab,skw92a|\ +wnce2001|\ +zbt-we2026) + set_wifi_led "$boardname:green:wlan" + ;; ai-br100) ucidef_set_led_netdev "wan" "wan" "$boardname:blue:wan" "eth0.2" set_wifi_led "$boardname:blue:wlan" ;; -air3gii) - set_wifi_led "$boardname:green:wlan" - ;; alfa-network,ac1200rm) set_wifi_led "$boardname:green:wlan2g" "wlan1" ;; -alfa-network,awusfree1) +alfa-network,awusfree1|\ +edimax,br-6478ac-v2) set_wifi_led "$boardname:blue:wlan" ;; +alfa-network,r36m-e4g) + ucidef_set_led_netdev "4g" "4g" "$boardname:orange:4g" "wwan0" + ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x8" + ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10" + ;; +alfa-network,tube-e4g) + ucidef_set_led_netdev "4g" "4g" "$boardname:green:4g" "wwan0" + ucidef_set_led_netdev "lan" "lan" "$boardname:blue:lan" "eth0" + ;; all0256n-4M|\ all0256n-8M) ucidef_set_rssimon "wlan0" "200000" "1" @@ -60,6 +69,10 @@ bdcom,wap2100-sk|\ hiwifi,hc5861b) set_wifi_led "$boardname:green:wlan2g" ;; +belkin,f9k1109v1) + set_usb_led "$boardname:green:usb1" + ucidef_set_led_netdev "lan" "lan" "$boardname:blue:wps" "eth0" + ;; broadway) set_wifi_led "$boardname:red:wps_active" ;; @@ -82,36 +95,52 @@ cf-wr800n) ucidef_set_led_netdev "lan" "lan" "$boardname:white:ethernet" eth0.1 set_wifi_led "$boardname:white:wifi" ;; -d240) +cudy,wr1000) + ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x10" + ucidef_set_led_switch "lan1" "lan1" "$boardname:blue:lan1" "switch0" "0x08" + ucidef_set_led_switch "lan2" "lan2" "$boardname:blue:lan2" "switch0" "0x04" + ;; +d240|\ +mlw221|\ +mlwg2|\ +rakwireless,rak633|\ +rt-ac51u) set_wifi_led "$boardname:blue:wifi" ;; dcs-930l-b1) ucidef_set_led_netdev "wifi" "WiFi" "$boardname:blue:wps" ;; dir-300-b1|\ -dir-600-b1|\ -dir-620-a1) - set_wifi_led "rt2800pci-phy0::radio" - ;; dir-300-b7|\ dir-320-b1|\ +dir-600-b1|\ dir-610-a1|\ +dir-615-d|\ +dir-615-h1|\ +dir-620-a1|\ esr-9753|\ hlk-rm04|\ +kn|\ +nbg-419n2|\ sl-r7205|\ v11st-fe|\ w306r-v20|\ +w502u|\ wt1520-4M|\ -wt1520-8M) - set_wifi_led "rt2800pci-phy0::radio" - ;; -dir-615-d|\ -dir-615-h1) +wt1520-8M|\ +zyxel,keenetic-start) set_wifi_led "rt2800pci-phy0::radio" ;; dir-620-d1|\ dlink,dwr-116-a1|\ -mzk-ex300np) +head-weblink,hdrm200|\ +kn_rc|\ +kn_rf|\ +kng_rc|\ +mzk-ex300np|\ +oy-0001|\ +tew-714tru|\ +zbt-wr8305rt) set_wifi_led "$boardname:green:wifi" ;; dlink,dwr-118-a1) @@ -134,9 +163,6 @@ dlink,dwr-922-e2) dir-860l-b1) ucidef_set_led_netdev "wan" "wan" "$boardname:green:net" "eth0.2" ;; -edimax,br-6478ac-v2) - set_wifi_led "$boardname:blue:wlan" - ;; ex2700|\ wn3000rpv3) set_wifi_led "$boardname:green:router" @@ -148,7 +174,8 @@ ex3700) f5d8235-v1) set_wifi_led "$boardname:blue:wireless" ;; -fonera20n) +fonera20n|\ +tiny-ac) set_wifi_led "$boardname:orange:wifi" ;; gnubee,gb-pc1|\ @@ -188,19 +215,15 @@ ht-tm02) ucidef_set_led_netdev "eth" "Ethernet" "$boardname:green:lan" "eth0" set_wifi_led "$boardname:blue:wlan" ;; +iodata,wn-ac1167gr|\ +iodata,wn-ac733gr3) + ucidef_set_led_wlan "wlan5g" "WLAN5G" "$boardname:green:wlan5g" "phy0radio" + ucidef_set_led_wlan "wlan2g" "WLAN2G" "$boardname:green:wlan2g" "phy1radio" + ;; kimax,u35wf) set_wifi_led "$boardname:blue:wifi" ucidef_set_led_netdev "eth" "ETH" "$boardname:green:eth" "eth0" ;; -kn|\ -nbg-419n2) - set_wifi_led "rt2800pci-phy0::radio" - ;; -kn_rc|\ -kn_rf|\ -kng_rc) - set_wifi_led "$boardname:green:wifi" - ;; lava,lr-25g001) ucidef_set_led_netdev "wlan2g" "WiFi 2.4GHz" "$boardname:green:wlan2g" "wlan1" ucidef_set_led_netdev "wlan5g" "WiFi 5GHz" "$boardname:green:wlan5g" "wlan0" @@ -223,29 +246,6 @@ mikrotik,rbm11g) miniembplug) set_wifi_led "$boardname:red:wlan" ;; -xiaomi,mir3p) - ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x10" "0x08" - ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x02" "0x08" - ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x04" "0x08" - ucidef_set_led_switch "lan3-amber" "LAN3 (amber)" "$boardname:amber:lan3" "switch0" "0x08" "0x08" - ;; -mir3g) - ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x02" "0x08" - ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x08" "0x08" - ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x04" "0x08" - ;; -mir4) - ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x08" "0x08" - ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x01" "0x08" - ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x02" "0x08" - ;; -mlw221|\ -mlwg2) - set_wifi_led "$boardname:blue:wifi" - ;; -mr-102n) - set_wifi_led "$boardname:green:wlan" - ;; mr200) ucidef_set_led_netdev "lan" "lan" "$boardname:white:lan" "eth0.1" ucidef_set_led_netdev "wan" "wan" "$boardname:white:wan" "usb0" @@ -254,16 +254,14 @@ mr200) mtc,wr1201) ucidef_set_led_switch "eth_link" "LAN link" "$boardname:green:eth_link" "switch0" "0x0f" ;; -mzk-ex750np) +mzk-ex750np|\ +zbtlink,zbt-we826-e) set_wifi_led "$boardname:red:wifi" ;; netgear,r6120) ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x0f" + ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10" ucidef_set_led_wlan "wlan2g" "WiFi 2.4GHz" "$boardname:green:wlan2g" "phy0tpt" - ucidef_set_led_wlan "wlan5g" "WiFi 5GHz" "$boardname:green:wlan5g" "phy1tpt" - ;; -oy-0001) - set_wifi_led "$boardname:green:wifi" ;; gehua,ghl-r-001|\ pbr-m1) @@ -282,9 +280,9 @@ px-4885-8M) set_wifi_led "px-4885:orange:wifi" ;; r6220|\ -netgear,r6350) - ucidef_set_led_netdev "wan" "wan" "$boardname:green:wan" eth0.2 - set_wifi_led "$boardname:green:wifi" +netgear,r6350|\ +wndr3700v5) + ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x10" ;; re350-v1) ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "$boardname:blue:wifi2G" "wlan0" @@ -296,13 +294,6 @@ rp-n53) ucidef_set_led_netdev "eth" "Network" "$boardname:white:back" "eth0" set_wifi_led "$boardname:blue:wifi" ;; -rt-ac51u) - set_wifi_led "$boardname:blue:wifi" - ;; -rt-ac54u) - ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "$boardname:blue:wifi" "wlan1" - set_usb_led "$boardname:blue:usb" - ;; rt-n12p) ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" eth0.1 ucidef_set_led_netdev "wan" "wan" "$boardname:green:wan" eth0.2 @@ -317,12 +308,6 @@ tama,w06) ucidef_set_led_netdev "wan" "WAN" "$boardname:green:wan" "eth0" ucidef_set_led_wlan "wlan" "WLAN" "$boardname:green:wlan" "phy0tpt" ;; -tew-714tru) - set_wifi_led "$boardname:green:wifi" - ;; -tiny-ac) - set_wifi_led "$boardname:orange:wifi" - ;; tl-wr840n-v4) ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan" "phy0tpt" ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e" @@ -351,7 +336,8 @@ tplink,c20-v4) ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ucidef_set_led_netdev "wlan2g" "wlan2g" "$boardname:green:wlan2g" "wlan0" ;; -tplink,c50-v3) +tplink,c50-v3|\ +tplink,c50-v4) ucidef_set_led_switch "lan" "lan" "$boardname:green:lan" "switch0" "0x1e" ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ucidef_set_led_wlan "wlan2g" "wlan2g" "$boardname:green:wlan2g" "phy0tpt" @@ -391,9 +377,6 @@ vocore-8M|\ vocore-16M) ucidef_set_led_netdev "eth" "ETH" "vocore:orange:eth" "eth0" ;; -w502u) - set_wifi_led "rt2800pci-phy0::radio" - ;; wavlink,wl-wn570ha1) ucidef_set_led_switch "wan" "wan" "$boardname:green:wan" "switch0" "0x01" ucidef_set_rssimon "wlan0" "200000" "1" @@ -402,20 +385,31 @@ wavlink,wl-wn570ha1) ucidef_set_led_rssi "wifi-high" "wifi-high" "$boardname:green:wifi-high" "wlan0" "85" "100" set_wifi_led "$boardname:green:wifi" ;; -we1026-5g-16m) - ucidef_set_led_netdev "lan" "LAN" "we1026-5g:green:lan" "eth0" - set_wifi_led "we1026-5g:green:wifi" - ;; -wl-wn575a3) +wavlink,wl-wn575a3) ucidef_set_rssimon "wlan1" "200000" "1" ucidef_set_led_rssi "wifi-low" "wifi-low" "$boardname:green:wifi-low" "wlan1" "1" "49" ucidef_set_led_rssi "wifi-med" "wifi-med" "$boardname:green:wifi-med" "wlan1" "50" "84" ucidef_set_led_rssi "wifi-high" "wifi-high" "$boardname:green:wifi-high" "wlan1" "85" "100" ;; +we1026-5g-16m) + ucidef_set_led_netdev "lan" "LAN" "we1026-5g:green:lan" "eth0" + set_wifi_led "we1026-5g:green:wifi" + ;; wrh-300cr) set_wifi_led "$boardname:green:wlan" ucidef_set_led_netdev "lan" "lan" "$boardname:green:ethernet" "eth0" ;; +xiaomi,mir3g) + ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x02" "0x08" + ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x08" "0x08" + ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x04" "0x08" + ;; +xiaomi,mir3p) + ucidef_set_led_switch "wan-amber" "WAN (amber)" "$boardname:amber:wan" "switch0" "0x10" "0x08" + ucidef_set_led_switch "lan1-amber" "LAN1 (amber)" "$boardname:amber:lan1" "switch0" "0x02" "0x08" + ucidef_set_led_switch "lan2-amber" "LAN2 (amber)" "$boardname:amber:lan2" "switch0" "0x04" "0x08" + ucidef_set_led_switch "lan3-amber" "LAN3 (amber)" "$boardname:amber:lan3" "switch0" "0x08" "0x08" + ;; xzwifi,creativebox-v1) ucidef_set_led_switch "internet" "internet" "$boardname:blue:internet" "switch0" "0x10" ;; @@ -440,9 +434,6 @@ zbt-ape522ii) zbt-wa05) set_wifi_led "$boardname:blue:air" ;; -zbt-we2026) - set_wifi_led "$boardname:green:wlan" - ;; zbt-we826-16M|\ zbt-we826-32M) set_wifi_led "zbt-we826:green:wifi" @@ -453,9 +444,6 @@ zbtlink,zbt-we1226) ucidef_set_led_switch "lan2" "LAN2" "$boardname:green:lan2" "switch0" "0x02" ucidef_set_led_switch "wan" "WAN" "$boardname:green:wan" "switch0" "0x10" ;; -zbt-wr8305rt) - set_wifi_led "$boardname:green:wifi" - ;; zorlik,zl5900v2) ucidef_set_led_netdev "lan" "lan" "$boardname:green:lan" eth0 ;; diff --git a/target/linux/ramips/base-files/etc/board.d/02_network b/target/linux/ramips/base-files/etc/board.d/02_network index 7f0dbbe003..0ffd5d6560 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -33,21 +33,14 @@ ramips_setup_interfaces() case $board in 11acnas|\ d-team,newifi-d2|\ + dir-615-h1|\ w2914nsv2|\ - XiaoYu-C5) - ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" - ;; zbt-we2026) ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan:5" "6@eth0" ;; 3g150b|\ 3g300m|\ - adslr,g7) - ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" - ;; a5-v11|\ all0256n-4M|\ all0256n-8M|\ @@ -94,7 +87,6 @@ ramips_setup_interfaces() dir-300-b7|\ dir-320-b1|\ dir-610-a1|\ - dir-615-h1|\ dir-810l|\ dlink,dwr-116-a1|\ dlink,dwr-921-c1|\ @@ -104,6 +96,7 @@ ramips_setup_interfaces() hc5661a|\ hc5962|\ hlk-rm04|\ + k2p|\ kn|\ kn_rc|\ mac1200rv2|\ @@ -114,31 +107,31 @@ ramips_setup_interfaces() mtc,wr1201|\ mzk-750dhp|\ mzk-w300nh2|\ - netgear,r6120|\ nixcore-x1-8M|\ nixcore-x1-16M|\ oy-0001|\ pbr-m1|\ psg1208|\ psg1218a|\ - r6220|\ - netgear,r6350|\ rt-n12p|\ sap-g3200u3|\ sk-wb8|\ + telco-electronics,x1|\ + totolink,lr1200|\ unielec,u7621-06-256m-16m|\ unielec,u7621-06-512m-64m|\ vr500|\ wavlink,wl-wn570ha1|\ + wavlink,wl-wn575a3|\ wf-2881|\ whr-g300n|\ mqmaker,witi-256m|\ mqmaker,witi-512m|\ - wl-wn575a3|\ - wndr3700v5|\ youku-yk1|\ + youku,yk-l2|\ zbt-ape522ii|\ zbt-we1326|\ + zbtlink,zbt-we826-e|\ zbtlink,zbt-we3526|\ zbt-we826-16M|\ zbt-we826-32M|\ @@ -149,16 +142,12 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" ;; - k2p) - ucidef_add_switch "switch0" \ - "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "6@eth0" - ucidef_set_interface_lan "eth0.1 ra0 rax0 apcli0 apclix0" - ;; gehua,ghl-r-001) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "4:wan" "6@eth0" ;; alfa-network,awusfree1|\ + alfa-network,tube-e4g|\ cs-qr10|\ d105|\ dlink,dap-1522-a1|\ @@ -173,6 +162,7 @@ ramips_setup_interfaces() ravpower,wd03|\ tama,w06|\ tplink,tl-mr3020-v3|\ + tplink,tl-wr802n-v4|\ u25awf-h1|\ wli-tx4-ag300n|\ wmdr-143n|\ @@ -181,6 +171,19 @@ ramips_setup_interfaces() wrh-300cr) ucidef_set_interface_lan "eth0" ;; + alfa-network,quad-e4g|\ + netgear,r6120|\ + r6220|\ + netgear,r6350|\ + wndr3700v5) + ucidef_add_switch "switch0" \ + "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0" + ;; + alfa-network,r36m-e4g|\ + wcr-1166ds) + ucidef_add_switch "switch0" \ + "3:lan" "4:wan" "6@eth0" + ;; dlink,dwr-118-a1) ucidef_add_switch "switch0" \ "1:lan:2" "2:lan:3" "3:lan:1" "4:lan:0" "5:wan" "6@eth0" @@ -189,14 +192,6 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan:2" "2:lan:1" "3:lan:3" "4:lan" "0:wan" "6@eth0" ;; - mir3g) - ucidef_add_switch "switch0" \ - "2:lan:2" "3:lan:1" "1:wan" "6t@eth0" - ;; - mir4) - ucidef_add_switch "switch0" \ - "1:lan:1" "2:lan:2" "4:wan" "6t@eth0" - ;; psg1218b) ucidef_add_switch "switch0" \ "0:lan:3" "1:lan:2" "2:lan:1" "3:wan" "6@eth0" @@ -210,11 +205,12 @@ ramips_setup_interfaces() ;; ar670w|\ ar725w|\ - rt-ac54u|\ + rakwireless,rak633|\ rt-ac51u) ucidef_add_switch "switch0" \ "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0" ;; + belkin,f9k1109v1|\ rt-n15|\ wl-351) ucidef_add_switch "switch0" \ @@ -226,6 +222,7 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "6t@eth0" ;; + asus,rt-ac57u|\ atp-52b|\ awm002-evb-4M|\ awm002-evb-8M|\ @@ -235,17 +232,19 @@ ramips_setup_interfaces() gl-mt300a|\ gl-mt300n|\ gl-mt750|\ + hilink,hlk-7628n|\ hiwifi,hc5861b|\ jhr-n805r|\ jhr-n825r|\ jhr-n926r|\ + mikrotik,rb750gr3|\ mikrotik,rbm33g|\ mzk-wdpr|\ - rb750gr3|\ rt-n14u|\ skylab,skw92a|\ tplink,c20-v4|\ tplink,c50-v3|\ + tplink,c50-v4|\ tplink,tl-mr3420-v5|\ tplink,tl-wr842n-v5|\ tl-wr840n-v4|\ @@ -310,6 +309,10 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "4:lan" "6t@eth0" ;; + cudy,wr1000) + ucidef_add_switch "switch0" \ + "2:lan:2" "3:lan:1" "4:wan" "6@eth0" + ;; cy-swr1100) ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:lan" "3:lan" "4:wan" "9@eth0" @@ -329,6 +332,7 @@ ramips_setup_interfaces() "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0" ;; hc5661|\ + head-weblink,hdrm200|\ y1s) ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "5:lan" "0:wan" "6@eth0" @@ -337,6 +341,11 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "5:wan" "6@eth0" ;; + iodata,wn-ac1167gr|\ + iodata,wn-ac733gr3) + ucidef_add_switch "switch1" \ + "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0" + ;; kn_rf) ucidef_add_switch "switch0" \ "0:wan" "1:lan" "2:lan" "3:lan" "4:lan" "6@eth0" @@ -373,6 +382,9 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "5:wan" "6@eth0" ;; + dlink,dir-510l|\ + glinet,vixmini|\ + netgear,ex6150|\ re350-v1) ucidef_add_switch "switch0" \ "0:lan" "6@eth0" @@ -419,10 +431,6 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "5@eth0" ;; - wcr-1166ds) - ucidef_add_switch "switch0" \ - "3:lan" "4:wan" "6@eth0" - ;; wcr-150gn|\ we1026-5g-16m) ucidef_add_switch "switch0" \ @@ -436,24 +444,36 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "0:lan" "1:lan" "2:wan" "6@eth0" ;; + wiznet,wizfi630s) + ucidef_add_switch "switch0" \ + "0:wan" "3:lan" "4:lan" "6@eth0" + ;; wt3020-4M|\ wt3020-8M) ucidef_add_switch "switch0" \ "4:lan" "0:wan" "6@eth0" ;; + xiaomi,mir3g) + ucidef_add_switch "switch0" \ + "2:lan:2" "3:lan:1" "1:wan" "6t@eth0" + ;; xiaomi,mir3p) ucidef_add_switch "switch0" \ "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0" ;; - xiaomi,miwifi-r3) + xiaomi,mir4a-100m) ucidef_add_switch "switch0" \ - "1:lan" "4:lan" "0:wan" "6@eth0" + "4:lan:1" "2:lan:2" "0:wan" "6@eth0" ;; zbtlink,zbt-we1226|\ y1) ucidef_add_switch "switch0" \ "0:lan:2" "1:lan:1" "4:wan" "6@eth0" ;; + zyxel,keenetic-start) + ucidef_add_switch "switch0" \ + "0:lan:3" "1:lan:2" "2:lan:1" "3:lan:0" "4:wan" "6@eth0" + ;; *) RT3X5X=`cat /proc/cpuinfo | egrep "(RT3.5|RT5350)"` if [ -n "${RT3X5X}" ]; then @@ -477,6 +497,19 @@ ramips_setup_macs() wmdr-143n) lan_mac=$(cat /sys/class/net/eth0/address) ;; + asus,rt-ac57u|\ + vr500) + lan_mac=$(mtd_get_mac_binary factory 57344) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; + alfa-network,quad-e4g|\ + elecom,wrc-1167ghbk2-s|\ + elecom,wrc-2533gst|\ + elecom,wrc-1900gst|\ + sk-wb8) + wan_mac=$(mtd_get_mac_binary factory 57350) + ;; + alfa-network,r36m-e4g|\ carambola|\ freestation5|\ w502u|\ @@ -490,7 +523,7 @@ ramips_setup_macs() dir-320-b1|\ dir-620-a1|\ esr-9753|\ - freestation5|\ + hilink,hlk-7628n|\ hlk-rm04|\ mpr-a1|\ psr-680w|\ @@ -501,22 +534,27 @@ ramips_setup_macs() lan_mac=$(macaddr_setbit_la "$lan_mac") wan_mac=$(macaddr_add "$lan_mac" 1) ;; + belkin,f9k1109v1) + wan_mac=$(mtd_get_mac_ascii uboot-env HW_WAN_MAC) + lan_mac=$(mtd_get_mac_ascii uboot-env HW_LAN_MAC) + ;; br-6475nd) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(mtd_get_mac_binary devdata 7) ;; cy-swr1100|\ - dch-m225) - lan_mac=$(mtd_get_mac_ascii factory lanmac) - ;; dir-645) lan_mac=$(mtd_get_mac_ascii nvram lanmac) wan_mac=$(mtd_get_mac_ascii nvram wanmac) ;; + dch-m225) + lan_mac=$(mtd_get_mac_ascii factory lanmac) + ;; dir-860l-b1) lan_mac=$(mtd_get_mac_ascii factory lanmac) wan_mac=$(mtd_get_mac_ascii factory wanmac) ;; + dlink,dir-510l|\ dlink,dwr-116-a1|\ dlink,dwr-118-a1|\ dlink,dwr-118-a2|\ @@ -529,18 +567,12 @@ ramips_setup_macs() e1700) wan_mac=$(mtd_get_mac_ascii config WAN_MAC_ADDR) ;; - edimax,br-6478ac-v2) + edimax,br-6478ac-v2|\ + netgear,r6350) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 2) ;; - elecom,wrc-1167ghbk2-s|\ - elecom,wrc-2533gst|\ - elecom,wrc-1900gst|\ - sk-wb8) - wan_mac=$(mtd_get_mac_binary factory 57350) - ;; gl-mt300n-v2|\ - miwifi-mini|\ whr-g300n) wan_mac=$(mtd_get_mac_binary factory 4) ;; @@ -552,6 +584,10 @@ ramips_setup_macs() [ -n "$lan_mac" ] || lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 1) ;; + iodata,wn-ac1167gr|\ + iodata,wn-ac733gr3) + wan_mac=$(macaddr_add "$(mtd_get_mac_binary Factory 4)" -1) + ;; iodata,wn-ax1167gr|\ iodata,wn-gx300gr) wan_mac=$(macaddr_add "$(mtd_get_mac_binary Factory 4)" 1) @@ -569,18 +605,9 @@ ramips_setup_macs() lan_mac=$(mtd_get_mac_binary factory_info 13) wan_mac=$(macaddr_add "$lan_mac" 1) ;; - mir3g|\ - xiaomi,mir3p) - lan_mac=$(mtd_get_mac_binary Factory 0xe006) - ;; - mir4) - lan_mac=$(mtd_get_mac_binary Factory 0xe006) - wan_mac=$(mtd_get_mac_binary Factory 0xe000) - ;; - xiaomi,miwifi-r3|\ - k2p) - lan_mac=$(mtd_get_mac_binary factory 0xe000) - wan_mac=$(mtd_get_mac_binary factory 0xe006) + miwifi-mini) + wan_mac=$(cat /sys/class/net/eth0/address) + lan_mac=$(macaddr_setbit_la "$wan_mac") ;; m3|\ m4-4M|\ @@ -604,11 +631,6 @@ ramips_setup_macs() lan_mac=$(mtd_get_mac_binary factory 40) wan_mac=$(mtd_get_mac_binary factory 46) ;; - r6220|\ - netgear,r6350) - wan_mac=$(mtd_get_mac_binary factory 4) - lan_mac=$(macaddr_add "$wan_mac" 1) - ;; rt-n56u) lan_mac=$(cat /sys/class/net/eth0/address) lan_mac=$(macaddr_setbit_la "$lan_mac") @@ -628,10 +650,6 @@ ramips_setup_macs() lan_mac=$(mtd_get_mac_ascii u-boot-env LAN_MAC_ADDR) wan_mac=$(mtd_get_mac_ascii u-boot-env WAN_MAC_ADDR) ;; - vr500) - lan_mac=$(mtd_get_mac_binary factory 57344) - wan_mac=$(mtd_get_mac_binary factory 57350) - ;; w306r-v20) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 5) @@ -659,6 +677,13 @@ ramips_setup_macs() wlr-6000) wan_mac=$(macaddr_add "$(mtd_get_mac_binary factory 32772)" 2) ;; + xiaomi,mir3g|\ + xiaomi,mir3p) + lan_mac=$(mtd_get_mac_binary Factory 0xe006) + ;; + zyxel,keenetic-start) + wan_mac=$(mtd_get_mac_binary factory 40) + ;; *) lan_mac=$(cat /sys/class/net/eth0/address) wan_mac=$(macaddr_add "$lan_mac" 1) diff --git a/target/linux/ramips/base-files/etc/board.d/03_gpio_switches b/target/linux/ramips/base-files/etc/board.d/03_gpio_switches index a847a64d6b..1406f91f8f 100755 --- a/target/linux/ramips/base-files/etc/board.d/03_gpio_switches +++ b/target/linux/ramips/base-files/etc/board.d/03_gpio_switches @@ -7,6 +7,24 @@ board_config_update board=$(board_name) case "$board" in +dlink,dir-510l) + ucidef_add_gpio_switch "usb_enable1" "USB 1A enable" "12" "0" + ucidef_add_gpio_switch "usb_enable05" "USB 0.5A enable" "13" "1" + ;; +head-weblink,hdrm200) + ucidef_add_gpio_switch "sim_switch" "SIM slot switch" "0" + ucidef_add_gpio_switch "io1" "I/O 1" "1" + ucidef_add_gpio_switch "io2" "I/O 2" "2" + ucidef_add_gpio_switch "io3" "I/O 3" "11" + ucidef_add_gpio_switch "io4" "I/O 4" "14" + ucidef_add_gpio_switch "power_mpcie" "mPCIe power" "21" "1" + ;; +mikrotik,rb750gr3) + ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "17" + ;; +telco-electronics,x1) + ucidef_add_gpio_switch "modem_reset" "Modem Reset" "16" + ;; ubnt-erx) ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "0" ;; @@ -17,6 +35,10 @@ ubnt-erx-sfp) ucidef_add_gpio_switch "poe_power_port3" "PoE Power Port3" "499" ucidef_add_gpio_switch "poe_power_port4" "PoE Power Port4" "500" ;; +zbtlink,zbt-we826-e) + ucidef_add_gpio_switch "sim_switch" "SIM slot switch" "13" + ucidef_add_gpio_switch "power_mpcie" "mPCIe power" "14" "1" + ;; esac board_config_flush diff --git a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom index 13a4687251..fc044c123e 100644 --- a/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom +++ b/target/linux/ramips/base-files/etc/hotplug.d/firmware/10-rt2x00-eeprom @@ -15,7 +15,7 @@ rt2x00_eeprom_extract() { [ -n "$mtd" ] || \ rt2x00_eeprom_die "no mtd device found for partition $part" - dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 2>/dev/null || \ + dd if=$mtd of=/lib/firmware/$FIRMWARE iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \ rt2x00_eeprom_die "failed to extract from $mtd" } @@ -39,7 +39,7 @@ rt2x00_eeprom_set_macaddr() { rt2x00_eeprom_die "invalid wlan mac address" macaddr_2bin $macaddr | dd of=/lib/firmware/$FIRMWARE \ - conv=notrunc bs=1 seek=4 count=6 2>/dev/null || \ + conv=notrunc oflag=seek_bytes bs=6 seek=4 count=1 2>/dev/null || \ rt2x00_eeprom_die "failed to write mac address to eeprom file" } @@ -54,6 +54,7 @@ board=$(board_name) case "$FIRMWARE" in "soc_wmac.eeprom") case $board in + dlink,dir-510l|\ dlink,dwr-116-a1|\ dlink,dwr-118-a1|\ dlink,dwr-118-a2|\ diff --git a/target/linux/ramips/base-files/etc/init.d/bootcount b/target/linux/ramips/base-files/etc/init.d/bootcount index e086e055e6..dd7cf1aed9 100755 --- a/target/linux/ramips/base-files/etc/init.d/bootcount +++ b/target/linux/ramips/base-files/etc/init.d/bootcount @@ -1,12 +1,21 @@ #!/bin/sh /etc/rc.common + START=99 -boot() { + +start() { + . /lib/functions.sh + case $(board_name) in - samknows,whitebox-v8) - fw_setenv bootcount 0 + alfa-network,ac1200rm|\ + alfa-network,awusfree1|\ + alfa-network,quad-e4g|\ + alfa-network,r36m-e4g|\ + alfa-network,tube-e4g) + [ -n "$(fw_printenv bootcount bootchanged 2>/dev/null)" ] &&\ + echo -e "bootcount\nbootchanged\n" | /usr/sbin/fw_setenv -s - ;; - xiaomi,miwifi-nano) - fw_setenv flag_boot_success 1 + sk-wb8) + fw_setenv bootcount 0 ;; esac } diff --git a/target/linux/ramips/base-files/etc/init.d/set-irq-affinity b/target/linux/ramips/base-files/etc/init.d/set-irq-affinity new file mode 100755 index 0000000000..9a3afefa5a --- /dev/null +++ b/target/linux/ramips/base-files/etc/init.d/set-irq-affinity @@ -0,0 +1,31 @@ +#!/bin/sh /etc/rc.common + +START=99 + +get_irq() { + local name="$1" + grep -m 1 "$name" /proc/interrupts | cut -d: -f1 | sed 's, *,,' +} + +set_irq_affinity() { + local name="$1" + local val="$2" + local irq="$(get_irq "$name")" + [ -n "$irq" ] || return + echo "$val" > "/proc/irq/$irq/smp_affinity" +} + +start() { + if grep -q 'processor.*: 2' /proc/cpuinfo; then + mask1=4 + mask2=8 + elif grep -q 'processor.*: 1' /proc/cpuinfo; then + mask1=2 + mask2=2 + else + return + fi + + set_irq_affinity mt76x2e $mask1 + set_irq_affinity mt7603e $mask2 +} diff --git a/target/linux/ramips/base-files/lib/ramips.sh b/target/linux/ramips/base-files/lib/ramips.sh index 3a58b939be..093303892c 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -277,12 +277,6 @@ ramips_board_detect() { *"Mercury MAC1200R v2") name="mac1200rv2" ;; - *"Mi Router 3G") - name="mir3g" - ;; - *"Mi Router 4") - name="mir4" - ;; *"MicroWRT") name="microwrt" ;; @@ -418,9 +412,6 @@ ramips_board_detect() { *"R6220") name="r6220" ;; - *"RB750Gr3") - name="rb750gr3" - ;; *"RE350 v1") name="re350-v1" ;; @@ -442,9 +433,6 @@ ramips_board_detect() { *"RT-AC51U") name="rt-ac51u" ;; - *"RT-AC54U") - name="rt-ac54u" - ;; *"RT-G32 B1") name="rt-g32-b1" ;; @@ -592,9 +580,6 @@ ramips_board_detect() { *"WL-351 v1 002") name="wl-351" ;; - *"WL-WN575A3") - name="wl-wn575a3" - ;; *"WLI-TX4-AG300N") name="wli-tx4-ag300n" ;; diff --git a/target/linux/ramips/base-files/lib/upgrade/platform.sh b/target/linux/ramips/base-files/lib/upgrade/platform.sh index 3e1eb692ed..3b967aac87 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -5,6 +5,9 @@ PART_NAME=firmware REQUIRE_IMAGE_METADATA=1 +RAMFS_COPY_BIN='fw_printenv fw_setenv' +RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' + platform_check_image() { return 0 } @@ -13,6 +16,7 @@ platform_pre_upgrade() { local board=$(board_name) case "$board" in + mikrotik,rb750gr3|\ mikrotik,rbm11g|\ mikrotik,rbm33g) [ -z "$(rootfs_type)" ] && mtd erase firmware @@ -25,9 +29,8 @@ platform_nand_pre_upgrade() { case "$board" in ubnt-erx|\ - ubnt-erx-sfp|\ - xiaomi,mir3p) - platform_upgrade_ubnt_erx "$ARGV" + ubnt-erx-sfp) + platform_upgrade_ubnt_erx "$1" ;; esac } @@ -36,18 +39,37 @@ platform_do_upgrade() { local board=$(board_name) case "$board" in + alfa-network,ac1200rm|\ + alfa-network,awusfree1|\ + alfa-network,quad-e4g|\ + alfa-network,r36m-e4g|\ + alfa-network,tube-e4g) + [ "$(fw_printenv -n dual_image 2>/dev/null)" = "1" ] &&\ + [ -n "$(find_mtd_part backup)" ] && { + PART_NAME=backup + if [ "$(fw_printenv -n bootactive 2>/dev/null)" = "1" ]; then + fw_setenv bootactive 2 || exit 1 + else + fw_setenv bootactive 1 || exit 1 + fi + } + default_do_upgrade "$1" + ;; hc5962|\ - mir3g|\ - mir4|\ r6220|\ netgear,r6350|\ - xiaomi,miwifi-r3|\ ubnt-erx|\ - ubnt-erx-sfp) - nand_do_upgrade "$ARGV" + ubnt-erx-sfp|\ + xiaomi,mir3g|\ + xiaomi,mir3p) + nand_do_upgrade "$1" + ;; + tplink,c50-v4) + MTD_ARGS="-t romfile" + default_do_upgrade "$1" ;; *) - default_do_upgrade "$ARGV" + default_do_upgrade "$1" ;; esac } diff --git a/target/linux/ramips/dts/11ACNAS.dts b/target/linux/ramips/dts/11ACNAS.dts index 6516bb0c13..2b15566968 100644 --- a/target/linux/ramips/dts/11ACNAS.dts +++ b/target/linux/ramips/dts/11ACNAS.dts @@ -11,7 +11,7 @@ reg = <0x0 0x10000000>; }; - gpio-leds { + leds { compatible = "gpio-leds"; usb { diff --git a/target/linux/ramips/dts/3G-6200N.dts b/target/linux/ramips/dts/3G-6200N.dts index d5b935e769..3859812217 100644 --- a/target/linux/ramips/dts/3G-6200N.dts +++ b/target/linux/ramips/dts/3G-6200N.dts @@ -52,14 +52,14 @@ }; partition@50000 { - compatible = "denx,uimage"; + compatible = "edimax,uimage"; label = "firmware"; reg = <0x50000 0x390000>; }; }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -80,7 +80,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/3G-6200NL.dts b/target/linux/ramips/dts/3G-6200NL.dts index dfc5574f07..7742561e50 100644 --- a/target/linux/ramips/dts/3G-6200NL.dts +++ b/target/linux/ramips/dts/3G-6200NL.dts @@ -52,14 +52,14 @@ }; partition@50000 { - compatible = "denx,uimage"; + compatible = "edimax,uimage"; label = "firmware"; reg = <0x50000 0x390000>; }; }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_internet: internet { @@ -73,7 +73,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/3G150B.dts b/target/linux/ramips/dts/3G150B.dts index 2e3253232d..9d13625516 100644 --- a/target/linux/ramips/dts/3G150B.dts +++ b/target/linux/ramips/dts/3G150B.dts @@ -16,7 +16,7 @@ led-upgrade = &led_ap; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_ap: ap { @@ -32,7 +32,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/3G300M.dts b/target/linux/ramips/dts/3G300M.dts index 788eba41a3..a463890dea 100644 --- a/target/linux/ramips/dts/3G300M.dts +++ b/target/linux/ramips/dts/3G300M.dts @@ -16,7 +16,7 @@ led-upgrade = &led_ap; }; - gpio-leds { + leds { compatible = "gpio-leds"; 3grouter { @@ -52,7 +52,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/A5-V11.dts b/target/linux/ramips/dts/A5-V11.dts index 8949a3ffe3..707963d691 100644 --- a/target/linux/ramips/dts/A5-V11.dts +++ b/target/linux/ramips/dts/A5-V11.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; system { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/AC1200RM.dts b/target/linux/ramips/dts/AC1200RM.dts index 29f54be0f0..388b088d92 100644 --- a/target/linux/ramips/dts/AC1200RM.dts +++ b/target/linux/ramips/dts/AC1200RM.dts @@ -50,7 +50,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -61,7 +61,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wlan2g { diff --git a/target/linux/ramips/dts/AI-BR100.dts b/target/linux/ramips/dts/AI-BR100.dts index b23ee9b520..8de4b5877a 100644 --- a/target/linux/ramips/dts/AI-BR100.dts +++ b/target/linux/ramips/dts/AI-BR100.dts @@ -16,7 +16,7 @@ led-upgrade = &led_wlan; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/AIR3GII.dts b/target/linux/ramips/dts/AIR3GII.dts index 0a9dd544f4..111119eea4 100644 --- a/target/linux/ramips/dts/AIR3GII.dts +++ b/target/linux/ramips/dts/AIR3GII.dts @@ -9,7 +9,7 @@ compatible = "airlive,air3gii", "ralink,rt5350-soc"; model = "AirLive Air3GII"; - gpio-leds { + leds { compatible = "gpio-leds"; wlan { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ALL0256N.dtsi b/target/linux/ramips/dts/ALL0256N.dtsi index 0437b96b62..d31547c335 100644 --- a/target/linux/ramips/dts/ALL0256N.dtsi +++ b/target/linux/ramips/dts/ALL0256N.dtsi @@ -6,7 +6,7 @@ / { compatible = "allnet,all0256n", "ralink,rt3050-soc"; - gpio-leds { + leds { compatible = "gpio-leds"; rssilow { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ALL5002.dts b/target/linux/ramips/dts/ALL5002.dts index 616f7424a9..a604ec1511 100644 --- a/target/linux/ramips/dts/ALL5002.dts +++ b/target/linux/ramips/dts/ALL5002.dts @@ -30,7 +30,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; ld1 { diff --git a/target/linux/ramips/dts/ALL5003.dts b/target/linux/ramips/dts/ALL5003.dts index 050ff886e2..8a3488a7e0 100644 --- a/target/linux/ramips/dts/ALL5003.dts +++ b/target/linux/ramips/dts/ALL5003.dts @@ -30,7 +30,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; ld1 { diff --git a/target/linux/ramips/dts/AP-MT7621A-V60.dts b/target/linux/ramips/dts/AP-MT7621A-V60.dts index bd29e0b3f2..b613c9c371 100644 --- a/target/linux/ramips/dts/AP-MT7621A-V60.dts +++ b/target/linux/ramips/dts/AP-MT7621A-V60.dts @@ -85,7 +85,6 @@ compatible = "mx25l6405d","jedec,spi-nor"; reg = <0 0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/AR670W.dts b/target/linux/ramips/dts/AR670W.dts index 3ee39c1eb7..96e4a8cbe2 100644 --- a/target/linux/ramips/dts/AR670W.dts +++ b/target/linux/ramips/dts/AR670W.dts @@ -39,13 +39,14 @@ }; partition@40000 { + compatible = "lzma"; reg = <0x40000 0x3c0000>; label = "firmware"; }; }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -59,7 +60,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; diff --git a/target/linux/ramips/dts/AR725W.dts b/target/linux/ramips/dts/AR725W.dts index b143f45234..5e3782ac28 100644 --- a/target/linux/ramips/dts/AR725W.dts +++ b/target/linux/ramips/dts/AR725W.dts @@ -51,7 +51,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -70,7 +70,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; diff --git a/target/linux/ramips/dts/ASL26555.dtsi b/target/linux/ramips/dts/ASL26555.dtsi index 860c2afee1..d1c21f8082 100644 --- a/target/linux/ramips/dts/ASL26555.dtsi +++ b/target/linux/ramips/dts/ASL26555.dtsi @@ -13,7 +13,7 @@ led-upgrade = &led_power_green; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -30,7 +30,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; eth { diff --git a/target/linux/ramips/dts/ATP-52B.dts b/target/linux/ramips/dts/ATP-52B.dts index 9fec757cfa..2fa5c19d04 100644 --- a/target/linux/ramips/dts/ATP-52B.dts +++ b/target/linux/ramips/dts/ATP-52B.dts @@ -51,7 +51,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_run: run { @@ -65,7 +65,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/AWAPN2403.dts b/target/linux/ramips/dts/AWAPN2403.dts index 4d089437cb..97f105a631 100644 --- a/target/linux/ramips/dts/AWAPN2403.dts +++ b/target/linux/ramips/dts/AWAPN2403.dts @@ -17,7 +17,7 @@ }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wps: wps { @@ -26,7 +26,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/AWM002-EVB.dtsi b/target/linux/ramips/dts/AWM002-EVB.dtsi index a2770d9ba5..384b2efec0 100644 --- a/target/linux/ramips/dts/AWM002-EVB.dtsi +++ b/target/linux/ramips/dts/AWM002-EVB.dtsi @@ -6,7 +6,7 @@ / { compatible = "asiarf,awm002-evb", "ralink,rt5350-soc"; - gpio-leds { + leds { compatible = "gpio-leds"; tx { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/AWUSFREE1.dts b/target/linux/ramips/dts/AWUSFREE1.dts index 3edafb3335..4e5ce1cc7b 100644 --- a/target/linux/ramips/dts/AWUSFREE1.dts +++ b/target/linux/ramips/dts/AWUSFREE1.dts @@ -52,7 +52,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -63,7 +63,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { @@ -129,7 +129,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/ArcherC2-v1.dts b/target/linux/ramips/dts/ArcherC2-v1.dts index 42f75dd753..921a50a56c 100644 --- a/target/linux/ramips/dts/ArcherC2-v1.dts +++ b/target/linux/ramips/dts/ArcherC2-v1.dts @@ -29,7 +29,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { @@ -60,7 +60,7 @@ }; }; - gpio-keys { + keys { compatible = "gpio-keys"; reset_wps { diff --git a/target/linux/ramips/dts/ArcherC20i.dts b/target/linux/ramips/dts/ArcherC20i.dts index a4cd3bc568..cf715a413f 100644 --- a/target/linux/ramips/dts/ArcherC20i.dts +++ b/target/linux/ramips/dts/ArcherC20i.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { label = "c20i:blue:lan"; @@ -39,7 +39,7 @@ }; }; - gpio-keys { + keys { compatible = "gpio-keys"; rfkill { diff --git a/target/linux/ramips/dts/ArcherC20v1.dts b/target/linux/ramips/dts/ArcherC20v1.dts index 31a5b830e8..39e33b8ff0 100644 --- a/target/linux/ramips/dts/ArcherC20v1.dts +++ b/target/linux/ramips/dts/ArcherC20v1.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { @@ -67,7 +67,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ArcherC20v4.dts b/target/linux/ramips/dts/ArcherC20v4.dts index f0ae2bebaf..aaafcc52f5 100644 --- a/target/linux/ramips/dts/ArcherC20v4.dts +++ b/target/linux/ramips/dts/ArcherC20v4.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { @@ -55,7 +55,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ArcherC50.dts b/target/linux/ramips/dts/ArcherC50.dts index 1d8bb233b6..b6f5bed0b7 100644 --- a/target/linux/ramips/dts/ArcherC50.dts +++ b/target/linux/ramips/dts/ArcherC50.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { @@ -67,7 +67,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ArcherC50V3.dts b/target/linux/ramips/dts/ArcherC50V3.dts index 423ac88c2b..cc4e72819f 100644 --- a/target/linux/ramips/dts/ArcherC50V3.dts +++ b/target/linux/ramips/dts/ArcherC50V3.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { diff --git a/target/linux/ramips/dts/ArcherC50V4.dts b/target/linux/ramips/dts/ArcherC50V4.dts new file mode 100644 index 0000000000..37f388620e --- /dev/null +++ b/target/linux/ramips/dts/ArcherC50V4.dts @@ -0,0 +1,99 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "TPLINK-8M-SPLIT-UBOOT.dtsi" + +#include +#include + +/ { + compatible = "tplink,c50-v4", "mediatek,mt7628an-soc"; + model = "TP-Link Archer C50 v4"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + rfkill { + label = "rfkill"; + gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "c50-v4:green:power"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + + wlan2 { + label = "c50-v4:green:wlan2g"; + gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + }; + + wlan5 { + label = "c50-v4:green:wlan5g"; + gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + }; + + lan { + label = "c50-v4:green:lan"; + gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "c50-v4:green:wan"; + gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; + }; + + wan_orange { + label = "c50-v4:orange:wan"; + gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "c50-v4:green:wps"; + gpios = <&gpio1 11 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "p0led_an", "p1led_an", "p2led_an", + "p3led_an", "p4led_an", "wdt", "wled_an"; + ralink,function = "gpio"; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&radio 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + mtd-mac-address = <&rom 0xf100>; + mtd-mac-address-increment = <(-1)>; + }; +}; diff --git a/target/linux/ramips/dts/ArcherMR200.dts b/target/linux/ramips/dts/ArcherMR200.dts index 99f3be2e08..ff00dbe958 100644 --- a/target/linux/ramips/dts/ArcherMR200.dts +++ b/target/linux/ramips/dts/ArcherMR200.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { @@ -74,7 +74,7 @@ }; }; - gpio-keys { + keys { compatible = "gpio-keys"; reset { diff --git a/target/linux/ramips/dts/BC2.dts b/target/linux/ramips/dts/BC2.dts index 5b9cec3f4a..324909e82f 100644 --- a/target/linux/ramips/dts/BC2.dts +++ b/target/linux/ramips/dts/BC2.dts @@ -46,7 +46,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; usb { @@ -57,7 +57,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/BDCOM-WAP2100-SK.dts b/target/linux/ramips/dts/BDCOM-WAP2100-SK.dts index 745037de0c..e71d14c6ab 100644 --- a/target/linux/ramips/dts/BDCOM-WAP2100-SK.dts +++ b/target/linux/ramips/dts/BDCOM-WAP2100-SK.dts @@ -19,7 +19,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; usb { @@ -40,7 +40,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/BOCCO.dts b/target/linux/ramips/dts/BOCCO.dts index e4c0561161..6b6ac754ea 100644 --- a/target/linux/ramips/dts/BOCCO.dts +++ b/target/linux/ramips/dts/BOCCO.dts @@ -9,7 +9,7 @@ compatible = "planex,cs-qr10", "ralink,mt7620a-soc"; model = "YUKAI Engineering BOCCO"; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/BR-6475ND.dts b/target/linux/ramips/dts/BR-6475ND.dts index ebb1475de7..f7fb8b5c40 100644 --- a/target/linux/ramips/dts/BR-6475ND.dts +++ b/target/linux/ramips/dts/BR-6475ND.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -34,7 +34,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -88,7 +88,7 @@ }; partition@70000 { - compatible = "denx,uimage"; + compatible = "edimax,uimage"; reg = <0x00070000 0x00790000>; label = "firmware"; }; diff --git a/target/linux/ramips/dts/BR-6478AC-V2.dts b/target/linux/ramips/dts/BR-6478AC-V2.dts index d4304df323..5c90aa1549 100644 --- a/target/linux/ramips/dts/BR-6478AC-V2.dts +++ b/target/linux/ramips/dts/BR-6478AC-V2.dts @@ -33,7 +33,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -44,7 +44,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -122,7 +122,7 @@ }; partition@70000 { - compatible = "denx,uimage"; + compatible = "edimax,uimage"; label = "firmware"; reg = <0x00070000 0x00790000>; }; diff --git a/target/linux/ramips/dts/BROADWAY.dts b/target/linux/ramips/dts/BROADWAY.dts index 3d4d6ef5f8..353cfbf415 100644 --- a/target/linux/ramips/dts/BROADWAY.dts +++ b/target/linux/ramips/dts/BROADWAY.dts @@ -46,7 +46,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; diskmounted { @@ -62,7 +62,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/C108.dts b/target/linux/ramips/dts/C108.dts index d79e54a797..2d89d34ad5 100644 --- a/target/linux/ramips/dts/C108.dts +++ b/target/linux/ramips/dts/C108.dts @@ -64,7 +64,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; sdcard { @@ -93,7 +93,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/CF-WR800N.dts b/target/linux/ramips/dts/CF-WR800N.dts index 0161075ba6..65f44e43d7 100644 --- a/target/linux/ramips/dts/CF-WR800N.dts +++ b/target/linux/ramips/dts/CF-WR800N.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; ethernet { @@ -39,7 +39,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/CS-QR10.dts b/target/linux/ramips/dts/CS-QR10.dts index f58e70f538..dadd37acba 100644 --- a/target/linux/ramips/dts/CS-QR10.dts +++ b/target/linux/ramips/dts/CS-QR10.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/CY-SWR1100.dts b/target/linux/ramips/dts/CY-SWR1100.dts index f1c04bf6ac..afffee2bd4 100644 --- a/target/linux/ramips/dts/CY-SWR1100.dts +++ b/target/linux/ramips/dts/CY-SWR1100.dts @@ -68,7 +68,7 @@ realtek,extif0 = <1 0 1 1 1 1 1 1 2>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -85,7 +85,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wps: wps { diff --git a/target/linux/ramips/dts/D105.dts b/target/linux/ramips/dts/D105.dts index 5ba479cd21..10732cc5ec 100644 --- a/target/linux/ramips/dts/D105.dts +++ b/target/linux/ramips/dts/D105.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -69,7 +69,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/D240.dts b/target/linux/ramips/dts/D240.dts index ade2dd16fc..2110959ee8 100644 --- a/target/linux/ramips/dts/D240.dts +++ b/target/linux/ramips/dts/D240.dts @@ -70,7 +70,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -91,7 +91,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/DAP-1350.dts b/target/linux/ramips/dts/DAP-1350.dts index c84d5b94da..06d490cacc 100644 --- a/target/linux/ramips/dts/DAP-1350.dts +++ b/target/linux/ramips/dts/DAP-1350.dts @@ -63,7 +63,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power_blue: power { @@ -82,7 +82,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/DAP-1522-A1.dts b/target/linux/ramips/dts/DAP-1522-A1.dts index bdd63ea96b..56e3990bfe 100644 --- a/target/linux/ramips/dts/DAP-1522-A1.dts +++ b/target/linux/ramips/dts/DAP-1522-A1.dts @@ -40,6 +40,7 @@ }; partition@40000 { + compatible = "wrg"; label = "firmware"; reg = <0x40000 0x3a0000>; }; @@ -52,7 +53,7 @@ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -83,7 +84,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wps { diff --git a/target/linux/ramips/dts/DB-WRT01.dts b/target/linux/ramips/dts/DB-WRT01.dts index 27dce66e1a..bb2c14e096 100644 --- a/target/linux/ramips/dts/DB-WRT01.dts +++ b/target/linux/ramips/dts/DB-WRT01.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/DCH-M225.dts b/target/linux/ramips/dts/DCH-M225.dts index e8f71ae160..0644378ba2 100644 --- a/target/linux/ramips/dts/DCH-M225.dts +++ b/target/linux/ramips/dts/DCH-M225.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -33,7 +33,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/ramips/dts/DCS-930.dts b/target/linux/ramips/dts/DCS-930.dts index 4f49fc3a8f..1c44e28fe4 100644 --- a/target/linux/ramips/dts/DCS-930.dts +++ b/target/linux/ramips/dts/DCS-930.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wifi { @@ -72,7 +72,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/DCS-930L-B1.dts b/target/linux/ramips/dts/DCS-930L-B1.dts index 6ac80e4d6c..0fff5e8b5c 100644 --- a/target/linux/ramips/dts/DCS-930L-B1.dts +++ b/target/linux/ramips/dts/DCS-930L-B1.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/DIR-300-B1.dts b/target/linux/ramips/dts/DIR-300-B1.dts index 1f0ed7d827..8bc77e422d 100644 --- a/target/linux/ramips/dts/DIR-300-B1.dts +++ b/target/linux/ramips/dts/DIR-300-B1.dts @@ -53,7 +53,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; status { diff --git a/target/linux/ramips/dts/DIR-300-B7.dts b/target/linux/ramips/dts/DIR-300-B7.dts index 3fa57ac349..2b6af163bc 100644 --- a/target/linux/ramips/dts/DIR-300-B7.dts +++ b/target/linux/ramips/dts/DIR-300-B7.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/DIR-320-B1.dts b/target/linux/ramips/dts/DIR-320-B1.dts index 68f0108ae1..040a223986 100644 --- a/target/linux/ramips/dts/DIR-320-B1.dts +++ b/target/linux/ramips/dts/DIR-320-B1.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -35,7 +35,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/DIR-510L.dts b/target/linux/ramips/dts/DIR-510L.dts new file mode 100644 index 0000000000..885e64f9f2 --- /dev/null +++ b/target/linux/ramips/dts/DIR-510L.dts @@ -0,0 +1,142 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7620a.dtsi" + +#include +#include + +/ { + compatible = "dlink,dir-510l", "ralink,mt7620a-soc"; + model = "D-Link DIR-510L"; + + aliases { + led-boot = &led_status; + led-failsafe = &led_status; + led-running = &led_status; + led-upgrade = &led_status; + }; + + chosen { + bootargs = "console=ttyS1,57600"; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_status: status { + label = "dir-510l:green:status"; + gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; + }; + + status-red { + label = "dir-510l:red:status"; + gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; + }; + + }; +}; + +ðernet { + mediatek,portmap = "llllw"; +}; + +&uart { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "jboot"; + reg = <0x0 0x10000>; + read-only; + }; + + partition@10000 { + label = "recovery"; + reg = <0x10000 0x200000>; + read-only; + }; + + partition@210000 { + compatible = "amit,jimage"; + label = "firmware"; + reg = <0x210000 0xde0000>; + }; + + config: partition@ff0000 { + label = "config"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + mt76x0e@0,0 { + reg = <0x0000 0 0 0 0>; + mtd-mac-address = <&config 0xe490>; + mtd-mac-address-increment = <(2)>; + mediatek,mtd-eeprom = <&config 0xe05d>; + }; +}; + +&gsw { + mediatek,port4 = "ephy"; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + diff --git a/target/linux/ramips/dts/DIR-600-B1.dts b/target/linux/ramips/dts/DIR-600-B1.dts index 246ee81ef6..a77bfd717f 100644 --- a/target/linux/ramips/dts/DIR-600-B1.dts +++ b/target/linux/ramips/dts/DIR-600-B1.dts @@ -53,7 +53,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; status { diff --git a/target/linux/ramips/dts/DIR-610-A1.dts b/target/linux/ramips/dts/DIR-610-A1.dts index ea58d41af9..7a0323e219 100644 --- a/target/linux/ramips/dts/DIR-610-A1.dts +++ b/target/linux/ramips/dts/DIR-610-A1.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/DIR-615-D.dts b/target/linux/ramips/dts/DIR-615-D.dts index fbced8d139..5f8ea1b224 100644 --- a/target/linux/ramips/dts/DIR-615-D.dts +++ b/target/linux/ramips/dts/DIR-615-D.dts @@ -53,7 +53,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; status { diff --git a/target/linux/ramips/dts/DIR-615-H1.dts b/target/linux/ramips/dts/DIR-615-H1.dts index c81978b7de..79d4717f57 100644 --- a/target/linux/ramips/dts/DIR-615-H1.dts +++ b/target/linux/ramips/dts/DIR-615-H1.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status_green; }; - gpio-leds { + leds { compatible = "gpio-leds"; status { @@ -46,7 +46,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/DIR-620-A1.dts b/target/linux/ramips/dts/DIR-620-A1.dts index 94f1bd6f9c..24fdec8ed4 100644 --- a/target/linux/ramips/dts/DIR-620-A1.dts +++ b/target/linux/ramips/dts/DIR-620-A1.dts @@ -53,7 +53,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; status { diff --git a/target/linux/ramips/dts/DIR-620-D1.dts b/target/linux/ramips/dts/DIR-620-D1.dts index ea14b54d93..74fd4af753 100644 --- a/target/linux/ramips/dts/DIR-620-D1.dts +++ b/target/linux/ramips/dts/DIR-620-D1.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/DIR-645.dts b/target/linux/ramips/dts/DIR-645.dts index ce4ed42cf1..35d011ebba 100644 --- a/target/linux/ramips/dts/DIR-645.dts +++ b/target/linux/ramips/dts/DIR-645.dts @@ -23,7 +23,7 @@ realtek,extif1 = <1 0 1 1 1 1 1 1 2>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -40,7 +40,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; inet { diff --git a/target/linux/ramips/dts/DIR-810L.dts b/target/linux/ramips/dts/DIR-810L.dts index feecf789b8..479005fbf7 100644 --- a/target/linux/ramips/dts/DIR-810L.dts +++ b/target/linux/ramips/dts/DIR-810L.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power_green; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power_green: power { @@ -142,7 +142,10 @@ }; &wmac { - ralink,mtd-eeprom = <&factory 0>; + ralink,mtd-eeprom = <&factory 0x0>; + pinctrl-names = "default"; + pinctrl-0 = <&pa_pins>; + mtd-mac-address = <&factory 0x28>; }; &pcie0 { @@ -150,5 +153,7 @@ reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; + mtd-mac-address = <&factory 0x28>; + mtd-mac-address-increment = <2>; }; }; diff --git a/target/linux/ramips/dts/DIR-860L-B1.dts b/target/linux/ramips/dts/DIR-860L-B1.dts index a37d68ff3b..c212e05a20 100644 --- a/target/linux/ramips/dts/DIR-860L-B1.dts +++ b/target/linux/ramips/dts/DIR-860L-B1.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; power { @@ -49,7 +49,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -74,7 +74,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/DUZUN-DM06.dts b/target/linux/ramips/dts/DUZUN-DM06.dts index ff9d6398a9..7325e2c699 100644 --- a/target/linux/ramips/dts/DUZUN-DM06.dts +++ b/target/linux/ramips/dts/DUZUN-DM06.dts @@ -14,7 +14,7 @@ reg = <0x0 0x4000000>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -110,7 +110,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <60000000>; - m25p,chunked-io = <32>; m25p,fast-read; partitions { diff --git a/target/linux/ramips/dts/DWR-116-A1.dts b/target/linux/ramips/dts/DWR-116-A1.dts index 793f9a120a..6f76a64039 100644 --- a/target/linux/ramips/dts/DWR-116-A1.dts +++ b/target/linux/ramips/dts/DWR-116-A1.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { diff --git a/target/linux/ramips/dts/DWR-118-A1.dts b/target/linux/ramips/dts/DWR-118-A1.dts index ab88553a05..707bc1c3d3 100644 --- a/target/linux/ramips/dts/DWR-118-A1.dts +++ b/target/linux/ramips/dts/DWR-118-A1.dts @@ -16,7 +16,7 @@ led-upgrade = &led_internet; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { @@ -149,6 +149,11 @@ mtd-mac-address = <&config 0xe496>; mtd-mac-address-increment = <(2)>; mediatek,mtd-eeprom = <&config 0xe083>; + + led { + led-sources = <0>; + led-active-low; + }; }; }; diff --git a/target/linux/ramips/dts/DWR-118-A2.dts b/target/linux/ramips/dts/DWR-118-A2.dts index 25c3c12320..e1d181a874 100644 --- a/target/linux/ramips/dts/DWR-118-A2.dts +++ b/target/linux/ramips/dts/DWR-118-A2.dts @@ -14,7 +14,7 @@ led-failsafe = &led_internet; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -31,7 +31,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { diff --git a/target/linux/ramips/dts/DWR-512-B.dts b/target/linux/ramips/dts/DWR-512-B.dts index d865ced704..a08ea5d03c 100644 --- a/target/linux/ramips/dts/DWR-512-B.dts +++ b/target/linux/ramips/dts/DWR-512-B.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; sms { diff --git a/target/linux/ramips/dts/DWR-921-C1.dts b/target/linux/ramips/dts/DWR-921-C1.dts index 42687d4f0e..92bcd54a42 100644 --- a/target/linux/ramips/dts/DWR-921-C1.dts +++ b/target/linux/ramips/dts/DWR-921-C1.dts @@ -14,7 +14,7 @@ led-failsafe = &led_sstrenghg; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -31,7 +31,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; sms { diff --git a/target/linux/ramips/dts/E1700.dts b/target/linux/ramips/dts/E1700.dts index 4560e3986b..2ea7400a71 100644 --- a/target/linux/ramips/dts/E1700.dts +++ b/target/linux/ramips/dts/E1700.dts @@ -26,7 +26,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -43,7 +43,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/ramips/dts/ESR-9753.dts b/target/linux/ramips/dts/ESR-9753.dts index 0680d0dcf6..4b55af0691 100644 --- a/target/linux/ramips/dts/ESR-9753.dts +++ b/target/linux/ramips/dts/ESR-9753.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -67,7 +67,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/EW1200.dts b/target/linux/ramips/dts/EW1200.dts index 6fe6a123a3..def47d5199 100644 --- a/target/linux/ramips/dts/EW1200.dts +++ b/target/linux/ramips/dts/EW1200.dts @@ -31,7 +31,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -42,7 +42,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_run: run { @@ -70,7 +70,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/EX2700.dts b/target/linux/ramips/dts/EX2700.dts index 66a46d7037..7d7b2220f7 100644 --- a/target/linux/ramips/dts/EX2700.dts +++ b/target/linux/ramips/dts/EX2700.dts @@ -30,7 +30,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power_green: power_g { @@ -70,7 +70,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/EX3700.dts b/target/linux/ramips/dts/EX3700.dts index 0232ab4412..d971909b29 100644 --- a/target/linux/ramips/dts/EX3700.dts +++ b/target/linux/ramips/dts/EX3700.dts @@ -22,7 +22,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power_green: power_g { @@ -62,7 +62,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/EX6150.dts b/target/linux/ramips/dts/EX6150.dts new file mode 100644 index 0000000000..a5827f270d --- /dev/null +++ b/target/linux/ramips/dts/EX6150.dts @@ -0,0 +1,248 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "netgear,ex6150", "mediatek,mt7621-soc"; + model = "Netgear EX6150"; + + aliases { + led-boot = &power_green; + led-failsafe = &power_amber; + led-running = &power_green; + led-upgrade = &power_amber; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + leds { + compatible = "gpio-leds"; + + power_amber: power_amber { + label = "ex6150:amber:power"; + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; + }; + + power_green: power_green { + label = "ex6150:green:power"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + }; + + wps { + label = "ex6150:green:wps"; + gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; + }; + + rightarrow { + label = "ex6150:blue:rightarrow"; + gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; + }; + + leftarrow { + label = "ex6150:blue:leftarrow"; + gpios = <&gpio0 31 GPIO_ACTIVE_LOW>; + }; + + router_green { + label = "ex6150:green:router"; + gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy1tpt"; + }; + + router_red { + label = "ex6150:red:router"; + gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; + }; + + client_green { + label = "ex6150:green:client"; + gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + client_red { + label = "ex6150:red:client"; + gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + wps { + label = "wps"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + toggle { + label = "AP/Extender toggle"; + gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; + linux,code = ; + /* Active when switch is set to "Access Point" */ + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xe80000>; + }; + + partition@ed0000 { + label = "ML1"; + reg = <0xed0000 0x10000>; + read-only; + }; + + partition@ef0000 { + label = "ML2"; + reg = <0xef0000 0x20000>; + read-only; + }; + + partition@f10000 { + label = "ML3"; + reg = <0xf10000 0x20000>; + read-only; + }; + + partition@f30000 { + label = "ML4"; + reg = <0xf30000 0x20000>; + read-only; + }; + + partition@f50000 { + label = "ML5"; + reg = <0xf50000 0x20000>; + read-only; + }; + + partition@f70000 { + label = "ML6"; + reg = <0xf70000 0x20000>; + read-only; + }; + + partition@f90000 { + label = "ML7"; + reg = <0xf90000 0x20000>; + read-only; + }; + + partition@fb0000 { + label = "T_Meter1"; + reg = <0xfb0000 0x10000>; + read-only; + }; + + partition@fc0000 { + label = "T_Meter2"; + reg = <0xfc0000 0x10000>; + read-only; + }; + + partition@fd0000 { + label = "POT"; + reg = <0xfd0000 0x10000>; + read-only; + }; + + partition@fe0000 { + label = "board_data"; + reg = <0xfe0000 0x10000>; + read-only; + }; + + partition@ff0000 { + label = "nvram"; + reg = <0xff0000 0x10000>; + read-only; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&pcie1 { + wifi@0,0 { + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x00000004>; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "sdhci", "rgmii2", "jtag"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/F5D8235_V1.dts b/target/linux/ramips/dts/F5D8235_V1.dts index 29e8f7db76..04728c582e 100644 --- a/target/linux/ramips/dts/F5D8235_V1.dts +++ b/target/linux/ramips/dts/F5D8235_V1.dts @@ -100,7 +100,7 @@ realtek,green-ethernet-features; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -117,7 +117,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; internet { diff --git a/target/linux/ramips/dts/F5D8235_V2.dts b/target/linux/ramips/dts/F5D8235_V2.dts index 3a0a148ef2..93725e9336 100644 --- a/target/linux/ramips/dts/F5D8235_V2.dts +++ b/target/linux/ramips/dts/F5D8235_V2.dts @@ -57,7 +57,7 @@ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>; }; - gpio-leds { + leds { compatible = "gpio-leds"; internet { diff --git a/target/linux/ramips/dts/F7C027.dts b/target/linux/ramips/dts/F7C027.dts index aab35ce3dc..f3bf00e30a 100644 --- a/target/linux/ramips/dts/F7C027.dts +++ b/target/linux/ramips/dts/F7C027.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status_orange; }; - gpio-leds { + leds { compatible = "gpio-leds"; status { @@ -40,7 +40,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/F9K1109V1.dts b/target/linux/ramips/dts/F9K1109V1.dts new file mode 100644 index 0000000000..cdd2b6b714 --- /dev/null +++ b/target/linux/ramips/dts/F9K1109V1.dts @@ -0,0 +1,71 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "F9K110x.dtsi" + +#include +#include + +/ { + compatible = "belkin,f9k1109v1", "ralink,rt3883-soc"; + model = "Belkin F9K1109 Version 1.0"; + + aliases { + led-boot = &led_status_amber; + led-failsafe = &led_status_amber; + led-running = &led_status_blue; + led-upgrade = &led_status_amber; + }; + + leds { + compatible = "gpio-leds"; + + led_status_amber: internet_amber { + label = "f9k1109v1:amber:internet"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + }; + + led_status_blue: internet_blue { + label = "f9k1109v1:blue:internet"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + }; + + usb1 { + label = "f9k1109v1:green:usb1"; + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + }; + + usb2 { + label = "f9k1109v1:green:usb2"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + }; + + wps_amber { + label = "f9k1109v1:amber:wps"; + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + }; + + wps_blue { + label = "f9k1109v1:blue:wps"; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + }; + + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <100>; + + reset { + label = "reset"; + gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; diff --git a/target/linux/ramips/dts/F9K110x.dtsi b/target/linux/ramips/dts/F9K110x.dtsi new file mode 100644 index 0000000000..a34c3f3600 --- /dev/null +++ b/target/linux/ramips/dts/F9K110x.dtsi @@ -0,0 +1,112 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "rt3883.dtsi" + +#include +#include + +/ { + compatible = "ralink,rt3883-soc"; + + rtl8367b { + compatible = "realtek,rtl8367b"; + gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>; + gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>; + realtek,extif1 = <1 0 1 1 1 1 1 1 2>; + }; + +}; + +&gpio1 { + status = "okay"; +}; + +&spi0 { + 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 = "uboot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "uboot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x7a0000>; + }; + + partition@7f0000 { + label = "user-cfg"; + reg = <0x7f0000 0x10000>; + read-only; + }; + }; + }; +}; + +ðernet { + port@0 { + mediatek,fixed-link = <1000 1 1 1>; + phy-mode = "rgmii"; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +&wmac { + status = "okay"; + ralink,mtd-eeprom = <&factory 0>; +}; + +&pci { + status = "okay"; +}; + +&pci1 { + status = "okay"; + + wifi@1,0 { + compatible = "pci1814,3091"; + reg = <0x10000 0 0 0 0>; + ralink,5ghz = <0>; + ralink,mtd-eeprom = <&factory 0x8000>; + }; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/FIREWRT.dts b/target/linux/ramips/dts/FIREWRT.dts index 82b511cdb5..2abc01b2af 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -34,7 +34,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -63,7 +63,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/FONERA20N.dts b/target/linux/ramips/dts/FONERA20N.dts index 2c8629be37..83ce173174 100644 --- a/target/linux/ramips/dts/FONERA20N.dts +++ b/target/linux/ramips/dts/FONERA20N.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wifi { @@ -74,7 +74,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/FREESTATION5.dts b/target/linux/ramips/dts/FREESTATION5.dts index 2f9d80ecc2..b924229a7e 100644 --- a/target/linux/ramips/dts/FREESTATION5.dts +++ b/target/linux/ramips/dts/FREESTATION5.dts @@ -64,7 +64,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; /* diff --git a/target/linux/ramips/dts/GB-PC1.dts b/target/linux/ramips/dts/GB-PC1.dts index 007879a7b9..e09e9f75a9 100644 --- a/target/linux/ramips/dts/GB-PC1.dts +++ b/target/linux/ramips/dts/GB-PC1.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -36,7 +36,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; system { @@ -71,8 +71,8 @@ m25p80@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; + spi-max-frequency = <80000000>; + m25p,fast-read; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/GB-PC2.dts b/target/linux/ramips/dts/GB-PC2.dts index b07613b7ab..dff1b3d5f7 100644 --- a/target/linux/ramips/dts/GB-PC2.dts +++ b/target/linux/ramips/dts/GB-PC2.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -36,7 +36,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; system { @@ -81,8 +81,8 @@ m25p80@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; + spi-max-frequency = <80000000>; + m25p,fast-read; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/GHL-R-001.dts b/target/linux/ramips/dts/GHL-R-001.dts index 8aef0dcce8..59640a179c 100644 --- a/target/linux/ramips/dts/GHL-R-001.dts +++ b/target/linux/ramips/dts/GHL-R-001.dts @@ -55,9 +55,10 @@ status = "okay"; flash@0 { - compatible = "jedec,spi-nor"; + compatible = "mx25l25635f", "jedec,spi-nor"; reg = <0>; spi-max-frequency = <25000000>; + m25p,fast-read; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/GL-MT300A.dts b/target/linux/ramips/dts/GL-MT300A.dts index ad23ece7ec..2cea9d9beb 100644 --- a/target/linux/ramips/dts/GL-MT300A.dts +++ b/target/linux/ramips/dts/GL-MT300A.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { @@ -37,7 +37,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; reset { diff --git a/target/linux/ramips/dts/GL-MT300N-V2.dts b/target/linux/ramips/dts/GL-MT300N-V2.dts index 23669600a9..e4220736d2 100644 --- a/target/linux/ramips/dts/GL-MT300N-V2.dts +++ b/target/linux/ramips/dts/GL-MT300N-V2.dts @@ -25,7 +25,7 @@ reg = <0x0 0x8000000>; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -45,7 +45,7 @@ }; }; - gpio-keys { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -105,7 +105,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/GL-MT300N.dts b/target/linux/ramips/dts/GL-MT300N.dts index 9d9d6274fa..a30792cace 100644 --- a/target/linux/ramips/dts/GL-MT300N.dts +++ b/target/linux/ramips/dts/GL-MT300N.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { @@ -32,7 +32,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; reset { diff --git a/target/linux/ramips/dts/GL-MT750.dts b/target/linux/ramips/dts/GL-MT750.dts index 8e2a968e4d..11133a126a 100644 --- a/target/linux/ramips/dts/GL-MT750.dts +++ b/target/linux/ramips/dts/GL-MT750.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { @@ -32,7 +32,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; reset { diff --git a/target/linux/ramips/dts/HC5661.dts b/target/linux/ramips/dts/HC5661.dts index f070705102..091483a131 100644 --- a/target/linux/ramips/dts/HC5661.dts +++ b/target/linux/ramips/dts/HC5661.dts @@ -13,7 +13,7 @@ led-upgrade = &led_system; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { diff --git a/target/linux/ramips/dts/HC5661A.dts b/target/linux/ramips/dts/HC5661A.dts index 6dfac50618..25f1ff1a02 100644 --- a/target/linux/ramips/dts/HC5661A.dts +++ b/target/linux/ramips/dts/HC5661A.dts @@ -25,7 +25,7 @@ reg = <0x0 0x8000000>; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { @@ -42,7 +42,7 @@ }; }; - gpio-keys { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -71,7 +71,6 @@ reg = <0>; linux,modalias = "m25p80", "w25q128"; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/HC5761.dts b/target/linux/ramips/dts/HC5761.dts index 31ed99ad09..dff129a938 100644 --- a/target/linux/ramips/dts/HC5761.dts +++ b/target/linux/ramips/dts/HC5761.dts @@ -13,7 +13,7 @@ led-upgrade = &led_system; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { diff --git a/target/linux/ramips/dts/HC5861.dts b/target/linux/ramips/dts/HC5861.dts index b9a613de70..b1d5ce4fa1 100644 --- a/target/linux/ramips/dts/HC5861.dts +++ b/target/linux/ramips/dts/HC5861.dts @@ -13,7 +13,7 @@ led-upgrade = &led_system; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { @@ -103,10 +103,3 @@ ieee80211-freq-limit = <5000000 6000000>; }; }; - -&state_default { - gpio { - ralink,group = "uartf", "wled", "rgmii2", "ephy"; - ralink,function = "gpio"; - }; -}; diff --git a/target/linux/ramips/dts/HC5861B.dts b/target/linux/ramips/dts/HC5861B.dts index ef2d70613e..5cc2634dcc 100644 --- a/target/linux/ramips/dts/HC5861B.dts +++ b/target/linux/ramips/dts/HC5861B.dts @@ -25,7 +25,7 @@ reg = <0x0 0x8000000>; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { @@ -38,7 +38,7 @@ }; }; - gpio-keys { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -66,7 +66,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/HC5962.dts b/target/linux/ramips/dts/HC5962.dts index 298502046d..817b571d2a 100644 --- a/target/linux/ramips/dts/HC5962.dts +++ b/target/linux/ramips/dts/HC5962.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -39,7 +39,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/HC5X61.dtsi b/target/linux/ramips/dts/HC5X61.dtsi index 8da05adeef..09b303fd33 100644 --- a/target/linux/ramips/dts/HC5X61.dtsi +++ b/target/linux/ramips/dts/HC5X61.dtsi @@ -10,7 +10,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/HDRM200.dts b/target/linux/ramips/dts/HDRM200.dts new file mode 100644 index 0000000000..ad16d02716 --- /dev/null +++ b/target/linux/ramips/dts/HDRM200.dts @@ -0,0 +1,188 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7620a.dtsi" + +#include +#include + +/ { + compatible = "head-weblink,hdrm200", "ralink,mt7620a-soc"; + model = "Head Weblink HDRM200"; + + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + chosen { + bootargs = "console=ttyS1,57600"; + }; + + leds { + compatible = "gpio-leds"; + + rssi { + label = "hdrm200:red:rssi"; + gpios = <&gpio0 19 GPIO_ACTIVE_LOW>; + }; + + led_system: system { + label = "hdrm200:green:system"; + gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>; + }; + + air { + label = "hdrm200:green:wifi"; + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + wps { + label = "wps"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + firmware: partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&sdhci { + status = "okay"; +}; + +&ehci { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +ðernet { + status = "okay"; + + mtd-mac-address = <&factory 0x4>; + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &rgmii2_pins &mdio_pins>; + + port@4 { + status = "okay"; + phy-handle = <&phy4>; + phy-mode = "rgmii"; + }; + + port@5 { + status = "okay"; + phy-handle = <&phy5>; + phy-mode = "rgmii"; + }; + + mdio-bus { + status = "okay"; + + phy4: ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; + }; + + phy5: ethernet-phy@5 { + reg = <5>; + phy-mode = "rgmii"; + }; + }; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "uartf", "pa", "spi refclk", + "wled"; + ralink,function = "gpio"; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&uart { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/HG255D.dts b/target/linux/ramips/dts/HG255D.dts index 961fd8f91f..df8a72c8cb 100644 --- a/target/linux/ramips/dts/HG255D.dts +++ b/target/linux/ramips/dts/HG255D.dts @@ -59,7 +59,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -95,7 +95,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <10>; diff --git a/target/linux/ramips/dts/XiaoYu-C5.dts b/target/linux/ramips/dts/HLK-7628N.dts similarity index 60% rename from target/linux/ramips/dts/XiaoYu-C5.dts rename to target/linux/ramips/dts/HLK-7628N.dts index 4183734d46..71c6b60ac2 100644 --- a/target/linux/ramips/dts/XiaoYu-C5.dts +++ b/target/linux/ramips/dts/HLK-7628N.dts @@ -1,54 +1,56 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "mt7621.dtsi" +#include "mt7628an.dtsi" #include #include / { - compatible = "XiaoYu-C5", "mediatek,mt7621-soc"; - model = "XiaoYu-C5"; + compatible = "hilink,hlk-7628n", "mediatek,mt7628an-soc"; + model = "HILINK HLK-7628N"; - aliases { - led-boot = &led_sys; - led-failsafe = &led_sys; - led-running = &led_sys; - led-upgrade = &led_sys; - label-mac-device = ðernet; - }; - memory@0 { device_type = "memory"; - reg = <0x0 0x1c000000>, <0x20000000 0x4000000>; + reg = <0x0 0x8000000>; }; chosen { bootargs = "console=ttyS0,57600"; }; - leds { - compatible = "gpio-leds"; - - work { - label = "xy-c5:green:work"; - gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; - }; - - led_sys: sys { - label = "xy-c5:green:sys"; - gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; - }; - }; - keys { - compatible = "gpio-keys"; + compatible = "gpio-keys-polled"; + poll-interval = <20>; reset { label = "reset"; - gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; + gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; linux,code = ; }; }; + + leds { + compatible = "gpio-leds"; + + wlan { + label = "hlk-7628n:green:wlan"; + gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c"; + ralink,function = "gpio"; + }; + }; +}; + +&uart1 { + status = "okay"; }; &spi0 { @@ -57,7 +59,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <25000000>; + spi-max-frequency = <10000000>; partitions { compatible = "fixed-partitions"; @@ -91,19 +93,7 @@ }; }; -&pcie { +&wmac { status = "okay"; }; -ðernet { - mtd-mac-address = <&factory 0x4>; -}; - -&pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "uart3", "wdt"; - ralink,function = "gpio"; - }; - }; -}; \ No newline at end of file diff --git a/target/linux/ramips/dts/HLKRM04.dts b/target/linux/ramips/dts/HLKRM04.dts index efbd517767..7b2791fa62 100644 --- a/target/linux/ramips/dts/HLKRM04.dts +++ b/target/linux/ramips/dts/HLKRM04.dts @@ -37,7 +37,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; reset { diff --git a/target/linux/ramips/dts/HPM.dts b/target/linux/ramips/dts/HPM.dts index d27eff8b87..7ccd078144 100644 --- a/target/linux/ramips/dts/HPM.dts +++ b/target/linux/ramips/dts/HPM.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -31,7 +31,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; power { diff --git a/target/linux/ramips/dts/HT-TM02.dts b/target/linux/ramips/dts/HT-TM02.dts index d6954fe652..4e73c6988d 100644 --- a/target/linux/ramips/dts/HT-TM02.dts +++ b/target/linux/ramips/dts/HT-TM02.dts @@ -16,7 +16,7 @@ led-upgrade = &led_wlan; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wlan: wlan { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/HW550-3G.dts b/target/linux/ramips/dts/HW550-3G.dts index fa5c4d72af..372d18e75e 100644 --- a/target/linux/ramips/dts/HW550-3G.dts +++ b/target/linux/ramips/dts/HW550-3G.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; usb { @@ -79,7 +79,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/IP2202.dts b/target/linux/ramips/dts/IP2202.dts index c9c04dc342..31478da694 100644 --- a/target/linux/ramips/dts/IP2202.dts +++ b/target/linux/ramips/dts/IP2202.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_run: run { @@ -67,7 +67,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/JHR-N805R.dts b/target/linux/ramips/dts/JHR-N805R.dts index f633bb26e6..702d779aa2 100644 --- a/target/linux/ramips/dts/JHR-N805R.dts +++ b/target/linux/ramips/dts/JHR-N805R.dts @@ -16,7 +16,7 @@ led-upgrade = &led_system; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/JHR-N825R.dts b/target/linux/ramips/dts/JHR-N825R.dts index 12c5c90f2c..4c0640b881 100644 --- a/target/linux/ramips/dts/JHR-N825R.dts +++ b/target/linux/ramips/dts/JHR-N825R.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { label = "jhr-n825r:red:power"; @@ -61,7 +61,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; reset_wps { diff --git a/target/linux/ramips/dts/JHR-N926R.dts b/target/linux/ramips/dts/JHR-N926R.dts index 5990c0652b..9414828594 100644 --- a/target/linux/ramips/dts/JHR-N926R.dts +++ b/target/linux/ramips/dts/JHR-N926R.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wlan1 { @@ -100,7 +100,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/K2G.dts b/target/linux/ramips/dts/K2G.dts index 96714944f2..4ca5229745 100644 --- a/target/linux/ramips/dts/K2G.dts +++ b/target/linux/ramips/dts/K2G.dts @@ -17,7 +17,7 @@ serial0 = &uartlite; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_blue: blue { @@ -36,7 +36,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/K2P.dts b/target/linux/ramips/dts/K2P.dts index ab0237b918..0b330aa20e 100644 --- a/target/linux/ramips/dts/K2P.dts +++ b/target/linux/ramips/dts/K2P.dts @@ -16,11 +16,16 @@ led-upgrade = &led_blue; }; + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + chosen { bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; stat_r { @@ -39,7 +44,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -58,7 +63,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/LINKIT7688.dts b/target/linux/ramips/dts/LINKIT7688.dts index 23a59aef54..eaa75f407d 100644 --- a/target/linux/ramips/dts/LINKIT7688.dts +++ b/target/linux/ramips/dts/LINKIT7688.dts @@ -35,7 +35,7 @@ status = "okay"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wifi: wifi { @@ -44,7 +44,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -104,7 +104,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <40000000>; - m25p,chunked-io = <31>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/LR-25G001.dts b/target/linux/ramips/dts/LR-25G001.dts index 2584457dfa..20974c93e2 100644 --- a/target/linux/ramips/dts/LR-25G001.dts +++ b/target/linux/ramips/dts/LR-25G001.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { diff --git a/target/linux/ramips/dts/M2M.dts b/target/linux/ramips/dts/M2M.dts index 6c251af341..122c70e21f 100644 --- a/target/linux/ramips/dts/M2M.dts +++ b/target/linux/ramips/dts/M2M.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,57600n8 root=/dev/mtdblock5"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wifi: wifi { @@ -34,7 +34,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/M3.dts b/target/linux/ramips/dts/M3.dts index bfc1f90576..1c894aff12 100644 --- a/target/linux/ramips/dts/M3.dts +++ b/target/linux/ramips/dts/M3.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/M4.dtsi b/target/linux/ramips/dts/M4.dtsi index 8a9548ef44..df8db131e9 100644 --- a/target/linux/ramips/dts/M4.dtsi +++ b/target/linux/ramips/dts/M4.dtsi @@ -13,7 +13,7 @@ led-upgrade = &led_status; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -22,7 +22,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MAC1200RV2.dts b/target/linux/ramips/dts/MAC1200RV2.dts index a260e71880..7d13621135 100644 --- a/target/linux/ramips/dts/MAC1200RV2.dts +++ b/target/linux/ramips/dts/MAC1200RV2.dts @@ -25,7 +25,7 @@ reg = <0x0 0x2000000>; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { label = "mac1200rv2:green:status"; @@ -41,7 +41,6 @@ compatible = "jedec,spi-nor"; reg = <0 0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/MINIEMBPLUG.dts b/target/linux/ramips/dts/MINIEMBPLUG.dts index ccdea8000c..5db1ce48a1 100644 --- a/target/linux/ramips/dts/MINIEMBPLUG.dts +++ b/target/linux/ramips/dts/MINIEMBPLUG.dts @@ -9,7 +9,7 @@ compatible = "omnima,miniembplug", "ralink,rt5350-soc"; model = "Omnima MiniEMBPlug"; - gpio-leds { + leds { compatible = "gpio-leds"; wlan { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MINIEMBWIFI.dts b/target/linux/ramips/dts/MINIEMBWIFI.dts index 641b9004fd..2f045c7884 100644 --- a/target/linux/ramips/dts/MINIEMBWIFI.dts +++ b/target/linux/ramips/dts/MINIEMBWIFI.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MIR3G.dts b/target/linux/ramips/dts/MIR3G.dts index 40bcf884fe..b0b63f8085 100644 --- a/target/linux/ramips/dts/MIR3G.dts +++ b/target/linux/ramips/dts/MIR3G.dts @@ -10,10 +10,10 @@ model = "Xiaomi Mi Router 3G"; aliases { - led-boot = &led_status_blue; - led-failsafe = &led_status_blue; + led-boot = &led_status_yellow; + led-failsafe = &led_status_red; led-running = &led_status_blue; - led-upgrade = &led_status_blue; + led-upgrade = &led_status_yellow; }; memory@0 { @@ -25,10 +25,10 @@ bootargs = "console=ttyS0,115200n8"; }; - gpio-leds { + leds { compatible = "gpio-leds"; - status_red { + led_status_red: status_red { label = "mir3g:red:status"; gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; }; @@ -38,7 +38,7 @@ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; - status_yellow { + led_status_yellow: status_yellow { label = "mir3g:yellow:status"; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; @@ -59,7 +59,7 @@ }; }; - gpio-keys-polled { + button { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,7 @@ }; }; - reg_usb_vbus: reg_usb_vbus { + reg_usb_vbus: regulator { compatible = "regulator-fixed"; regulator-name = "usb_vbus"; regulator-min-microvolt = <5000000>; diff --git a/target/linux/ramips/dts/MIR3P.dts b/target/linux/ramips/dts/MIR3P.dts index 5a39774e7e..cd929e5e33 100644 --- a/target/linux/ramips/dts/MIR3P.dts +++ b/target/linux/ramips/dts/MIR3P.dts @@ -164,8 +164,6 @@ compatible = "pci14c3,7615"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x0000>; - mediatek,5ghz = <0>; - ieee80211-freq-limit = <2400000 2500000>; }; }; @@ -174,7 +172,6 @@ compatible = "pci14c3,7615"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; - mediatek,2ghz = <0>; ieee80211-freq-limit = <5000000 6000000>; }; }; diff --git a/target/linux/ramips/dts/MIR4.dts b/target/linux/ramips/dts/MIR4.dts deleted file mode 100644 index 6360c3c351..0000000000 --- a/target/linux/ramips/dts/MIR4.dts +++ /dev/null @@ -1,194 +0,0 @@ -/dts-v1/; - -#include "mt7621.dtsi" - -#include -#include - -/ { - compatible = "xiaomi,mir4", "mediatek,mt7621-soc"; - model = "Xiaomi Mi Router 4"; - - aliases { - led-boot = &led_status_blue; - led-failsafe = &led_status_blue; - led-running = &led_status_blue; - led-upgrade = &led_status_blue; - }; - - memory@0 { - device_type = "memory"; - reg = <0x0 0x8000000>; - }; - - chosen { - bootargs = "console=ttyS0,115200n8"; - }; - - gpio-leds { - compatible = "gpio-leds"; - - status_red { - label = "mir3g:red:status"; - gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; - }; - - led_status_blue: status_blue { - label = "mir3g:blue:status"; - gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; - }; - - status_yellow { - label = "mir3g:yellow:status"; - gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; - }; - - wan_amber { - label = "mir3g:amber:wan"; - gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; - }; - - lan1_amber { - label = "mir3g:amber:lan1"; - gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; - }; - - lan2_amber { - label = "mir3g:amber:lan2"; - gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; - }; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - poll-interval = <20>; - - reset { - label = "reset"; - gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; -}; - -&nand { - status = "okay"; - - partitions { - compatible = "fixed-partitions"; - #address-cells = <1>; - #size-cells = <1>; - - partition@0 { - label = "Bootloader"; - reg = <0x0 0x80000>; - read-only; - }; - - partition@80000 { - label = "Config"; - reg = <0x80000 0x40000>; - }; - - partition@c0000 { - label = "Bdata"; - reg = <0xc0000 0x40000>; - read-only; - }; - - factory: partition@100000 { - label = "Factory"; - reg = <0x100000 0x40000>; - read-only; - }; - - partition@140000 { - label = "crash"; - reg = <0x140000 0x40000>; - }; - - partition@180000 { - label = "crash_syslog"; - reg = <0x180000 0x40000>; - }; - - partition@1c0000 { - label = "reserved0"; - reg = <0x1c0000 0x40000>; - read-only; - }; - - /* uboot expects to find kernels at 0x200000 & 0x600000 - * referred to as system 1 & system 2 respectively. - * a kernel is considered suitable for handing control over - * if its linux magic number exists & uImage CRC are correct. - * If either of those conditions fail, a matching sys'n'_fail flag - * is set in uboot env & a restart performed in the hope that the - * alternate kernel is okay. - * if neither kernel checksums ok and both are marked failed, system 2 - * is booted anyway. - * - * Note uboot's tftp flash install writes the transferred - * image to both kernel partitions. - */ - - partition@200000 { - label = "kernel_stock"; - reg = <0x200000 0x400000>; - }; - - partition@600000 { - label = "kernel"; - reg = <0x600000 0x400000>; - }; - - /* ubi partition is the result of squashing - * next consecutive stock partitions: - * - rootfs0 (rootfs partition for stock kernel0), - * - rootfs1 (rootfs partition for stock failsafe kernel1), - * - overlay (used as ubi overlay in stock fw) - * resulting 117,5MiB space for packages. - */ - - partition@a00000 { - label = "ubi"; - reg = <0xa00000 0x7580000>; - }; - }; -}; - -&pcie { - status = "okay"; -}; - -&pcie0 { - wifi@0,0 { - compatible = "pci14c3,7603"; - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0000>; - ieee80211-freq-limit = <2400000 2500000>; - }; -}; - -&pcie1 { - wifi@0,0 { - compatible = "pci14c3,7662"; - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; - ieee80211-freq-limit = <5000000 6000000>; - }; -}; - -ðernet { - mtd-mac-address = <&factory 0xe000>; - mediatek,portmap = "lwlll"; -}; - -&pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "jtag", "uart2", "uart3", "wdt"; - ralink,function = "gpio"; - }; - }; -}; diff --git a/target/linux/ramips/dts/MIWIFI-MINI.dts b/target/linux/ramips/dts/MIWIFI-MINI.dts index e9f9c9663d..e8ff02f2ab 100644 --- a/target/linux/ramips/dts/MIWIFI-MINI.dts +++ b/target/linux/ramips/dts/MIWIFI-MINI.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_blue: blue { @@ -40,7 +40,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MIWIFI-NANO.dts b/target/linux/ramips/dts/MIWIFI-NANO.dts index 4740942ca8..bad37e21f1 100644 --- a/target/linux/ramips/dts/MIWIFI-NANO.dts +++ b/target/linux/ramips/dts/MIWIFI-NANO.dts @@ -25,7 +25,7 @@ reg = <0x0 0x4000000>; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_blue: status_blue { @@ -42,7 +42,7 @@ }; }; - gpio-keys { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -57,20 +57,12 @@ &pinctrl { state_default: pinctrl0 { gpio { - ralink,group = "gpio", "refclk", "wdt", "wled_an"; + ralink,group = "refclk", "wled_an", "gpio"; ralink,function = "gpio"; }; }; }; -&ehci { - status = "disabled"; -}; - -&ohci { - status = "disabled"; -}; - &wmac { status = "okay"; ralink,mtd-eeprom = <&factory 0x4>; @@ -86,8 +78,7 @@ m25p80@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <40000000>; - m25p,chunked-io = <32>; + spi-max-frequency = <10000000>; partitions { compatible = "fixed-partitions"; @@ -97,6 +88,7 @@ partition@0 { label = "u-boot"; reg = <0x0 0x30000>; + read-only; }; partition@30000 { diff --git a/target/linux/ramips/dts/MIWIFI-R3.dts b/target/linux/ramips/dts/MIWIFI-R3.dts deleted file mode 100644 index c535a71c6e..0000000000 --- a/target/linux/ramips/dts/MIWIFI-R3.dts +++ /dev/null @@ -1,175 +0,0 @@ -/dts-v1/; - -#include "mt7620a.dtsi" - -#include -#include - -/ { - compatible = "xiaomi,miwifi-r3", "ralink,mt7620a-soc"; - model = "Xiaomi Mi Router R3"; - - aliases { - led-status = &led_status_blue; - }; - - memory@0 { - device_type = "memory"; - reg = <0x0 0x8000000>; - }; - - chosen { - bootargs = "console=ttyS0,115200"; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - #address-cells = <1>; - #size-cells = <0>; - poll-interval = <20>; - - reset { - label = "reset"; - gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; - linux,code = ; - }; - }; - - gpio-leds { - compatible = "gpio-leds"; - - led_status_blue: blue { - label = "miwifi-r3:blue:status"; - gpios = <&gpio1 0 GPIO_ACTIVE_LOW>; - }; - - yellow { - label = "miwifi-r3:yellow:status"; - gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; - }; - - red { - label = "miwifi-r3:red:status"; - gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; - }; - }; - - nand { - status = "okay"; - #address-cells = <1>; - #size-cells = <1>; - compatible = "mtk,mt7620-nand"; - - partition@0 { - label = "Bootloader"; - reg = <0x0 0x40000>; - read-only; - }; - - partition@40000 { - label = "Config"; - reg = <0x40000 0x40000>; - }; - - partition@80000 { - label = "Bdata"; - reg = <0x80000 0x40000>; - read-only; - }; - - factory: partition@0xc0000 { - label = "Factory"; - reg = <0xc0000 0x40000>; - read-only; - }; - - partition@100000 { - label = "crash"; - reg = <0x100000 0x40000>; - read-only; - }; - - partition@140000 { - label = "crash_syslog"; - reg = <0x140000 0x40000>; - read-only; - }; - - partition@180000 { - label = "reserved0"; - reg = <0x180000 0x80000>; - read-only; - }; - - partition@200000 { - label = "kernel0_rsvd"; - reg = <0x200000 0x400000>; - }; - - partition@600000 { - label = "kernel"; - reg = <0x600000 0x400000>; - }; - - /* ubi partition is the result of squashing - * next consequent stock partitions: - * - rootfs0 (rootfs partition for stock kernel0), - * - rootfs1 (rootfs partition for stock failsafe kernel1), - * - overlay (used as ubi overlay in stock fw) - * resulting 117,5MiB space for packages. - */ - partition@a00000 { - label = "ubi"; - reg = <0xa00000 0x7600000>; - }; - }; -}; - -&gpio1 { - status = "okay"; -}; - -&ehci { - status = "okay"; -}; - -&ohci { - status = "okay"; -}; - -ðernet { - pinctrl-names = "default"; - pinctrl-0 = <&ephy_pins>; - mtd-mac-address = <&factory 0x28>; - mediatek,portmap = "llllw"; -}; - -&wmac { - ralink,mtd-eeprom = <&factory 0>; -}; - -&pcie { - status = "okay"; -}; - -&pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; - ieee80211-freq-limit = <5000000 6000000>; - }; -}; - -&pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "rgmii1"; - ralink,function = "gpio"; - }; - - pa { - ralink,group = "pa"; - ralink,function = "pa"; - }; - }; -}; diff --git a/target/linux/ramips/dts/MLW221.dts b/target/linux/ramips/dts/MLW221.dts index e7b57f58cb..815370e6fd 100644 --- a/target/linux/ramips/dts/MLW221.dts +++ b/target/linux/ramips/dts/MLW221.dts @@ -16,7 +16,7 @@ led-upgrade = &led_system; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MLWG2.dts b/target/linux/ramips/dts/MLWG2.dts index 83c1a89db6..f88af71896 100644 --- a/target/linux/ramips/dts/MLWG2.dts +++ b/target/linux/ramips/dts/MLWG2.dts @@ -16,7 +16,7 @@ led-upgrade = &led_system; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MOFI3500-3GN.dts b/target/linux/ramips/dts/MOFI3500-3GN.dts index 24c9eb7004..d20f2d2703 100644 --- a/target/linux/ramips/dts/MOFI3500-3GN.dts +++ b/target/linux/ramips/dts/MOFI3500-3GN.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; usb { @@ -79,7 +79,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MPRA1.dts b/target/linux/ramips/dts/MPRA1.dts index cb6b49ef2e..328351a550 100644 --- a/target/linux/ramips/dts/MPRA1.dts +++ b/target/linux/ramips/dts/MPRA1.dts @@ -16,7 +16,7 @@ led-upgrade = &led_system; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MPRA2.dts b/target/linux/ramips/dts/MPRA2.dts index 22c0456d08..fedb5b061e 100644 --- a/target/linux/ramips/dts/MPRA2.dts +++ b/target/linux/ramips/dts/MPRA2.dts @@ -16,7 +16,7 @@ led-upgrade = &led_system; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MR-102N.dts b/target/linux/ramips/dts/MR-102N.dts index c431ff143a..ffb76e3bf4 100644 --- a/target/linux/ramips/dts/MR-102N.dts +++ b/target/linux/ramips/dts/MR-102N.dts @@ -63,7 +63,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; usb { @@ -84,7 +84,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MT7620a.dts b/target/linux/ramips/dts/MT7620a.dts index be96fa9de9..9166fdc576 100644 --- a/target/linux/ramips/dts/MT7620a.dts +++ b/target/linux/ramips/dts/MT7620a.dts @@ -9,7 +9,7 @@ compatible = "ralink,mt7620a-eval-board", "ralink,mt7620a-soc"; model = "Ralink MT7620a + MT7610e evaluation board"; - gpio-keys-polled { + keys { compatible = "gpio-keys"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MT7620a_MT7610e.dts b/target/linux/ramips/dts/MT7620a_MT7610e.dts index 972b48af00..e0ae57a0d9 100644 --- a/target/linux/ramips/dts/MT7620a_MT7610e.dts +++ b/target/linux/ramips/dts/MT7620a_MT7610e.dts @@ -9,7 +9,7 @@ compatible = "ralink,mt7620a-eval-board", "ralink,mt7620a-soc"; model = "Ralink MT7620A evaluation board"; - gpio-keys-polled { + keys { compatible = "gpio-keys"; poll-interval = <20>; @@ -89,3 +89,11 @@ &pcie { status = "okay"; }; + +&pcie0 { + wifi@0,0 { + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; diff --git a/target/linux/ramips/dts/MT7620a_V22SG.dts b/target/linux/ramips/dts/MT7620a_V22SG.dts index 4a88445f81..d2863ee75c 100644 --- a/target/linux/ramips/dts/MT7620a_V22SG.dts +++ b/target/linux/ramips/dts/MT7620a_V22SG.dts @@ -9,7 +9,7 @@ compatible = "ralink,mt7620a-eval-board", "ralink,mt7620a-soc"; model = "Ralink MT7620a V22SG High Power evaluation board"; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MT7628.dts b/target/linux/ramips/dts/MT7628.dts index 313c634753..b4afc8ce96 100644 --- a/target/linux/ramips/dts/MT7628.dts +++ b/target/linux/ramips/dts/MT7628.dts @@ -32,7 +32,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/MZK-750DHP.dts b/target/linux/ramips/dts/MZK-750DHP.dts index f4376d7059..a4a6c9b8be 100644 --- a/target/linux/ramips/dts/MZK-750DHP.dts +++ b/target/linux/ramips/dts/MZK-750DHP.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; wps { @@ -35,7 +35,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MZK-DP150N.dts b/target/linux/ramips/dts/MZK-DP150N.dts index ea3fc8aeb1..41fb6e06d8 100644 --- a/target/linux/ramips/dts/MZK-DP150N.dts +++ b/target/linux/ramips/dts/MZK-DP150N.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MZK-EX300NP.dts b/target/linux/ramips/dts/MZK-EX300NP.dts index 49046fdd0d..6578d952c0 100644 --- a/target/linux/ramips/dts/MZK-EX300NP.dts +++ b/target/linux/ramips/dts/MZK-EX300NP.dts @@ -16,7 +16,7 @@ led-upgrade = &led_wps; }; - gpio-leds { + leds { compatible = "gpio-leds"; wifi { @@ -50,7 +50,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MZK-EX750NP.dts b/target/linux/ramips/dts/MZK-EX750NP.dts index 08e34723fc..497693d393 100644 --- a/target/linux/ramips/dts/MZK-EX750NP.dts +++ b/target/linux/ramips/dts/MZK-EX750NP.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -55,7 +55,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MZK-W300NH2.dts b/target/linux/ramips/dts/MZK-W300NH2.dts index a001598edc..ab749fc43d 100644 --- a/target/linux/ramips/dts/MZK-W300NH2.dts +++ b/target/linux/ramips/dts/MZK-W300NH2.dts @@ -59,7 +59,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -78,7 +78,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MicroWRT.dts b/target/linux/ramips/dts/MicroWRT.dts index 051ff8a0a6..a010a9c626 100644 --- a/target/linux/ramips/dts/MicroWRT.dts +++ b/target/linux/ramips/dts/MicroWRT.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/NA930.dts b/target/linux/ramips/dts/NA930.dts index 43fea5670d..6d85914265 100644 --- a/target/linux/ramips/dts/NA930.dts +++ b/target/linux/ramips/dts/NA930.dts @@ -54,7 +54,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -77,7 +77,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; zwave { diff --git a/target/linux/ramips/dts/NBG-419N.dts b/target/linux/ramips/dts/NBG-419N.dts index 2f9c48c480..625e1616d8 100644 --- a/target/linux/ramips/dts/NBG-419N.dts +++ b/target/linux/ramips/dts/NBG-419N.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -67,7 +67,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/NBG-419N2.dts b/target/linux/ramips/dts/NBG-419N2.dts index 58361faa1c..e150eff9e8 100644 --- a/target/linux/ramips/dts/NBG-419N2.dts +++ b/target/linux/ramips/dts/NBG-419N2.dts @@ -57,7 +57,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -78,7 +78,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; reset { diff --git a/target/linux/ramips/dts/NW718.dts b/target/linux/ramips/dts/NW718.dts index 6db2e23c8a..61af498fd8 100644 --- a/target/linux/ramips/dts/NW718.dts +++ b/target/linux/ramips/dts/NW718.dts @@ -16,7 +16,7 @@ led-upgrade = &led_cpu; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_cpu: cpu { @@ -37,7 +37,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/Newifi-D1.dts b/target/linux/ramips/dts/Newifi-D1.dts index 37383fd3d8..2c180585c9 100644 --- a/target/linux/ramips/dts/Newifi-D1.dts +++ b/target/linux/ramips/dts/Newifi-D1.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; status-red { @@ -45,7 +45,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -82,10 +82,10 @@ status = "okay"; m25p80@0 { - compatible = "jedec,spi-nor"; + compatible = "mx25l25635f", "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; + spi-max-frequency = <25000000>; + m25p,fast-read; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/Newifi-D2.dts b/target/linux/ramips/dts/Newifi-D2.dts index 447701296e..31fc42cde2 100644 --- a/target/linux/ramips/dts/Newifi-D2.dts +++ b/target/linux/ramips/dts/Newifi-D2.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; power-amber { @@ -66,7 +66,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -102,7 +102,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/OMEGA2.dtsi b/target/linux/ramips/dts/OMEGA2.dtsi index adde7fcdd1..e36602d6c9 100644 --- a/target/linux/ramips/dts/OMEGA2.dtsi +++ b/target/linux/ramips/dts/OMEGA2.dtsi @@ -17,7 +17,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; system_led: system { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -109,7 +109,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <40000000>; - m25p,chunked-io = <31>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/OY-0001.dts b/target/linux/ramips/dts/OY-0001.dts index cc656d4137..6b93b8d089 100644 --- a/target/linux/ramips/dts/OY-0001.dts +++ b/target/linux/ramips/dts/OY-0001.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: powerled { @@ -34,7 +34,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/PBR-D1.dts b/target/linux/ramips/dts/PBR-D1.dts index 5fe72bbc39..6d98a4492f 100644 --- a/target/linux/ramips/dts/PBR-D1.dts +++ b/target/linux/ramips/dts/PBR-D1.dts @@ -29,7 +29,7 @@ reg = <0x0 0x8000000>; }; - gpio-leds { + leds { compatible = "gpio-leds"; usb { @@ -46,7 +46,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -105,7 +105,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <40000000>; - m25p,chunked-io = <31>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/PBR-M1.dts b/target/linux/ramips/dts/PBR-M1.dts index f3b85d50aa..e89a7ef93f 100644 --- a/target/linux/ramips/dts/PBR-M1.dts +++ b/target/linux/ramips/dts/PBR-M1.dts @@ -37,7 +37,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; power { @@ -67,7 +67,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -118,7 +118,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; @@ -146,7 +145,7 @@ partition@50000 { compatible = "denx,uimage"; label = "firmware"; - reg = <0x50000 0x1fb0000>; + reg = <0x50000 0xfb0000>; }; }; }; diff --git a/target/linux/ramips/dts/PSG1208.dts b/target/linux/ramips/dts/PSG1208.dts index de8d11abee..564b083f82 100644 --- a/target/linux/ramips/dts/PSG1208.dts +++ b/target/linux/ramips/dts/PSG1208.dts @@ -16,7 +16,7 @@ led-upgrade = &led_wps; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wps: wps { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/PSG1218.dtsi b/target/linux/ramips/dts/PSG1218.dtsi index 23f1dd753e..33eabb6f78 100644 --- a/target/linux/ramips/dts/PSG1218.dtsi +++ b/target/linux/ramips/dts/PSG1218.dtsi @@ -6,7 +6,7 @@ / { compatible = "phicomm,psg1218", "ralink,mt7620a-soc"; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/PSG1218A.dts b/target/linux/ramips/dts/PSG1218A.dts index 767070dbb5..2ae8871d89 100644 --- a/target/linux/ramips/dts/PSG1218A.dts +++ b/target/linux/ramips/dts/PSG1218A.dts @@ -13,7 +13,7 @@ led-upgrade = &led_blue; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_blue: blue { label = "psg1218a:blue:status"; diff --git a/target/linux/ramips/dts/PSG1218B.dts b/target/linux/ramips/dts/PSG1218B.dts index 8f735a7d9a..f6445e8c44 100644 --- a/target/linux/ramips/dts/PSG1218B.dts +++ b/target/linux/ramips/dts/PSG1218B.dts @@ -13,7 +13,7 @@ led-upgrade = &led_blue; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_blue: blue { label = "psg1218b:blue:status"; diff --git a/target/linux/ramips/dts/PSR-680W.dts b/target/linux/ramips/dts/PSR-680W.dts index cdda066a29..260d0a1444 100644 --- a/target/linux/ramips/dts/PSR-680W.dts +++ b/target/linux/ramips/dts/PSR-680W.dts @@ -57,7 +57,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wan: wan { @@ -66,7 +66,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/PWH2004.dts b/target/linux/ramips/dts/PWH2004.dts index 885589a2e3..3280c93afb 100644 --- a/target/linux/ramips/dts/PWH2004.dts +++ b/target/linux/ramips/dts/PWH2004.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wifi { @@ -67,7 +67,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/PX-4885.dtsi b/target/linux/ramips/dts/PX-4885.dtsi index cbfd2d0f3a..032a89cd1a 100644 --- a/target/linux/ramips/dts/PX-4885.dtsi +++ b/target/linux/ramips/dts/PX-4885.dtsi @@ -13,7 +13,7 @@ led-upgrade = &led_wifi; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -24,7 +24,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wifi: wifi { diff --git a/target/linux/ramips/dts/QUAD-E4G.dts b/target/linux/ramips/dts/QUAD-E4G.dts new file mode 100644 index 0000000000..3826f69872 --- /dev/null +++ b/target/linux/ramips/dts/QUAD-E4G.dts @@ -0,0 +1,236 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "alfa-network,quad-e4g", "mediatek,mt7621-soc"; + model = "ALFA Network Quad-E4G"; + + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + m2-enable { + gpio-export,name = "m2-enable"; + gpio-export,output = <1>; + gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>; + }; + + minipcie0-enable { + gpio-export,name = "minipcie0-enable"; + gpio-export,output = <1>; + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; + }; + + minipcie0-reset { + gpio-export,name = "minipcie0-reset"; + gpio-export,output = <0>; + gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; + }; + + minipcie1-enable { + gpio-export,name = "minipcie1-enable"; + gpio-export,output = <1>; + gpios = <&gpio0 30 GPIO_ACTIVE_HIGH>; + }; + + minipcie1-reset { + gpio-export,name = "minipcie1-reset"; + gpio-export,output = <0>; + gpios = <&gpio0 24 GPIO_ACTIVE_HIGH>; + }; + + minipcie2-enable { + gpio-export,name = "minipcie2-enable"; + gpio-export,output = <1>; + gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; + }; + + minipcie2-reset { + gpio-export,name = "minipcie2-reset"; + gpio-export,output = <0>; + gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; + }; + + pcie-perst-disable { + gpio-export,name = "pcie-perst-enable"; + gpio-export,output = <0>; + gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>; + }; + + sim-select { + gpio-export,name = "sim-select"; + gpio-export,output = <1>; + gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; + }; + + watchdog-enable { + gpio-export,name = "watchdog-enable"; + gpio-export,output = <1>; + gpios = <&gpio0 17 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + user1 { + label = "user1"; + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + user2 { + label = "user2"; + gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_system: system { + label = "quad-e4g:red:system"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + m2 { + label = "quad-e4g:orange:m2"; + gpios = <&gpio1 1 GPIO_ACTIVE_LOW>; + }; + + minipcie0 { + label = "quad-e4g:orange:minipcie0"; + gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; + }; + + minipcie1 { + label = "quad-e4g:orange:minipcie1"; + gpios = <&gpio0 27 GPIO_ACTIVE_LOW>; + }; + + minipcie2 { + label = "quad-e4g:orange:minipcie2"; + gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; + }; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x10000000>; + }; + + watchdog { + compatible = "linux,wdt-gpio"; + gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>; + hw_algo = "toggle"; + hw_margin_ms = <25000>; + always-running; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xe000>; +}; + +&i2c { + status = "okay"; + + rtc@68 { + compatible = "ti,bq32000"; + reg = <0x68>; + }; +}; + +&pcie { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "jtag", "rgmii2", "wdt"; + ralink,function = "gpio"; + }; + }; +}; + +&sdhci { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x1000>; + }; + + partition@31000 { + label = "config"; + reg = <0x31000 0xf000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; + +&uartlite2 { + status = "okay"; +}; + +&uartlite3 { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/R36M-E4G.dts b/target/linux/ramips/dts/R36M-E4G.dts new file mode 100644 index 0000000000..8d7d512d27 --- /dev/null +++ b/target/linux/ramips/dts/R36M-E4G.dts @@ -0,0 +1,217 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7620a.dtsi" + +#include +#include + +/ { + compatible = "alfa-network,r36m-e4g", "ralink,mt7620a-soc"; + model = "ALFA Network R36M-E4G"; + + aliases { + led-boot = &led_system; + led-failsafe = &led_system; + led-running = &led_system; + led-upgrade = &led_system; + }; + + chosen { + bootargs = "console=ttyS1,115200"; + }; + + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + modem-enable { + gpio-export,name = "modem-enable"; + gpio-export,output = <1>; + gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; + }; + + modem-rf-enable { + gpio-export,name = "modem-rf-enable"; + gpio-export,output = <1>; + gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>; + }; + + rtc-enable { + gpio-export,name = "rtc-enable"; + gpio-export,output = <1>; + gpio-export,direction_may_change = <1>; + gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>; + }; + + sim-select { + gpio-export,name = "sim-select"; + gpio-export,output = <0>; + gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>; + }; + + sim1-detect { + gpio-export,name = "sim1-detect"; + gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>; + }; + + sim2-detect { + gpio-export,name = "sim2-detect"; + gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + rfkill { + label = "rfkill"; + gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + 4g { + label = "r36m-e4g:orange:4g"; + gpios = <&gpio1 3 GPIO_ACTIVE_LOW>; + }; + + lan { + label = "r36m-e4g:green:lan"; + gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; + }; + + led_system: system { + label = "r36m-e4g:green:system"; + gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + sim1 { + label = "r36m-e4g:green:sim1"; + gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + sim2 { + label = "r36m-e4g:green:sim2"; + gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + wan { + label = "r36m-e4g:green:wan"; + gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + }; + + wlan { + label = "r36m-e4g:orange:wlan"; + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0radio"; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gpio3 { + status = "okay"; +}; + +&gsw { + mediatek,port4 = "ephy"; +}; + +&i2c { + status = "okay"; +}; + +&ohci { + status = "okay"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "ephy", "pcie", "rgmii1", "wled"; + ralink,function = "gpio"; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x1000>; + }; + + partition@31000 { + label = "config"; + reg = <0x31000 0xf000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&wmac { + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/R6120.dts b/target/linux/ramips/dts/R6120.dts index 052933b766..d263c7824b 100644 --- a/target/linux/ramips/dts/R6120.dts +++ b/target/linux/ramips/dts/R6120.dts @@ -7,7 +7,7 @@ / { compatible = "netgear,r6120", "mediatek,mt7628an-soc"; - model = "Netgear AC1200 R6120"; + model = "Netgear R6120"; aliases { led-boot = &led_power; @@ -21,7 +21,7 @@ reg = <0x0 0x4000000>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -32,7 +32,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { @@ -55,23 +55,36 @@ gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; }; - wlan5 { - label = "r6120:green:wlan5g"; + wan { + label = "r6120:green:wan"; gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; }; - wlan5_orange { - label = "r6120:orange:wlan5g"; + wan_orange { + label = "r6120:orange:wan"; gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; }; }; + + usb-regulator { + compatible = "regulator-fixed"; + + regulator-name = "USB-power"; + gpio = <&gpio1 13 GPIO_ACTIVE_HIGH>; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + enable-active-high; + + regulator-always-on; + }; }; &pinctrl { state_default: pinctrl0 { gpio { ralink,group = "p0led_an", "p1led_an", "p2led_an", - "p3led_an", "p4led_an", "wdt", "wled_an"; + "p3led_an", "p4led_an", "wdt", + "wled_an", "uart1"; ralink,function = "gpio"; }; }; @@ -84,7 +97,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; @@ -103,7 +115,7 @@ read-only; }; - nvram: partition@60000 { + partition@60000 { label = "nvram"; reg = <0x60000 0x30000>; read-only; @@ -126,12 +138,12 @@ &wmac { status = "okay"; - mtd-mac-address = <&nvram 0x100b0>; - mediatek,mtd-eeprom = <&factory 0x20000>; + mtd-mac-address = <&factory 0x4>; + mediatek,mtd-eeprom = <&factory 0x0>; }; ðernet { - mtd-mac-address = <&nvram 0x100b0>; + mtd-mac-address = <&factory 0x4>; }; &pcie { @@ -141,9 +153,9 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x28000>; + mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&nvram 0x100b0>; + mtd-mac-address = <&factory 0x4>; mtd-mac-address-increment = <(2)>; }; }; diff --git a/target/linux/ramips/dts/R6220.dts b/target/linux/ramips/dts/R6220.dts index f9b27daf2a..28c3a3938d 100644 --- a/target/linux/ramips/dts/R6220.dts +++ b/target/linux/ramips/dts/R6220.dts @@ -1,6 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 /dts-v1/; -#include "mt7621.dtsi" +#include "R6220.dtsi" #include #include @@ -8,87 +9,26 @@ / { compatible = "netgear,r6220", "mediatek,mt7621-soc"; model = "Netgear R6220"; +}; - aliases { - led-boot = &led_power; - led-failsafe = &led_power; - led-running = &led_power; - led-upgrade = &led_power; - }; +&led_power { + label = "r6220:green:power"; +}; - memory@0 { - device_type = "memory"; - reg = <0x0 0x8000000>; - }; +&led_usb { + label = "r6220:green:usb"; +}; - chosen { - bootargs = "console=ttyS0,57600"; - }; +&led_internet { + label = "r6220:green:wan"; +}; - gpio-leds { - compatible = "gpio-leds"; +&led_wifi { + label = "r6220:green:wifi"; +}; - led_power: power { - label = "r6220:green:power"; - gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; - }; - - usb { - label = "r6220:green:usb"; - gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; - trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; - linux,default-trigger = "usbport"; - }; - - internet { - label = "r6220:green:wan"; - gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; - }; - - wifi { - label = "r6220:green:wifi"; - gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; - }; - - wps { - label = "r6220:green:wps"; - gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; - }; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - poll-interval = <20>; - - wps { - label = "wps"; - gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; - linux,code = ; - }; - - wifi { - label = "wifi"; - gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; - linux,code = ; - }; - - reset { - label = "reset"; - gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; - linux,code = ; - }; - }; - - gpio_export { - compatible = "gpio-export"; - #size-cells = <0>; - - usbpower { - gpio-export,name = "usbpower"; - gpio-export,output = <1>; - gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; - }; - }; +&led_wps { + label = "r6220:green:wps"; }; &nand { @@ -134,36 +74,3 @@ }; }; }; - -&pcie { - status = "okay"; -}; - -&pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; - ieee80211-freq-limit = <5000000 6000000>; - }; -}; - -&pcie1 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0000>; - ieee80211-freq-limit = <2400000 2500000>; - }; -}; - -ðernet { - mtd-mac-address = <&factory 0x00000004>; -}; - -&pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "uart3", "jtag"; - ralink,function = "gpio"; - }; - }; -}; diff --git a/target/linux/ramips/dts/R6220.dtsi b/target/linux/ramips/dts/R6220.dtsi new file mode 100644 index 0000000000..c9268b0caa --- /dev/null +++ b/target/linux/ramips/dts/R6220.dtsi @@ -0,0 +1,125 @@ +// SPDX-License-Identifier: GPL-2.0 +/dts-v1/; + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "mediatek,mt7621-soc"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + + chosen { + bootargs = "console=ttyS0,57600"; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; + }; + + led_usb: usb { + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; + trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; + linux,default-trigger = "usbport"; + }; + + led_internet: internet { + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + }; + + led_wifi: wifi { + gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + led_wps: wps { + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + wps { + label = "wps"; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wifi { + label = "wifi"; + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + reg_usb_vbus: regulator { + compatible = "regulator-fixed"; + regulator-name = "usb_vbus"; + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; + gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>; + enable-active-high; + }; +}; + +&xhci { + vbus-supply = <®_usb_vbus>; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "pci14c3,7662"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "pci14c3,7603"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + ieee80211-freq-limit = <2400000 2500000>; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x00000004>; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "uart3", "uart2", "jtag", "wdt"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/R6350.dts b/target/linux/ramips/dts/R6350.dts index b3f5281542..538fa21ace 100644 --- a/target/linux/ramips/dts/R6350.dts +++ b/target/linux/ramips/dts/R6350.dts @@ -26,7 +26,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -49,10 +49,11 @@ wifi { label = "r6350:green:wifi"; gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/RAK633.dts b/target/linux/ramips/dts/RAK633.dts new file mode 100644 index 0000000000..ac7218510f --- /dev/null +++ b/target/linux/ramips/dts/RAK633.dts @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7628an.dtsi" + +#include +#include + +/ { + compatible = "rakwireless,rak633", "mediatek,mt7628an-soc"; + model = "Rakwireless RAK633"; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + leds { + compatible = "gpio-leds"; + + wifi { + label = "rak633:blue:wifi"; + gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + wled_an { + ralink,group = "wled_an"; + ralink,function = "gpio"; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; + }; +}; + +&i2c { + status = "okay"; +}; + +&i2s { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&uart2 { + status = "okay"; +}; + +&gdma { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&wmac { + status = "okay"; + ralink,mtd-eeprom = <&factory 0x4>; +}; diff --git a/target/linux/ramips/dts/RB750Gr3.dts b/target/linux/ramips/dts/RB750Gr3.dts index 6b18cce78f..4a303edddb 100644 --- a/target/linux/ramips/dts/RB750Gr3.dts +++ b/target/linux/ramips/dts/RB750Gr3.dts @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; #include "mt7621.dtsi" @@ -7,13 +8,13 @@ / { compatible = "mikrotik,rb750gr3", "mediatek,mt7621-soc"; - model = "MikroTik RB750Gr3"; + model = "MikroTik RouterBOARD 750Gr3"; aliases { - led-boot = &led_pwr; - led-failsafe = &led_pwr; - led-running = &led_pwr; - led-upgrade = &led_pwr; + led-boot = &led_usr; + led-failsafe = &led_usr; + led-running = &led_usr; + led-upgrade = &led_usr; }; memory@0 { @@ -22,52 +23,52 @@ }; chosen { - bootargs = "console=ttyS0,57600"; + bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; - led_pwr: pwr { + pwr { label = "rb750gr3:blue:pwr"; gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; + default-state = "on"; }; - usr { + led_usr: usr { label = "rb750gr3:green:usr"; gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; mode { label = "mode"; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; - linux,code = ; + linux,code = ; }; - res { - label = "res"; + reset { + label = "reset"; gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; linux,code = ; }; }; + beeper { + compatible = "gpio-beeper"; + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; + }; + gpio_export { compatible = "gpio-export"; #size-cells = <0>; - buzzer { - gpio-export,name = "buzzer"; - gpio-export,output = <0>; - gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; - }; - - usb { - gpio-export,name = "usb"; + usb_power { + gpio-export,name = "usb_power"; gpio-export,output = <1>; gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; }; @@ -77,11 +78,10 @@ &spi0 { status = "okay"; - m25p80@0 { + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; + spi-max-frequency = <20000000>; partitions { compatible = "fixed-partitions"; @@ -89,41 +89,62 @@ #size-cells = <1>; partition@0 { - label = "u-boot"; - reg = <0x0 0x30000>; + label = "RouterBoot"; + reg = <0x0 0x40000>; read-only; + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader1"; + reg = <0x0 0xf000>; + read-only; + }; + + hard_config: partition@f000 { + label = "hard_config"; + reg = <0xf000 0x1000>; + read-only; + }; + + partition@10000 { + label = "bootloader2"; + reg = <0x10000 0xf000>; + read-only; + }; + + partition@20000 { + label = "soft_config"; + reg = <0x20000 0x1000>; + }; + + partition@30000 { + label = "bios"; + reg = <0x30000 0x1000>; + read-only; + }; }; - partition@30000 { - label = "u-boot-env"; - reg = <0x30000 0x10000>; - read-only; - }; - - factory: partition@40000 { - label = "factory"; - reg = <0x40000 0x10000>; - read-only; - }; - - partition@50000 { - compatible = "denx,uimage"; + partition@40000 { + compatible = "mikrotik,minor"; label = "firmware"; - reg = <0x50000 0xfb0000>; + reg = <0x040000 0xfc0000>; }; }; }; }; ðernet { - mtd-mac-address = <&factory 0xe000>; + mtd-mac-address = <&hard_config 0x0010>; mtd-mac-address-increment = <1>; }; &pinctrl { state_default: pinctrl0 { gpio { - ralink,group = "i2c", "uart2", "uart3", "pcie", "rgmii2", "jtag"; + /* via gpio7 (uart3 group) the PoE status can be read */ + ralink,group = "uart2", "uart3", "jtag", "wdt"; ralink,function = "gpio"; }; }; diff --git a/target/linux/ramips/dts/RBM11G.dts b/target/linux/ramips/dts/RBM11G.dts index 4c01316495..ce8d7208f1 100644 --- a/target/linux/ramips/dts/RBM11G.dts +++ b/target/linux/ramips/dts/RBM11G.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_usr: usr { @@ -59,7 +59,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; res { diff --git a/target/linux/ramips/dts/RBM33G.dts b/target/linux/ramips/dts/RBM33G.dts index 08c5ab1f38..f40c4f733f 100644 --- a/target/linux/ramips/dts/RBM33G.dts +++ b/target/linux/ramips/dts/RBM33G.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_usr: usr { @@ -34,7 +34,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/RE350.dts b/target/linux/ramips/dts/RE350.dts index 38218b6c97..5414fe147a 100644 --- a/target/linux/ramips/dts/RE350.dts +++ b/target/linux/ramips/dts/RE350.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -64,7 +64,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -101,7 +101,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/RE6500.dts b/target/linux/ramips/dts/RE6500.dts index 830dfe25ad..de5c310608 100644 --- a/target/linux/ramips/dts/RE6500.dts +++ b/target/linux/ramips/dts/RE6500.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; wifi { @@ -39,7 +39,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -64,7 +64,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/RP-N53.dts b/target/linux/ramips/dts/RP-N53.dts index d73e7d1840..2d2820ed79 100644 --- a/target/linux/ramips/dts/RP-N53.dts +++ b/target/linux/ramips/dts/RP-N53.dts @@ -9,7 +9,7 @@ compatible = "asus,rp-n53", "ralink,mt7620a-soc"; model = "Asus RP-N53"; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -38,7 +38,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; backlight { diff --git a/target/linux/ramips/dts/RT-AC51U.dts b/target/linux/ramips/dts/RT-AC51U.dts index b54e5b8474..3e54ffdad2 100644 --- a/target/linux/ramips/dts/RT-AC51U.dts +++ b/target/linux/ramips/dts/RT-AC51U.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -37,7 +37,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ADSLR-G7.dts b/target/linux/ramips/dts/RT-AC57U.dts similarity index 56% rename from target/linux/ramips/dts/ADSLR-G7.dts rename to target/linux/ramips/dts/RT-AC57U.dts index ea5b5080d5..6fec0cdf61 100644 --- a/target/linux/ramips/dts/ADSLR-G7.dts +++ b/target/linux/ramips/dts/RT-AC57U.dts @@ -7,14 +7,19 @@ #include / { - compatible = "adslr,g7", "mediatek,mt7621-soc"; - model = "ADSLR G7"; + compatible = "asus,rt-ac57u", "mediatek,mt7621-soc"; + model = "ASUS RT-AC57U"; aliases { - led-boot = &led_sys; - led-failsafe = &led_sys; - led-running = &led_sys; - led-upgrade = &led_sys; + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; }; chosen { @@ -24,22 +29,45 @@ leds { compatible = "gpio-leds"; - led_sys: sys { - label = "g7:blue:sys"; - gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + led_power: power { + label = "rt-ac57u:blue:power"; + gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; + }; + + usb { + label = "rt-ac57u:blue:usb"; + gpios = <&gpio1 15 GPIO_ACTIVE_LOW>; + trigger-sources = <&ehci_port2>; + linux,default-trigger = "usbport"; }; }; keys { compatible = "gpio-keys"; + wps { + label = "wps"; + gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; + linux,code = ; + debounce-interval = <60>; + }; + reset { label = "reset"; - gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; - debounce-interval = <60>; + gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; linux,code = ; + debounce-interval = <60>; }; }; + + led-regulator { + compatible = "regulator-fixed"; + regulator-name = "LED-Power"; + gpio = <&gpio1 14 GPIO_ACTIVE_LOW>; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; }; &spi0 { @@ -48,7 +76,7 @@ flash@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <40000000>; + spi-max-frequency = <10000000>; partitions { compatible = "fixed-partitions"; @@ -62,7 +90,7 @@ }; partition@30000 { - label = "u-boot-env"; + label = "config"; reg = <0x30000 0x10000>; read-only; }; @@ -90,8 +118,12 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0000>; - ieee80211-freq-limit = <2400000 2500000>; + mediatek,mtd-eeprom = <&factory 0x8000>; + + led { + led-sources = <2>; + led-active-low; + }; }; }; @@ -99,8 +131,11 @@ wifi@0,0 { compatible = "mediatek,mt76"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; - ieee80211-freq-limit = <5000000 6000000>; + mediatek,mtd-eeprom = <&factory 0x0000>; + + led { + led-active-low; + }; }; }; @@ -111,7 +146,7 @@ &pinctrl { state_default: pinctrl0 { gpio { - ralink,group = "i2c", "wdt"; + ralink,group = "sdhci"; ralink,function = "gpio"; }; }; diff --git a/target/linux/ramips/dts/RT-G32-B1.dts b/target/linux/ramips/dts/RT-G32-B1.dts index 581941c846..8f0544e7ef 100644 --- a/target/linux/ramips/dts/RT-G32-B1.dts +++ b/target/linux/ramips/dts/RT-G32-B1.dts @@ -9,7 +9,7 @@ compatible = "asus,rt-g32-b1", "ralink,rt3050-soc"; model = "Asus RT-G32 B1"; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/RT-N10-PLUS.dts b/target/linux/ramips/dts/RT-N10-PLUS.dts index eaf32ece12..3b77a4ce3c 100644 --- a/target/linux/ramips/dts/RT-N10-PLUS.dts +++ b/target/linux/ramips/dts/RT-N10-PLUS.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wps: wps { @@ -62,7 +62,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/RT-N12-PLUS.dts b/target/linux/ramips/dts/RT-N12-PLUS.dts index 401e403cf3..83a7b6adf0 100644 --- a/target/linux/ramips/dts/RT-N12-PLUS.dts +++ b/target/linux/ramips/dts/RT-N12-PLUS.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { @@ -44,7 +44,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/RT-N13U.dts b/target/linux/ramips/dts/RT-N13U.dts index f4a8720a09..c3a3d2346f 100644 --- a/target/linux/ramips/dts/RT-N13U.dts +++ b/target/linux/ramips/dts/RT-N13U.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -67,7 +67,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <10>; diff --git a/target/linux/ramips/dts/RT-N14U.dts b/target/linux/ramips/dts/RT-N14U.dts index 10ae9c0476..834eb0ddf3 100644 --- a/target/linux/ramips/dts/RT-N14U.dts +++ b/target/linux/ramips/dts/RT-N14U.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { @@ -47,7 +47,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/RT-N15.dts b/target/linux/ramips/dts/RT-N15.dts index 3cc929d51e..4ed6c1ed45 100644 --- a/target/linux/ramips/dts/RT-N15.dts +++ b/target/linux/ramips/dts/RT-N15.dts @@ -61,7 +61,7 @@ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -78,7 +78,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/ramips/dts/RT-N56U.dts b/target/linux/ramips/dts/RT-N56U.dts index 39f6488ac0..9c2a32a988 100644 --- a/target/linux/ramips/dts/RT-N56U.dts +++ b/target/linux/ramips/dts/RT-N56U.dts @@ -59,7 +59,7 @@ realtek,extif1 = <1 0 1 1 1 1 1 1 2>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -76,7 +76,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/ramips/dts/RUT5XX.dts b/target/linux/ramips/dts/RUT5XX.dts index a7654c60b2..52638f94e6 100644 --- a/target/linux/ramips/dts/RUT5XX.dts +++ b/target/linux/ramips/dts/RUT5XX.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/SAP-G3200U3.dts b/target/linux/ramips/dts/SAP-G3200U3.dts index 1b2078990e..d1d6a534b6 100644 --- a/target/linux/ramips/dts/SAP-G3200U3.dts +++ b/target/linux/ramips/dts/SAP-G3200U3.dts @@ -18,7 +18,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; usb { @@ -29,7 +29,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -54,7 +54,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/SK-WB8.dts b/target/linux/ramips/dts/SK-WB8.dts index 8f85c704cd..9511432e15 100644 --- a/target/linux/ramips/dts/SK-WB8.dts +++ b/target/linux/ramips/dts/SK-WB8.dts @@ -24,7 +24,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wps: wps { @@ -40,7 +40,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; wps { @@ -63,7 +63,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/SKW92A.dts b/target/linux/ramips/dts/SKW92A.dts index 5aaf3ce161..dddb794a8f 100644 --- a/target/linux/ramips/dts/SKW92A.dts +++ b/target/linux/ramips/dts/SKW92A.dts @@ -24,7 +24,7 @@ reg = <0x0 0x4000000>; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: wps { @@ -38,7 +38,7 @@ }; }; - gpio-keys { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -75,7 +75,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/SL-R7205.dts b/target/linux/ramips/dts/SL-R7205.dts index 7c3d53aea6..3d8a9ec464 100644 --- a/target/linux/ramips/dts/SL-R7205.dts +++ b/target/linux/ramips/dts/SL-R7205.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wifi: wifi { @@ -62,7 +62,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/TEW-638APB-V2.dts b/target/linux/ramips/dts/TEW-638APB-V2.dts index bacdb0b1f1..a014b32802 100644 --- a/target/linux/ramips/dts/TEW-638APB-V2.dts +++ b/target/linux/ramips/dts/TEW-638APB-V2.dts @@ -53,7 +53,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wps { diff --git a/target/linux/ramips/dts/TEW-691GR.dts b/target/linux/ramips/dts/TEW-691GR.dts index 8fee29b83a..aeed7fbb24 100644 --- a/target/linux/ramips/dts/TEW-691GR.dts +++ b/target/linux/ramips/dts/TEW-691GR.dts @@ -52,7 +52,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -75,7 +75,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wps: wps { diff --git a/target/linux/ramips/dts/TEW-692GR.dts b/target/linux/ramips/dts/TEW-692GR.dts index 37b841c1dc..03395a92dd 100644 --- a/target/linux/ramips/dts/TEW-692GR.dts +++ b/target/linux/ramips/dts/TEW-692GR.dts @@ -52,7 +52,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -69,7 +69,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wps { diff --git a/target/linux/ramips/dts/TEW-714TRU.dts b/target/linux/ramips/dts/TEW-714TRU.dts index 4969aee4b9..00e3d2df12 100644 --- a/target/linux/ramips/dts/TEW-714TRU.dts +++ b/target/linux/ramips/dts/TEW-714TRU.dts @@ -9,7 +9,7 @@ compatible = "trendnet,tew-714tru", "ralink,rt5350-soc"; model = "TRENDnet TEW714TRU"; - gpio-leds { + leds { compatible = "gpio-leds"; usb { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/TINY-AC.dts b/target/linux/ramips/dts/TINY-AC.dts index d5a232124d..e36af1dc7f 100644 --- a/target/linux/ramips/dts/TINY-AC.dts +++ b/target/linux/ramips/dts/TINY-AC.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; usb { @@ -29,7 +29,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/TL-MR3020V3.dts b/target/linux/ramips/dts/TL-MR3020V3.dts index aa9bcaf81c..7a9ef41446 100644 --- a/target/linux/ramips/dts/TL-MR3020V3.dts +++ b/target/linux/ramips/dts/TL-MR3020V3.dts @@ -25,7 +25,7 @@ reg = <0x0 0x4000000>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -48,7 +48,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -88,7 +88,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/TL-MR3420V5.dts b/target/linux/ramips/dts/TL-MR3420V5.dts index 80436b870a..a528152d38 100644 --- a/target/linux/ramips/dts/TL-MR3420V5.dts +++ b/target/linux/ramips/dts/TL-MR3420V5.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { diff --git a/target/linux/ramips/dts/TL-WA801NDV5.dts b/target/linux/ramips/dts/TL-WA801NDV5.dts index ad9177617c..fb944b07ef 100644 --- a/target/linux/ramips/dts/TL-WA801NDV5.dts +++ b/target/linux/ramips/dts/TL-WA801NDV5.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -27,7 +27,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/ramips/dts/TL-WR802NV4.dts b/target/linux/ramips/dts/TL-WR802NV4.dts new file mode 100644 index 0000000000..668da700c3 --- /dev/null +++ b/target/linux/ramips/dts/TL-WR802NV4.dts @@ -0,0 +1,53 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "TPLINK-8M.dtsi" + +#include +#include + +/ { + compatible = "tplink,tl-wr802n-v4", "mediatek,mt7628an-soc"; + model = "TP-Link TL-WR802N v4"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "tl-wr802n-v4:green:power"; + gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "refclk", "wdt"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xf100>; + mediatek,portmap = "l"; +}; diff --git a/target/linux/ramips/dts/TL-WR840NV4.dts b/target/linux/ramips/dts/TL-WR840NV4.dts index df892a0d28..5f5bb4fa47 100644 --- a/target/linux/ramips/dts/TL-WR840NV4.dts +++ b/target/linux/ramips/dts/TL-WR840NV4.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -27,7 +27,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { diff --git a/target/linux/ramips/dts/TL-WR840NV5.dts b/target/linux/ramips/dts/TL-WR840NV5.dts index 2d9b7e5c55..773839098b 100644 --- a/target/linux/ramips/dts/TL-WR840NV5.dts +++ b/target/linux/ramips/dts/TL-WR840NV5.dts @@ -25,7 +25,7 @@ reg = <0x0 0x4000000>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -36,7 +36,7 @@ }; }; /* LED used is dual-color,dual lead LED */ - gpio-leds { + leds { compatible = "gpio-leds"; led_power_green: power { @@ -58,7 +58,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/TL-WR841NV13.dts b/target/linux/ramips/dts/TL-WR841NV13.dts index a9a01fea2a..3dea063286 100644 --- a/target/linux/ramips/dts/TL-WR841NV13.dts +++ b/target/linux/ramips/dts/TL-WR841NV13.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/ramips/dts/TL-WR842NV5.dts b/target/linux/ramips/dts/TL-WR842NV5.dts index 9d1e399668..0610b20250 100644 --- a/target/linux/ramips/dts/TL-WR842NV5.dts +++ b/target/linux/ramips/dts/TL-WR842NV5.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { diff --git a/target/linux/ramips/dts/TL-WR902ACV3.dts b/target/linux/ramips/dts/TL-WR902ACV3.dts index b786041286..1d634314cf 100644 --- a/target/linux/ramips/dts/TL-WR902ACV3.dts +++ b/target/linux/ramips/dts/TL-WR902ACV3.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -45,7 +45,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { diff --git a/target/linux/ramips/dts/TOTOLINK-LR1200.dts b/target/linux/ramips/dts/TOTOLINK-LR1200.dts new file mode 100644 index 0000000000..81aa8db915 --- /dev/null +++ b/target/linux/ramips/dts/TOTOLINK-LR1200.dts @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7628an.dtsi" + +#include +#include + +/ { + compatible = "totolink,lr1200", "mediatek,mt7628dan"; + model = "TOTOLINK LR1200"; + + aliases { + led-boot = &led_sys; + led-failsafe = &led_sys; + led-running = &led_sys; + led-upgrade = &led_sys; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + leds { + compatible = "gpio-leds"; + + led_sys: sys { + label = "lr1200:blue:sys"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + sms { + label = "lr1200:blue:sms"; + gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; + }; + wifi { + label = "lr1200:blue:wifi"; + gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + 3g { + label = "lr1200:blue:3g"; + gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; + }; + 4g { + label = "lr1200:blue:4g"; + gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; + }; + rssi1 { + label = "lr1200:blue:rssi1"; + gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; + }; + rssi2 { + label = "lr1200:blue:rssi2"; + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + }; + rssi3 { + label = "lr1200:blue:rssi3"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + }; + rssi4 { + label = "lr1200:blue:rssi4"; + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&gpio1 { + gpio_modem_reset { + gpio-hog; + gpios = <13 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "modem-reset"; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "gpio", "i2c", "i2s", "refclk", "uart1", "wdt", "wled_an"; + ralink,function = "gpio"; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + mt76@0,0 { + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&wmac { + status = "okay"; + ralink,mtd-eeprom = <&factory 0x4>; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&spi0 { + status = "okay"; + + m25p80@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; + }; +}; diff --git a/target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi b/target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi new file mode 100644 index 0000000000..c62079ee56 --- /dev/null +++ b/target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi @@ -0,0 +1,89 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include "mt7628an.dtsi" + +/ { + chosen { + bootargs = "console=ttyS0,115200"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "factory-uboot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "boot"; + reg = <0x30000 0x20000>; + read-only; + }; + + partition@50000 { + compatible = "tplink,firmware"; + label = "firmware"; + reg = <0x50000 0x770000>; + }; + + partition@7c0000 { + label = "config"; + reg = <0x7c0000 0x10000>; + read-only; + }; + + rom: partition@7d0000 { + label = "rom"; + reg = <0x7d0000 0x10000>; + read-only; + }; + + partition@7e0000 { + label = "romfile"; + reg = <0x7e0000 0x10000>; + }; + + radio: partition@7f0000 { + label = "radio"; + reg = <0x7f0000 0x10000>; + read-only; + }; + }; + }; +}; + +&ehci { + status = "disabled"; +}; + +&ohci { + status = "disabled"; +}; + +&wmac { + status = "okay"; + mtd-mac-address = <&rom 0xf100>; + mediatek,mtd-eeprom = <&radio 0x0>; +}; + +ðernet { + mtd-mac-address = <&rom 0xf100>; + mediatek,portmap = "llllw"; +}; diff --git a/target/linux/ramips/dts/TPLINK-8M.dtsi b/target/linux/ramips/dts/TPLINK-8M.dtsi index 017f5acd6e..9f7f7ccd6c 100644 --- a/target/linux/ramips/dts/TPLINK-8M.dtsi +++ b/target/linux/ramips/dts/TPLINK-8M.dtsi @@ -18,7 +18,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/TUBE-E4G.dts b/target/linux/ramips/dts/TUBE-E4G.dts new file mode 100644 index 0000000000..4097dc6140 --- /dev/null +++ b/target/linux/ramips/dts/TUBE-E4G.dts @@ -0,0 +1,190 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7620a.dtsi" + +#include +#include + +/ { + compatible = "alfa-network,tube-e4g", "ralink,mt7620a-soc"; + model = "ALFA Network Tube-E4G"; + + aliases { + led-boot = &power; + led-failsafe = &power; + led-running = &power; + led-upgrade = &power; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + modem-enable { + gpio-export,name = "modem-enable"; + gpio-export,output = <1>; + gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>; + }; + + modem-rf-enable { + gpio-export,name = "modem-rf-enable"; + gpio-export,output = <1>; + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + }; + + sim-select { + gpio-export,name = "sim-select"; + gpio-export,output = <0>; + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>; + }; + + sim1-detect { + gpio-export,name = "sim1-detect"; + gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; + }; + + sim2-detect { + gpio-export,name = "sim2-detect"; + gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio2 15 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + + 4g { + label = "tube-e4g:green:4g"; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + }; + + lan { + label = "tube-e4g:blue:lan"; + gpios = <&gpio2 4 GPIO_ACTIVE_LOW>; + }; + + power: power { + label = "tube-e4g:green:power"; + gpios = <&gpio2 0 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + sim1 { + label = "tube-e4g:green:sim1"; + gpios = <&gpio2 3 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + + sim2 { + label = "tube-e4g:green:sim2"; + gpios = <&gpio2 2 GPIO_ACTIVE_LOW>; + default-state = "keep"; + }; + }; +}; + +&ehci { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&gpio2 { + status = "okay"; +}; + +&gsw { + mediatek,port4 = "ephy"; +}; + +&ohci { + status = "okay"; +}; + +&pcie { + status = "disabled"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "ephy", "nd_sd", "pcie", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x1000>; + }; + + partition@31000 { + label = "config"; + reg = <0x31000 0xf000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; + +&wmac { + status = "disabled"; +}; diff --git a/target/linux/ramips/dts/Telco-Electronics-X1.dts b/target/linux/ramips/dts/Telco-Electronics-X1.dts new file mode 100644 index 0000000000..33fc1810a2 --- /dev/null +++ b/target/linux/ramips/dts/Telco-Electronics-X1.dts @@ -0,0 +1,172 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +/dts-v1/; + +#include "mt7621.dtsi" + +#include +#include + +/ { + compatible = "telco-electronics,x1", "mediatek,mt7621-soc"; + model = "Telco Electronics X1"; + + aliases { + led-boot = &system_led; + led-failsafe = &system_led; + led-running = &system_led; + led-upgrade = &system_led; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + system_led: system { + label = "x1:green:system"; + gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; + }; + + modem_offline { + label = "x1:red:modem-offline"; + gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>; + }; + + modem_4g { + label = "x1:blue:modem-4g"; + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>; + }; + + modem_3g { + label = "x1:green:modem-3g"; + gpios = <&gpio0 25 GPIO_ACTIVE_LOW>; + }; + + modem_rssi_lowest { + label = "x1:green:modem-rssi-lowest"; + gpios = <&gpio0 27 GPIO_ACTIVE_LOW>; + }; + + modem_rssi_low { + label = "x1:green:modem-rssi-low"; + gpios = <&gpio0 28 GPIO_ACTIVE_LOW>; + }; + + modem_rssi_medium { + label = "x1:green:modem-rssi-medium"; + gpios = <&gpio0 29 GPIO_ACTIVE_LOW>; + }; + + modem_rssi_high { + label = "x1:green:modem-rssi-high"; + gpios = <&gpio0 30 GPIO_ACTIVE_LOW>; + }; + + modem_rssi_highest { + label = "x1:green:modem-rssi-highest"; + gpios = <&gpio0 31 GPIO_ACTIVE_LOW>; + }; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x10000000>; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <14000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "config"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + firmware: partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0xfb0000>; + }; + }; + }; +}; + +&gpio0 { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0xe006>; + mediatek,portmap = "llllw"; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "jtag", "uart2", "wdt", "rgmii2"; + ralink,function = "gpio"; + }; + }; +}; + +&pcie { + status = "okay"; + + pcie0 { + wifi@0,0 { + compatible = "pci14c3,7603"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x0000>; + ieee80211-freq-limit = <2400000 2500000>; + }; + }; + + pcie1 { + wifi@0,0 { + compatible = "pci14c3,7662"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + led { + led-sources = <2>; + }; + }; + }; +}; diff --git a/target/linux/ramips/dts/Timecloud.dts b/target/linux/ramips/dts/Timecloud.dts index 188aef226f..1b8aa9d85d 100644 --- a/target/linux/ramips/dts/Timecloud.dts +++ b/target/linux/ramips/dts/Timecloud.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; statw { @@ -39,7 +39,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -68,7 +68,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/U25AWF-H1.dts b/target/linux/ramips/dts/U25AWF-H1.dts index d4caa8a90d..4b4d0b6356 100644 --- a/target/linux/ramips/dts/U25AWF-H1.dts +++ b/target/linux/ramips/dts/U25AWF-H1.dts @@ -16,7 +16,7 @@ led-upgrade = &led_wifi; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -27,7 +27,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wifi: wifi { diff --git a/target/linux/ramips/dts/U35WF.dts b/target/linux/ramips/dts/U35WF.dts index 854c9683f8..d058b83949 100644 --- a/target/linux/ramips/dts/U35WF.dts +++ b/target/linux/ramips/dts/U35WF.dts @@ -16,7 +16,7 @@ led-upgrade = &led_wifi; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -27,7 +27,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wifi: wifi { diff --git a/target/linux/ramips/dts/U7621-06-256M-16M.dts b/target/linux/ramips/dts/U7621-06-256M-16M.dts index ae66bd365f..e6cc4c9205 100644 --- a/target/linux/ramips/dts/U7621-06-256M-16M.dts +++ b/target/linux/ramips/dts/U7621-06-256M-16M.dts @@ -56,7 +56,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <14000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/U7621-06-512M-64M.dts b/target/linux/ramips/dts/U7621-06-512M-64M.dts index 4b064b2b3b..d710477c13 100644 --- a/target/linux/ramips/dts/U7621-06-512M-64M.dts +++ b/target/linux/ramips/dts/U7621-06-512M-64M.dts @@ -57,7 +57,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/U7621-06.dtsi b/target/linux/ramips/dts/U7621-06.dtsi index 2bfd4d71f4..301edfe680 100644 --- a/target/linux/ramips/dts/U7621-06.dtsi +++ b/target/linux/ramips/dts/U7621-06.dtsi @@ -62,7 +62,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -73,7 +73,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { diff --git a/target/linux/ramips/dts/U7628-01-128M-16M.dts b/target/linux/ramips/dts/U7628-01-128M-16M.dts index 7b27bfb19c..ac9fd503ca 100644 --- a/target/linux/ramips/dts/U7628-01-128M-16M.dts +++ b/target/linux/ramips/dts/U7628-01-128M-16M.dts @@ -53,7 +53,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <12000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/U7628-01.dtsi b/target/linux/ramips/dts/U7628-01.dtsi index 3ba6b8e800..03da1f88f2 100644 --- a/target/linux/ramips/dts/U7628-01.dtsi +++ b/target/linux/ramips/dts/U7628-01.dtsi @@ -51,7 +51,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; reset { @@ -61,7 +61,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/ramips/dts/UBNT-ER-e50.dtsi b/target/linux/ramips/dts/UBNT-ER-e50.dtsi index b3949a39f0..1d54713fe6 100644 --- a/target/linux/ramips/dts/UBNT-ER-e50.dtsi +++ b/target/linux/ramips/dts/UBNT-ER-e50.dtsi @@ -15,7 +15,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -95,7 +95,6 @@ compatible = "jedec,spi-nor"; reg = <1>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/UR-326N4G.dts b/target/linux/ramips/dts/UR-326N4G.dts index 88cf964277..d67c2e0ec5 100644 --- a/target/linux/ramips/dts/UR-326N4G.dts +++ b/target/linux/ramips/dts/UR-326N4G.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; 3g { @@ -82,7 +82,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/UR-336UN.dts b/target/linux/ramips/dts/UR-336UN.dts index 2ee1a8b871..937278db92 100644 --- a/target/linux/ramips/dts/UR-336UN.dts +++ b/target/linux/ramips/dts/UR-336UN.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; 3g { @@ -82,7 +82,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/V11STFE.dts b/target/linux/ramips/dts/V11STFE.dts index a8a569a8cd..5007f271bb 100644 --- a/target/linux/ramips/dts/V11STFE.dts +++ b/target/linux/ramips/dts/V11STFE.dts @@ -52,7 +52,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -63,7 +63,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { diff --git a/target/linux/ramips/dts/V22RW-2X2.dts b/target/linux/ramips/dts/V22RW-2X2.dts index df0fad3b21..df56c80819 100644 --- a/target/linux/ramips/dts/V22RW-2X2.dts +++ b/target/linux/ramips/dts/V22RW-2X2.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_security: security { @@ -67,7 +67,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/VAR11N-300.dts b/target/linux/ramips/dts/VAR11N-300.dts index 1b93231308..cf4b7c54a1 100644 --- a/target/linux/ramips/dts/VAR11N-300.dts +++ b/target/linux/ramips/dts/VAR11N-300.dts @@ -16,7 +16,7 @@ led-upgrade = &led_system; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_system: system { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/VIXMINI.dts b/target/linux/ramips/dts/VIXMINI.dts new file mode 100644 index 0000000000..5a52fe2a1b --- /dev/null +++ b/target/linux/ramips/dts/VIXMINI.dts @@ -0,0 +1,114 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7628an.dtsi" + +#include +#include + +/{ + compatible = "glinet,vixmini", "mediatek,mt7628an-soc"; + model = "GL.iNet VIXMINI"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "vixmini:blue:power"; + default-state = "on"; + gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + }; + + wlan { + label = "vixmini:white:wlan"; + gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "wdt", "wled_an", "p1led_an"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; +}; + +&wmac { + status = "okay"; + + ralink,mtd-eeprom = <&factory 0x0>; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + }; + }; +}; diff --git a/target/linux/ramips/dts/VOCORE.dtsi b/target/linux/ramips/dts/VOCORE.dtsi index cee7e38ca8..c5c26e77c8 100644 --- a/target/linux/ramips/dts/VOCORE.dtsi +++ b/target/linux/ramips/dts/VOCORE.dtsi @@ -138,7 +138,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { diff --git a/target/linux/ramips/dts/VOCORE2.dts b/target/linux/ramips/dts/VOCORE2.dts index 8ecfd7737c..a78d2cc733 100644 --- a/target/linux/ramips/dts/VOCORE2.dts +++ b/target/linux/ramips/dts/VOCORE2.dts @@ -15,7 +15,7 @@ led-upgrade = &led_status; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -32,7 +32,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/VOCORE2LITE.dts b/target/linux/ramips/dts/VOCORE2LITE.dts index a09fa773f9..db45a95a81 100644 --- a/target/linux/ramips/dts/VOCORE2LITE.dts +++ b/target/linux/ramips/dts/VOCORE2LITE.dts @@ -15,7 +15,7 @@ led-upgrade = &led_status; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -32,7 +32,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/VR500.dts b/target/linux/ramips/dts/VR500.dts index 3538ef793b..4d74f2c9ce 100644 --- a/target/linux/ramips/dts/VR500.dts +++ b/target/linux/ramips/dts/VR500.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -34,7 +34,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -53,7 +53,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/W06.dts b/target/linux/ramips/dts/W06.dts index 8c3bbe4058..55b117c194 100644 --- a/target/linux/ramips/dts/W06.dts +++ b/target/linux/ramips/dts/W06.dts @@ -14,7 +14,7 @@ reg = <0x0 0x4000000>; }; - gpio-leds { + leds { compatible = "gpio-leds"; wps { @@ -33,7 +33,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -73,7 +73,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/W150M.dts b/target/linux/ramips/dts/W150M.dts index 77e835558e..e128580ec8 100644 --- a/target/linux/ramips/dts/W150M.dts +++ b/target/linux/ramips/dts/W150M.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; 3grouter { @@ -87,7 +87,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/W2914NSV2.dts b/target/linux/ramips/dts/W2914NSV2.dts index 4c13122c11..bd8e809447 100644 --- a/target/linux/ramips/dts/W2914NSV2.dts +++ b/target/linux/ramips/dts/W2914NSV2.dts @@ -10,7 +10,7 @@ reg = <0x0 0x8000000>; }; - gpio-leds { + leds { compatible = "gpio-leds"; usb { diff --git a/target/linux/ramips/dts/W2914NSV2.dtsi b/target/linux/ramips/dts/W2914NSV2.dtsi index 332473375b..63cff0c10d 100644 --- a/target/linux/ramips/dts/W2914NSV2.dtsi +++ b/target/linux/ramips/dts/W2914NSV2.dtsi @@ -10,7 +10,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -39,7 +39,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/W306R_V20.dts b/target/linux/ramips/dts/W306R_V20.dts index 2e1fd77c6f..233a6d2e46 100644 --- a/target/linux/ramips/dts/W306R_V20.dts +++ b/target/linux/ramips/dts/W306R_V20.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_sys: sys { @@ -67,7 +67,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/W502U.dts b/target/linux/ramips/dts/W502U.dts index 0de66af84c..a53c47819b 100644 --- a/target/linux/ramips/dts/W502U.dts +++ b/target/linux/ramips/dts/W502U.dts @@ -57,7 +57,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; usb { @@ -73,7 +73,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WCR-1166DS.dts b/target/linux/ramips/dts/WCR-1166DS.dts index ca715c8ba5..602ea8c5de 100644 --- a/target/linux/ramips/dts/WCR-1166DS.dts +++ b/target/linux/ramips/dts/WCR-1166DS.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -40,7 +40,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; router_o { @@ -126,7 +126,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; @@ -152,6 +151,7 @@ }; partition@50000 { + compatible = "openwrt,trx"; label = "firmware"; reg = <0x50000 0x7c0000>; }; diff --git a/target/linux/ramips/dts/WCR150GN.dts b/target/linux/ramips/dts/WCR150GN.dts index 90298bf828..b209676807 100644 --- a/target/linux/ramips/dts/WCR150GN.dts +++ b/target/linux/ramips/dts/WCR150GN.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; user { @@ -69,7 +69,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WD03.dts b/target/linux/ramips/dts/WD03.dts index c685aeaf60..bbb2ca3dc9 100644 --- a/target/linux/ramips/dts/WD03.dts +++ b/target/linux/ramips/dts/WD03.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; green-wifi { @@ -28,7 +28,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WE1026-5G.dtsi b/target/linux/ramips/dts/WE1026-5G.dtsi index e6c4b8c1b6..e7e64e251a 100644 --- a/target/linux/ramips/dts/WE1026-5G.dtsi +++ b/target/linux/ramips/dts/WE1026-5G.dtsi @@ -43,7 +43,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { label = "we1026-5g:green:lan"; @@ -63,7 +63,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; reset { diff --git a/target/linux/ramips/dts/WF-2881.dts b/target/linux/ramips/dts/WF-2881.dts index aeff06b42b..bc9d6d7229 100644 --- a/target/linux/ramips/dts/WF-2881.dts +++ b/target/linux/ramips/dts/WF-2881.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; usb { @@ -41,7 +41,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WHR-1166D.dts b/target/linux/ramips/dts/WHR-1166D.dts index ddfa768b94..9a6ca335a8 100644 --- a/target/linux/ramips/dts/WHR-1166D.dts +++ b/target/linux/ramips/dts/WHR-1166D.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power_green; }; - gpio-leds { + leds { compatible = "gpio-leds"; power { @@ -55,7 +55,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WHR-300HP2.dts b/target/linux/ramips/dts/WHR-300HP2.dts index efcd65d63c..8a79d6ab05 100644 --- a/target/linux/ramips/dts/WHR-300HP2.dts +++ b/target/linux/ramips/dts/WHR-300HP2.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power_green; }; - gpio-leds { + leds { compatible = "gpio-leds"; power { @@ -55,7 +55,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WHR-600D.dts b/target/linux/ramips/dts/WHR-600D.dts index c96bd6828f..f4b5661eac 100644 --- a/target/linux/ramips/dts/WHR-600D.dts +++ b/target/linux/ramips/dts/WHR-600D.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power_green; }; - gpio-leds { + leds { compatible = "gpio-leds"; power { @@ -55,7 +55,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WHR-G300N.dts b/target/linux/ramips/dts/WHR-G300N.dts index f9756065cd..3871b55495 100644 --- a/target/linux/ramips/dts/WHR-G300N.dts +++ b/target/linux/ramips/dts/WHR-G300N.dts @@ -10,10 +10,9 @@ model = "Buffalo WHR-G300N"; aliases { - led-boot = &led_router; - led-failsafe = &led_router; - led-running = &led_router; - led-upgrade = &led_router; + led-boot = &led_diag; + led-failsafe = &led_diag; + led-upgrade = &led_diag; }; cfi@1f000000 { @@ -59,15 +58,15 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; - diag { + led_diag: diag { label = "whr-g300n:red:diag"; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; - led_router: router { + router { label = "whr-g300n:green:router"; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; @@ -78,7 +77,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WIDORA-NEO-16M.dts b/target/linux/ramips/dts/WIDORA-NEO-16M.dts index 1c1049094d..9ed6b15334 100644 --- a/target/linux/ramips/dts/WIDORA-NEO-16M.dts +++ b/target/linux/ramips/dts/WIDORA-NEO-16M.dts @@ -17,7 +17,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <40000000>; - m25p,chunked-io = <31>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/WIDORA-NEO-32M.dts b/target/linux/ramips/dts/WIDORA-NEO-32M.dts index a9d0b6fc60..cfd6ba709c 100644 --- a/target/linux/ramips/dts/WIDORA-NEO-32M.dts +++ b/target/linux/ramips/dts/WIDORA-NEO-32M.dts @@ -17,7 +17,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <40000000>; - m25p,chunked-io = <31>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/WIDORA-NEO.dtsi b/target/linux/ramips/dts/WIDORA-NEO.dtsi index 4d2ebb20c7..af3a1b1a1e 100644 --- a/target/linux/ramips/dts/WIDORA-NEO.dtsi +++ b/target/linux/ramips/dts/WIDORA-NEO.dtsi @@ -22,7 +22,7 @@ reg = <0x0 0x8000000>; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wifi: wifi { @@ -32,7 +32,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WITI.dtsi b/target/linux/ramips/dts/WITI.dtsi index 9e1e62fc33..6e474e90bb 100644 --- a/target/linux/ramips/dts/WITI.dtsi +++ b/target/linux/ramips/dts/WITI.dtsi @@ -24,7 +24,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -47,7 +47,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/WIZFI630A.dts b/target/linux/ramips/dts/WIZFI630A.dts index 45c080be60..f88d5ae63f 100644 --- a/target/linux/ramips/dts/WIZFI630A.dts +++ b/target/linux/ramips/dts/WIZFI630A.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS1,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_run: run { @@ -44,7 +44,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WIZFI630S.dts b/target/linux/ramips/dts/WIZFI630S.dts new file mode 100644 index 0000000000..13c8f68f15 --- /dev/null +++ b/target/linux/ramips/dts/WIZFI630S.dts @@ -0,0 +1,193 @@ +//SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7628an.dtsi" + +#include +#include + +/ { + compatible = "wiznet,wizfi630s", "mediatek,mt7628an-soc"; + model = "WIZnet WizFi630S"; + + chosen { + bootargs = "console=ttyS1,115200"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x8000000>; + }; + + aliases { + led-boot = &led_run; + led-failsafe = &led_run; + led-running = &led_run; + led-upgrade = &led_run; + serial0 = &uart1; + serial1 = &uartlite; + }; + + leds { + compatible = "gpio-leds"; + + led_run: run { + label = "wizfi630s:green:run"; + gpios = <&gpio0 4 GPIO_ACTIVE_LOW>; + }; + + ledwps { + label = "wizfi630s:green:wps"; + gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; + }; + + leduart1 { + label = "wizfi630s:green:uart1"; + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + }; + + leduart2 { + label = "wizfi630s:green:uart2"; + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + #address-cells = <1>; + #size-cells = <0>; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>; + linux,code = ; + }; + + scm1 { + label = "SCM1"; + gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + scm2 { + label = "SCM2"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "gpio"; + ralink,function = "gpio"; + }; + + i2s { + ralink,group = "i2s"; + ralink,function = "gpio"; + }; + + wdt { + ralink,group = "wdt"; + ralink,function = "gpio"; + }; + + + i2c { + ralink,group = "i2c"; + ralink,function = "gpio"; + }; + + refclk { + ralink,group = "refclk"; + ralink,function = "gpio"; + }; + }; +}; + +&wmac { + status = "okay"; +}; + +&spi0 { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <40000000>; + m25p,chunked-io = <31>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x1fb0000>; + }; + }; + }; +}; + +&i2c { + status = "okay"; +}; + +&uart1 { + status = "okay"; +}; + +&pwm { + status = "okay"; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + +&esw { + mediatek,portmap = <0x3e>; +}; + +&sdhci { + status = "okay"; + mediatek,cd-high; +}; + +&wmac { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/WL-330N.dts b/target/linux/ramips/dts/WL-330N.dts index e747d60976..48a6e3a4cf 100644 --- a/target/linux/ramips/dts/WL-330N.dts +++ b/target/linux/ramips/dts/WL-330N.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; link { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -43,7 +43,7 @@ wps { label = "wps"; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; - linux,code = ; + linux,code = ; }; }; }; diff --git a/target/linux/ramips/dts/WL-330N3G.dts b/target/linux/ramips/dts/WL-330N3G.dts index c562d95106..8453147b6b 100644 --- a/target/linux/ramips/dts/WL-330N3G.dts +++ b/target/linux/ramips/dts/WL-330N3G.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; 3g { @@ -35,7 +35,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -48,7 +48,7 @@ wps { label = "wps"; gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; - linux,code = ; + linux,code = ; }; }; }; diff --git a/target/linux/ramips/dts/WL-351.dts b/target/linux/ramips/dts/WL-351.dts index aefb4c74ad..1b31bda736 100644 --- a/target/linux/ramips/dts/WL-351.dts +++ b/target/linux/ramips/dts/WL-351.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -72,7 +72,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WL-WN570HA1.dts b/target/linux/ramips/dts/WL-WN570HA1.dts index 14ca115607..a07490b853 100644 --- a/target/linux/ramips/dts/WL-WN570HA1.dts +++ b/target/linux/ramips/dts/WL-WN570HA1.dts @@ -17,7 +17,7 @@ reg = <0x0 0x4000000>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -28,7 +28,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; power { @@ -92,7 +92,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/WL-WN575A3.dts b/target/linux/ramips/dts/WL-WN575A3.dts index deeb7bbfb2..76923d5cf6 100644 --- a/target/linux/ramips/dts/WL-WN575A3.dts +++ b/target/linux/ramips/dts/WL-WN575A3.dts @@ -17,7 +17,7 @@ reg = <0x0 0x4000000>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -34,7 +34,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wifi-high { @@ -62,7 +62,7 @@ &pinctrl { state_default: pinctrl0 { gpio { - ralink,group = "i2c", "wled_an"; + ralink,group = "i2c", "wled_an", "gpio", "refclk", "wdt", "p0led_an"; ralink,function = "gpio"; }; }; @@ -83,11 +83,10 @@ &spi0 { status = "okay"; - m25p80@0 { + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; @@ -123,10 +122,9 @@ &wmac { status = "okay"; - ralink,mtd-eeprom = <&factory 0x4>; }; ðernet { - mtd-mac-address = <&factory 0x2e>; + mtd-mac-address = <&factory 0x28>; mediatek,portmap = "llllw"; }; diff --git a/target/linux/ramips/dts/WLI-TX4-AG300N.dts b/target/linux/ramips/dts/WLI-TX4-AG300N.dts index 4a55a92127..dcd30eb60f 100644 --- a/target/linux/ramips/dts/WLI-TX4-AG300N.dts +++ b/target/linux/ramips/dts/WLI-TX4-AG300N.dts @@ -55,7 +55,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -78,7 +78,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; diag { diff --git a/target/linux/ramips/dts/WLR-6000.dts b/target/linux/ramips/dts/WLR-6000.dts index 2eeb4748b0..2b1f707658 100644 --- a/target/linux/ramips/dts/WLR-6000.dts +++ b/target/linux/ramips/dts/WLR-6000.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -27,7 +27,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/ramips/dts/WMR-300.dts b/target/linux/ramips/dts/WMR-300.dts index 3b4551107a..f0f1cc1337 100644 --- a/target/linux/ramips/dts/WMR-300.dts +++ b/target/linux/ramips/dts/WMR-300.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - gpio-leds { + leds { compatible = "gpio-leds"; aoss1 { @@ -35,7 +35,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WN-AC1167GR.dts b/target/linux/ramips/dts/WN-AC1167GR.dts new file mode 100644 index 0000000000..14c851a3a8 --- /dev/null +++ b/target/linux/ramips/dts/WN-AC1167GR.dts @@ -0,0 +1,216 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7620a.dtsi" + +#include +#include + +/ { + compatible = "iodata,wn-ac1167gr", "ralink,mt7620a-soc"; + model = "I-O DATA WN-AC1167GR"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "wn-ac1167gr:green:power"; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + wlan2g { + label = "wn-ac1167gr:green:wlan2g"; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + }; + + notification { + label = "wn-ac1167gr:green:notification"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + + wlan5g { + label = "wn-ac1167gr:green:wlan5g"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + wps { + label = "wps"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + reset { + label = "reset"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + auto { + label = "auto"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + linux,code = ; + linux,input-type = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + Factory: partition@40000 { + label = "Factory"; + reg = <0x40000 0x8000>; + read-only; + }; + + iNIC_rf: partition@48000 { + label = "iNIC_rf"; + reg = <0x48000 0x8000>; + read-only; + }; + + partition@50000 { + label = "NoUsed"; + reg = <0x50000 0x20000>; + read-only; + }; + + partition@70000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x70000 0x6b4000>; + }; + + partition@724000 { + label = "manufacture"; + reg = <0x724000 0x8c000>; + read-only; + }; + + partition@7b0000 { + label = "backup"; + reg = <0x7b0000 0x10000>; + read-only; + }; + + partition@7c0000 { + label = "storage"; + reg = <0x7c0000 0x40000>; + read-only; + }; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins &mdio_pins>; + mtd-mac-address = <&Factory 0x4>; + + port@5 { + status = "okay"; + mediatek,fixed-link = <1000 1 1 1>; + phy-mode = "rgmii"; + }; + + mdio-bus { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + ethernet-phy@0 { + reg = <0>; + phy-mode = "rgmii"; + }; + + ethernet-phy@1 { + reg = <1>; + phy-mode = "rgmii"; + }; + + ethernet-phy@2 { + reg = <2>; + phy-mode = "rgmii"; + }; + + ethernet-phy@3 { + reg = <3>; + phy-mode = "rgmii"; + }; + + ethernet-phy@4 { + reg = <4>; + phy-mode = "rgmii"; + }; + + ethernet-phy@1f { + reg = <0x1f>; + phy-mode = "rgmii"; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&iNIC_rf 0x0>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&wmac { + ralink,mtd-eeprom = <&Factory 0x0>; +}; diff --git a/target/linux/ramips/dts/WN-AC733GR3.dts b/target/linux/ramips/dts/WN-AC733GR3.dts new file mode 100644 index 0000000000..ea837c4d34 --- /dev/null +++ b/target/linux/ramips/dts/WN-AC733GR3.dts @@ -0,0 +1,198 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7620a.dtsi" + +#include +#include + +/ { + compatible = "iodata,wn-ac733gr3", "ralink,mt7620a-soc"; + model = "I-O DATA WN-AC733GR3"; + + aliases { + led-boot = &led_power; + led-failsafe = &led_power; + led-running = &led_power; + led-upgrade = &led_power; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + leds { + compatible = "gpio-leds"; + + led_power: power { + label = "wn-ac733gr3:green:power"; + gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + notification { + label = "wn-ac733gr3:green:notification"; + gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; + }; + + wlan2g { + label = "wn-ac733gr3:green:wlan2g"; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + }; + + wlan5g { + label = "wn-ac733gr3:green:wlan5g"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + router { + label = "router"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + linux,code = ; + linux,input-type = ; + }; + + auto { + label = "auto"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + linux,code = ; + linux,input-type = ; + }; + }; + + rtl8367rb { + compatible = "realtek,rtl8367b"; + gpio-sda = <&gpio0 22 GPIO_ACTIVE_HIGH>; + gpio-sck = <&gpio0 23 GPIO_ACTIVE_HIGH>; + realtek,extif1 = <1 0 1 1 1 1 1 1 2>; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + Factory: partition@40000 { + label = "Factory"; + reg = <0x40000 0x8000>; + read-only; + }; + + iNIC_rf: partition@48000 { + label = "iNIC_rf"; + reg = <0x48000 0x8000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x6d4000>; + }; + + partition@724000 { + label = "manufacture"; + reg = <0x724000 0x8c000>; + read-only; + }; + + partition@7b0000 { + label = "backup"; + reg = <0x7b0000 0x10000>; + read-only; + }; + + partition@7c0000 { + label = "storage"; + reg = <0x7c0000 0x40000>; + read-only; + }; + }; + }; +}; + +ðernet { + pinctrl-names = "default"; + pinctrl-0 = <&rgmii1_pins>; + mtd-mac-address = <&Factory 0x4>; + + port@5 { + status = "okay"; + mediatek,fixed-link = <1000 1 1 1>; + phy-mode = "rgmii"; + }; +}; + +&gpio0 { + rtl8367rb_reset { + gpio-hog; + gpios = <0 GPIO_ACTIVE_HIGH>; + output-high; + line-name = "rtl8367rb-reset"; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "uartf", "mdio"; + ralink,function = "gpio"; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&iNIC_rf 0x0>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&wmac { + ralink,mtd-eeprom = <&Factory 0x0>; +}; diff --git a/target/linux/ramips/dts/WN-AX1167GR.dts b/target/linux/ramips/dts/WN-AX1167GR.dts index 5163af1679..cc7f7f240f 100644 --- a/target/linux/ramips/dts/WN-AX1167GR.dts +++ b/target/linux/ramips/dts/WN-AX1167GR.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -39,7 +39,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -78,7 +78,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/WN-GX300GR.dts b/target/linux/ramips/dts/WN-GX300GR.dts index 2fcfc96218..5399a49399 100644 --- a/target/linux/ramips/dts/WN-GX300GR.dts +++ b/target/linux/ramips/dts/WN-GX300GR.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -39,7 +39,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -78,7 +78,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/WN3000RPV3.dts b/target/linux/ramips/dts/WN3000RPV3.dts index b22ce02d47..b067a4e448 100644 --- a/target/linux/ramips/dts/WN3000RPV3.dts +++ b/target/linux/ramips/dts/WN3000RPV3.dts @@ -22,7 +22,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power_green: power_g { @@ -72,7 +72,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WNCE2001.dts b/target/linux/ramips/dts/WNCE2001.dts index 0a578205e2..3f0d93d8a4 100644 --- a/target/linux/ramips/dts/WNCE2001.dts +++ b/target/linux/ramips/dts/WNCE2001.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power_green: power-green { @@ -44,7 +44,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WNDR3700V5.dts b/target/linux/ramips/dts/WNDR3700V5.dts index 92e7944f0c..475ddb7e95 100644 --- a/target/linux/ramips/dts/WNDR3700V5.dts +++ b/target/linux/ramips/dts/WNDR3700V5.dts @@ -1,6 +1,7 @@ +// SPDX-License-Identifier: GPL-2.0 /dts-v1/; -#include "mt7621.dtsi" +#include "R6220.dtsi" #include #include @@ -8,80 +9,35 @@ / { compatible = "netgear,wndr3700-v5", "mediatek,mt7621-soc"; model = "Netgear WNDR3700v5"; +}; - aliases { - led-boot = &led_power; - led-failsafe = &led_power; - led-running = &led_power; - led-upgrade = &led_power; - }; +&led_power { + label = "wndr3700v5:green:power"; +}; - memory@0 { - device_type = "memory"; - reg = <0x0 0x8000000>; - }; +&led_usb { + label = "wndr3700v5:green:usb"; +}; - chosen { - bootargs = "console=ttyS0,57600 maxcpus=2"; - }; +&led_internet { + label = "wndr3700v5:green:wan"; +}; - gpio-leds { - compatible = "gpio-leds"; +&led_wifi { + label = "wndr3700v5:green:wifi"; +}; - wps { - label = "wndr3700v5:green:wps"; - gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; - }; - - led_power: power { - label = "wndr3700v5:green:power"; - gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; - }; - }; - - gpio-keys-polled { - compatible = "gpio-keys-polled"; - poll-interval = <20>; - - wps { - label = "wndr3700v5:wps"; - gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>; - linux,code = ; - }; - - wifi { - label = "wndr3700v5:wifi"; - gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; - linux,code = ; - }; - - reset { - label = "wndr3700v5:reset"; - gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>; - linux,code = ; - }; - }; - - gpio_export { - compatible = "gpio-export"; - #size-cells = <0>; - - usbpower { - gpio-export,name = "usbpower"; - gpio-export,output = <1>; - gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; - }; - }; +&led_wps { + label = "wndr3700v5:green:wps"; }; &spi0 { status = "okay"; - mx25l12805d@0 { + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; @@ -114,35 +70,3 @@ }; }; }; - -&pcie { - status = "okay"; -}; - -&pcie0 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; - ieee80211-freq-limit = <5000000 6000000>; - }; -}; - -&pcie1 { - mt76@0,0 { - reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x0000>; - }; -}; - -ðernet { - mtd-mac-address = <&factory 0x0000000c>; -}; - -&pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "rgmii2", "mdio", "wdt"; - ralink,function = "gpio"; - }; - }; -}; diff --git a/target/linux/ramips/dts/WR1000.dts b/target/linux/ramips/dts/WR1000.dts new file mode 100644 index 0000000000..ff0b9badd1 --- /dev/null +++ b/target/linux/ramips/dts/WR1000.dts @@ -0,0 +1,144 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7628an.dtsi" + +#include +#include + +/ { + compatible = "cudy,wr1000", "mediatek,mt7628an-soc"; + model = "Cudy WR1000"; + + aliases { + led-boot = &led_wps; + led-failsafe = &led_wps; + led-upgrade = &led_wps; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "rfkill"; + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + leds { + compatible = "gpio-leds"; + + lan1 { + label = "wr1000:blue:lan1"; + gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; + }; + + lan2 { + label = "wr1000:blue:lan2"; + gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; + }; + + wan { + label = "wr1000:blue:wan"; + gpios = <&gpio1 7 GPIO_ACTIVE_LOW>; + }; + + wlan2g { + label = "wr1000:blue:wlan2g"; + gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + linux,default-trigger = "phy0tpt"; + }; + + led_wps: wps { + label = "wr1000:blue:wps"; + gpios = <&gpio1 5 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x7b0000>; + }; + + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2s", "refclk", "wdt", "p4led_an", + "p3led_an", "p2led_an", "wled_an"; + ralink,function = "gpio"; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + + led { + led-sources = <2>; + led-active-low; + }; + }; +}; + +&wmac { + status = "okay"; + ralink,mtd-eeprom = <&factory 0x4>; +}; + +ðernet { + mtd-mac-address = <&factory 0x2e>; + mediatek,portmap = "llllw"; +}; diff --git a/target/linux/ramips/dts/WR1200JS.dts b/target/linux/ramips/dts/WR1200JS.dts index 950a516a07..6fd087ca09 100644 --- a/target/linux/ramips/dts/WR1200JS.dts +++ b/target/linux/ramips/dts/WR1200JS.dts @@ -23,7 +23,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; internet { @@ -44,7 +44,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -75,7 +75,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/WR1201.dts b/target/linux/ramips/dts/WR1201.dts index be20717499..08c9b2c18f 100644 --- a/target/linux/ramips/dts/WR1201.dts +++ b/target/linux/ramips/dts/WR1201.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -51,7 +51,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/WR512-3GN.dtsi b/target/linux/ramips/dts/WR512-3GN.dtsi index f0612ab0b0..5761b8b532 100644 --- a/target/linux/ramips/dts/WR512-3GN.dtsi +++ b/target/linux/ramips/dts/WR512-3GN.dtsi @@ -13,7 +13,7 @@ led-upgrade = &led_wps; }; - gpio-leds { + leds { compatible = "gpio-leds"; 3g { @@ -42,7 +42,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WR6202.dts b/target/linux/ramips/dts/WR6202.dts index b1030f5aee..26ec6de8f7 100644 --- a/target/linux/ramips/dts/WR6202.dts +++ b/target/linux/ramips/dts/WR6202.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; wps { @@ -27,7 +27,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WRC-1167GHBK2-S.dts b/target/linux/ramips/dts/WRC-1167GHBK2-S.dts index 4f0427050a..9587b3769d 100644 --- a/target/linux/ramips/dts/WRC-1167GHBK2-S.dts +++ b/target/linux/ramips/dts/WRC-1167GHBK2-S.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; wlan2g { @@ -59,7 +59,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -88,7 +88,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/WRH-300CR.dts b/target/linux/ramips/dts/WRH-300CR.dts index 828200b687..eb6dbe6d1a 100644 --- a/target/linux/ramips/dts/WRH-300CR.dts +++ b/target/linux/ramips/dts/WRH-300CR.dts @@ -16,7 +16,7 @@ led-upgrade = &led_wps; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_wps: wps { @@ -35,7 +35,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WRTNODE.dts b/target/linux/ramips/dts/WRTNODE.dts index e4cc3c5873..a808818201 100644 --- a/target/linux/ramips/dts/WRTNODE.dts +++ b/target/linux/ramips/dts/WRTNODE.dts @@ -15,7 +15,7 @@ led-upgrade = &led_indicator; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_indicator: indicator { diff --git a/target/linux/ramips/dts/WRTNODE2.dtsi b/target/linux/ramips/dts/WRTNODE2.dtsi index 6758d271f3..9bac822872 100644 --- a/target/linux/ramips/dts/WRTNODE2.dtsi +++ b/target/linux/ramips/dts/WRTNODE2.dtsi @@ -10,7 +10,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -29,7 +29,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/WRTNODE2P.dts b/target/linux/ramips/dts/WRTNODE2P.dts index 522df7cd9d..cd668d601e 100644 --- a/target/linux/ramips/dts/WRTNODE2P.dts +++ b/target/linux/ramips/dts/WRTNODE2P.dts @@ -13,7 +13,7 @@ led-upgrade = &led_indicator; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_indicator: indicator { diff --git a/target/linux/ramips/dts/WRTNODE2R.dts b/target/linux/ramips/dts/WRTNODE2R.dts index ee1e2f91b9..bfe533c0c3 100644 --- a/target/linux/ramips/dts/WRTNODE2R.dts +++ b/target/linux/ramips/dts/WRTNODE2R.dts @@ -13,9 +13,12 @@ led-upgrade = &led_indicator; }; - gpio-leds { + leds { compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&led_pins>; + led_indicator: indicator { label = "wrtnode:blue:indicator"; gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; @@ -26,7 +29,14 @@ &pinctrl { state_default: pinctrl0 { gpio { - ralink,group = "i2c", "gpio", "wled_an"; + ralink,group = "gpio"; + ralink,function = "gpio"; + }; + }; + + led_pins: led { + gpio { + ralink,group = "wled_an"; ralink,function = "gpio"; }; }; diff --git a/target/linux/ramips/dts/WSR-1166.dts b/target/linux/ramips/dts/WSR-1166.dts index bb05745359..ff033c41e4 100644 --- a/target/linux/ramips/dts/WSR-1166.dts +++ b/target/linux/ramips/dts/WSR-1166.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; internet_g { @@ -69,7 +69,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -126,7 +126,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/WSR-600.dts b/target/linux/ramips/dts/WSR-600.dts index 7eb75b9649..0cdd79cdda 100644 --- a/target/linux/ramips/dts/WSR-600.dts +++ b/target/linux/ramips/dts/WSR-600.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -69,7 +69,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -126,7 +126,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/WT1520.dtsi b/target/linux/ramips/dts/WT1520.dtsi index 1a383876a3..28d498bc87 100644 --- a/target/linux/ramips/dts/WT1520.dtsi +++ b/target/linux/ramips/dts/WT1520.dtsi @@ -11,7 +11,7 @@ reg = <0x0 0x2000000>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WT3020.dtsi b/target/linux/ramips/dts/WT3020.dtsi index 67ded65bd0..59558a2e96 100644 --- a/target/linux/ramips/dts/WT3020.dtsi +++ b/target/linux/ramips/dts/WT3020.dtsi @@ -13,7 +13,7 @@ led-upgrade = &led_power; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -24,7 +24,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/ramips/dts/WZR-AGL300NH.dts b/target/linux/ramips/dts/WZR-AGL300NH.dts index ba42d25911..c6a90d426a 100644 --- a/target/linux/ramips/dts/WZR-AGL300NH.dts +++ b/target/linux/ramips/dts/WZR-AGL300NH.dts @@ -61,7 +61,7 @@ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -84,7 +84,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_router: router { diff --git a/target/linux/ramips/dts/X5.dts b/target/linux/ramips/dts/X5.dts index 2cb53facb2..7e3d8b6f03 100644 --- a/target/linux/ramips/dts/X5.dts +++ b/target/linux/ramips/dts/X5.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -40,7 +40,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/X8.dts b/target/linux/ramips/dts/X8.dts index 8edf4f7034..3b6d60478f 100644 --- a/target/linux/ramips/dts/X8.dts +++ b/target/linux/ramips/dts/X8.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -25,7 +25,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/XDXRN502J.dts b/target/linux/ramips/dts/XDXRN502J.dts index 7b33fcb3d6..0cab20f8f6 100644 --- a/target/linux/ramips/dts/XDXRN502J.dts +++ b/target/linux/ramips/dts/XDXRN502J.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wifi { @@ -67,7 +67,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/XIAOMI-MIR4A-100M.dts b/target/linux/ramips/dts/XIAOMI-MIR4A-100M.dts new file mode 100644 index 0000000000..8a33745f7f --- /dev/null +++ b/target/linux/ramips/dts/XIAOMI-MIR4A-100M.dts @@ -0,0 +1,147 @@ +//SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "mt7628an.dtsi" + +#include +#include + +/ { + compatible = "xiaomi,mir4a-100m", "mediatek,mt7628an-soc"; + model = "Xiaomi Mi Router 4A (100M Edition)"; + + chosen { + bootargs = "console=ttyS0,115200"; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x4000000>; + }; + + aliases { + led-boot = &power_yellow; + led-failsafe = &power_yellow; + led-running = &power_blue; + led-upgrade = &power_yellow; + }; + + leds { + compatible = "gpio-leds"; + + power_blue: power_blue { + label = "mir4a-100m:blue:power"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + + power_yellow: power_yellow { + label = "mir4a-100m:yellow:power"; + gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio1 6 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "bootloader"; + reg = <0x0 0x20000>; + read-only; + }; + + partition@20000 { + label = "config"; + reg = <0x20000 0x10000>; + read-only; + }; + + factory: partition@30000 { + label = "factory"; + reg = <0x30000 0x10000>; + read-only; + }; + + partition@40000 { + label = "crash"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + label = "cfg_bak"; + reg = <0x50000 0x10000>; + read-only; + }; + + partition@60000 { + label = "overlay"; + reg = <0x60000 0x100000>; + read-only; + }; + + partition@160000 { + label = "firmware"; + reg = <0x160000 0xea0000>; + compatible = "denx,uimage"; + }; + }; + }; +}; + +&pcie { + status = "okay"; +}; + +&pcie0 { + wifi@0,0 { + compatible = "mediatek,mt76"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "gpio", "wdt", "wled_an"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x4>; + mtd-mac-address-increment = <(-1)>; +}; + +&esw { + mediatek,portmap = <0x2f>; + mediatek,portdisable = <0x2a>; +}; + +&wmac { + status = "okay"; +}; diff --git a/target/linux/ramips/dts/Y1.dts b/target/linux/ramips/dts/Y1.dts index 1538ba92c6..87eb1bf4c5 100644 --- a/target/linux/ramips/dts/Y1.dts +++ b/target/linux/ramips/dts/Y1.dts @@ -13,7 +13,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/ramips/dts/Y1.dtsi b/target/linux/ramips/dts/Y1.dtsi index 9d171adbe8..5d6c9922fd 100644 --- a/target/linux/ramips/dts/Y1.dtsi +++ b/target/linux/ramips/dts/Y1.dtsi @@ -10,7 +10,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/Y1S.dts b/target/linux/ramips/dts/Y1S.dts index d2b917e80d..6cdf0b5cdc 100644 --- a/target/linux/ramips/dts/Y1S.dts +++ b/target/linux/ramips/dts/Y1S.dts @@ -34,7 +34,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; power1 { diff --git a/target/linux/ramips/dts/YOUKU-YK1.dts b/target/linux/ramips/dts/YOUKU-YK1.dts index 82540fb8dc..5d90b17a04 100644 --- a/target/linux/ramips/dts/YOUKU-YK1.dts +++ b/target/linux/ramips/dts/YOUKU-YK1.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { label = "youku-yk1:blue:wan"; @@ -38,7 +38,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; reset { @@ -69,9 +69,10 @@ status = "okay"; m25p80@0 { - compatible = "jedec,spi-nor"; + compatible = "mx25l25635f", "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <10000000>; + spi-max-frequency = <25000000>; + m25p,fast-read; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/RT-AC54U.dts b/target/linux/ramips/dts/YOUKU-YK2.dts similarity index 61% rename from target/linux/ramips/dts/RT-AC54U.dts rename to target/linux/ramips/dts/YOUKU-YK2.dts index 7eff315d9b..55fdf2f224 100644 --- a/target/linux/ramips/dts/RT-AC54U.dts +++ b/target/linux/ramips/dts/YOUKU-YK2.dts @@ -1,41 +1,51 @@ // SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; -#include "mt7620a.dtsi" +#include "mt7621.dtsi" #include #include / { - compatible = "asus,rt-ac54u", "ralink,mt7620a-soc"; - model = "Asus RT-AC54U"; + compatible = "youku,yk-l2", "mediatek,mt7621-soc"; + model = "Youku YK-L2"; aliases { led-boot = &led_power; led-failsafe = &led_power; led-running = &led_power; - led-upgrade = &led_power; + led-upgrade = &led_wps; + }; + + memory@0 { + device_type = "memory"; + reg = <0x0 0x10000000>; + }; + + chosen { + bootargs = "console=ttyS0,115200"; }; leds { compatible = "gpio-leds"; led_power: power { - label = "rt-ac54u:blue:power"; - gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + label = "yk-l2:blue:power"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + default-state = "on"; + }; + + led_wps: wps { + label = "yk-l2:blue:wps"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; usb { - label = "rt-ac54u:blue:usb"; - gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; - trigger-sources = <&ohci_port1>, <&ehci_port1>; + label = "yk-l2:blue:usb"; + gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; + trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; linux,default-trigger = "usbport"; }; - - wifi { - label = "rt-ac54u:blue:wifi"; - gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; - }; }; keys { @@ -44,33 +54,30 @@ reset { label = "reset"; - gpios = <&gpio0 1 GPIO_ACTIVE_LOW>; + gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; linux,code = ; }; wps { label = "wps"; - gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; linux,code = ; }; }; +}; - gpio_export { - compatible = "gpio-export"; - #size-cells = <0>; +&sdhci { + status = "okay"; +}; - enable-leds { - gpio-export,name = "enable-leds"; - gpio-export,output = <0>; - gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>; - }; - }; +&xhci { + status = "okay"; }; &spi0 { status = "okay"; - flash@0{ + flash@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; @@ -107,47 +114,44 @@ }; }; -&ehci { - status = "okay"; -}; - -&ohci { - status = "okay"; -}; - -&gpio3 { - status = "okay"; -}; - -ðernet { - status = "okay"; - mtd-mac-address = <&factory 0x4>; - mediatek,portmap = "wllll"; -}; - -&wmac { - ralink,mtd-eeprom = <&factory 0>; -}; - -&pinctrl { - state_default: pinctrl0 { - gpio { - ralink,group = "i2c", "wled", "uartf"; - ralink,function = "gpio"; - }; - }; -}; - &pcie { status = "okay"; }; &pcie0 { wifi@0,0 { + compatible = "pci14c3,7603"; reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,mtd-eeprom = <&factory 0x0000>; + ieee80211-freq-limit = <2400000 2500000>; led { - led-sources = <2>; + led-active-low; + }; + }; +}; + +&pcie1 { + wifi@0,0 { + compatible = "pci14c3,7662"; + reg = <0x0000 0 0 0 0>; + mediatek,mtd-eeprom = <&factory 0x8000>; + ieee80211-freq-limit = <5000000 6000000>; + led { + led-sources = <2>; + led-active-low; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0xe000>; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "jtag", "wdt"; + ralink,function = "gpio"; }; }; }; diff --git a/target/linux/ramips/dts/ZBT-APE522II.dts b/target/linux/ramips/dts/ZBT-APE522II.dts index 231c1fd127..70ad0f0b58 100644 --- a/target/linux/ramips/dts/ZBT-APE522II.dts +++ b/target/linux/ramips/dts/ZBT-APE522II.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; sys1 { @@ -42,7 +42,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ZBT-CPE102.dts b/target/linux/ramips/dts/ZBT-CPE102.dts index fce33e0752..6f0213bf70 100644 --- a/target/linux/ramips/dts/ZBT-CPE102.dts +++ b/target/linux/ramips/dts/ZBT-CPE102.dts @@ -19,7 +19,7 @@ led-failsafe = &led_4g_0; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_4g_0: 4g-0 { @@ -38,7 +38,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ZBT-WA05.dts b/target/linux/ramips/dts/ZBT-WA05.dts index 417989468e..21b56dcae1 100644 --- a/target/linux/ramips/dts/ZBT-WA05.dts +++ b/target/linux/ramips/dts/ZBT-WA05.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -41,7 +41,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ZBT-WE1226.dts b/target/linux/ramips/dts/ZBT-WE1226.dts index 1a1a986ebe..aace0042e4 100644 --- a/target/linux/ramips/dts/ZBT-WE1226.dts +++ b/target/linux/ramips/dts/ZBT-WE1226.dts @@ -24,7 +24,7 @@ reg = <0x0 0x4000000>; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -35,7 +35,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { @@ -76,7 +76,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/ZBT-WE1326.dts b/target/linux/ramips/dts/ZBT-WE1326.dts index 8b1311480f..2f6f94f3ff 100644 --- a/target/linux/ramips/dts/ZBT-WE1326.dts +++ b/target/linux/ramips/dts/ZBT-WE1326.dts @@ -13,12 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - memory@0 { - device_type = "memory"; - reg = <0x0 0x1c000000>, <0x20000000 0x4000000>; - }; - - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -46,7 +41,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/ZBT-WE2026.dts b/target/linux/ramips/dts/ZBT-WE2026.dts index 30ed4f7855..be8d13be90 100644 --- a/target/linux/ramips/dts/ZBT-WE2026.dts +++ b/target/linux/ramips/dts/ZBT-WE2026.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -34,7 +34,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ZBT-WE3526.dts b/target/linux/ramips/dts/ZBT-WE3526.dts index ed86249bc9..30c941c9c8 100644 --- a/target/linux/ramips/dts/ZBT-WE3526.dts +++ b/target/linux/ramips/dts/ZBT-WE3526.dts @@ -24,7 +24,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -47,7 +47,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/ZBT-WE826-E.dts b/target/linux/ramips/dts/ZBT-WE826-E.dts new file mode 100644 index 0000000000..ce97b03715 --- /dev/null +++ b/target/linux/ramips/dts/ZBT-WE826-E.dts @@ -0,0 +1,84 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "ZBT-WE826.dtsi" + +/ { + compatible = "zbtlink,zbt-we826-e", "zbtlink,zbt-we826", "ralink,mt7620a-soc"; + model = "ZBT-WE826-E"; + + /delete-node/ leds; + + leds { + compatible = "gpio-leds"; + + led_power: gsm { + label = "zbt-we826-e:blue:gsm"; + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + }; + + signal { + label = "zbt-we826-e:green:signal"; + gpios = <&gpio0 11 GPIO_ACTIVE_LOW>; + }; + + sim { + label = "zbt-we826-e:red:sim"; + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; + }; + + air { + label = "zbt-we826-e:red:wifi"; + gpios = <&gpio3 0 GPIO_ACTIVE_LOW>; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + firmware: partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x1fb0000>; + }; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + default { + ralink,group = "i2c", "uartf", "wled"; + ralink,function = "gpio"; + }; + }; +}; diff --git a/target/linux/ramips/dts/ZBT-WE826.dtsi b/target/linux/ramips/dts/ZBT-WE826.dtsi index 4fa81b73e1..0776ea7a79 100644 --- a/target/linux/ramips/dts/ZBT-WE826.dtsi +++ b/target/linux/ramips/dts/ZBT-WE826.dtsi @@ -17,7 +17,7 @@ bootargs = "console=ttyS0,115200"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { label = "zbt-we826:green:power"; @@ -35,7 +35,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; reset { diff --git a/target/linux/ramips/dts/ZBT-WG2626.dts b/target/linux/ramips/dts/ZBT-WG2626.dts index 938a144558..4ceee9bd6f 100644 --- a/target/linux/ramips/dts/ZBT-WG2626.dts +++ b/target/linux/ramips/dts/ZBT-WG2626.dts @@ -31,7 +31,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -42,7 +42,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -63,7 +63,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/ZBT-WG3526.dtsi b/target/linux/ramips/dts/ZBT-WG3526.dtsi index 13443e0ffd..0cf94d57d2 100644 --- a/target/linux/ramips/dts/ZBT-WG3526.dtsi +++ b/target/linux/ramips/dts/ZBT-WG3526.dtsi @@ -28,7 +28,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -39,7 +39,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_status: status { @@ -60,7 +60,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/ZBT-WR8305RT.dts b/target/linux/ramips/dts/ZBT-WR8305RT.dts index eafe778cf9..5292c70dbb 100644 --- a/target/linux/ramips/dts/ZBT-WR8305RT.dts +++ b/target/linux/ramips/dts/ZBT-WR8305RT.dts @@ -16,7 +16,7 @@ led-upgrade = &led_sys; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_sys: sys { @@ -37,7 +37,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ZL5900V2.dts b/target/linux/ramips/dts/ZL5900V2.dts index 026a524b38..d5d0ca3728 100644 --- a/target/linux/ramips/dts/ZL5900V2.dts +++ b/target/linux/ramips/dts/ZL5900V2.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; lan { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ZTE-Q7.dts b/target/linux/ramips/dts/ZTE-Q7.dts index 51f9122446..5b4c5ee047 100644 --- a/target/linux/ramips/dts/ZTE-Q7.dts +++ b/target/linux/ramips/dts/ZTE-Q7.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status_blue; }; - gpio-leds { + leds { compatible = "gpio-leds"; statred { @@ -30,7 +30,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/elecom_wrc-gst.dtsi b/target/linux/ramips/dts/elecom_wrc-gst.dtsi index eb06b0478c..40f16adb84 100644 --- a/target/linux/ramips/dts/elecom_wrc-gst.dtsi +++ b/target/linux/ramips/dts/elecom_wrc-gst.dtsi @@ -23,7 +23,7 @@ bootargs = "console=ttyS0,57600"; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power_green: power_green { @@ -47,7 +47,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -104,7 +104,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/ki_rb.dts b/target/linux/ramips/dts/ki_rb.dts index 818b4f8a0d..56912a786e 100644 --- a/target/linux/ramips/dts/ki_rb.dts +++ b/target/linux/ramips/dts/ki_rb.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600n8"; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -48,7 +48,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -94,7 +94,6 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; - m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/kn.dts b/target/linux/ramips/dts/kn.dts index 3619aae603..1f9928e59a 100644 --- a/target/linux/ramips/dts/kn.dts +++ b/target/linux/ramips/dts/kn.dts @@ -53,7 +53,7 @@ }; }; - gpio-leds { + leds { compatible = "gpio-leds"; led_power: power { @@ -74,7 +74,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/kn_rc.dts b/target/linux/ramips/dts/kn_rc.dts index 90f740c137..74396d1fc2 100644 --- a/target/linux/ramips/dts/kn_rc.dts +++ b/target/linux/ramips/dts/kn_rc.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { @@ -42,7 +42,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/kn_rf.dts b/target/linux/ramips/dts/kn_rf.dts index aaa98e8bc0..765629548c 100644 --- a/target/linux/ramips/dts/kn_rf.dts +++ b/target/linux/ramips/dts/kn_rf.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { @@ -42,7 +42,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/kn_st.dts b/target/linux/ramips/dts/kn_st.dts new file mode 100644 index 0000000000..16ab9567c0 --- /dev/null +++ b/target/linux/ramips/dts/kn_st.dts @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include "rt5350.dtsi" + +#include +#include + +/ { + compatible = "zyxel,keenetic-start", "ralink,rt5350-soc"; + model = "ZyXEL Keenetic Start"; + + aliases { + led-boot = &led_status; + led-failsafe = &led_status; + led-running = &led_status; + led-upgrade = &led_status; + }; + + leds { + compatible = "gpio-leds"; + + led_status: power { + label = "zyxel:green:power"; + gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; + }; + + internet { + label = "zyxel:green:internet"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys-polled"; + poll-interval = <20>; + + reset { + label = "reset"; + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; +}; + +&spi0 { + status = "okay"; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <10000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x0 0x30000>; + read-only; + }; + + partition@30000 { + label = "u-boot-env"; + reg = <0x30000 0x10000>; + read-only; + }; + + factory: partition@40000 { + label = "factory"; + reg = <0x40000 0x10000>; + read-only; + }; + + partition@50000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x50000 0x3b0000>; + }; + }; + }; +}; + +&pinctrl { + state_default: pinctrl0 { + gpio { + ralink,group = "i2c", "jtag", "uartf"; + ralink,function = "gpio"; + }; + }; +}; + +ðernet { + mtd-mac-address = <&factory 0x28>; +}; + + +&esw { + mediatek,portmap = <0x2f>; + mediatek,led_polarity = <0x17>; +}; + +&wmac { + status = "okay"; + ralink,led-polarity = <1>; + ralink,mtd-eeprom = <&factory 0>; +}; diff --git a/target/linux/ramips/dts/kng_rc.dts b/target/linux/ramips/dts/kng_rc.dts index e8b1522262..3d6d2c6f06 100644 --- a/target/linux/ramips/dts/kng_rc.dts +++ b/target/linux/ramips/dts/kng_rc.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power_green; }; - gpio-leds { + leds { compatible = "gpio-leds"; wan { @@ -47,7 +47,7 @@ }; }; - gpio-keys-polled { + keys { compatible = "gpio-keys"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi index 77841a61d2..4f69e0902e 100644 --- a/target/linux/ramips/dts/mt7621.dtsi +++ b/target/linux/ramips/dts/mt7621.dtsi @@ -76,6 +76,9 @@ compatible = "mtk,mt7621-gpio"; reg = <0x600 0x100>; + interrupt-parent = <&gic>; + interrupts = ; + gpio0: bank@0 { reg = <0>; compatible = "mtk,mt7621-gpio-bank"; diff --git a/target/linux/ramips/dts/mt7628an.dtsi b/target/linux/ramips/dts/mt7628an.dtsi index 91f715c245..61016c8b40 100644 --- a/target/linux/ramips/dts/mt7628an.dtsi +++ b/target/linux/ramips/dts/mt7628an.dtsi @@ -232,6 +232,7 @@ pwm: pwm@5000 { compatible = "mediatek,mt7628-pwm"; reg = <0x5000 0x1000>; + #pwm-cells = <2>; resets = <&rstctrl 31>; reset-names = "pwm"; diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.c index 9acea3bc84..5216cb5c66 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.c +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mt7530.c @@ -51,11 +51,6 @@ #define MT7621_PORT_MIB_RXB_ID 37 /* RxByte */ /* registers */ -#define REG_ESW_WT_MAC_MFC 0x10 - -#define REG_ESW_WT_MAC_MFC_MIRROR_ENABLE BIT(3) -#define REG_ESW_WT_MAC_MFC_MIRROR_DEST_MASK 0x07 - #define REG_ESW_VLAN_VTCR 0x90 #define REG_ESW_VLAN_VAWD1 0x94 #define REG_ESW_VLAN_VAWD2 0x98 @@ -77,11 +72,6 @@ enum { #define REG_ESW_PORT_PVC(x) (0x2010 | ((x) << 8)) #define REG_ESW_PORT_PPBV1(x) (0x2014 | ((x) << 8)) -#define REG_ESW_PORT_PCR_MIRROR_SRC_RX_BIT BIT(8) -#define REG_ESW_PORT_PCR_MIRROR_SRC_TX_BIT BIT(9) -#define REG_ESW_PORT_PCR_MIRROR_SRC_RX_MASK 0x0100 -#define REG_ESW_PORT_PCR_MIRROR_SRC_TX_MASK 0x0200 - #define REG_HWTRAP 0x7804 #define MIB_DESC(_s , _o, _n) \ @@ -193,8 +183,6 @@ enum { struct mt7530_port_entry { u16 pvid; - bool mirror_rx; - bool mirror_tx; }; struct mt7530_vlan_entry { @@ -208,8 +196,6 @@ struct mt7530_priv { struct mii_bus *bus; struct switch_dev swdev; - u8 mirror_src_port; - u8 mirror_dest_port; bool global_vlan_enable; struct mt7530_vlan_entry vlan_entries[MT7530_NUM_VLANS]; struct mt7530_port_entry port_entries[MT7530_NUM_PORTS]; @@ -519,138 +505,6 @@ mt7530_get_vid(struct switch_dev *dev, const struct switch_attr *attr, return 0; } -static int -mt7530_get_mirror_rx_enable(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - val->value.i = priv->port_entries[priv->mirror_src_port].mirror_rx; - - return 0; -} - -static int -mt7530_set_mirror_rx_enable(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - priv->port_entries[priv->mirror_src_port].mirror_rx = val->value.i; - - return 0; -} - -static int -mt7530_get_mirror_tx_enable(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - val->value.i = priv->port_entries[priv->mirror_src_port].mirror_tx; - - return 0; -} - -static int -mt7530_set_mirror_tx_enable(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - priv->port_entries[priv->mirror_src_port].mirror_tx = val->value.i; - - return 0; -} - -static int -mt7530_get_mirror_monitor_port(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - val->value.i = priv->mirror_dest_port; - - return 0; -} - -static int -mt7530_set_mirror_monitor_port(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - priv->mirror_dest_port = val->value.i; - - return 0; -} - -static int -mt7530_get_mirror_source_port(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - val->value.i = priv->mirror_src_port; - - return 0; -} - -static int -mt7530_set_mirror_source_port(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - priv->mirror_src_port = val->value.i; - - return 0; -} - -static int -mt7530_get_port_mirror_rx(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - val->value.i = priv->port_entries[val->port_vlan].mirror_rx; - - return 0; -} - -static int -mt7530_set_port_mirror_rx(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - priv->port_entries[val->port_vlan].mirror_rx = val->value.i; - - return 0; -} - -static int -mt7530_get_port_mirror_tx(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - val->value.i = priv->port_entries[val->port_vlan].mirror_tx; - - return 0; -} - -static int -mt7530_set_port_mirror_tx(struct switch_dev *dev, const struct switch_attr *attr, - struct switch_val *val) -{ - struct mt7530_priv *priv = container_of(dev, struct mt7530_priv, swdev); - - priv->port_entries[val->port_vlan].mirror_tx = val->value.i; - - return 0; -} - static void mt7530_write_vlan_entry(struct mt7530_priv *priv, int vlan, u16 vid, u8 ports, u8 etags) @@ -704,7 +558,6 @@ mt7530_apply_config(struct switch_dev *dev) int i, j; u8 tag_ports; u8 untag_ports; - bool is_mirror = false; if (!priv->global_vlan_enable) { for (i = 0; i < MT7530_NUM_PORTS; i++) @@ -784,31 +637,6 @@ mt7530_apply_config(struct switch_dev *dev) mt7530_w32(priv, REG_ESW_PORT_PPBV1(i), val); } - /* set mirroring source port */ - for (i = 0; i < MT7530_NUM_PORTS; i++) { - u32 val = mt7530_r32(priv, REG_ESW_PORT_PCR(i)); - if (priv->port_entries[i].mirror_rx) { - val |= REG_ESW_PORT_PCR_MIRROR_SRC_RX_BIT; - is_mirror = true; - } - - if (priv->port_entries[i].mirror_tx) { - val |= REG_ESW_PORT_PCR_MIRROR_SRC_TX_BIT; - is_mirror = true; - } - - mt7530_w32(priv, REG_ESW_PORT_PCR(i), val); - } - - /* set mirroring monitor port */ - if (is_mirror) { - u32 val = mt7530_r32(priv, REG_ESW_WT_MAC_MFC); - val |= REG_ESW_WT_MAC_MFC_MIRROR_ENABLE; - val &= ~REG_ESW_WT_MAC_MFC_MIRROR_DEST_MASK; - val |= priv->mirror_dest_port; - mt7530_w32(priv, REG_ESW_WT_MAC_MFC, val); - } - return 0; } @@ -1002,34 +830,6 @@ static const struct switch_attr mt7530_global[] = { .description = "Get MIB counters for switch", .get = mt7530_sw_get_mib, .set = NULL, - }, { - .type = SWITCH_TYPE_INT, - .name = "enable_mirror_rx", - .description = "Enable mirroring of RX packets", - .set = mt7530_set_mirror_rx_enable, - .get = mt7530_get_mirror_rx_enable, - .max = 1 - }, { - .type = SWITCH_TYPE_INT, - .name = "enable_mirror_tx", - .description = "Enable mirroring of TX packets", - .set = mt7530_set_mirror_tx_enable, - .get = mt7530_get_mirror_tx_enable, - .max = 1 - }, { - .type = SWITCH_TYPE_INT, - .name = "mirror_monitor_port", - .description = "Mirror monitor port", - .set = mt7530_set_mirror_monitor_port, - .get = mt7530_get_mirror_monitor_port, - .max = MT7530_NUM_PORTS - 1 - }, { - .type = SWITCH_TYPE_INT, - .name = "mirror_source_port", - .description = "Mirror source port", - .set = mt7530_set_mirror_source_port, - .get = mt7530_get_mirror_source_port, - .max = MT7530_NUM_PORTS - 1 }, }; @@ -1040,20 +840,6 @@ static const struct switch_attr mt7621_port[] = { .description = "Get MIB counters for port", .get = mt7621_sw_get_port_mib, .set = NULL, - }, { - .type = SWITCH_TYPE_INT, - .name = "enable_mirror_rx", - .description = "Enable mirroring of RX packets", - .set = mt7530_set_port_mirror_rx, - .get = mt7530_get_port_mirror_rx, - .max = 1, - }, { - .type = SWITCH_TYPE_INT, - .name = "enable_mirror_tx", - .description = "Enable mirroring of TX packets", - .set = mt7530_set_port_mirror_tx, - .get = mt7530_get_port_mirror_tx, - .max = 1, }, }; @@ -1075,20 +861,6 @@ static const struct switch_attr mt7530_port[] = { .description = "Get MIB counters for port", .get = mt7530_sw_get_port_mib, .set = NULL, - }, { - .type = SWITCH_TYPE_INT, - .name = "enable_mirror_rx", - .description = "Enable mirroring of RX packets", - .set = mt7530_set_port_mirror_rx, - .get = mt7530_get_port_mirror_rx, - .max = 1, - }, { - .type = SWITCH_TYPE_INT, - .name = "enable_mirror_tx", - .description = "Enable mirroring of TX packets", - .set = mt7530_set_port_mirror_tx, - .get = mt7530_get_port_mirror_tx, - .max = 1, }, }; diff --git a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c index 10d9fd7a3e..b2c3d32c55 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_eth_soc.c @@ -1411,19 +1411,8 @@ static int fe_do_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd) if (!priv->phy_dev) return -ENODEV; - switch (cmd) { - case SIOCETHTOOL: - return phy_ethtool_ioctl(priv->phy_dev, - (void *) ifr->ifr_data); - case SIOCGMIIPHY: - case SIOCGMIIREG: - case SIOCSMIIREG: - return phy_mii_ioctl(priv->phy_dev, ifr, cmd); - default: - break; - } - return -EOPNOTSUPP; + return phy_mii_ioctl(priv->phy_dev, ifr, cmd); } static int fe_change_mtu(struct net_device *dev, int new_mtu) diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 33c4f3132f..07251aebba 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -10,6 +10,8 @@ include $(INCLUDE_DIR)/image.mk DEVICE_VARS += DTS IMAGE_SIZE NETGEAR_BOARD_ID NETGEAR_HW_ID DEVICE_VARS += BUFFALO_TAG_PLATFORM BUFFALO_TAG_VERSION BUFFALO_TAG_MINOR DEVICE_VARS += SEAMA_SIGNATURE SEAMA_MTDBLOCK +DEVICE_VARS += SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER +DEVICE_VARS += JCG_MAXSIZE loadaddr-y := 0x80000000 loadaddr-$(CONFIG_TARGET_ramips_rt288x) := 0x88000000 @@ -17,12 +19,12 @@ loadaddr-$(CONFIG_TARGET_ramips_mt7621) := 0x80001000 KERNEL_LOADADDR := $(loadaddr-y) -KERNEL_DTB = kernel-bin | patch-dtb | lzma +KERNEL_DTB = kernel-bin | append-dtb | lzma define Device/Default - PROFILES = Default $$(DTS) - KERNEL_DEPENDS = $$(wildcard ../dts/$$(DTS).dts) + PROFILES = Default KERNEL := $(KERNEL_DTB) | uImage lzma DEVICE_DTS_DIR := ../dts + DEVICE_DTS = $$(DTS) IMAGES := sysupgrade.bin IMAGE_SIZE := $(ralink_default_fw_size_8M) SUPPORTED_DEVICES := $(subst _,$(comma),$(1)) @@ -45,9 +47,9 @@ define Device/seama SEAMA_SIGNATURE := endef -define Build/patch-dtb - $(call Image/BuildDTB,../dts/$(DTS).dts,$@.dtb) - $(STAGING_DIR_HOST)/bin/patch-dtb $@ $@.dtb +define Build/jcg-header + $(STAGING_DIR_HOST)/bin/jcgimage -v $(1) $(if $(JCG_MAXSIZE), -m $(JCG_MAXSIZE),) -u $@ -o $@.new + mv $@.new $@ endef define Build/trx @@ -114,6 +116,7 @@ define Build/mkdlinkfw -k $(IMAGE_KERNEL) \ -r $(IMAGE_ROOTFS) \ -o $@ \ + $(if $(DLINK_IMAGE_OFFSET), -O $(DLINK_IMAGE_OFFSET)) \ -s $(DLINK_FIRMWARE_SIZE) endef @@ -122,6 +125,7 @@ define Build/mkdlinkfw-factory -m $(DLINK_ROM_ID) -f $(DLINK_FAMILY_MEMBER) \ -F $@ \ -o $@.new \ + $(if $(DLINK_IMAGE_OFFSET), -O $(DLINK_IMAGE_OFFSET)) \ -s $(DLINK_FIRMWARE_SIZE) mv $@.new $@ endef @@ -130,6 +134,19 @@ define Build/zyimage $(STAGING_DIR_HOST)/bin/zyimage $(1) $@ endef +define Build/sercom-seal + $(STAGING_DIR_HOST)/bin/mksercommfw \ + -i $@ \ + -b $(SERCOMM_HWID) \ + -r $(SERCOMM_HWVER) \ + -v $(SERCOMM_SWVER) \ + $(1) +endef + +define Build/sercom-footer + $(call Build/sercom-seal,-f) +endef + ralink_default_fw_size_4M=3866624 ralink_default_fw_size_8M=8060928 ralink_default_fw_size_16M=16121856 diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index 6a528be76c..fff10425a7 100644 --- a/target/linux/ramips/image/mt7620.mk +++ b/target/linux/ramips/image/mt7620.mk @@ -3,7 +3,7 @@ # DEVICE_VARS += TPLINK_FLASHLAYOUT TPLINK_HWID TPLINK_HWREV TPLINK_HWREVADD TPLINK_HVERSION \ - DLINK_ROM_ID DLINK_FAMILY_MEMBER DLINK_FIRMWARE_SIZE + DLINK_ROM_ID DLINK_FAMILY_MEMBER DLINK_FIRMWARE_SIZE DLINK_IMAGE_OFFSET define Build/elecom-header cp $@ $(KDIR)/v_0.0.0.bin @@ -16,6 +16,25 @@ define Build/elecom-header -f $@ -C $(KDIR) v_0.0.0.bin v_0.0.0.md5 endef +define Build/elx-header + $(eval hw_id=$(word 1,$(1))) + $(eval xor_pattern=$(word 2,$(1))) + ( \ + echo -ne "\x00\x00\x00\x00\x00\x00\x00\x03" | \ + dd bs=42 count=1 conv=sync; \ + hw_id="$(hw_id)"; \ + echo -ne "\x$${hw_id:0:2}\x$${hw_id:2:2}\x$${hw_id:4:2}\x$${hw_id:6:2}" | \ + dd bs=20 count=1 conv=sync; \ + echo -ne "$$(printf '%08x' $$(stat -c%s $@) | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ + dd bs=8 count=1 conv=sync; \ + echo -ne "$$($(STAGING_DIR_HOST)/bin/mkhash md5 $@ | fold -s2 | xargs -I {} echo \\x{} | tr -d '\n')" | \ + dd bs=58 count=1 conv=sync; \ + ) > $(KDIR)/tmp/$(DEVICE_NAME).header + $(call Build/xor-image,-p $(xor_pattern) -x) + cat $(KDIR)/tmp/$(DEVICE_NAME).header $@ > $@.new + mv $@.new $@ +endef + define Device/ai-br100 DTS := AI-BR100 IMAGE_SIZE := 7936k @@ -32,6 +51,32 @@ define Device/alfa-network_ac1200rm endef TARGET_DEVICES += alfa-network_ac1200rm +define Device/alfa-network_r36m-e4g + DTS := R36M-E4G + IMAGE_SIZE := 16064k + DEVICE_TITLE := ALFA Network R36M-E4G + DEVICE_PACKAGES := kmod-i2c-ralink kmod-usb2 kmod-usb-ohci uboot-envtools uqmi +endef +TARGET_DEVICES += alfa-network_r36m-e4g + +define Device/alfa-network_tube-e4g + DTS := TUBE-E4G + IMAGE_SIZE := 16064k + DEVICE_TITLE := ALFA Network Tube-E4G + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci uboot-envtools uqmi \ + -iwinfo -kmod-rt2800-soc -wpad-basic +endef +TARGET_DEVICES += alfa-network_tube-e4g + +define Device/amit_jboot + DLINK_IMAGE_OFFSET := 0x10000 + KERNEL := $(KERNEL_DTB) + IMAGES += factory.bin + IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata + IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory + DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-usb-ohci +endef + define Device/Archer TPLINK_HWREVADD := 0 TPLINK_HVERSION := 3 @@ -153,61 +198,59 @@ define Device/dir-810l endef TARGET_DEVICES += dir-810l +define Device/dlink_dir-510l + $(Device/amit_jboot) + DTS := DIR-510L + DEVICE_TITLE := D-Link DIR-510L + DEVICE_PACKAGES += kmod-mt76x0e + DLINK_ROM_ID := DLK6E3805001 + DLINK_FAMILY_MEMBER := 0x6E38 + DLINK_FIRMWARE_SIZE := 0xDE0000 + DLINK_IMAGE_OFFSET := 0x210000 +endef +TARGET_DEVICES += dlink_dir-510l + define Device/dlink_dwr-116-a1 + $(Device/amit_jboot) DTS := DWR-116-A1 DEVICE_TITLE := D-Link DWR-116 A1/A2 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci jboot-tools DLINK_ROM_ID := DLK6E3803001 DLINK_FAMILY_MEMBER := 0x6E38 DLINK_FIRMWARE_SIZE := 0x7E0000 - KERNEL := $(KERNEL_DTB) - IMAGES += factory.bin - IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata - IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory endef TARGET_DEVICES += dlink_dwr-116-a1 define Device/dlink_dwr-118-a1 + $(Device/amit_jboot) DTS := DWR-118-A1 DEVICE_TITLE := D-Link DWR-118 A1 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci jboot-tools kmod-mt76x0e + DEVICE_PACKAGES += kmod-mt76x0e DLINK_ROM_ID := DLK6E3811001 DLINK_FAMILY_MEMBER := 0x6E38 DLINK_FIRMWARE_SIZE := 0xFE0000 - KERNEL := $(KERNEL_DTB) - IMAGES += factory.bin - IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata - IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory endef TARGET_DEVICES += dlink_dwr-118-a1 define Device/dlink_dwr-118-a2 + $(Device/amit_jboot) DTS := DWR-118-A2 DEVICE_TITLE := D-Link DWR-118 A2 - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci jboot-tools + DEVICE_PACKAGES += kmod-mt76x2 DLINK_ROM_ID := DLK6E3814001 DLINK_FAMILY_MEMBER := 0x6E38 DLINK_FIRMWARE_SIZE := 0xFE0000 - KERNEL := $(KERNEL_DTB) - IMAGES += factory.bin - IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata - IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory endef TARGET_DEVICES += dlink_dwr-118-a2 define Device/dlink_dwr-921-c1 + $(Device/amit_jboot) DTS := DWR-921-C1 IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := D-Link DWR-921 C1 DLINK_ROM_ID := DLK6E2414001 DLINK_FAMILY_MEMBER := 0x6E24 DLINK_FIRMWARE_SIZE := 0xFE0000 - KERNEL := $(KERNEL_DTB) - IMAGES += factory.bin - IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata - IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory - DEVICE_PACKAGES := jboot-tools \ - kmod-usb2 kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi + DEVICE_PACKAGES += kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi endef TARGET_DEVICES += dlink_dwr-921-c1 @@ -220,18 +263,14 @@ endef TARGET_DEVICES += dlink_dwr-921-c3 define Device/dlink_dwr-922-e2 + $(Device/amit_jboot) DTS := DWR-922-E2 IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := D-Link DWR-922 E2 DLINK_ROM_ID := DLK6E2414005 DLINK_FAMILY_MEMBER := 0x6E24 DLINK_FIRMWARE_SIZE := 0xFE0000 - KERNEL := $(KERNEL_DTB) - IMAGES += factory.bin - IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata - IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory - DEVICE_PACKAGES := jboot-tools \ - kmod-usb2 kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi + DEVICE_PACKAGES += kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi endef TARGET_DEVICES += dlink_dwr-922-e2 @@ -256,7 +295,7 @@ define Device/ex2700 netgear-dni DEVICE_TITLE := Netgear EX2700 endef -TARGET_DEVICES += ex2700 +#TARGET_DEVICES += ex2700 define Device/ex3700-ex3800 NETGEAR_BOARD_ID := U12H319T00_NETGEAR @@ -283,8 +322,7 @@ define Device/u25awf-h1 DTS := U25AWF-H1 IMAGE_SIZE := 16064k DEVICE_TITLE := Kimax U25AWF-H1 - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-storage kmod-scsi-core \ - kmod-fs-ext4 kmod-fs-vfat block-mount + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci endef TARGET_DEVICES += u25awf-h1 @@ -328,12 +366,44 @@ define Device/hc5861 endef TARGET_DEVICES += hc5861 +define Device/head-weblink_hdrm200 + DTS := HDRM200 + IMAGE_SIZE := 16064k + DEVICE_TITLE := Head Weblink HDRM2000 + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 \ + uqmi kmod-usb-serial kmod-usb-serial-option +endef +TARGET_DEVICES += head-weblink_hdrm200 + +define Device/iodata_wn-ac1167gr + DTS := WN-AC1167GR + DEVICE_TITLE := I-O DATA WN-AC1167GR + IMAGE_SIZE := 6864k + IMAGES += factory.bin + IMAGE/factory.bin := \ + $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + elx-header 01040016 8844A2D168B45A2D + DEVICE_PACKAGES := kmod-mt76x2 +endef +TARGET_DEVICES += iodata_wn-ac1167gr + +define Device/iodata_wn-ac733gr3 + DTS := WN-AC733GR3 + DEVICE_TITLE := I-O DATA WN-AC733GR3 + IMAGE_SIZE := 6992k + IMAGES += factory.bin + IMAGE/factory.bin := \ + $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | \ + elx-header 01040006 8844A2D168B45A2D + DEVICE_PACKAGES := kmod-mt76x0e kmod-switch-rtl8367b +endef +TARGET_DEVICES += iodata_wn-ac733gr3 + define Device/kimax_u35wf DTS := U35WF IMAGE_SIZE := 16064k DEVICE_TITLE := Kimax U35WF - DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-storage kmod-scsi-core \ - kmod-fs-ext4 kmod-fs-vfat block-mount + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci endef TARGET_DEVICES += kimax_u35wf @@ -380,16 +450,13 @@ endef TARGET_DEVICES += microwrt define Device/lava_lr-25g001 + $(Device/amit_jboot) DTS := LR-25G001 DEVICE_TITLE := LAVA LR-25G001 DLINK_ROM_ID := LVA6E3804001 DLINK_FAMILY_MEMBER := 0x6E38 DLINK_FIRMWARE_SIZE := 0xFE0000 - KERNEL := $(KERNEL_DTB) - IMAGES += factory.bin - IMAGE/sysupgrade.bin := mkdlinkfw | pad-rootfs | append-metadata - IMAGE/factory.bin := mkdlinkfw | pad-rootfs | mkdlinkfw-factory - DEVICE_PACKAGES := jboot-tools kmod-usb2 kmod-usb-ohci kmod-mt76x0e + DEVICE_PACKAGES += kmod-mt76x0e endef TARGET_DEVICES += lava_lr-25g001 @@ -433,6 +500,7 @@ TARGET_DEVICES += mt7620a_mt7530 define Device/mt7620a_mt7610e DTS := MT7620a_MT7610e DEVICE_TITLE := MediaTek MT7620a + MT7610e EVB + DEVICE_PACKAGES := kmod-mt76x0e SUPPORTED_DEVICES := mt7620a_mt7610e endef TARGET_DEVICES += mt7620a_mt7610e @@ -514,6 +582,7 @@ TARGET_DEVICES += phicomm_k2g define Device/rp-n53 DTS := RP-N53 DEVICE_TITLE := Asus RP-N53 + DEVICE_PACKAGES := kmod-rt2800-pci endef TARGET_DEVICES += rp-n53 @@ -538,14 +607,6 @@ define Device/rt-ac51u endef TARGET_DEVICES += rt-ac51u -define Device/rt-ac54u - DTS := RT-AC54U - IMAGE_SIZE := $(ralink_default_fw_size_16M) - DEVICE_TITLE := Asus RT-AC54U - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport -endef -TARGET_DEVICES += rt-ac54u - define Device/tiny-ac DTS := TINY-AC DEVICE_TITLE := Dovado Tiny AC @@ -625,6 +686,7 @@ define Device/whr-600d DTS := WHR-600D IMAGE_SIZE := 6848k DEVICE_TITLE := Buffalo WHR-600D + DEVICE_PACKAGES := kmod-rt2800-pci endef TARGET_DEVICES += whr-600d @@ -676,7 +738,7 @@ define Device/wt3020-4M poray-header -B WT3020 -F 4M DEVICE_TITLE := Nexx WT3020 (4MB) endef -TARGET_DEVICES += wt3020-4M +#TARGET_DEVICES += wt3020-4M define Device/wt3020-8M DTS := WT3020-8M @@ -722,22 +784,6 @@ define Device/we1026-5g-16m endef TARGET_DEVICES += we1026-5g-16m -define Device/xiaomi_miwifi-r3 - DTS := MIWIFI-R3 - BLOCKSIZE := 128k - PAGESIZE := 2048 - KERNEL_SIZE := 4096k - IMAGE_SIZE := 32768k - UBINIZE_OPTS := -E 5 - IMAGES += kernel1.bin rootfs0.bin - IMAGE/kernel1.bin := append-kernel | check-size $$$$(KERNEL_SIZE) - IMAGE/rootfs0.bin := append-ubi | check-size $$$$(IMAGE_SIZE) - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - DEVICE_TITLE := Xiaomi Mi Router R3 - DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci uboot-envtools -endef -TARGET_DEVICES += xiaomi_miwifi-r3 - define Device/zbt-ape522ii DTS := ZBT-APE522II DEVICE_TITLE := Zbtlink ZBT-APE522II @@ -782,6 +828,15 @@ define Device/zbt-we826-32M endef TARGET_DEVICES += zbt-we826-32M +define Device/zbtlink_zbt-we826-e + DTS := ZBT-WE826-E + IMAGE_SIZE := 32448k + DEVICE_TITLE := Zbtlink ZBT-WE826-E + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-sdhci-mt7620 uqmi \ + kmod-usb-serial kmod-usb-serial-option +endef +TARGET_DEVICES += zbtlink_zbt-we826-e + define Device/zbt-wr8305rt DTS := ZBT-WR8305RT DEVICE_TITLE := Zbtlink ZBT-WR8305RT diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 983f580469..51f92ceded 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -87,17 +87,35 @@ endef define Device/11acnas DTS := 11ACNAS IMAGE_SIZE := $(ralink_default_fw_size_16M) + UIMAGE_NAME := 11AC-NAS-Router(0.0.0) DEVICE_TITLE := WeVO 11AC NAS Router - DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic endef TARGET_DEVICES += 11acnas +define Device/alfa-network_quad-e4g + DTS := QUAD-E4G + IMAGE_SIZE := 16064k + DEVICE_TITLE := ALFA Network Quad-E4G + DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-usb3 \ + uboot-envtools +endef +TARGET_DEVICES += alfa-network_quad-e4g + +define Device/asus_rt-ac57u + DTS := RT-AC57U + DEVICE_TITLE := ASUS RT-AC57U + IMAGE_SIZE := 16064k + DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic +endef +TARGET_DEVICES += asus_rt-ac57u + define Device/dir-860l-b1 $(Device/seama) DTS := DIR-860L-B1 BLOCKSIZE := 64k SEAMA_SIGNATURE := wrgac13_dlink.2013gui_dir860lb - KERNEL := kernel-bin | patch-dtb | relocate-kernel | lzma | uImage lzma + KERNEL := kernel-bin | append-dtb | relocate-kernel | lzma | uImage lzma IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := D-Link DIR-860L B1 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic @@ -236,14 +254,6 @@ define Device/k2p endef TARGET_DEVICES += k2p -define Device/adslr_g7 - DTS := ADSLR-G7 - IMAGE_SIZE := 16064k - DEVICE_TITLE := ADSLR G7 - DEVICE_PACKAGES := kmod-mt7615e wpad-basic -endef -TARGET_DEVICES += adslr_g7 - define Device/xiaomi_mir3p DTS := MIR3P BLOCKSIZE := 128k @@ -260,7 +270,7 @@ define Device/xiaomi_mir3p endef TARGET_DEVICES += xiaomi_mir3p -define Device/mir3g +define Device/xiaomi_mir3g DTS := MIR3G BLOCKSIZE := 128k PAGESIZE := 2048 @@ -273,31 +283,12 @@ define Device/mir3g IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata DEVICE_TITLE := Xiaomi Mi Router 3G SUPPORTED_DEVICES += R3G + SUPPORTED_DEVICES += mir3g DEVICE_PACKAGES := \ kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic \ uboot-envtools endef -TARGET_DEVICES += mir3g - -define Device/mir4 - DTS := MIR4 - BLOCKSIZE := 128k - PAGESIZE := 2048 - KERNEL_SIZE := 4096k - IMAGE_SIZE := 32768k - UBINIZE_OPTS := -E 5 - IMAGES += kernel1.bin rootfs0.bin factory.bin - IMAGE/kernel1.bin := append-kernel - IMAGE/rootfs0.bin := append-ubi | check-size $$$$(IMAGE_SIZE) - IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata - IMAGE/factory.bin := append-kernel | pad-to $$(KERNEL_SIZE) |append-kernel | pad-to $$(KERNEL_SIZE)| append-ubi | check-size $$$$(IMAGE_SIZE) - DEVICE_TITLE := Xiaomi Mi Router 4 - SUPPORTED_DEVICES += R4 - DEVICE_PACKAGES := \ - kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-basic \ - uboot-envtools -endef -TARGET_DEVICES += mir4 +TARGET_DEVICES += xiaomi_mir3g define Device/mt7621 DTS := MT7621 @@ -327,7 +318,7 @@ TARGET_DEVICES += d-team_newifi-d2 define Device/pbr-m1 DTS := PBR-M1 - IMAGE_SIZE := $(ralink_default_fw_size_32M) + IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := PBR-M1 DEVICE_PACKAGES := \ kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \ @@ -342,7 +333,12 @@ define Device/r6220 KERNEL_SIZE := 4096k IMAGE_SIZE := 28672k UBINIZE_OPTS := -E 5 - IMAGES += kernel.bin rootfs.bin + SERCOMM_HWID := AYA + SERCOMM_HWVER := A001 + SERCOMM_SWVER := 0x0086 + IMAGES += factory.img kernel.bin rootfs.bin + IMAGE/factory.img := pad-extra 2048k | append-kernel | pad-to 6144k | append-ubi | \ + pad-to $$$$(BLOCKSIZE) | sercom-footer | pad-to 128 | zip R6220.bin | sercom-seal IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata IMAGE/kernel.bin := append-kernel IMAGE/rootfs.bin := append-ubi | check-size $$$$(IMAGE_SIZE) @@ -352,6 +348,17 @@ define Device/r6220 endef TARGET_DEVICES += r6220 +define Device/netgear_ex6150 + DTS := EX6150 + DEVICE_TITLE := Netgear EX6150 + DEVICE_PACKAGES := kmod-mt76x2 wpad-basic + NETGEAR_BOARD_ID := U12H318T00_NETGEAR + IMAGE_SIZE := 14848k + IMAGES += factory.chk + IMAGE/factory.chk := $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | netgear-chk +endef +TARGET_DEVICES += netgear_ex6150 + define Device/netgear_r6350 DTS := R6350 BLOCKSIZE := 128k @@ -369,14 +376,6 @@ define Device/netgear_r6350 endef TARGET_DEVICES += netgear_r6350 -define Device/rb750gr3 - DTS := RB750Gr3 - IMAGE_SIZE := $(ralink_default_fw_size_16M) - DEVICE_TITLE := MikroTik RB750Gr3 - DEVICE_PACKAGES := kmod-usb3 uboot-envtools -endef -TARGET_DEVICES += rb750gr3 - define Device/MikroTik BLOCKSIZE := 64k IMAGE_SIZE := 16128k @@ -388,6 +387,14 @@ define Device/MikroTik append-rootfs | pad-rootfs | append-metadata | check-size $$$$(IMAGE_SIZE) endef +define Device/mikrotik_rb750gr3 + $(Device/MikroTik) + DTS := RB750Gr3 + DEVICE_TITLE := MikroTik RouterBOARD RB750Gr3 + DEVICE_PACKAGES += kmod-gpio-beeper +endef +TARGET_DEVICES += mikrotik_rb750gr3 + define Device/mikrotik_rbm33g $(Device/MikroTik) DTS := RBM33G @@ -452,6 +459,14 @@ define Device/sk-wb8 endef TARGET_DEVICES += sk-wb8 +define Device/telco-electronics_x1 + DTS := Telco-Electronics-X1 + IMAGE_SIZE := 16064k + DEVICE_TITLE := Telco Electronics X1 + DEVICE_PACKAGES := kmod-usb3 kmod-mt76 wpad-basic +endef +TARGET_DEVICES += telco-electronics_x1 + define Device/timecloud DTS := Timecloud DEVICE_TITLE := Thunder Timecloud @@ -505,6 +520,7 @@ TARGET_DEVICES += vr500 define Device/w2914nsv2 DTS := W2914NSV2 IMAGE_SIZE := $(ralink_default_fw_size_16M) + UIMAGE_NAME := W2914NS-V2(0.0.0) DEVICE_TITLE := WeVO W2914NS v2 DEVICE_PACKAGES := \ kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic @@ -548,9 +564,19 @@ TARGET_DEVICES += mqmaker_witi-512m define Device/wndr3700v5 DTS := WNDR3700V5 - IMAGE_SIZE := $(ralink_default_fw_size_16M) + BLOCKSIZE := 64k + IMAGE_SIZE := 15232k + SERCOMM_HWID := AYB + SERCOMM_HWVER := A001 + SERCOMM_SWVER := 0x1054 + IMAGES += factory.img + IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE) | append-rootfs | pad-rootfs + IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE) + IMAGE/factory.img := pad-extra 320k | $$(IMAGE/default) | pad-to $$$$(BLOCKSIZE) | \ + sercom-footer | pad-to 128 | zip WNDR3700v5.bin | sercom-seal DEVICE_TITLE := Netgear WNDR3700v5 - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-basic + DEVICE_PACKAGES := \ + kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic endef TARGET_DEVICES += wndr3700v5 @@ -563,6 +589,15 @@ define Device/youhua_wr1200js endef TARGET_DEVICES += youhua_wr1200js +define Device/youku_yk-l2 + DTS := YOUKU-YK2 + IMAGE_SIZE := $(ralink_default_fw_size_16M) + DEVICE_TITLE := Youku YK-L2 + DEVICE_PACKAGES := \ + kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic +endef +TARGET_DEVICES += youku_yk-l2 + define Device/wsr-1166 DTS := WSR-1166 IMAGE/sysupgrade.bin := trx | pad-rootfs | append-metadata @@ -580,14 +615,6 @@ define Device/wsr-600 endef TARGET_DEVICES += wsr-600 -define Device/XiaoYu-C5 - DTS := XiaoYu-C5 - IMAGE_SIZE := $(ralink_default_fw_size_32M) - DEVICE_TITLE := XiaoYu-C5 - DEVICE_PACKAGES := kmod-ata-core kmod-ata-ahci kmod-usb3 -endef -TARGET_DEVICES += XiaoYu-C5 - define Device/zbt-we1326 DTS := ZBT-WE1326 IMAGE_SIZE := $(ralink_default_fw_size_16M) @@ -637,4 +664,4 @@ define Device/zbt-wg3526-32M kmod-ata-core kmod-ata-ahci kmod-sdhci-mt7620 kmod-mt7603 kmod-mt76x2 \ kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic endef -TARGET_DEVICES += zbt-wg3526-32M \ No newline at end of file +TARGET_DEVICES += zbt-wg3526-32M diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 7cfe1606b0..054935e595 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -2,17 +2,6 @@ # MT76x8 Profiles # -DEVICE_VARS += SERCOMM_KERNEL_OFFSET SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER - -define Build/mksercommfw - $(STAGING_DIR_HOST)/bin/mksercommfw \ - $@ \ - $(SERCOMM_KERNEL_OFFSET) \ - $(SERCOMM_HWID) \ - $(SERCOMM_HWVER) \ - $(SERCOMM_SWVER) -endef - define Device/tplink TPLINK_FLASHLAYOUT := TPLINK_HWID := @@ -38,6 +27,19 @@ define Device/alfa-network_awusfree1 endef TARGET_DEVICES += alfa-network_awusfree1 +define Device/cudy_wr1000 + DTS := WR1000 + IMAGE_SIZE := $(ralink_default_fw_size_8M) + IMAGES += factory.bin + IMAGE/factory.bin := \ + $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | jcg-header 92.122 + JCG_MAXSIZE := 8060928 + DEVICE_TITLE := Cudy WR1000 + DEVICE_PACKAGES := kmod-mt76x2 + SUPPORTED_DEVICES += wr1000 +endef +TARGET_DEVICES += cudy_wr1000 + define Device/tama_w06 DTS := W06 IMAGE_SIZE := 15040k @@ -61,6 +63,14 @@ define Device/gl-mt300n-v2 endef TARGET_DEVICES += gl-mt300n-v2 +define Device/glinet_vixmini + DTS := VIXMINI + IMAGE_SIZE := 7872k + DEVICE_TITLE := GL.iNet VIXMINI + SUPPORTED_DEVICES += vixmini +endef +TARGET_DEVICES += glinet_vixmini + define Device/hc5661a DTS := HC5661A IMAGE_SIZE := $(ralink_default_fw_size_16M) @@ -68,6 +78,13 @@ define Device/hc5661a endef TARGET_DEVICES += hc5661a +define Device/hilink_hlk-7628n + DTS := HLK-7628N + IMAGE_SIZE := $(ralink_default_fw_size_32M) + DEVICE_TITLE := HILINK HLK7628N +endef +TARGET_DEVICES += hilink_hlk-7628n + define Device/hiwifi_hc5861b DTS := HC5861B IMAGE_SIZE := 15808k @@ -97,7 +114,7 @@ define Device/miwifi-nano DTS := MIWIFI-NANO IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := Xiaomi MiWiFi Nano - DEVICE_PACKAGES := uboot-envtools + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci kmod-usb-ledtrig-usbport endef TARGET_DEVICES += miwifi-nano @@ -114,16 +131,16 @@ define Device/netgear_r6120 DTS := R6120 BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_16M) - DEVICE_TITLE := Netgear AC1200 R6120 + DEVICE_TITLE := Netgear R6120 DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci - SERCOMM_KERNEL_OFFSET := 0x90000 SERCOMM_HWID := CGQ SERCOMM_HWVER := A001 SERCOMM_SWVER := 0x0040 IMAGES += factory.img IMAGE/default := append-kernel | pad-to $$$$(BLOCKSIZE)| append-rootfs | pad-rootfs IMAGE/sysupgrade.bin := $$(IMAGE/default) | append-metadata | check-size $$$$(IMAGE_SIZE) - IMAGE/factory.img := $$(IMAGE/default) | mksercommfw + IMAGE/factory.img := pad-extra 576k | $$(IMAGE/default) | pad-to $$$$(BLOCKSIZE) | \ + sercom-footer | pad-to 128 | zip R6120.bin | sercom-seal endef TARGET_DEVICES += netgear_r6120 @@ -151,6 +168,13 @@ define Device/pbr-d1 endef TARGET_DEVICES += pbr-d1 +define Device/rakwireless_rak633 + DTS := RAK633 + DEVICE_TITLE := Rakwireless RAK633 + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci +endef +TARGET_DEVICES += rakwireless_rak633 + define Device/skylab_skw92a DTS := SKW92A IMAGE_SIZE := 16064k @@ -159,6 +183,14 @@ define Device/skylab_skw92a endef TARGET_DEVICES += skylab_skw92a +define Device/totolink_lr1200 + DTS := TOTOLINK-LR1200 + IMAGE_SIZE := 7872k + DEVICE_TITLE := TOTOLINK LR1200 + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 uqmi +endef +TARGET_DEVICES += totolink_lr1200 + define Device/tplink_tl-wa801nd-v5 $(Device/tplink) DTS := TL-WA801NDV5 @@ -172,6 +204,19 @@ define Device/tplink_tl-wa801nd-v5 endef TARGET_DEVICES += tplink_tl-wa801nd-v5 +define Device/tplink_tl-wr802n-v4 + $(Device/tplink) + DTS := TL-WR802NV4 + IMAGE_SIZE := 7808k + DEVICE_TITLE := TP-Link TL-WR802N v4 + TPLINK_FLASHLAYOUT := 8Mmtk + TPLINK_HWID := 0x08020004 + TPLINK_HWREV := 0x1 + TPLINK_HWREVADD := 0x4 + TPLINK_HVERSION := 3 +endef +TARGET_DEVICES += tplink_tl-wr802n-v4 + define Device/tl-wr840n-v4 $(Device/tplink) DTS := TL-WR840NV4 @@ -198,6 +243,7 @@ define Device/tl-wr840n-v5 KERNEL_INITRAMFS := $(KERNEL_DTB) | tplink-v2-header -e IMAGE/sysupgrade.bin := tplink-v2-image -s -e | append-metadata | \ check-size $$$$(IMAGE_SIZE) + DEFAULT := n endef TARGET_DEVICES += tl-wr840n-v5 @@ -242,6 +288,21 @@ define Device/tplink_c50-v3 endef TARGET_DEVICES += tplink_c50-v3 +define Device/tplink_c50-v4 + $(Device/tplink) + DTS := ArcherC50V4 + IMAGE_SIZE := 7616k + DEVICE_TITLE := TP-Link ArcherC50 v4 + TPLINK_FLASHLAYOUT := 8MSUmtk + TPLINK_HWID := 0x001D589B + TPLINK_HWREV := 0x93 + TPLINK_HWREVADD := 0x2 + TPLINK_HVERSION := 3 + DEVICE_PACKAGES := kmod-mt76x2 + IMAGES := sysupgrade.bin +endef +TARGET_DEVICES += tplink_c50-v4 + define Device/tplink_tl-mr3020-v3 $(Device/tplink) DTS := TL-MR3020V3 @@ -332,6 +393,15 @@ define Device/wavlink_wl-wn570ha1 endef TARGET_DEVICES += wavlink_wl-wn570ha1 +define Device/wavlink_wl-wn575a3 + DTS := WL-WN575A3 + IMAGE_SIZE := $(ralink_default_fw_size_8M) + DEVICE_TITLE := Wavlink WL-WN575A3 + DEVICE_PACKAGES := kmod-mt76x2 + SUPPORTED_DEVICES += wl-wn575a3 +endef +TARGET_DEVICES += wavlink_wl-wn575a3 + define Device/wcr-1166ds DTS := WCR-1166DS BUFFALO_TAG_PLATFORM := MTK @@ -349,14 +419,6 @@ define Device/wcr-1166ds endef TARGET_DEVICES += wcr-1166ds -define Device/wl-wn575a3 - DTS := WL-WN575A3 - IMAGE_SIZE := $(ralink_default_fw_size_8M) - DEVICE_TITLE := Wavlink WL-WN575A3 - DEVICE_PACKAGES := kmod-mt76x2 -endef -TARGET_DEVICES += wl-wn575a3 - define Device/widora_neo-16m DTS := WIDORA-NEO-16M IMAGE_SIZE := $(ralink_default_fw_size_16M) @@ -374,6 +436,13 @@ define Device/widora_neo-32m endef TARGET_DEVICES += widora_neo-32m +define Device/wiznet_wizfi630s + DTS := WIZFI630S + IMAGE_SIZE := $(ralink_default_fw_size_32M) + DEVICE_TITLE := WIZnet WizFi630S +endef +TARGET_DEVICES += wiznet_wizfi630s + define Device/wrtnode2p DTS := WRTNODE2P IMAGE_SIZE := $(ralink_default_fw_size_16M) @@ -390,6 +459,14 @@ define Device/wrtnode2r endef TARGET_DEVICES += wrtnode2r +define Device/xiaomi_mir4a-100m + DTS := XIAOMI-MIR4A-100M + IMAGE_SIZE := 14976k + DEVICE_TITLE := Xiaomi Mi Router 4A (100M Edition) + DEVICE_PACKAGES := kmod-mt76x2 +endef +TARGET_DEVICES += xiaomi_mir4a-100m + define Device/zbtlink_zbt-we1226 DTS := ZBT-WE1226 IMAGE_SIZE := $(ralink_default_fw_size_8M) diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index 163726e1e1..f59a748949 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -21,11 +21,6 @@ define Build/hilink-header mv $@.new $@ endef -define Build/jcg-header - $(STAGING_DIR_HOST)/bin/jcgimage -v $(1) -u $@ -o $@.new - mv $@.new $@ -endef - define Device/3g150b DTS := 3G150B @@ -74,6 +69,7 @@ define Device/a5-v11 $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | poray-header -B A5-V11 -F 4M DEVICE_TITLE := A5-V11 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 + DEFAULT := n endef TARGET_DEVICES += a5-v11 @@ -233,6 +229,7 @@ define Device/dir-300-b1 IMAGE/factory.bin := \ $$(sysupgrade_bin) | check-size $$$$(IMAGE_SIZE) | wrg-header wrgn23_dlwbr_dir300b DEVICE_TITLE := D-Link DIR-300 B1 + DEFAULT := n endef TARGET_DEVICES += dir-300-b1 @@ -241,6 +238,7 @@ define Device/dir-300-b7 BLOCKSIZE := 4k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := D-Link DIR-300 B7 + DEFAULT := n endef TARGET_DEVICES += dir-300-b7 @@ -654,6 +652,7 @@ define Device/rt-n10-plus BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Asus RT-N10+ + DEFAULT := n endef TARGET_DEVICES += rt-n10-plus @@ -819,6 +818,7 @@ define Device/wl-351 IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := Sitecom WL-351 v1 DEVICE_PACKAGES := kmod-switch-rtl8366rb kmod-swconfig swconfig + DEFAULT := n endef TARGET_DEVICES += wl-351 @@ -838,6 +838,7 @@ define Device/wr512-3gn-4M DTS := WR512-3GN-4M IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := WR512-3GN (4M) + DEFAULT := n endef TARGET_DEVICES += wr512-3gn-4M @@ -907,9 +908,17 @@ define Device/kn IMAGE_SIZE := $(ralink_default_fw_size_4M) DEVICE_TITLE := ZyXEL Keenetic DEVICE_PACKAGES := kmod-usb-core kmod-usb2 kmod-usb-ehci kmod-usb-ledtrig-usbport + DEFAULT := n endef TARGET_DEVICES += kn +define Device/zyxel_keenetic-start + DTS := kn_st + IMAGE_SIZE := $(ralink_default_fw_size_4M) + DEVICE_TITLE := ZyXEL Keenetic Start +endef +TARGET_DEVICES += zyxel_keenetic-start + define Device/zorlik_zl5900v2 DTS := ZL5900V2 DEVICE_TITLE := Zorlik ZL5900V2 diff --git a/target/linux/ramips/image/rt3883.mk b/target/linux/ramips/image/rt3883.mk index abee533d01..1f4b261c9b 100644 --- a/target/linux/ramips/image/rt3883.mk +++ b/target/linux/ramips/image/rt3883.mk @@ -24,7 +24,8 @@ define Device/cy-swr1100 KERNEL := $(KERNEL_DTB) SEAMA_SIGNATURE := wrgnd10_samsung_ss815 DEVICE_TITLE := Samsung CY-SWR1100 - DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig + DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 \ + kmod-usb-ledtrig-usbport swconfig endef TARGET_DEVICES += cy-swr1100 @@ -37,10 +38,23 @@ define Device/dir-645 SEAMA_SIGNATURE := wrgn39_dlob.hans_dir645 DEVICE_TITLE := D-Link DIR-645 DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig + DEFAULT := n endef TARGET_DEVICES += dir-645 +define Device/belkin_f9k1109v1 + DTS := F9K1109V1 + BLOCKSIZE := 64k + DEVICE_TITLE := Belkin F9K1109 Version 1.0 + DEVICE_PACKAGES := kmod-usb-core kmod-usb-ohci kmod-usb2 swconfig + IMAGE_SIZE := 7224k + KERNEL := kernel-bin | append-dtb | lzma -d16 | uImage lzma + # Stock firmware checks for this uImage image name during upload. + UIMAGE_NAME := N750F9K1103VB +endef +TARGET_DEVICES += belkin_f9k1109v1 + define Device/hpm DTS := HPM BLOCKSIZE := 64k diff --git a/target/linux/ramips/modules.mk b/target/linux/ramips/modules.mk index 1bdde9c6dd..b604110b1e 100644 --- a/target/linux/ramips/modules.mk +++ b/target/linux/ramips/modules.mk @@ -136,18 +136,3 @@ define KernelPackage/sound-mt7620/description endef $(eval $(call KernelPackage,sound-mt7620)) - -define KernelPackage/sound-mt76x8-wm8960 - TITLE:=MT76x8 WM8960 ALSA SoC Machine Driver - DEPENDS:=@TARGET_ramips +kmod-sound-mt7620 +kmod-i2c-mt7628 @!TARGET_ramips_rt288x - KCONFIG:=CONFIG_SND_SOC_MT76X8_WM8960 - FILES:=$(LINUX_DIR)/sound/soc/ralink/snd-soc-mt76x8-wm8960.ko - AUTOLOAD:=$(call AutoLoad,91,snd-soc-mt76x8-wm8960) - $(call AddDepends/sound) -endef - -define KernelPackage/sound-mt76x8-wm8960/description - ASoC Audio driver for Ralink SoC with WM8960 codec. -endef - -$(eval $(call KernelPackage,sound-mt76x8-wm8960)) diff --git a/target/linux/ramips/mt7620/config-4.14 b/target/linux/ramips/mt7620/config-4.14 index e1a8e0c73b..74da9ec5a1 100644 --- a/target/linux/ramips/mt7620/config-4.14 +++ b/target/linux/ramips/mt7620/config-4.14 @@ -41,6 +41,7 @@ CONFIG_CPU_MIPS32=y # CONFIG_CPU_MIPS32_R1 is not set CONFIG_CPU_MIPS32_R2=y CONFIG_CPU_MIPSR2=y +CONFIG_CPU_MIPSR2_IRQ_VI=y CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y CONFIG_CPU_R4K_CACHE_TLB=y CONFIG_CPU_R4K_FPU=y @@ -85,6 +86,7 @@ CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set # CONFIG_HAVE_ARCH_BITREVERSE is not set +CONFIG_HAVE_ARCH_COMPILER_H=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y @@ -134,9 +136,11 @@ CONFIG_MARVELL_PHY=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y CONFIG_MIPS=y CONFIG_MIPS_ASID_BITS=8 CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CBPF_JIT=y CONFIG_MIPS_CLOCK_VSYSCALL=y # CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set # CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set @@ -146,8 +150,8 @@ CONFIG_MIPS_CMDLINE_FROM_DTB=y # CONFIG_MIPS_HUGE_TLB_SUPPORT is not set CONFIG_MIPS_L1_CACHE_SHIFT=5 # CONFIG_MIPS_MACHINE is not set -CONFIG_MIPS_NO_APPENDED_DTB=y -# CONFIG_MIPS_RAW_APPENDED_DTB is not set +# CONFIG_MIPS_NO_APPENDED_DTB is not set +CONFIG_MIPS_RAW_APPENDED_DTB=y CONFIG_MIPS_SPRAM=y CONFIG_MODULES_USE_ELF_REL=y # CONFIG_MT7621_WDT is not set @@ -158,7 +162,6 @@ CONFIG_MTD_PHYSMAP=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT=16384 -CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_JIMAGE_FW=y CONFIG_MTD_SPLIT_SEAMA_FW=y CONFIG_MTD_SPLIT_TPLINK_FW=y diff --git a/target/linux/ramips/mt7620/target.mk b/target/linux/ramips/mt7620/target.mk index 788c9a1dfc..f3d450edf4 100644 --- a/target/linux/ramips/mt7620/target.mk +++ b/target/linux/ramips/mt7620/target.mk @@ -4,7 +4,7 @@ SUBTARGET:=mt7620 BOARDNAME:=MT7620 based boards -FEATURES+=usb +FEATURES+=usb ramdisk CPU_TYPE:=24kc DEFAULT_PACKAGES += kmod-rt2800-soc wpad-basic diff --git a/target/linux/ramips/mt7621/config-4.14 b/target/linux/ramips/mt7621/config-4.14 index 5f4d76624f..4112cad780 100644 --- a/target/linux/ramips/mt7621/config-4.14 +++ b/target/linux/ramips/mt7621/config-4.14 @@ -89,6 +89,8 @@ CONFIG_GPIOLIB=y CONFIG_GPIO_MT7621=y # CONFIG_GPIO_RALINK is not set CONFIG_GPIO_SYSFS=y +CONFIG_GPIO_WATCHDOG=y +# CONFIG_GPIO_WATCHDOG_ARCH_INITCALL is not set # CONFIG_GRO_CELLS is not set CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDWARE_WATCHPOINTS=y @@ -154,6 +156,7 @@ CONFIG_MIGRATION=y CONFIG_MIPS=y CONFIG_MIPS_ASID_BITS=8 CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CBPF_JIT=y CONFIG_MIPS_CLOCK_VSYSCALL=y CONFIG_MIPS_CM=y # CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set @@ -172,9 +175,9 @@ CONFIG_MIPS_L1_CACHE_SHIFT=5 CONFIG_MIPS_MT=y CONFIG_MIPS_MT_FPAFF=y CONFIG_MIPS_MT_SMP=y -CONFIG_MIPS_NO_APPENDED_DTB=y +# CONFIG_MIPS_NO_APPENDED_DTB is not set CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y -# CONFIG_MIPS_RAW_APPENDED_DTB is not set +CONFIG_MIPS_RAW_APPENDED_DTB=y CONFIG_MIPS_SPRAM=y # CONFIG_MIPS_VPE_LOADER is not set CONFIG_MODULES_USE_ELF_REL=y @@ -252,6 +255,7 @@ CONFIG_RESET_CONTROLLER=y CONFIG_RFS_ACCEL=y CONFIG_RPS=y CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_BQ32K=y CONFIG_RTC_DRV_PCF8563=y CONFIG_RTC_I2C_AND_SPI=y CONFIG_RTC_MC146818_LIB=y diff --git a/target/linux/ramips/mt76x8/config-4.14 b/target/linux/ramips/mt76x8/config-4.14 index 81e0848931..00de576855 100644 --- a/target/linux/ramips/mt76x8/config-4.14 +++ b/target/linux/ramips/mt76x8/config-4.14 @@ -40,6 +40,7 @@ CONFIG_CPU_MIPS32=y # CONFIG_CPU_MIPS32_R1 is not set CONFIG_CPU_MIPS32_R2=y CONFIG_CPU_MIPSR2=y +CONFIG_CPU_MIPSR2_IRQ_VI=y CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y CONFIG_CPU_R4K_CACHE_TLB=y CONFIG_CPU_R4K_FPU=y @@ -83,6 +84,7 @@ CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set # CONFIG_HAVE_ARCH_BITREVERSE is not set +CONFIG_HAVE_ARCH_COMPILER_H=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y @@ -131,9 +133,11 @@ CONFIG_LIBFDT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y CONFIG_MIPS=y CONFIG_MIPS_ASID_BITS=8 CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CBPF_JIT=y CONFIG_MIPS_CLOCK_VSYSCALL=y # CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set # CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set @@ -143,8 +147,8 @@ CONFIG_MIPS_CMDLINE_FROM_DTB=y # CONFIG_MIPS_HUGE_TLB_SUPPORT is not set CONFIG_MIPS_L1_CACHE_SHIFT=5 # CONFIG_MIPS_MACHINE is not set -CONFIG_MIPS_NO_APPENDED_DTB=y -# CONFIG_MIPS_RAW_APPENDED_DTB is not set +# CONFIG_MIPS_NO_APPENDED_DTB is not set +CONFIG_MIPS_RAW_APPENDED_DTB=y CONFIG_MIPS_SPRAM=y CONFIG_MODULES_USE_ELF_REL=y CONFIG_MT7621_WDT=y @@ -153,7 +157,6 @@ CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_M25P80=y CONFIG_MTD_PHYSMAP=y CONFIG_MTD_SPI_NOR=y -CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_TPLINK_FW=y CONFIG_MTD_SPLIT_TRX_FW=y CONFIG_MTD_SPLIT_UIMAGE_FW=y @@ -193,6 +196,8 @@ CONFIG_RALINK=y # CONFIG_RCU_STALL_COMMON is not set CONFIG_REGMAP=y CONFIG_REGMAP_MMIO=y +CONFIG_REGULATOR=y +CONFIG_REGULATOR_FIXED_VOLTAGE=y CONFIG_RESET_CONTROLLER=y # CONFIG_SCHED_INFO is not set # CONFIG_SCSI_DMA is not set diff --git a/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch b/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch index d50e689110..03b2b36db9 100644 --- a/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch +++ b/target/linux/ramips/patches-4.14/0039-mtd-add-mt7621-nand-support.patch @@ -3578,7 +3578,7 @@ Signed-off-by: John Crispin + if (!err) { + MSG(INIT, "[mtk_nand] probe successfully!\n"); + nand_disable_clock(); -+ shift_on_bbt = 1; ++ shift_on_bbt = 0; + if (load_fact_bbt(mtd) == 0) { + int i; + for (i = 0; i < 0x100; i++) diff --git a/target/linux/ramips/patches-4.14/0043-spi-add-mt7621-support.patch b/target/linux/ramips/patches-4.14/0043-spi-add-mt7621-support.patch index d9bc48d69b..b607f2bdf4 100644 --- a/target/linux/ramips/patches-4.14/0043-spi-add-mt7621-support.patch +++ b/target/linux/ramips/patches-4.14/0043-spi-add-mt7621-support.patch @@ -1,15 +1,45 @@ -From 87a5fcd57c577cd94b5b080deb98885077c13a42 Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Sun, 27 Jul 2014 09:49:07 +0100 -Subject: [PATCH 43/53] spi: add mt7621 support +From cbd66c626e16743b05af807ad48012c0a097b9fb Mon Sep 17 00:00:00 2001 +From: Stefan Roese +Date: Mon, 25 Mar 2019 09:29:25 +0100 +Subject: [PATCH] spi: mt7621: Move SPI driver out of staging -Signed-off-by: John Crispin +This patch moves the MT7621 SPI driver, which is used on some Ralink / +MediaTek MT76xx MIPS SoC's, out of the staging directory. No changes to +the source code are done in this patch. + +This driver version was tested successfully on an MT7688 based platform +with an SPI NOR on CS0 and an SPI NAND on CS1 without any issues (so +far). + +This patch also documents the devicetree bindings for the MT7621 SPI +device driver. + +Signed-off-by: Stefan Roese +Cc: Rob Herring +Cc: Mark Brown +Cc: Greg Kroah-Hartman +Cc: NeilBrown +Cc: Sankalp Negi +Cc: Chuanhong Guo +Cc: John Crispin +Cc: Armando Miraglia +Signed-off-by: Mark Brown --- - drivers/spi/Kconfig | 6 + - drivers/spi/Makefile | 1 + - drivers/spi/spi-mt7621.c | 480 ++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 487 insertions(+) - create mode 100644 drivers/spi/spi-mt7621.c + .../devicetree/bindings/spi/spi-mt7621.txt | 26 ++++++ + drivers/spi/Kconfig | 6 ++ + drivers/spi/Makefile | 1 + + .../{staging/mt7621-spi => spi}/spi-mt7621.c | 83 +++++++++---------- + drivers/staging/Kconfig | 2 - + drivers/staging/Makefile | 1 - + drivers/staging/mt7621-spi/Kconfig | 6 -- + drivers/staging/mt7621-spi/Makefile | 1 - + drivers/staging/mt7621-spi/TODO | 5 -- + 9 files changed, 74 insertions(+), 57 deletions(-) + create mode 100644 Documentation/devicetree/bindings/spi/spi-mt7621.txt + rename drivers/{staging/mt7621-spi => spi}/spi-mt7621.c (88%) + delete mode 100644 drivers/staging/mt7621-spi/Kconfig + delete mode 100644 drivers/staging/mt7621-spi/Makefile + delete mode 100644 drivers/staging/mt7621-spi/TODO --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -38,45 +68,34 @@ Signed-off-by: John Crispin obj-$(CONFIG_SPI_OC_TINY) += spi-oc-tiny.o --- /dev/null +++ b/drivers/spi/spi-mt7621.c -@@ -0,0 +1,494 @@ -+/* -+ * spi-mt7621.c -- MediaTek MT7621 SPI controller driver -+ * -+ * Copyright (C) 2011 Sergiy -+ * Copyright (C) 2011-2013 Gabor Juhos -+ * Copyright (C) 2014-2015 Felix Fietkau -+ * -+ * Some parts are based on spi-orion.c: -+ * Author: Shadi Ammouri -+ * Copyright (C) 2007-2008 Marvell Ltd. -+ * -+ * This program is free software; you can redistribute it and/or modify -+ * it under the terms of the GNU General Public License version 2 as -+ * published by the Free Software Foundation. -+ */ +@@ -0,0 +1,416 @@ ++// SPDX-License-Identifier: GPL-2.0 ++// ++// spi-mt7621.c -- MediaTek MT7621 SPI controller driver ++// ++// Copyright (C) 2011 Sergiy ++// Copyright (C) 2011-2013 Gabor Juhos ++// Copyright (C) 2014-2015 Felix Fietkau ++// ++// Some parts are based on spi-orion.c: ++// Author: Shadi Ammouri ++// Copyright (C) 2007-2008 Marvell Ltd. + -+#include -+#include +#include -+#include +#include +#include ++#include ++#include +#include +#include -+#include -+#include -+#include + -+#include ++#define DRIVER_NAME "spi-mt7621" + -+#define SPI_BPW_MASK(bits) BIT((bits) - 1) -+ -+#define DRIVER_NAME "spi-mt7621" +/* in usec */ -+#define RALINK_SPI_WAIT_MAX_LOOP 2000 ++#define RALINK_SPI_WAIT_MAX_LOOP 2000 + +/* SPISTAT register bit field */ -+#define SPISTAT_BUSY BIT(0) ++#define SPISTAT_BUSY BIT(0) + +#define MT7621_SPI_TRANS 0x00 +#define SPITRANS_BUSY BIT(16) @@ -87,32 +106,33 @@ Signed-off-by: John Crispin +#define SPI_CTL_TX_RX_CNT_MASK 0xff +#define SPI_CTL_START BIT(8) + -+#define MT7621_SPI_POLAR 0x38 +#define MT7621_SPI_MASTER 0x28 ++#define MASTER_MORE_BUFMODE BIT(2) ++#define MASTER_FULL_DUPLEX BIT(10) ++#define MASTER_RS_CLK_SEL GENMASK(27, 16) ++#define MASTER_RS_CLK_SEL_SHIFT 16 ++#define MASTER_RS_SLAVE_SEL GENMASK(31, 29) ++ +#define MT7621_SPI_MOREBUF 0x2c ++#define MT7621_SPI_POLAR 0x38 +#define MT7621_SPI_SPACE 0x3c + +#define MT7621_CPHA BIT(5) +#define MT7621_CPOL BIT(4) +#define MT7621_LSB_FIRST BIT(3) + -+#define RT2880_SPI_MODE_BITS (SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST | SPI_CS_HIGH) -+ -+struct mt7621_spi; -+ +struct mt7621_spi { -+ struct spi_master *master; ++ struct spi_controller *master; + void __iomem *base; + unsigned int sys_freq; + unsigned int speed; + struct clk *clk; -+ -+ struct mt7621_spi_ops *ops; ++ int pending_write; +}; + +static inline struct mt7621_spi *spidev_to_mt7621_spi(struct spi_device *spi) +{ -+ return spi_master_get_devdata(spi->master); ++ return spi_controller_get_devdata(spi->master); +} + +static inline u32 mt7621_spi_read(struct mt7621_spi *rs, u32 reg) @@ -125,29 +145,25 @@ Signed-off-by: John Crispin + iowrite32(val, rs->base + reg); +} + -+static void mt7621_spi_reset(struct mt7621_spi *rs, int duplex) -+{ -+ u32 master = mt7621_spi_read(rs, MT7621_SPI_MASTER); -+ -+ master |= 7 << 29; -+ master |= 1 << 2; -+#ifdef CONFIG_SOC_MT7620 -+ if (duplex) -+ master |= 1 << 10; -+ else -+#endif -+ master &= ~(1 << 10); -+ -+ mt7621_spi_write(rs, MT7621_SPI_MASTER, master); -+} -+ +static void mt7621_spi_set_cs(struct spi_device *spi, int enable) +{ + struct mt7621_spi *rs = spidev_to_mt7621_spi(spi); + int cs = spi->chip_select; + u32 polar = 0; ++ u32 master; ++ ++ /* ++ * Select SPI device 7, enable "more buffer mode" and disable ++ * full-duplex (only half-duplex really works on this chip ++ * reliably) ++ */ ++ master = mt7621_spi_read(rs, MT7621_SPI_MASTER); ++ master |= MASTER_RS_SLAVE_SEL | MASTER_MORE_BUFMODE; ++ master &= ~MASTER_FULL_DUPLEX; ++ mt7621_spi_write(rs, MT7621_SPI_MASTER, master); ++ ++ rs->pending_write = 0; + -+ mt7621_spi_reset(rs, cs); + if (enable) + polar = BIT(cs); + mt7621_spi_write(rs, MT7621_SPI_POLAR, polar); @@ -171,45 +187,36 @@ Signed-off-by: John Crispin + rate = 2; + + reg = mt7621_spi_read(rs, MT7621_SPI_MASTER); -+ reg &= ~(0xfff << 16); -+ reg |= (rate - 2) << 16; ++ reg &= ~MASTER_RS_CLK_SEL; ++ reg |= (rate - 2) << MASTER_RS_CLK_SEL_SHIFT; + rs->speed = speed; + + reg &= ~MT7621_LSB_FIRST; + if (spi->mode & SPI_LSB_FIRST) + reg |= MT7621_LSB_FIRST; + ++ /* ++ * This SPI controller seems to be tested on SPI flash only and some ++ * bits are swizzled under other SPI modes probably due to incorrect ++ * wiring inside the silicon. Only mode 0 works correctly. ++ */ + reg &= ~(MT7621_CPHA | MT7621_CPOL); -+ switch(spi->mode & (SPI_CPOL | SPI_CPHA)) { -+ case SPI_MODE_0: -+ break; -+ case SPI_MODE_1: -+ reg |= MT7621_CPHA; -+ break; -+ case SPI_MODE_2: -+ reg |= MT7621_CPOL; -+ break; -+ case SPI_MODE_3: -+ reg |= MT7621_CPOL | MT7621_CPHA; -+ break; -+ } ++ + mt7621_spi_write(rs, MT7621_SPI_MASTER, reg); + + return 0; +} + -+static inline int mt7621_spi_wait_till_ready(struct spi_device *spi) ++static inline int mt7621_spi_wait_till_ready(struct mt7621_spi *rs) +{ -+ struct mt7621_spi *rs = spidev_to_mt7621_spi(spi); + int i; + + for (i = 0; i < RALINK_SPI_WAIT_MAX_LOOP; i++) { + u32 status; + + status = mt7621_spi_read(rs, MT7621_SPI_TRANS); -+ if ((status & SPITRANS_BUSY) == 0) { ++ if ((status & SPITRANS_BUSY) == 0) + return 0; -+ } + cpu_relax(); + udelay(1); + } @@ -217,205 +224,157 @@ Signed-off-by: John Crispin + return -ETIMEDOUT; +} + -+static int mt7621_spi_transfer_half_duplex(struct spi_master *master, ++static void mt7621_spi_read_half_duplex(struct mt7621_spi *rs, ++ int rx_len, u8 *buf) ++{ ++ int tx_len; ++ ++ /* ++ * Combine with any pending write, and perform one or more half-duplex ++ * transactions reading 'len' bytes. Data to be written is already in ++ * MT7621_SPI_DATA. ++ */ ++ tx_len = rs->pending_write; ++ rs->pending_write = 0; ++ ++ while (rx_len || tx_len) { ++ int i; ++ u32 val = (min(tx_len, 4) * 8) << 24; ++ int rx = min(rx_len, 32); ++ ++ if (tx_len > 4) ++ val |= (tx_len - 4) * 8; ++ val |= (rx * 8) << 12; ++ mt7621_spi_write(rs, MT7621_SPI_MOREBUF, val); ++ ++ tx_len = 0; ++ ++ val = mt7621_spi_read(rs, MT7621_SPI_TRANS); ++ val |= SPI_CTL_START; ++ mt7621_spi_write(rs, MT7621_SPI_TRANS, val); ++ ++ mt7621_spi_wait_till_ready(rs); ++ ++ for (i = 0; i < rx; i++) { ++ if ((i % 4) == 0) ++ val = mt7621_spi_read(rs, MT7621_SPI_DATA0 + i); ++ *buf++ = val & 0xff; ++ val >>= 8; ++ } ++ ++ rx_len -= i; ++ } ++} ++ ++static inline void mt7621_spi_flush(struct mt7621_spi *rs) ++{ ++ mt7621_spi_read_half_duplex(rs, 0, NULL); ++} ++ ++static void mt7621_spi_write_half_duplex(struct mt7621_spi *rs, ++ int tx_len, const u8 *buf) ++{ ++ int len = rs->pending_write; ++ int val = 0; ++ ++ if (len & 3) { ++ val = mt7621_spi_read(rs, MT7621_SPI_OPCODE + (len & ~3)); ++ if (len < 4) { ++ val <<= (4 - len) * 8; ++ val = swab32(val); ++ } ++ } ++ ++ while (tx_len > 0) { ++ if (len >= 36) { ++ rs->pending_write = len; ++ mt7621_spi_flush(rs); ++ len = 0; ++ } ++ ++ val |= *buf++ << (8 * (len & 3)); ++ len++; ++ if ((len & 3) == 0) { ++ if (len == 4) ++ /* The byte-order of the opcode is weird! */ ++ val = swab32(val); ++ mt7621_spi_write(rs, MT7621_SPI_OPCODE + len - 4, val); ++ val = 0; ++ } ++ tx_len -= 1; ++ } ++ ++ if (len & 3) { ++ if (len < 4) { ++ val = swab32(val); ++ val >>= (4 - len) * 8; ++ } ++ mt7621_spi_write(rs, MT7621_SPI_OPCODE + (len & ~3), val); ++ } ++ ++ rs->pending_write = len; ++} ++ ++static int mt7621_spi_transfer_one_message(struct spi_controller *master, + struct spi_message *m) +{ -+ struct mt7621_spi *rs = spi_master_get_devdata(master); ++ struct mt7621_spi *rs = spi_controller_get_devdata(master); + struct spi_device *spi = m->spi; + unsigned int speed = spi->max_speed_hz; + struct spi_transfer *t = NULL; + int status = 0; -+ int i, len = 0; -+ int rx_len = 0; -+ u32 data[9] = { 0 }; -+ u32 val; + -+ mt7621_spi_wait_till_ready(spi); -+ -+ list_for_each_entry(t, &m->transfers, transfer_list) { -+ const u8 *buf = t->tx_buf; -+ -+ if (t->rx_buf) -+ rx_len += t->len; -+ -+ if (!buf) -+ continue; ++ mt7621_spi_wait_till_ready(rs); + ++ list_for_each_entry(t, &m->transfers, transfer_list) + if (t->speed_hz < speed) + speed = t->speed_hz; + -+ /* -+ * m25p80 might attempt to write more data than we can handle. -+ * truncate the message to what we can fit into the registers -+ */ -+ if (len + t->len > 36) -+ t->len = 36 - len; -+ -+ for (i = 0; i < t->len; i++, len++) -+ data[len / 4] |= buf[i] << (8 * (len & 3)); -+ } -+ -+ if (WARN_ON(rx_len > 32)) { -+ status = -EIO; -+ goto msg_done; -+ } -+ + if (mt7621_spi_prepare(spi, speed)) { + status = -EIO; + goto msg_done; + } -+ data[0] = swab32(data[0]); -+ if (len < 4) -+ data[0] >>= (4 - len) * 8; -+ -+ for (i = 0; i < len; i += 4) -+ mt7621_spi_write(rs, MT7621_SPI_OPCODE + i, data[i / 4]); -+ -+ val = (min_t(int, len, 4) * 8) << 24; -+ if (len > 4) -+ val |= (len - 4) * 8; -+ val |= (rx_len * 8) << 12; -+ mt7621_spi_write(rs, MT7621_SPI_MOREBUF, val); + ++ /* Assert CS */ + mt7621_spi_set_cs(spi, 1); + -+ val = mt7621_spi_read(rs, MT7621_SPI_TRANS); -+ val |= SPI_CTL_START; -+ mt7621_spi_write(rs, MT7621_SPI_TRANS, val); -+ -+ mt7621_spi_wait_till_ready(spi); -+ -+ mt7621_spi_set_cs(spi, 0); -+ -+ for (i = 0; i < rx_len; i += 4) -+ data[i / 4] = mt7621_spi_read(rs, MT7621_SPI_DATA0 + i); -+ -+ m->actual_length = len + rx_len; -+ -+ len = 0; ++ m->actual_length = 0; + list_for_each_entry(t, &m->transfers, transfer_list) { -+ u8 *buf = t->rx_buf; -+ -+ if (!buf) -+ continue; -+ -+ for (i = 0; i < t->len; i++, len++) -+ buf[i] = data[len / 4] >> (8 * (len & 3)); -+ } -+ -+msg_done: -+ m->status = status; -+ spi_finalize_current_message(master); -+ -+ return 0; -+} -+ -+#ifdef CONFIG_SOC_MT7620 -+static int mt7621_spi_transfer_full_duplex(struct spi_master *master, -+ struct spi_message *m) -+{ -+ struct mt7621_spi *rs = spi_master_get_devdata(master); -+ struct spi_device *spi = m->spi; -+ unsigned int speed = spi->max_speed_hz; -+ struct spi_transfer *t = NULL; -+ int status = 0; -+ int i, len = 0; -+ int rx_len = 0; -+ u32 data[9] = { 0 }; -+ u32 val = 0; -+ -+ mt7621_spi_wait_till_ready(spi); -+ -+ list_for_each_entry(t, &m->transfers, transfer_list) { -+ const u8 *buf = t->tx_buf; -+ -+ if (t->rx_buf) -+ rx_len += t->len; -+ -+ if (!buf) -+ continue; -+ -+ if (WARN_ON(len + t->len > 16)) { ++ if ((t->rx_buf) && (t->tx_buf)) { ++ /* ++ * This controller will shift some extra data out ++ * of spi_opcode if (mosi_bit_cnt > 0) && ++ * (cmd_bit_cnt == 0). So the claimed full-duplex ++ * support is broken since we have no way to read ++ * the MISO value during that bit. ++ */ + status = -EIO; + goto msg_done; ++ } else if (t->rx_buf) { ++ mt7621_spi_read_half_duplex(rs, t->len, t->rx_buf); ++ } else if (t->tx_buf) { ++ mt7621_spi_write_half_duplex(rs, t->len, t->tx_buf); + } -+ -+ for (i = 0; i < t->len; i++, len++) -+ data[len / 4] |= buf[i] << (8 * (len & 3)); -+ if (speed > t->speed_hz) -+ speed = t->speed_hz; ++ m->actual_length += t->len; + } + -+ if (WARN_ON(rx_len > 16)) { -+ status = -EIO; -+ goto msg_done; -+ } -+ -+ if (mt7621_spi_prepare(spi, speed)) { -+ status = -EIO; -+ goto msg_done; -+ } -+ -+ for (i = 0; i < len; i += 4) -+ mt7621_spi_write(rs, MT7621_SPI_DATA0 + i, data[i / 4]); -+ -+ val |= len * 8; -+ val |= (rx_len * 8) << 12; -+ mt7621_spi_write(rs, MT7621_SPI_MOREBUF, val); -+ -+ mt7621_spi_set_cs(spi, 1); -+ -+ val = mt7621_spi_read(rs, MT7621_SPI_TRANS); -+ val |= SPI_CTL_START; -+ mt7621_spi_write(rs, MT7621_SPI_TRANS, val); -+ -+ mt7621_spi_wait_till_ready(spi); -+ ++ /* Flush data and deassert CS */ ++ mt7621_spi_flush(rs); + mt7621_spi_set_cs(spi, 0); + -+ for (i = 0; i < rx_len; i += 4) -+ data[i / 4] = mt7621_spi_read(rs, MT7621_SPI_DATA4 + i); -+ -+ m->actual_length = rx_len; -+ -+ len = 0; -+ list_for_each_entry(t, &m->transfers, transfer_list) { -+ u8 *buf = t->rx_buf; -+ -+ if (!buf) -+ continue; -+ -+ for (i = 0; i < t->len; i++, len++) -+ buf[i] = data[len / 4] >> (8 * (len & 3)); -+ } -+ +msg_done: + m->status = status; + spi_finalize_current_message(master); + + return 0; +} -+#endif -+ -+static int mt7621_spi_transfer_one_message(struct spi_master *master, -+ struct spi_message *m) -+{ -+ struct spi_device *spi = m->spi; -+#ifdef CONFIG_SOC_MT7620 -+ int cs = spi->chip_select; -+ -+ if (cs) -+ return mt7621_spi_transfer_full_duplex(master, m); -+#endif -+ return mt7621_spi_transfer_half_duplex(master, m); -+} + +static int mt7621_spi_setup(struct spi_device *spi) +{ + struct mt7621_spi *rs = spidev_to_mt7621_spi(spi); + + if ((spi->max_speed_hz == 0) || -+ (spi->max_speed_hz > (rs->sys_freq / 2))) ++ (spi->max_speed_hz > (rs->sys_freq / 2))) + spi->max_speed_hz = (rs->sys_freq / 2); + + if (spi->max_speed_hz < (rs->sys_freq / 4097)) { @@ -433,26 +392,20 @@ Signed-off-by: John Crispin +}; +MODULE_DEVICE_TABLE(of, mt7621_spi_match); + -+static size_t mt7621_max_transfer_size(struct spi_device *spi) -+{ -+ return 32; -+} -+ +static int mt7621_spi_probe(struct platform_device *pdev) +{ + const struct of_device_id *match; -+ struct spi_master *master; ++ struct spi_controller *master; + struct mt7621_spi *rs; + void __iomem *base; + struct resource *r; + int status = 0; + struct clk *clk; -+ struct mt7621_spi_ops *ops; ++ int ret; + + match = of_match_device(mt7621_spi_match, &pdev->dev); + if (!match) + return -EINVAL; -+ ops = (struct mt7621_spi_ops *)match->data; + + r = platform_get_resource(pdev, IORESOURCE_MEM, 0); + base = devm_ioremap_resource(&pdev->dev, r); @@ -471,47 +424,47 @@ Signed-off-by: John Crispin + return status; + + master = spi_alloc_master(&pdev->dev, sizeof(*rs)); -+ if (master == NULL) { ++ if (!master) { + dev_info(&pdev->dev, "master allocation failed\n"); + return -ENOMEM; + } + -+ master->mode_bits = RT2880_SPI_MODE_BITS; -+ ++ master->mode_bits = SPI_LSB_FIRST; ++ master->flags = SPI_CONTROLLER_HALF_DUPLEX; + master->setup = mt7621_spi_setup; + master->transfer_one_message = mt7621_spi_transfer_one_message; + master->bits_per_word_mask = SPI_BPW_MASK(8); + master->dev.of_node = pdev->dev.of_node; + master->num_chipselect = 2; -+ master->max_transfer_size = mt7621_max_transfer_size; + + dev_set_drvdata(&pdev->dev, master); + -+ rs = spi_master_get_devdata(master); ++ rs = spi_controller_get_devdata(master); + rs->base = base; + rs->clk = clk; + rs->master = master; + rs->sys_freq = clk_get_rate(rs->clk); -+ rs->ops = ops; ++ rs->pending_write = 0; + dev_info(&pdev->dev, "sys_freq: %u\n", rs->sys_freq); + -+ device_reset(&pdev->dev); ++ ret = device_reset(&pdev->dev); ++ if (ret) { ++ dev_err(&pdev->dev, "SPI reset failed!\n"); ++ return ret; ++ } + -+ mt7621_spi_reset(rs, 0); -+ -+ return spi_register_master(master); ++ return devm_spi_register_controller(&pdev->dev, master); +} + +static int mt7621_spi_remove(struct platform_device *pdev) +{ -+ struct spi_master *master; ++ struct spi_controller *master; + struct mt7621_spi *rs; + + master = dev_get_drvdata(&pdev->dev); -+ rs = spi_master_get_devdata(master); ++ rs = spi_controller_get_devdata(master); + -+ clk_disable(rs->clk); -+ spi_unregister_master(master); ++ clk_disable_unprepare(rs->clk); + + return 0; +} @@ -521,7 +474,6 @@ Signed-off-by: John Crispin +static struct platform_driver mt7621_spi_driver = { + .driver = { + .name = DRIVER_NAME, -+ .owner = THIS_MODULE, + .of_match_table = mt7621_spi_match, + }, + .probe = mt7621_spi_probe, diff --git a/target/linux/ramips/patches-4.14/0048-asoc-add-mt7620-support.patch b/target/linux/ramips/patches-4.14/0048-asoc-add-mt7620-support.patch index ffbe782635..1834e88538 100644 --- a/target/linux/ramips/patches-4.14/0048-asoc-add-mt7620-support.patch +++ b/target/linux/ramips/patches-4.14/0048-asoc-add-mt7620-support.patch @@ -58,7 +58,7 @@ Signed-off-by: John Crispin obj-$(CONFIG_SND_SOC) += sirf/ --- /dev/null +++ b/sound/soc/ralink/Kconfig -@@ -0,0 +1,15 @@ +@@ -0,0 +1,8 @@ +config SND_RALINK_SOC_I2S + depends on RALINK && SND_SOC && !SOC_RT288X + select SND_SOC_GENERIC_DMAENGINE_PCM @@ -67,26 +67,15 @@ Signed-off-by: John Crispin + help + Say Y if you want to use I2S protocol and I2S codec on Ralink/MediaTek + based boards. -+ -+config SND_SOC_MT76X8_WM8960 -+ tristate "ASoC Audio driver for Ralink SoC with WM8960 codec" -+ depends on SND_RALINK_SOC_I2S && I2C -+ select SND_SOC_WM8960 -+ help -+ Say Y if you want to use WM8960 codec on Ralink/MediaTek based boards. --- /dev/null +++ b/sound/soc/ralink/Makefile -@@ -0,0 +1,10 @@ +@@ -0,0 +1,6 @@ +# +# Ralink/MediaTek Platform Support +# +snd-soc-ralink-i2s-objs := ralink-i2s.o + +obj-$(CONFIG_SND_RALINK_SOC_I2S) += snd-soc-ralink-i2s.o -+ -+snd-soc-mt76x8-wm8960-objs := mt76x8-wm8960.o -+ -+obj-$(CONFIG_SND_SOC_MT76X8_WM8960) += snd-soc-mt76x8-wm8960.o --- /dev/null +++ b/sound/soc/ralink/ralink-i2s.c @@ -0,0 +1,965 @@ @@ -1018,7 +1007,7 @@ Signed-off-by: John Crispin + if (ret) + goto err_debugfs; + -+ dev_info(i2s->dev, "mclk %luKHz\n", clk_get_rate(i2s->clk) / 1000000); ++ dev_info(i2s->dev, "mclk %luMHz\n", clk_get_rate(i2s->clk) / 1000000); + + return 0; + @@ -1055,169 +1044,3 @@ Signed-off-by: John Crispin +MODULE_DESCRIPTION("Ralink/MediaTek I2S driver"); +MODULE_LICENSE("GPL"); +MODULE_ALIAS("platform:" DRV_NAME); ---- /dev/null -+++ b/sound/soc/ralink/mt76x8-wm8960.c -@@ -0,0 +1,163 @@ -+/* -+ * mt76x8-wm8960.c -- MT76x8 WM8960 ALSA SoC machine driver -+ * -+ * Copyright 2018 Jack Chen -+ * -+ * Based on mt2701-wm8960.c -+ * Copyright (c) 2017 MediaTek Inc. -+ * Author: Ryder Lee -+ * -+ * The code contained herein is licensed under the GNU General Public -+ * License. You may obtain a copy of the GNU General Public License -+ * Version 2 or later at the following locations: -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+ -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+#include -+ -+#include "../codecs/wm8960.h" -+ -+static const struct snd_soc_dapm_widget mt76x8_wm8960_dapm_widgets[] = { -+ SND_SOC_DAPM_HP("Headphone", NULL), -+ SND_SOC_DAPM_SPK("Ext Spk", NULL), -+ SND_SOC_DAPM_LINE("Line In", NULL), -+ SND_SOC_DAPM_MIC("Mic", NULL), -+}; -+ -+static int mt76x8_wm8960_ops_hw_params(struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *params) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_dai *codec_dai = rtd->codec_dai; -+ struct snd_soc_dai *cpu_dai = rtd->cpu_dai; -+ unsigned int mclk_rate; -+ unsigned int rate = params_rate(params); -+ unsigned int div_mclk_over_bck = rate > 192000 ? 2 : 4; -+ unsigned int div_bck_over_lrck = 64; -+ -+ mclk_rate = rate * div_bck_over_lrck * div_mclk_over_bck; -+ -+ snd_soc_dai_set_sysclk(cpu_dai, 0, mclk_rate, SND_SOC_CLOCK_OUT); -+ snd_soc_dai_set_sysclk(codec_dai, 0, mclk_rate, SND_SOC_CLOCK_IN); -+ -+ return 0; -+} -+ -+static struct snd_soc_ops mt76x8_wm8960_ops = { -+ .hw_params = mt76x8_wm8960_ops_hw_params, -+}; -+ -+static struct snd_soc_dai_link mt76x8_wm8960_dai_links[] = { -+ { -+ .name = "wm8960-codec", -+ .stream_name = "wm8960-hifi", -+ .cpu_dai_name = "ralink-i2s", -+ .codec_dai_name = "wm8960-hifi", -+ .dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_CBS_CFS, -+ .ops = &mt76x8_wm8960_ops, -+ .dpcm_playback = 1, -+ .dpcm_capture = 1, -+ }, -+}; -+ -+static struct snd_soc_card mt76x8_wm8960_card = { -+ .name = "MT76x8 WM8960 ASoC Card", -+ .owner = THIS_MODULE, -+ .dai_link = mt76x8_wm8960_dai_links, -+ .num_links = ARRAY_SIZE(mt76x8_wm8960_dai_links), -+ .dapm_widgets = mt76x8_wm8960_dapm_widgets, -+ .num_dapm_widgets = ARRAY_SIZE(mt76x8_wm8960_dapm_widgets), -+}; -+ -+static int mt76x8_wm8960_machine_probe(struct platform_device *pdev) -+{ -+ struct snd_soc_card *card = &mt76x8_wm8960_card; -+ struct device_node *platform_node, *codec_node; -+ struct platform_device *platform_dev; -+ struct i2c_client *codec_dev; -+ int ret, i; -+ -+ platform_node = of_parse_phandle(pdev->dev.of_node, "mediatek,platform", 0); -+ if (!platform_node) { -+ dev_err(&pdev->dev, "property 'platform' missing or invalid\n"); -+ return -EINVAL; -+ } -+ platform_dev = of_find_device_by_node(platform_node); -+ if (!platform_dev) { -+ dev_err(&pdev->dev, "failed to find platform device\n"); -+ return -EINVAL; -+ } -+ for (i=0; inum_links; i++) { -+ if (mt76x8_wm8960_dai_links[i].platform_name) { -+ continue; -+ } -+ mt76x8_wm8960_dai_links[i].platform_of_node = platform_node; -+ } -+ -+ card->dev = &pdev->dev; -+ -+ codec_node = of_parse_phandle(pdev->dev.of_node, "mediatek,audio-codec", 0); -+ if (!codec_node) { -+ dev_err(&pdev->dev, "property 'audio-codec' missing or invalid\n"); -+ return -EINVAL; -+ } -+ codec_dev = of_find_i2c_device_by_node(codec_node); -+ if (!codec_dev || !codec_dev->dev.driver) { -+ dev_err(&pdev->dev, "failed to find audio codec device\n"); -+ return -EINVAL; -+ } -+ for (i=0; inum_links; i++) { -+ if (mt76x8_wm8960_dai_links[i].codec_name) { -+ continue; -+ } -+ mt76x8_wm8960_dai_links[i].codec_of_node = codec_node; -+ } -+ -+ ret = snd_soc_of_parse_audio_routing(card, "audio-routing"); -+ if (ret) { -+ dev_err(&pdev->dev, "failed to parse audio-routing: %d\n", ret); -+ return ret; -+ } -+ -+ ret = devm_snd_soc_register_card(&pdev->dev, card); -+ if (ret) { -+ dev_err(&pdev->dev, "%s snd_soc_register_card fail %d\n", __func__, ret); -+ } -+ -+ return ret; -+} -+ -+#ifdef CONFIG_OF -+static const struct of_device_id mt76x8_wm8960_machine_dt_match[] = { -+ {.compatible = "mediatek,mt76x8-wm8960-machine"}, -+ {} -+}; -+#endif -+ -+static struct platform_driver mt76x8_wm8960_machine = { -+ .driver = { -+ .name = "mt76x8-wm8960", -+ .owner = THIS_MODULE, -+#ifdef CONFIG_OF -+ .of_match_table = mt76x8_wm8960_machine_dt_match, -+#endif -+ }, -+ .probe = mt76x8_wm8960_machine_probe, -+}; -+ -+module_platform_driver(mt76x8_wm8960_machine); -+ -+/* Module information */ -+MODULE_DESCRIPTION("MT76x8 WM8960 ALSA SoC machine driver"); -+MODULE_AUTHOR("Jack Chen "); -+MODULE_LICENSE("GPL v2"); -+MODULE_ALIAS("MT76x8 WM8960 ASoC driver"); diff --git a/target/linux/ramips/patches-4.14/0100-prom_fixes.patch b/target/linux/ramips/patches-4.14/0100-prom_fixes.patch deleted file mode 100644 index 91ac3b22c4..0000000000 --- a/target/linux/ramips/patches-4.14/0100-prom_fixes.patch +++ /dev/null @@ -1,66 +0,0 @@ -From 67b7bff0fd364c194e653f69baa623ba2141bd4c Mon Sep 17 00:00:00 2001 -From: John Crispin -Date: Mon, 4 Aug 2014 18:46:02 +0200 -Subject: [PATCH 07/53] MIPS: ralink: copy the commandline from the devicetree - -Signed-off-by: John Crispin ---- - arch/mips/ralink/of.c | 2 ++ - 1 file changed, 2 insertions(+) - ---- a/arch/mips/ralink/of.c -+++ b/arch/mips/ralink/of.c -@@ -3,7 +3,7 @@ - * under the terms of the GNU General Public License version 2 as published - * by the Free Software Foundation. - * -- * Copyright (C) 2008 Imre Kaloz -+ * Copyright (C) 2008-2014 Imre Kaloz - * Copyright (C) 2008-2009 Gabor Juhos - * Copyright (C) 2013 John Crispin - */ -@@ -66,6 +66,19 @@ static int __init early_init_dt_find_mem - return 0; - } - -+static int chosen_dtb; -+ -+static int __init early_init_dt_find_chosen(unsigned long node, const char *uname, -+ int depth, void *data) -+{ -+ if (depth == 1 && !strcmp(uname, "chosen")) -+ chosen_dtb = 1; -+ -+ return 0; -+} -+ -+extern struct boot_param_header __image_dtb; -+ - void __init plat_mem_setup(void) - { - void *dtb = NULL; -@@ -82,7 +95,11 @@ void __init plat_mem_setup(void) - else if (__dtb_start != __dtb_end) - dtb = (void *)__dtb_start; - -- __dt_setup_arch(dtb); -+ __dt_setup_arch(&__image_dtb); -+ -+ of_scan_flat_dt(early_init_dt_find_chosen, NULL); -+ if (chosen_dtb) -+ strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE); - - strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE); - ---- a/arch/mips/kernel/head.S -+++ b/arch/mips/kernel/head.S -@@ -85,6 +85,9 @@ EXPORT(__image_cmdline) - .fill 0x400 - #endif /* CONFIG_IMAGE_CMDLINE_HACK */ - -+ .ascii "OWRTDTB:" -+ EXPORT(__image_dtb) -+ .fill 0x4000 - __REF - - NESTED(kernel_entry, 16, sp) # kernel entry point diff --git a/target/linux/ramips/patches-4.14/105-mt7621-memory-detect.patch b/target/linux/ramips/patches-4.14/105-mt7621-memory-detect.patch index b19b57fd66..13e14f5079 100644 --- a/target/linux/ramips/patches-4.14/105-mt7621-memory-detect.patch +++ b/target/linux/ramips/patches-4.14/105-mt7621-memory-detect.patch @@ -114,7 +114,7 @@ Signed-off-by: Chuanhong Guo --- a/arch/mips/ralink/of.c +++ b/arch/mips/ralink/of.c -@@ -89,6 +89,8 @@ void __init plat_mem_setup(void) +@@ -106,6 +106,8 @@ void __init plat_mem_setup(void) of_scan_flat_dt(early_init_dt_find_memory, NULL); if (memory_dtb) of_scan_flat_dt(early_init_dt_scan_memory, NULL); diff --git a/target/linux/ramips/patches-4.14/300-mt7620-export-chip-version-and-pkg.patch b/target/linux/ramips/patches-4.14/300-mt7620-export-chip-version-and-pkg.patch new file mode 100644 index 0000000000..0cb1fede30 --- /dev/null +++ b/target/linux/ramips/patches-4.14/300-mt7620-export-chip-version-and-pkg.patch @@ -0,0 +1,19 @@ +--- a/arch/mips/include/asm/mach-ralink/mt7620.h ++++ b/arch/mips/include/asm/mach-ralink/mt7620.h +@@ -137,4 +137,16 @@ static inline int mt7620_get_eco(void) + return rt_sysc_r32(SYSC_REG_CHIP_REV) & CHIP_REV_ECO_MASK; + } + ++static inline int mt7620_get_chipver(void) ++{ ++ return (rt_sysc_r32(SYSC_REG_CHIP_REV) >> CHIP_REV_VER_SHIFT) & ++ CHIP_REV_VER_MASK; ++} ++ ++static inline int mt7620_get_pkg(void) ++{ ++ return (rt_sysc_r32(SYSC_REG_CHIP_REV) >> CHIP_REV_PKG_SHIFT) & ++ CHIP_REV_PKG_MASK; ++} ++ + #endif diff --git a/target/linux/ramips/patches-4.14/304-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch b/target/linux/ramips/patches-4.14/304-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch new file mode 100644 index 0000000000..c8febaf73f --- /dev/null +++ b/target/linux/ramips/patches-4.14/304-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch @@ -0,0 +1,72 @@ +This hack can be dropped after the next stable release from +v5.x-tree. + +The problem was fixed upstream by + +commit 2bffa65da43e ("mtd: spi-nor: Add a post BFPT fixup for MX25L25635E") + +For reference see: + + +--- a/drivers/mtd/spi-nor/spi-nor.c ++++ b/drivers/mtd/spi-nor/spi-nor.c +@@ -1098,6 +1098,7 @@ static const struct flash_info spi_nor_i + { "mx25l12805d", INFO(0xc22018, 0, 64 * 1024, 256, 0) }, + { "mx25l12855e", INFO(0xc22618, 0, 64 * 1024, 256, 0) }, + { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) }, ++ { "mx25l25635f", INFO(0xc22019, 0, 64 * 1024, 512, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, + { "mx25u25635f", INFO(0xc22539, 0, 64 * 1024, 512, SECT_4K | SPI_NOR_4B_OPCODES) }, + { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) }, + { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ | SPI_NOR_4B_OPCODES) }, +@@ -1267,11 +1268,12 @@ static const struct flash_info spi_nor_i + { }, + }; + +-static const struct flash_info *spi_nor_read_id(struct spi_nor *nor) ++static const struct flash_info *spi_nor_read_id(struct spi_nor *nor, ++ const char *name) + { + int tmp; + u8 id[SPI_NOR_MAX_ID_LEN]; +- const struct flash_info *info; ++ const struct flash_info *info, *first_match = NULL; + + tmp = nor->read_reg(nor, SPINOR_OP_RDID, id, SPI_NOR_MAX_ID_LEN); + if (tmp < 0) { +@@ -1282,10 +1284,16 @@ static const struct flash_info *spi_nor_ + for (tmp = 0; tmp < ARRAY_SIZE(spi_nor_ids) - 1; tmp++) { + info = &spi_nor_ids[tmp]; + if (info->id_len) { +- if (!memcmp(info->id, id, info->id_len)) +- return &spi_nor_ids[tmp]; ++ if (!memcmp(info->id, id, info->id_len)) { ++ if (!name || !strcmp(name, info->name)) ++ return info; ++ if (!first_match) ++ first_match = info; ++ } + } + } ++ if (first_match) ++ return first_match; + dev_err(nor->dev, "unrecognized JEDEC id bytes: %02x, %02x, %02x\n", + id[0], id[1], id[2]); + return ERR_PTR(-ENODEV); +@@ -2765,7 +2773,7 @@ int spi_nor_scan(struct spi_nor *nor, co + info = spi_nor_match_id(name); + /* Try to auto-detect if chip name wasn't specified or not found */ + if (!info) +- info = spi_nor_read_id(nor); ++ info = spi_nor_read_id(nor, NULL); + if (IS_ERR_OR_NULL(info)) + return -ENOENT; + +@@ -2776,7 +2784,7 @@ int spi_nor_scan(struct spi_nor *nor, co + if (name && info->id_len) { + const struct flash_info *jinfo; + +- jinfo = spi_nor_read_id(nor); ++ jinfo = spi_nor_read_id(nor, name); + if (IS_ERR(jinfo)) { + return PTR_ERR(jinfo); + } else if (jinfo != info) { diff --git a/target/linux/ramips/patches-4.14/999-fix-m25p-shutdown.patch b/target/linux/ramips/patches-4.14/999-fix-m25p-shutdown.patch deleted file mode 100644 index 0b825d61e0..0000000000 --- a/target/linux/ramips/patches-4.14/999-fix-m25p-shutdown.patch +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c -index 24e1ea3..b1ff69a 100644 ---- a/drivers/mtd/devices/m25p80.c -+++ b/drivers/mtd/devices/m25p80.c -@@ -313,6 +313,21 @@ static int m25p_remove(struct spi_device *spi) - return mtd_device_unregister(&flash->spi_nor.mtd); - } - -+static void m25p_shutdown(struct spi_device *spi) -+{ -+ struct m25p *flash = spi_get_drvdata(spi); -+ -+ if ((&flash->spi_nor)->addr_width > 3) { -+ printk(KERN_INFO "m25p80: exit 4-byte address mode\n"); -+ flash->command[0] = SPINOR_OP_EX4B; // exit 4-byte address mode: 0xe9 -+ spi_write(flash->spi, flash->command, 1); -+ flash->command[0] = 0x66; // enable reset -+ spi_write(flash->spi, flash->command, 1); -+ flash->command[0] = 0x99; // reset -+ spi_write(flash->spi, flash->command, 1); -+ } -+} -+ - /* - * Do NOT add to this array without reading the following: - * -@@ -387,6 +402,7 @@ static struct spi_driver m25p80_driver = { - .id_table = m25p_ids, - .probe = m25p_probe, - .remove = m25p_remove, -+ .shutdown = m25p_shutdown, - - /* REVISIT: many of these chips have deep power-down modes, which - * should clearly be entered on suspend() to minimize power use. diff --git a/target/linux/ramips/rt288x/config-4.14 b/target/linux/ramips/rt288x/config-4.14 index de4dffe885..cbeca7fd1c 100644 --- a/target/linux/ramips/rt288x/config-4.14 +++ b/target/linux/ramips/rt288x/config-4.14 @@ -75,6 +75,7 @@ CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set # CONFIG_HAVE_ARCH_BITREVERSE is not set +CONFIG_HAVE_ARCH_COMPILER_H=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y @@ -122,9 +123,11 @@ CONFIG_IRQ_WORK=y CONFIG_LIBFDT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y +CONFIG_MIGRATION=y CONFIG_MIPS=y CONFIG_MIPS_ASID_BITS=8 CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CBPF_JIT=y CONFIG_MIPS_CLOCK_VSYSCALL=y # CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set # CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set @@ -144,7 +147,6 @@ CONFIG_MTD_CMDLINE_PARTS=y CONFIG_MTD_M25P80=y CONFIG_MTD_PHYSMAP=y CONFIG_MTD_SPI_NOR=y -CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_LZMA_FW=y CONFIG_MTD_SPLIT_UIMAGE_FW=y CONFIG_MTD_SPLIT_WRGG_FW=y diff --git a/target/linux/ramips/rt305x/config-4.14 b/target/linux/ramips/rt305x/config-4.14 index 346a8a8814..76e875dbe8 100644 --- a/target/linux/ramips/rt305x/config-4.14 +++ b/target/linux/ramips/rt305x/config-4.14 @@ -5,20 +5,26 @@ CONFIG_ARCH_HAS_ELF_RANDOMIZE=y # CONFIG_ARCH_HAS_GCOV_PROFILE_ALL is not set CONFIG_ARCH_HAS_RESET_CONTROLLER=y # CONFIG_ARCH_HAS_SG_CHAIN is not set +# CONFIG_ARCH_HAS_STRICT_KERNEL_RWX is not set +# CONFIG_ARCH_HAS_STRICT_MODULE_RWX is not set CONFIG_ARCH_HIBERNATION_POSSIBLE=y CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y +CONFIG_ARCH_MMAP_RND_BITS_MAX=15 +CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15 +# CONFIG_ARCH_OPTIONAL_KERNEL_RWX is not set +# CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT is not set CONFIG_ARCH_SUPPORTS_UPROBES=y CONFIG_ARCH_SUSPEND_POSSIBLE=y CONFIG_ARCH_USE_BUILTIN_BSWAP=y +CONFIG_ARCH_USE_QUEUED_RWLOCKS=y +CONFIG_ARCH_USE_QUEUED_SPINLOCKS=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_CEVT_R4K=y CONFIG_CEVT_SYSTICK_QUIRK=y CONFIG_CLKDEV_LOOKUP=y CONFIG_CLKEVT_RT3352=y CONFIG_CLKSRC_MMIO=y -CONFIG_CLKSRC_OF=y -CONFIG_CLKSRC_PROBE=y CONFIG_CLONE_BACKWARDS=y CONFIG_CMDLINE="rootfstype=squashfs,jffs2" CONFIG_CMDLINE_BOOL=y @@ -51,8 +57,10 @@ CONFIG_FIXED_PHY=y CONFIG_GENERIC_ATOMIC64=y CONFIG_GENERIC_CLOCKEVENTS=y CONFIG_GENERIC_CMOS_UPDATE=y +CONFIG_GENERIC_CPU_AUTOPROBE=y CONFIG_GENERIC_IO=y CONFIG_GENERIC_IRQ_CHIP=y +CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y CONFIG_GENERIC_IRQ_SHOW=y CONFIG_GENERIC_PCI_IOMAP=y CONFIG_GENERIC_PHY=y @@ -62,6 +70,7 @@ CONFIG_GENERIC_TIME_VSYSCALL=y CONFIG_GPIOLIB=y CONFIG_GPIO_RALINK=y CONFIG_GPIO_SYSFS=y +# CONFIG_GRO_CELLS is not set CONFIG_HANDLE_DOMAIN_IRQ=y CONFIG_HARDWARE_WATCHPOINTS=y CONFIG_HAS_DMA=y @@ -69,6 +78,7 @@ CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set # CONFIG_HAVE_ARCH_BITREVERSE is not set +CONFIG_HAVE_ARCH_COMPILER_H=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y @@ -78,6 +88,7 @@ CONFIG_HAVE_CBPF_JIT=y CONFIG_HAVE_CC_STACKPROTECTOR=y CONFIG_HAVE_CLK=y CONFIG_HAVE_CONTEXT_TRACKING=y +CONFIG_HAVE_COPY_THREAD_TLS=y CONFIG_HAVE_C_RECORDMCOUNT=y CONFIG_HAVE_DEBUG_KMEMLEAK=y CONFIG_HAVE_DEBUG_STACKOVERFLOW=y @@ -111,10 +122,14 @@ CONFIG_IRQ_INTC=y CONFIG_IRQ_MIPS_CPU=y CONFIG_IRQ_WORK=y CONFIG_LIBFDT=y -CONFIG_MDIO_BOARDINFO=y +CONFIG_MDIO_BUS=y +CONFIG_MDIO_DEVICE=y +CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y CONFIG_MIPS=y CONFIG_MIPS_ASID_BITS=8 CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CBPF_JIT=y CONFIG_MIPS_CLOCK_VSYSCALL=y # CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set # CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set @@ -124,8 +139,8 @@ CONFIG_MIPS_CMDLINE_FROM_DTB=y # CONFIG_MIPS_HUGE_TLB_SUPPORT is not set CONFIG_MIPS_L1_CACHE_SHIFT=5 # CONFIG_MIPS_MACHINE is not set -CONFIG_MIPS_NO_APPENDED_DTB=y -# CONFIG_MIPS_RAW_APPENDED_DTB is not set +# CONFIG_MIPS_NO_APPENDED_DTB is not set +CONFIG_MIPS_RAW_APPENDED_DTB=y CONFIG_MIPS_SPRAM=y CONFIG_MODULES_USE_ELF_REL=y # CONFIG_MTD_CFI_INTELEXT is not set @@ -135,7 +150,6 @@ CONFIG_MTD_PHYSMAP=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT=16384 -CONFIG_MTD_SPLIT_FIRMWARE=y CONFIG_MTD_SPLIT_JIMAGE_FW=y CONFIG_MTD_SPLIT_SEAMA_FW=y CONFIG_MTD_SPLIT_UIMAGE_FW=y @@ -166,7 +180,10 @@ CONFIG_PINCTRL_RT2880=y CONFIG_RALINK=y # CONFIG_RALINK_ILL_ACC is not set CONFIG_RALINK_WDT=y +# CONFIG_RCU_NEED_SEGCBLIST is not set # CONFIG_RCU_STALL_COMMON is not set +CONFIG_REGMAP=y +CONFIG_REGMAP_MMIO=y CONFIG_RESET_CONTROLLER=y # CONFIG_SCHED_INFO is not set # CONFIG_SCSI_DMA is not set @@ -194,6 +211,9 @@ CONFIG_SYS_SUPPORTS_ARBIT_HZ=y CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y CONFIG_SYS_SUPPORTS_MIPS16=y CONFIG_TICK_CPU_ACCOUNTING=y +CONFIG_TIMER_OF=y +CONFIG_TIMER_PROBE=y +CONFIG_TINY_SRCU=y CONFIG_USB_SUPPORT=y CONFIG_USE_OF=y CONFIG_WATCHDOG_CORE=y diff --git a/target/linux/ramips/rt3883/config-4.14 b/target/linux/ramips/rt3883/config-4.14 index 93d803e2ed..4583ec534f 100644 --- a/target/linux/ramips/rt3883/config-4.14 +++ b/target/linux/ramips/rt3883/config-4.14 @@ -79,6 +79,7 @@ CONFIG_HAS_IOMEM=y CONFIG_HAS_IOPORT_MAP=y # CONFIG_HAVE_64BIT_ALIGNED_ACCESS is not set # CONFIG_HAVE_ARCH_BITREVERSE is not set +CONFIG_HAVE_ARCH_COMPILER_H=y CONFIG_HAVE_ARCH_JUMP_LABEL=y CONFIG_HAVE_ARCH_KGDB=y CONFIG_HAVE_ARCH_SECCOMP_FILTER=y @@ -126,9 +127,11 @@ CONFIG_LIBFDT=y CONFIG_MDIO_BUS=y CONFIG_MDIO_DEVICE=y CONFIG_MFD_SYSCON=y +CONFIG_MIGRATION=y CONFIG_MIPS=y CONFIG_MIPS_ASID_BITS=8 CONFIG_MIPS_ASID_SHIFT=0 +CONFIG_MIPS_CBPF_JIT=y CONFIG_MIPS_CLOCK_VSYSCALL=y # CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set # CONFIG_MIPS_CMDLINE_DTB_EXTEND is not set @@ -138,8 +141,8 @@ CONFIG_MIPS_CMDLINE_FROM_DTB=y # CONFIG_MIPS_HUGE_TLB_SUPPORT is not set CONFIG_MIPS_L1_CACHE_SHIFT=5 # CONFIG_MIPS_MACHINE is not set -CONFIG_MIPS_NO_APPENDED_DTB=y -# CONFIG_MIPS_RAW_APPENDED_DTB is not set +# CONFIG_MIPS_NO_APPENDED_DTB is not set +CONFIG_MIPS_RAW_APPENDED_DTB=y CONFIG_MIPS_SPRAM=y CONFIG_MODULES_USE_ELF_REL=y # CONFIG_MTD_CFI_INTELEXT is not set @@ -149,8 +152,6 @@ CONFIG_MTD_PHYSMAP=y CONFIG_MTD_SPI_NOR=y CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y CONFIG_MTD_SPI_NOR_USE_4K_SECTORS_LIMIT=16384 -CONFIG_MTD_SPLIT_FIRMWARE=y -CONFIG_MTD_SPLIT_JIMAGE_FW=y CONFIG_MTD_SPLIT_SEAMA_FW=y CONFIG_MTD_SPLIT_UIMAGE_FW=y CONFIG_NEED_DMA_MAP_STATE=y