From 1933bc8bfaf05fc151506d3e16198f314d0a42fd Mon Sep 17 00:00:00 2001 From: coolsnowwolf Date: Mon, 15 Apr 2019 22:12:35 +0800 Subject: [PATCH] Revert "ramips: sync with upsteam target" This reverts commit 9cd0dc0dc996f6c49ea6307caeab6625e5184a00. --- .../ramips/base-files/etc/board.d/01_leds | 55 +- .../ramips/base-files/etc/board.d/02_network | 72 +-- .../base-files/etc/board.d/03_gpio_switches | 7 - .../etc/hotplug.d/firmware/10-rt2x00-eeprom | 5 +- .../base-files/etc/init.d/set-irq-affinity | 31 -- target/linux/ramips/base-files/lib/ramips.sh | 12 + .../ramips/base-files/lib/upgrade/platform.sh | 12 +- target/linux/ramips/dts/11ACNAS.dts | 2 +- target/linux/ramips/dts/3G-6200N.dts | 6 +- target/linux/ramips/dts/3G-6200NL.dts | 6 +- target/linux/ramips/dts/3G150B.dts | 4 +- target/linux/ramips/dts/3G300M.dts | 4 +- target/linux/ramips/dts/A5-V11.dts | 4 +- target/linux/ramips/dts/AC1200RM.dts | 4 +- target/linux/ramips/dts/AI-BR100.dts | 4 +- target/linux/ramips/dts/AIR3GII.dts | 4 +- target/linux/ramips/dts/ALL0256N.dtsi | 4 +- target/linux/ramips/dts/ALL5002.dts | 2 +- target/linux/ramips/dts/ALL5003.dts | 2 +- target/linux/ramips/dts/AP-MT7621A-V60.dts | 1 + target/linux/ramips/dts/AR670W.dts | 5 +- target/linux/ramips/dts/AR725W.dts | 4 +- target/linux/ramips/dts/ASL26555.dtsi | 4 +- target/linux/ramips/dts/ATP-52B.dts | 4 +- target/linux/ramips/dts/AWAPN2403.dts | 4 +- target/linux/ramips/dts/AWM002-EVB.dtsi | 4 +- target/linux/ramips/dts/AWUSFREE1.dts | 5 +- target/linux/ramips/dts/ArcherC2-v1.dts | 4 +- target/linux/ramips/dts/ArcherC20i.dts | 4 +- target/linux/ramips/dts/ArcherC20v1.dts | 4 +- target/linux/ramips/dts/ArcherC20v4.dts | 4 +- target/linux/ramips/dts/ArcherC50.dts | 4 +- target/linux/ramips/dts/ArcherC50V3.dts | 4 +- target/linux/ramips/dts/ArcherC50V4.dts | 99 ---- target/linux/ramips/dts/ArcherMR200.dts | 4 +- target/linux/ramips/dts/BC2.dts | 4 +- target/linux/ramips/dts/BDCOM-WAP2100-SK.dts | 4 +- target/linux/ramips/dts/BOCCO.dts | 2 +- target/linux/ramips/dts/BR-6475ND.dts | 6 +- target/linux/ramips/dts/BR-6478AC-V2.dts | 6 +- target/linux/ramips/dts/BROADWAY.dts | 4 +- target/linux/ramips/dts/C108.dts | 4 +- target/linux/ramips/dts/CF-WR800N.dts | 4 +- target/linux/ramips/dts/CS-QR10.dts | 4 +- target/linux/ramips/dts/CY-SWR1100.dts | 4 +- target/linux/ramips/dts/D105.dts | 4 +- target/linux/ramips/dts/D240.dts | 4 +- target/linux/ramips/dts/DAP-1350.dts | 4 +- target/linux/ramips/dts/DAP-1522-A1.dts | 5 +- target/linux/ramips/dts/DB-WRT01.dts | 4 +- target/linux/ramips/dts/DCH-M225.dts | 4 +- target/linux/ramips/dts/DCS-930.dts | 4 +- target/linux/ramips/dts/DCS-930L-B1.dts | 4 +- target/linux/ramips/dts/DIR-300-B1.dts | 4 +- target/linux/ramips/dts/DIR-300-B7.dts | 4 +- target/linux/ramips/dts/DIR-320-B1.dts | 4 +- target/linux/ramips/dts/DIR-510L.dts | 142 ------ target/linux/ramips/dts/DIR-600-B1.dts | 4 +- target/linux/ramips/dts/DIR-610-A1.dts | 4 +- target/linux/ramips/dts/DIR-615-D.dts | 4 +- target/linux/ramips/dts/DIR-615-H1.dts | 4 +- target/linux/ramips/dts/DIR-620-A1.dts | 4 +- target/linux/ramips/dts/DIR-620-D1.dts | 4 +- target/linux/ramips/dts/DIR-645.dts | 4 +- target/linux/ramips/dts/DIR-810L.dts | 4 +- target/linux/ramips/dts/DIR-860L-B1.dts | 5 +- target/linux/ramips/dts/DUZUN-DM06.dts | 3 +- target/linux/ramips/dts/DWR-116-A1.dts | 4 +- target/linux/ramips/dts/DWR-118-A1.dts | 4 +- target/linux/ramips/dts/DWR-118-A2.dts | 4 +- target/linux/ramips/dts/DWR-512-B.dts | 4 +- target/linux/ramips/dts/DWR-921-C1.dts | 4 +- target/linux/ramips/dts/E1700.dts | 4 +- target/linux/ramips/dts/ESR-9753.dts | 4 +- target/linux/ramips/dts/EW1200.dts | 5 +- target/linux/ramips/dts/EX2700.dts | 4 +- target/linux/ramips/dts/EX3700.dts | 4 +- target/linux/ramips/dts/EX6150.dts | 248 --------- target/linux/ramips/dts/F5D8235_V1.dts | 4 +- target/linux/ramips/dts/F5D8235_V2.dts | 2 +- target/linux/ramips/dts/F7C027.dts | 4 +- target/linux/ramips/dts/F9K1109V1.dts | 71 --- target/linux/ramips/dts/F9K110x.dtsi | 112 ----- target/linux/ramips/dts/FIREWRT.dts | 5 +- target/linux/ramips/dts/FONERA20N.dts | 4 +- target/linux/ramips/dts/FREESTATION5.dts | 2 +- target/linux/ramips/dts/GB-PC1.dts | 8 +- target/linux/ramips/dts/GB-PC2.dts | 8 +- target/linux/ramips/dts/GHL-R-001.dts | 3 +- target/linux/ramips/dts/GL-MT300A.dts | 4 +- target/linux/ramips/dts/GL-MT300N-V2.dts | 5 +- target/linux/ramips/dts/GL-MT300N.dts | 4 +- target/linux/ramips/dts/GL-MT750.dts | 4 +- target/linux/ramips/dts/HC5661.dts | 2 +- target/linux/ramips/dts/HC5661A.dts | 5 +- target/linux/ramips/dts/HC5761.dts | 2 +- target/linux/ramips/dts/HC5861.dts | 9 +- target/linux/ramips/dts/HC5861B.dts | 5 +- target/linux/ramips/dts/HC5962.dts | 4 +- target/linux/ramips/dts/HC5X61.dtsi | 2 +- target/linux/ramips/dts/HG255D.dts | 4 +- target/linux/ramips/dts/HLKRM04.dts | 2 +- target/linux/ramips/dts/HPM.dts | 4 +- target/linux/ramips/dts/HT-TM02.dts | 4 +- target/linux/ramips/dts/HW550-3G.dts | 4 +- target/linux/ramips/dts/IP2202.dts | 4 +- target/linux/ramips/dts/JHR-N805R.dts | 4 +- target/linux/ramips/dts/JHR-N825R.dts | 4 +- target/linux/ramips/dts/JHR-N926R.dts | 4 +- target/linux/ramips/dts/K2G.dts | 4 +- target/linux/ramips/dts/K2P.dts | 5 +- target/linux/ramips/dts/LINKIT7688.dts | 5 +- target/linux/ramips/dts/LR-25G001.dts | 4 +- target/linux/ramips/dts/M2M.dts | 4 +- target/linux/ramips/dts/M3.dts | 4 +- target/linux/ramips/dts/M4.dtsi | 4 +- target/linux/ramips/dts/MAC1200RV2.dts | 3 +- target/linux/ramips/dts/MINIEMBPLUG.dts | 4 +- target/linux/ramips/dts/MINIEMBWIFI.dts | 4 +- target/linux/ramips/dts/MIR3G.dts | 16 +- .../linux/ramips/dts/{MIR3P.dts => MIR4.dts} | 111 ++-- target/linux/ramips/dts/MIWIFI-MINI.dts | 4 +- target/linux/ramips/dts/MIWIFI-NANO.dts | 5 +- target/linux/ramips/dts/MIWIFI-R3.dts | 175 +++++++ target/linux/ramips/dts/MLW221.dts | 4 +- target/linux/ramips/dts/MLWG2.dts | 4 +- target/linux/ramips/dts/MOFI3500-3GN.dts | 4 +- target/linux/ramips/dts/MPRA1.dts | 4 +- target/linux/ramips/dts/MPRA2.dts | 4 +- target/linux/ramips/dts/MR-102N.dts | 4 +- target/linux/ramips/dts/MT7620a.dts | 2 +- target/linux/ramips/dts/MT7620a_MT7610e.dts | 10 +- target/linux/ramips/dts/MT7620a_V22SG.dts | 2 +- target/linux/ramips/dts/MT7628.dts | 1 + target/linux/ramips/dts/MZK-750DHP.dts | 4 +- target/linux/ramips/dts/MZK-DP150N.dts | 4 +- target/linux/ramips/dts/MZK-EX300NP.dts | 4 +- target/linux/ramips/dts/MZK-EX750NP.dts | 4 +- target/linux/ramips/dts/MZK-W300NH2.dts | 4 +- target/linux/ramips/dts/MicroWRT.dts | 2 +- target/linux/ramips/dts/NA930.dts | 4 +- target/linux/ramips/dts/NBG-419N.dts | 4 +- target/linux/ramips/dts/NBG-419N2.dts | 4 +- target/linux/ramips/dts/NW718.dts | 4 +- target/linux/ramips/dts/Newifi-D1.dts | 10 +- target/linux/ramips/dts/Newifi-D2.dts | 5 +- target/linux/ramips/dts/OMEGA2.dtsi | 5 +- target/linux/ramips/dts/OY-0001.dts | 4 +- target/linux/ramips/dts/PBR-D1.dts | 5 +- target/linux/ramips/dts/PBR-M1.dts | 7 +- target/linux/ramips/dts/PSG1208.dts | 4 +- target/linux/ramips/dts/PSG1218.dtsi | 2 +- target/linux/ramips/dts/PSG1218A.dts | 2 +- target/linux/ramips/dts/PSG1218B.dts | 2 +- target/linux/ramips/dts/PSR-680W.dts | 4 +- target/linux/ramips/dts/PWH2004.dts | 4 +- target/linux/ramips/dts/PX-4885.dtsi | 4 +- target/linux/ramips/dts/R6120.dts | 42 +- target/linux/ramips/dts/R6220.dts | 4 +- target/linux/ramips/dts/R6350.dts | 4 +- target/linux/ramips/dts/RAK633.dts | 104 ---- target/linux/ramips/dts/RB750Gr3.dts | 107 ++-- target/linux/ramips/dts/RBM11G.dts | 4 +- target/linux/ramips/dts/RBM33G.dts | 4 +- target/linux/ramips/dts/RE350.dts | 5 +- target/linux/ramips/dts/RE6500.dts | 5 +- target/linux/ramips/dts/RP-N53.dts | 4 +- target/linux/ramips/dts/RT-AC51U.dts | 4 +- target/linux/ramips/dts/RT-G32-B1.dts | 2 +- target/linux/ramips/dts/RT-N10-PLUS.dts | 4 +- target/linux/ramips/dts/RT-N12-PLUS.dts | 4 +- target/linux/ramips/dts/RT-N13U.dts | 4 +- target/linux/ramips/dts/RT-N14U.dts | 4 +- target/linux/ramips/dts/RT-N15.dts | 4 +- target/linux/ramips/dts/RT-N56U.dts | 4 +- target/linux/ramips/dts/RUT5XX.dts | 4 +- target/linux/ramips/dts/SAP-G3200U3.dts | 5 +- target/linux/ramips/dts/SK-WB8.dts | 5 +- target/linux/ramips/dts/SKW92A.dts | 5 +- target/linux/ramips/dts/SL-R7205.dts | 4 +- target/linux/ramips/dts/TEW-638APB-V2.dts | 4 +- target/linux/ramips/dts/TEW-691GR.dts | 4 +- target/linux/ramips/dts/TEW-692GR.dts | 4 +- target/linux/ramips/dts/TEW-714TRU.dts | 4 +- target/linux/ramips/dts/TINY-AC.dts | 4 +- target/linux/ramips/dts/TL-MR3020V3.dts | 5 +- target/linux/ramips/dts/TL-MR3420V5.dts | 4 +- target/linux/ramips/dts/TL-WA801NDV5.dts | 4 +- target/linux/ramips/dts/TL-WR802NV4.dts | 53 -- target/linux/ramips/dts/TL-WR840NV4.dts | 4 +- target/linux/ramips/dts/TL-WR840NV5.dts | 5 +- target/linux/ramips/dts/TL-WR841NV13.dts | 4 +- target/linux/ramips/dts/TL-WR842NV5.dts | 4 +- target/linux/ramips/dts/TL-WR902ACV3.dts | 4 +- .../ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi | 89 ---- target/linux/ramips/dts/TPLINK-8M.dtsi | 1 + target/linux/ramips/dts/TUBE-E4G.dts | 190 ------- target/linux/ramips/dts/Timecloud.dts | 5 +- target/linux/ramips/dts/U25AWF-H1.dts | 4 +- target/linux/ramips/dts/U35WF.dts | 4 +- target/linux/ramips/dts/U7621-06-256M-16M.dts | 1 + target/linux/ramips/dts/U7621-06-512M-64M.dts | 1 + target/linux/ramips/dts/U7621-06.dtsi | 4 +- target/linux/ramips/dts/U7628-01-128M-16M.dts | 1 + target/linux/ramips/dts/U7628-01.dtsi | 4 +- target/linux/ramips/dts/UBNT-ER-e50.dtsi | 3 +- target/linux/ramips/dts/UR-326N4G.dts | 4 +- target/linux/ramips/dts/UR-336UN.dts | 4 +- target/linux/ramips/dts/V11STFE.dts | 4 +- target/linux/ramips/dts/V22RW-2X2.dts | 4 +- target/linux/ramips/dts/VAR11N-300.dts | 4 +- target/linux/ramips/dts/VIXMINI.dts | 114 ----- target/linux/ramips/dts/VOCORE.dtsi | 2 +- target/linux/ramips/dts/VOCORE2.dts | 3 +- target/linux/ramips/dts/VOCORE2LITE.dts | 3 +- target/linux/ramips/dts/VR500.dts | 5 +- target/linux/ramips/dts/W06.dts | 5 +- target/linux/ramips/dts/W150M.dts | 4 +- target/linux/ramips/dts/W2914NSV2.dts | 2 +- target/linux/ramips/dts/W2914NSV2.dtsi | 3 +- target/linux/ramips/dts/W306R_V20.dts | 4 +- target/linux/ramips/dts/W502U.dts | 4 +- target/linux/ramips/dts/WCR-1166DS.dts | 6 +- target/linux/ramips/dts/WCR150GN.dts | 4 +- target/linux/ramips/dts/WD03.dts | 4 +- target/linux/ramips/dts/WE1026-5G.dtsi | 4 +- target/linux/ramips/dts/WF-2881.dts | 4 +- target/linux/ramips/dts/WHR-1166D.dts | 4 +- target/linux/ramips/dts/WHR-300HP2.dts | 4 +- target/linux/ramips/dts/WHR-600D.dts | 4 +- target/linux/ramips/dts/WHR-G300N.dts | 15 +- target/linux/ramips/dts/WIDORA-NEO-16M.dts | 1 + target/linux/ramips/dts/WIDORA-NEO-32M.dts | 1 + target/linux/ramips/dts/WIDORA-NEO.dtsi | 4 +- target/linux/ramips/dts/WITI.dtsi | 3 +- target/linux/ramips/dts/WIZFI630A.dts | 4 +- target/linux/ramips/dts/WIZFI630S.dts | 193 ------- target/linux/ramips/dts/WL-330N.dts | 4 +- target/linux/ramips/dts/WL-330N3G.dts | 4 +- target/linux/ramips/dts/WL-351.dts | 4 +- target/linux/ramips/dts/WL-WN570HA1.dts | 5 +- target/linux/ramips/dts/WL-WN575A3.dts | 12 +- target/linux/ramips/dts/WLI-TX4-AG300N.dts | 4 +- target/linux/ramips/dts/WLR-6000.dts | 4 +- target/linux/ramips/dts/WMR-300.dts | 4 +- target/linux/ramips/dts/WN-AC1167GR.dts | 216 -------- target/linux/ramips/dts/WN-AC733GR3.dts | 198 -------- target/linux/ramips/dts/WN-AX1167GR.dts | 5 +- target/linux/ramips/dts/WN-GX300GR.dts | 5 +- target/linux/ramips/dts/WN3000RPV3.dts | 4 +- target/linux/ramips/dts/WNCE2001.dts | 4 +- target/linux/ramips/dts/WNDR3700V5.dts | 5 +- target/linux/ramips/dts/WR1200JS.dts | 5 +- target/linux/ramips/dts/WR1201.dts | 5 +- target/linux/ramips/dts/WR512-3GN.dtsi | 4 +- target/linux/ramips/dts/WR6202.dts | 4 +- target/linux/ramips/dts/WRC-1167GHBK2-S.dts | 5 +- target/linux/ramips/dts/WRH-300CR.dts | 4 +- target/linux/ramips/dts/WRTNODE.dts | 2 +- target/linux/ramips/dts/WRTNODE2.dtsi | 3 +- target/linux/ramips/dts/WRTNODE2P.dts | 2 +- target/linux/ramips/dts/WRTNODE2R.dts | 14 +- target/linux/ramips/dts/WSR-1166.dts | 5 +- target/linux/ramips/dts/WSR-600.dts | 5 +- target/linux/ramips/dts/WT1520.dtsi | 2 +- target/linux/ramips/dts/WT3020.dtsi | 4 +- target/linux/ramips/dts/WZR-AGL300NH.dts | 4 +- target/linux/ramips/dts/X5.dts | 4 +- target/linux/ramips/dts/X8.dts | 4 +- target/linux/ramips/dts/XDXRN502J.dts | 4 +- target/linux/ramips/dts/Y1.dts | 2 +- target/linux/ramips/dts/Y1.dtsi | 2 +- target/linux/ramips/dts/Y1S.dts | 2 +- target/linux/ramips/dts/YOUKU-YK1.dts | 9 +- target/linux/ramips/dts/YOUKU-YK2.dts | 157 ------ target/linux/ramips/dts/ZBT-APE522II.dts | 4 +- target/linux/ramips/dts/ZBT-CPE102.dts | 4 +- target/linux/ramips/dts/ZBT-WA05.dts | 4 +- target/linux/ramips/dts/ZBT-WE1226.dts | 5 +- target/linux/ramips/dts/ZBT-WE1326.dts | 3 +- target/linux/ramips/dts/ZBT-WE2026.dts | 4 +- target/linux/ramips/dts/ZBT-WE3526.dts | 3 +- target/linux/ramips/dts/ZBT-WE826.dtsi | 4 +- target/linux/ramips/dts/ZBT-WG2626.dts | 5 +- target/linux/ramips/dts/ZBT-WG3526.dtsi | 5 +- target/linux/ramips/dts/ZBT-WR8305RT.dts | 4 +- target/linux/ramips/dts/ZL5900V2.dts | 4 +- target/linux/ramips/dts/ZTE-Q7.dts | 4 +- target/linux/ramips/dts/elecom_wrc-gst.dtsi | 5 +- target/linux/ramips/dts/ki_rb.dts | 5 +- target/linux/ramips/dts/kn.dts | 4 +- target/linux/ramips/dts/kn_rc.dts | 4 +- target/linux/ramips/dts/kn_rf.dts | 4 +- target/linux/ramips/dts/kn_st.dts | 115 ----- target/linux/ramips/dts/kng_rc.dts | 4 +- target/linux/ramips/dts/mt7628an.dtsi | 1 - .../net/ethernet/mediatek/mtk_offload.c | 39 +- target/linux/ramips/image/Makefile | 2 - target/linux/ramips/image/mt7620.mk | 135 ++--- target/linux/ramips/image/mt7621.mk | 77 ++- target/linux/ramips/image/mt76x8.mk | 92 +--- target/linux/ramips/image/rt305x.mk | 7 - target/linux/ramips/image/rt3883.mk | 12 - target/linux/ramips/modules.mk | 2 +- target/linux/ramips/mt7620/config-4.14 | 1 + target/linux/ramips/mt7621/config-4.14 | 3 +- target/linux/ramips/mt76x8/config-4.14 | 3 +- .../0043-spi-add-mt7621-support.patch | 474 ++++++++++-------- .../0048-asoc-add-mt7620-support.patch | 2 +- ...0-mt7620-export-chip-version-and-pkg.patch | 19 - ...or-enable-4B-opcodes-for-mx25l25635f.patch | 72 --- .../patches-4.14/999-fix-m25p-shutdown.patch | 34 ++ target/linux/ramips/rt288x/config-4.14 | 1 + target/linux/ramips/rt305x/config-4.14 | 1 + target/linux/ramips/rt3883/config-4.14 | 2 + 315 files changed, 1345 insertions(+), 3478 deletions(-) delete mode 100755 target/linux/ramips/base-files/etc/init.d/set-irq-affinity delete mode 100644 target/linux/ramips/dts/ArcherC50V4.dts delete mode 100644 target/linux/ramips/dts/DIR-510L.dts delete mode 100644 target/linux/ramips/dts/EX6150.dts delete mode 100644 target/linux/ramips/dts/F9K1109V1.dts delete mode 100644 target/linux/ramips/dts/F9K110x.dtsi rename target/linux/ramips/dts/{MIR3P.dts => MIR4.dts} (54%) create mode 100644 target/linux/ramips/dts/MIWIFI-R3.dts delete mode 100644 target/linux/ramips/dts/RAK633.dts delete mode 100644 target/linux/ramips/dts/TL-WR802NV4.dts delete mode 100644 target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi delete mode 100644 target/linux/ramips/dts/TUBE-E4G.dts delete mode 100644 target/linux/ramips/dts/VIXMINI.dts delete mode 100644 target/linux/ramips/dts/WIZFI630S.dts delete mode 100644 target/linux/ramips/dts/WN-AC1167GR.dts delete mode 100644 target/linux/ramips/dts/WN-AC733GR3.dts delete mode 100644 target/linux/ramips/dts/YOUKU-YK2.dts delete mode 100644 target/linux/ramips/dts/kn_st.dts delete mode 100644 target/linux/ramips/patches-4.14/300-mt7620-export-chip-version-and-pkg.patch delete mode 100644 target/linux/ramips/patches-4.14/304-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch create mode 100644 target/linux/ramips/patches-4.14/999-fix-m25p-shutdown.patch 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 fa20ab0714c96c..1bdf508000e2b6 100755 --- a/target/linux/ramips/base-files/etc/board.d/01_leds +++ b/target/linux/ramips/base-files/etc/board.d/01_leds @@ -38,10 +38,6 @@ alfa-network,ac1200rm) alfa-network,awusfree1) set_wifi_led "$boardname:blue:wlan" ;; -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" @@ -64,10 +60,6 @@ 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" ;; @@ -196,11 +188,6 @@ 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" @@ -236,6 +223,16 @@ mikrotik,rbm11g) miniembplug) set_wifi_led "$boardname:red:wlan" ;; +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" @@ -256,8 +253,8 @@ mzk-ex750np) ;; 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" @@ -283,9 +280,6 @@ netgear,r6350) ucidef_set_led_netdev "wan" "wan" "$boardname:green:wan" eth0.2 set_wifi_led "$boardname:green:wifi" ;; -rakwireless,rak633) - set_wifi_led "$boardname:blue:wifi" - ;; re350-v1) ucidef_set_led_netdev "wifi2g" "Wifi 2.4G" "$boardname:blue:wifi2G" "wlan0" ucidef_set_led_netdev "wifi5g" "Wifi 5G" "$boardname:blue:wifi5G" "wlan1" @@ -347,8 +341,7 @@ 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-v4) +tplink,c50-v3) 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" @@ -399,31 +392,20 @@ wavlink,wl-wn570ha1) ucidef_set_led_rssi "wifi-high" "wifi-high" "$boardname:green:wifi-high" "wlan0" "85" "100" set_wifi_led "$boardname:green:wifi" ;; -wavlink,wl-wn575a3) +we1026-5g-16m) + ucidef_set_led_netdev "lan" "LAN" "we1026-5g:green:lan" "eth0" + set_wifi_led "we1026-5g:green:wifi" + ;; +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" ;; @@ -471,9 +453,6 @@ zyxel,keenetic-extra-ii) set_wifi_led "$boardname:green:wifi" ucidef_set_led_switch "internet" "internet" "$boardname:green:internet" "switch0" "0x01" ;; -zyxel,keenetic-start) - set_wifi_led "rt2800pci-phy0::radio" - ;; youku-yk1) set_wifi_led "$boardname:blue:air" ucidef_set_led_switch "wan" "wan" "$boardname:blue:wan" "switch0" "0x10" 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 c2646876a27c14..5811d99532683e 100755 --- a/target/linux/ramips/base-files/etc/board.d/02_network +++ b/target/linux/ramips/base-files/etc/board.d/02_network @@ -33,7 +33,6 @@ ramips_setup_interfaces() case $board in 11acnas|\ d-team,newifi-d2|\ - dir-615-h1|\ w2914nsv2|\ zbt-we2026) ucidef_add_switch "switch0" \ @@ -108,6 +107,7 @@ ramips_setup_interfaces() mtc,wr1201|\ mzk-750dhp|\ mzk-w300nh2|\ + netgear,r6120|\ nixcore-x1-8M|\ nixcore-x1-16M|\ oy-0001|\ @@ -123,14 +123,13 @@ ramips_setup_interfaces() 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-we3526|\ @@ -148,7 +147,6 @@ ramips_setup_interfaces() "0:lan" "1:lan" "2:lan" "4:wan" "6@eth0" ;; alfa-network,awusfree1|\ - alfa-network,tube-e4g|\ cs-qr10|\ d105|\ dlink,dap-1522-a1|\ @@ -163,7 +161,6 @@ ramips_setup_interfaces() ravpower,wd03|\ tama,w06|\ tplink,tl-mr3020-v3|\ - tplink,tl-wr802n-v4|\ u25awf-h1|\ wli-tx4-ag300n|\ wmdr-143n|\ @@ -180,6 +177,14 @@ 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" @@ -193,12 +198,10 @@ ramips_setup_interfaces() ;; ar670w|\ ar725w|\ - 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" \ @@ -223,14 +226,13 @@ ramips_setup_interfaces() 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|\ @@ -322,11 +324,6 @@ 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" @@ -345,10 +342,6 @@ ramips_setup_interfaces() "0:lan" "1:lan" "2:lan" "3:lan" "6t@eth0" ucidef_set_interface_wan "usb0" ;; - netgear,r6120) - ucidef_add_switch "switch0" \ - "0:lan:4" "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0" - ;; hc5761) ucidef_add_switch "switch0" \ "1:lan" "4:lan" "0:wan" "6@eth0" @@ -367,9 +360,6 @@ 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" @@ -433,32 +423,20 @@ 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) + xiaomi,miwifi-r3) ucidef_add_switch "switch0" \ - "1:lan:3" "2:lan:2" "3:lan:1" "4:wan" "6@eth0" + "1:lan" "4:lan" "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 @@ -506,10 +484,6 @@ 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) @@ -526,7 +500,6 @@ ramips_setup_macs() 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|\ @@ -561,10 +534,6 @@ 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) @@ -582,6 +551,14 @@ ramips_setup_macs() lan_mac=$(mtd_get_mac_binary factory_info 13) wan_mac=$(macaddr_add "$lan_mac" 1) ;; + mir3g) + 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|\ miwifi-mini) wan_mac=$(cat /sys/class/net/eth0/address) lan_mac=$(macaddr_setbit_la "$wan_mac") @@ -663,13 +640,6 @@ 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 80e3c4c41f0378..a847a64d6bb026 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,13 +7,6 @@ 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" - ;; -mikrotik,rb750gr3) - ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "17" - ;; ubnt-erx) ucidef_add_gpio_switch "poe_passthrough" "PoE Passthrough" "0" ;; 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 fc044c123eaf55..13a4687251e1eb 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 iflag=skip_bytes bs=$count skip=$offset count=1 2>/dev/null || \ + dd if=$mtd of=/lib/firmware/$FIRMWARE bs=1 skip=$offset count=$count 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 oflag=seek_bytes bs=6 seek=4 count=1 2>/dev/null || \ + conv=notrunc bs=1 seek=4 count=6 2>/dev/null || \ rt2x00_eeprom_die "failed to write mac address to eeprom file" } @@ -54,7 +54,6 @@ 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/set-irq-affinity b/target/linux/ramips/base-files/etc/init.d/set-irq-affinity deleted file mode 100755 index 9a3afefa5a3cbf..00000000000000 --- a/target/linux/ramips/base-files/etc/init.d/set-irq-affinity +++ /dev/null @@ -1,31 +0,0 @@ -#!/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 093303892c2fea..1bfa62d61ff31a 100755 --- a/target/linux/ramips/base-files/lib/ramips.sh +++ b/target/linux/ramips/base-files/lib/ramips.sh @@ -277,6 +277,12 @@ ramips_board_detect() { *"Mercury MAC1200R v2") name="mac1200rv2" ;; + *"Mi Router 3G") + name="mir3g" + ;; + *"Mi Router 4") + name="mir4" + ;; *"MicroWRT") name="microwrt" ;; @@ -412,6 +418,9 @@ ramips_board_detect() { *"R6220") name="r6220" ;; + *"RB750Gr3") + name="rb750gr3" + ;; *"RE350 v1") name="re350-v1" ;; @@ -580,6 +589,9 @@ 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 7372a379399316..9c65c104295b81 100755 --- a/target/linux/ramips/base-files/lib/upgrade/platform.sh +++ b/target/linux/ramips/base-files/lib/upgrade/platform.sh @@ -13,7 +13,6 @@ platform_pre_upgrade() { local board=$(board_name) case "$board" in - mikrotik,rb750gr3|\ mikrotik,rbm11g|\ mikrotik,rbm33g) [ -z "$(rootfs_type)" ] && mtd erase firmware @@ -37,18 +36,15 @@ platform_do_upgrade() { case "$board" in hc5962|\ + mir3g|\ + mir4|\ r6220|\ netgear,r6350|\ + xiaomi,miwifi-r3|\ ubnt-erx|\ - ubnt-erx-sfp|\ - xiaomi,mir3g|\ - xiaomi,mir3p) + ubnt-erx-sfp) nand_do_upgrade "$ARGV" ;; - tplink,c50-v4) - MTD_ARGS="-t romfile" - default_do_upgrade "$ARGV" - ;; *) default_do_upgrade "$ARGV" ;; diff --git a/target/linux/ramips/dts/11ACNAS.dts b/target/linux/ramips/dts/11ACNAS.dts index 2b1556696854c7..6516bb0c13a4fe 100644 --- a/target/linux/ramips/dts/11ACNAS.dts +++ b/target/linux/ramips/dts/11ACNAS.dts @@ -11,7 +11,7 @@ reg = <0x0 0x10000000>; }; - leds { + gpio-leds { compatible = "gpio-leds"; usb { diff --git a/target/linux/ramips/dts/3G-6200N.dts b/target/linux/ramips/dts/3G-6200N.dts index 38598122178f4f..d5b935e7699e25 100644 --- a/target/linux/ramips/dts/3G-6200N.dts +++ b/target/linux/ramips/dts/3G-6200N.dts @@ -52,14 +52,14 @@ }; partition@50000 { - compatible = "edimax,uimage"; + compatible = "denx,uimage"; label = "firmware"; reg = <0x50000 0x390000>; }; }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -80,7 +80,7 @@ }; }; - keys { + gpio-keys-polled { 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 7742561e508f54..dfc5574f07ebff 100644 --- a/target/linux/ramips/dts/3G-6200NL.dts +++ b/target/linux/ramips/dts/3G-6200NL.dts @@ -52,14 +52,14 @@ }; partition@50000 { - compatible = "edimax,uimage"; + compatible = "denx,uimage"; label = "firmware"; reg = <0x50000 0x390000>; }; }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_internet: internet { @@ -73,7 +73,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/3G150B.dts b/target/linux/ramips/dts/3G150B.dts index 9d136255161bd2..2e3253232ddfd1 100644 --- a/target/linux/ramips/dts/3G150B.dts +++ b/target/linux/ramips/dts/3G150B.dts @@ -16,7 +16,7 @@ led-upgrade = &led_ap; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_ap: ap { @@ -32,7 +32,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/3G300M.dts b/target/linux/ramips/dts/3G300M.dts index a463890dea566b..788eba41a3a34f 100644 --- a/target/linux/ramips/dts/3G300M.dts +++ b/target/linux/ramips/dts/3G300M.dts @@ -16,7 +16,7 @@ led-upgrade = &led_ap; }; - leds { + gpio-leds { compatible = "gpio-leds"; 3grouter { @@ -52,7 +52,7 @@ }; }; - keys { + gpio-keys-polled { 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 707963d691351f..8949a3ffe33993 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; system { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/AC1200RM.dts b/target/linux/ramips/dts/AC1200RM.dts index 388b088d927f3d..29f54be0f063db 100644 --- a/target/linux/ramips/dts/AC1200RM.dts +++ b/target/linux/ramips/dts/AC1200RM.dts @@ -50,7 +50,7 @@ bootargs = "console=ttyS0,115200"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -61,7 +61,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; wlan2g { diff --git a/target/linux/ramips/dts/AI-BR100.dts b/target/linux/ramips/dts/AI-BR100.dts index 8de4b5877adffc..b23ee9b520a00e 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; wan { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/AIR3GII.dts b/target/linux/ramips/dts/AIR3GII.dts index 111119eea42b3c..0a9dd544f4ce0c 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"; - leds { + gpio-leds { compatible = "gpio-leds"; wlan { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ALL0256N.dtsi b/target/linux/ramips/dts/ALL0256N.dtsi index d31547c33528cc..0437b96b625f09 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"; - leds { + gpio-leds { compatible = "gpio-leds"; rssilow { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ALL5002.dts b/target/linux/ramips/dts/ALL5002.dts index a604ec1511d19f..616f7424a90a8b 100644 --- a/target/linux/ramips/dts/ALL5002.dts +++ b/target/linux/ramips/dts/ALL5002.dts @@ -30,7 +30,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; ld1 { diff --git a/target/linux/ramips/dts/ALL5003.dts b/target/linux/ramips/dts/ALL5003.dts index 8a3488a7e0e0ac..050ff886e2bbc1 100644 --- a/target/linux/ramips/dts/ALL5003.dts +++ b/target/linux/ramips/dts/ALL5003.dts @@ -30,7 +30,7 @@ }; }; - leds { + gpio-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 b613c9c3710d09..bd29e0b3f27990 100644 --- a/target/linux/ramips/dts/AP-MT7621A-V60.dts +++ b/target/linux/ramips/dts/AP-MT7621A-V60.dts @@ -85,6 +85,7 @@ 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 96e4a8cbe26ed2..3ee39c1eb75ffd 100644 --- a/target/linux/ramips/dts/AR670W.dts +++ b/target/linux/ramips/dts/AR670W.dts @@ -39,14 +39,13 @@ }; partition@40000 { - compatible = "lzma"; reg = <0x40000 0x3c0000>; label = "firmware"; }; }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -60,7 +59,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; diff --git a/target/linux/ramips/dts/AR725W.dts b/target/linux/ramips/dts/AR725W.dts index 5e3782ac28292a..b143f45234009d 100644 --- a/target/linux/ramips/dts/AR725W.dts +++ b/target/linux/ramips/dts/AR725W.dts @@ -51,7 +51,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -70,7 +70,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; diff --git a/target/linux/ramips/dts/ASL26555.dtsi b/target/linux/ramips/dts/ASL26555.dtsi index d1c21f8082a5fe..860c2afee198ff 100644 --- a/target/linux/ramips/dts/ASL26555.dtsi +++ b/target/linux/ramips/dts/ASL26555.dtsi @@ -13,7 +13,7 @@ led-upgrade = &led_power_green; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -30,7 +30,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; eth { diff --git a/target/linux/ramips/dts/ATP-52B.dts b/target/linux/ramips/dts/ATP-52B.dts index 2fa5c19d04f388..9fec757cfadc9f 100644 --- a/target/linux/ramips/dts/ATP-52B.dts +++ b/target/linux/ramips/dts/ATP-52B.dts @@ -51,7 +51,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_run: run { @@ -65,7 +65,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/AWAPN2403.dts b/target/linux/ramips/dts/AWAPN2403.dts index 97f105a631d436..4d089437cbbbe9 100644 --- a/target/linux/ramips/dts/AWAPN2403.dts +++ b/target/linux/ramips/dts/AWAPN2403.dts @@ -17,7 +17,7 @@ }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wps: wps { @@ -26,7 +26,7 @@ }; }; - keys { + gpio-keys-polled { 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 384b2efec0a995..a2770d9ba52d3a 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"; - leds { + gpio-leds { compatible = "gpio-leds"; tx { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/AWUSFREE1.dts b/target/linux/ramips/dts/AWUSFREE1.dts index 4e5ce1cc7b2960..3edafb333539d6 100644 --- a/target/linux/ramips/dts/AWUSFREE1.dts +++ b/target/linux/ramips/dts/AWUSFREE1.dts @@ -52,7 +52,7 @@ bootargs = "console=ttyS0,115200"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -63,7 +63,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { @@ -129,6 +129,7 @@ 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 921a50a56cd15e..42f75dd7536243 100644 --- a/target/linux/ramips/dts/ArcherC2-v1.dts +++ b/target/linux/ramips/dts/ArcherC2-v1.dts @@ -29,7 +29,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { @@ -60,7 +60,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; reset_wps { diff --git a/target/linux/ramips/dts/ArcherC20i.dts b/target/linux/ramips/dts/ArcherC20i.dts index cf715a413f97c9..a4cd3bc5689dfe 100644 --- a/target/linux/ramips/dts/ArcherC20i.dts +++ b/target/linux/ramips/dts/ArcherC20i.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { label = "c20i:blue:lan"; @@ -39,7 +39,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; rfkill { diff --git a/target/linux/ramips/dts/ArcherC20v1.dts b/target/linux/ramips/dts/ArcherC20v1.dts index 39e33b8ff08561..31a5b830e8e9c6 100644 --- a/target/linux/ramips/dts/ArcherC20v1.dts +++ b/target/linux/ramips/dts/ArcherC20v1.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { @@ -67,7 +67,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ArcherC20v4.dts b/target/linux/ramips/dts/ArcherC20v4.dts index aaafcc52f53842..f0ae2bebaf2606 100644 --- a/target/linux/ramips/dts/ArcherC20v4.dts +++ b/target/linux/ramips/dts/ArcherC20v4.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { @@ -55,7 +55,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ArcherC50.dts b/target/linux/ramips/dts/ArcherC50.dts index b6f5bed0b71e2e..1d8bb233b673de 100644 --- a/target/linux/ramips/dts/ArcherC50.dts +++ b/target/linux/ramips/dts/ArcherC50.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { @@ -67,7 +67,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ArcherC50V3.dts b/target/linux/ramips/dts/ArcherC50V3.dts index cc4e72819f9a2b..423ac88c2bcf82 100644 --- a/target/linux/ramips/dts/ArcherC50V3.dts +++ b/target/linux/ramips/dts/ArcherC50V3.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { diff --git a/target/linux/ramips/dts/ArcherC50V4.dts b/target/linux/ramips/dts/ArcherC50V4.dts deleted file mode 100644 index 37f388620e3bf2..00000000000000 --- a/target/linux/ramips/dts/ArcherC50V4.dts +++ /dev/null @@ -1,99 +0,0 @@ -// 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 ff00dbe958416a..99f3be2e087308 100644 --- a/target/linux/ramips/dts/ArcherMR200.dts +++ b/target/linux/ramips/dts/ArcherMR200.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { @@ -74,7 +74,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys"; reset { diff --git a/target/linux/ramips/dts/BC2.dts b/target/linux/ramips/dts/BC2.dts index 324909e82fcf01..5b9cec3f4a5550 100644 --- a/target/linux/ramips/dts/BC2.dts +++ b/target/linux/ramips/dts/BC2.dts @@ -46,7 +46,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; usb { @@ -57,7 +57,7 @@ }; }; - keys { + gpio-keys-polled { 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 e71d14c6abff4e..745037de0cead3 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; usb { @@ -40,7 +40,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/BOCCO.dts b/target/linux/ramips/dts/BOCCO.dts index 6b6ac754ea1739..e4c056116177d5 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"; - keys { + gpio-keys-polled { 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 f7fb8b5c40e90c..ebb1475de76cdd 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -34,7 +34,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -88,7 +88,7 @@ }; partition@70000 { - compatible = "edimax,uimage"; + compatible = "denx,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 5c90aa15496f0a..d4304df323fe83 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"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -44,7 +44,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -122,7 +122,7 @@ }; partition@70000 { - compatible = "edimax,uimage"; + compatible = "denx,uimage"; label = "firmware"; reg = <0x00070000 0x00790000>; }; diff --git a/target/linux/ramips/dts/BROADWAY.dts b/target/linux/ramips/dts/BROADWAY.dts index 353cfbf415763a..3d4d6ef5f82f03 100644 --- a/target/linux/ramips/dts/BROADWAY.dts +++ b/target/linux/ramips/dts/BROADWAY.dts @@ -46,7 +46,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; diskmounted { @@ -62,7 +62,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/C108.dts b/target/linux/ramips/dts/C108.dts index 2d89d34ad5056e..d79e54a797ad72 100644 --- a/target/linux/ramips/dts/C108.dts +++ b/target/linux/ramips/dts/C108.dts @@ -64,7 +64,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; sdcard { @@ -93,7 +93,7 @@ }; }; - keys { + gpio-keys-polled { 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 65f44e43d7ab08..0161075ba68743 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; ethernet { @@ -39,7 +39,7 @@ }; }; - keys { + gpio-keys-polled { 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 dadd37acba6128..f58e70f53833be 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { 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 afffee2bd46520..f1c04bf6ac5ca7 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>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -85,7 +85,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wps: wps { diff --git a/target/linux/ramips/dts/D105.dts b/target/linux/ramips/dts/D105.dts index 10732cc5ec2bd4..5ba479cd2140df 100644 --- a/target/linux/ramips/dts/D105.dts +++ b/target/linux/ramips/dts/D105.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -69,7 +69,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/D240.dts b/target/linux/ramips/dts/D240.dts index 2110959ee8ae88..ade2dd16fc444a 100644 --- a/target/linux/ramips/dts/D240.dts +++ b/target/linux/ramips/dts/D240.dts @@ -70,7 +70,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -91,7 +91,7 @@ }; }; - keys { + gpio-keys-polled { 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 06d490cacc8030..c84d5b94da838f 100644 --- a/target/linux/ramips/dts/DAP-1350.dts +++ b/target/linux/ramips/dts/DAP-1350.dts @@ -63,7 +63,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power_blue: power { @@ -82,7 +82,7 @@ }; }; - keys { + gpio-keys-polled { 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 56e3990bfe4e87..bdd63ea96b808b 100644 --- a/target/linux/ramips/dts/DAP-1522-A1.dts +++ b/target/linux/ramips/dts/DAP-1522-A1.dts @@ -40,7 +40,6 @@ }; partition@40000 { - compatible = "wrg"; label = "firmware"; reg = <0x40000 0x3a0000>; }; @@ -53,7 +52,7 @@ gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -84,7 +83,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; wps { diff --git a/target/linux/ramips/dts/DB-WRT01.dts b/target/linux/ramips/dts/DB-WRT01.dts index bb2c14e0962731..27dce66e1a607e 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { 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 0644378ba29478..e8f71ae1606d5d 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -33,7 +33,7 @@ }; }; - leds { + gpio-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 1c44e28fe45791..4f49fc3a8f6f7d 100644 --- a/target/linux/ramips/dts/DCS-930.dts +++ b/target/linux/ramips/dts/DCS-930.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; wifi { @@ -72,7 +72,7 @@ }; }; - keys { + gpio-keys-polled { 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 0fff5e8b5c7aa4..6ac80e4d6cbb68 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { 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 8bc77e422d6f98..1f0ed7d8275ef3 100644 --- a/target/linux/ramips/dts/DIR-300-B1.dts +++ b/target/linux/ramips/dts/DIR-300-B1.dts @@ -53,7 +53,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,7 @@ }; }; - leds { + gpio-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 2b6af163bc55f9..3fa57ac349cc3a 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { 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 040a223986c08e..68f0108ae1546d 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -35,7 +35,7 @@ }; }; - keys { + gpio-keys-polled { 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 deleted file mode 100644 index 885e64f9f2d2aa..00000000000000 --- a/target/linux/ramips/dts/DIR-510L.dts +++ /dev/null @@ -1,142 +0,0 @@ -// 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 a77bfd717fc42c..246ee81ef6020f 100644 --- a/target/linux/ramips/dts/DIR-600-B1.dts +++ b/target/linux/ramips/dts/DIR-600-B1.dts @@ -53,7 +53,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,7 @@ }; }; - leds { + gpio-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 7a0323e219ca1f..ea58d41af97814 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { 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 5f8ea1b224be0d..fbced8d1390254 100644 --- a/target/linux/ramips/dts/DIR-615-D.dts +++ b/target/linux/ramips/dts/DIR-615-D.dts @@ -53,7 +53,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,7 @@ }; }; - leds { + gpio-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 79d4717f57bda7..c81978b7de7560 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; status { @@ -46,7 +46,7 @@ }; }; - keys { + gpio-keys-polled { 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 24fdec8ed4eeda..94f1bd6f9c7305 100644 --- a/target/linux/ramips/dts/DIR-620-A1.dts +++ b/target/linux/ramips/dts/DIR-620-A1.dts @@ -53,7 +53,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,7 @@ }; }; - leds { + gpio-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 74fd4af7536b3d..ea14b54d93fca0 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { 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 35d011ebba4fbd..ce4ed42cf188ad 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>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -40,7 +40,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; inet { diff --git a/target/linux/ramips/dts/DIR-810L.dts b/target/linux/ramips/dts/DIR-810L.dts index d728449a481f17..feecf789b82316 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power_green: power { diff --git a/target/linux/ramips/dts/DIR-860L-B1.dts b/target/linux/ramips/dts/DIR-860L-B1.dts index c212e05a20b2db..a37d68ff3b0ceb 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; power { @@ -49,7 +49,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -74,6 +74,7 @@ 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 7325e2c6996098..ff9d6398a9ea99 100644 --- a/target/linux/ramips/dts/DUZUN-DM06.dts +++ b/target/linux/ramips/dts/DUZUN-DM06.dts @@ -14,7 +14,7 @@ reg = <0x0 0x4000000>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -110,6 +110,7 @@ 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 6f76a640397fed..793f9a120a3620 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - leds { + gpio-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 4b373ececee845..ab88553a057f5a 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; wan { diff --git a/target/linux/ramips/dts/DWR-118-A2.dts b/target/linux/ramips/dts/DWR-118-A2.dts index e1d181a8748f82..25c3c1232056d9 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -31,7 +31,7 @@ }; }; - leds { + gpio-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 a08ea5d03c9d55..d865ced704b95f 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - leds { + gpio-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 92bcd54a428d2f..42687d4f0e62b2 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -31,7 +31,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; sms { diff --git a/target/linux/ramips/dts/E1700.dts b/target/linux/ramips/dts/E1700.dts index 2ea7400a71ef9e..4560e3986bd5d1 100644 --- a/target/linux/ramips/dts/E1700.dts +++ b/target/linux/ramips/dts/E1700.dts @@ -26,7 +26,7 @@ led-upgrade = &led_power; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -43,7 +43,7 @@ }; }; - leds { + gpio-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 4b55af0691ca52..0680d0dcf6e42c 100644 --- a/target/linux/ramips/dts/ESR-9753.dts +++ b/target/linux/ramips/dts/ESR-9753.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -67,7 +67,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/EW1200.dts b/target/linux/ramips/dts/EW1200.dts index def47d51990b78..6fe6a123a34252 100644 --- a/target/linux/ramips/dts/EW1200.dts +++ b/target/linux/ramips/dts/EW1200.dts @@ -31,7 +31,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -42,7 +42,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_run: run { @@ -70,6 +70,7 @@ 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 7d7b2220f773ee..66a46d7037c0d1 100644 --- a/target/linux/ramips/dts/EX2700.dts +++ b/target/linux/ramips/dts/EX2700.dts @@ -30,7 +30,7 @@ bootargs = "console=ttyS0,57600"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power_green: power_g { @@ -70,7 +70,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/EX3700.dts b/target/linux/ramips/dts/EX3700.dts index d971909b29f59e..0232ab44128ab0 100644 --- a/target/linux/ramips/dts/EX3700.dts +++ b/target/linux/ramips/dts/EX3700.dts @@ -22,7 +22,7 @@ bootargs = "console=ttyS0,57600"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power_green: power_g { @@ -62,7 +62,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/EX6150.dts b/target/linux/ramips/dts/EX6150.dts deleted file mode 100644 index a5827f270d9a2b..00000000000000 --- a/target/linux/ramips/dts/EX6150.dts +++ /dev/null @@ -1,248 +0,0 @@ -// 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 04728c582ee394..29e8f7db760e7e 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -117,7 +117,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; internet { diff --git a/target/linux/ramips/dts/F5D8235_V2.dts b/target/linux/ramips/dts/F5D8235_V2.dts index 93725e933699c7..3a0a148ef219be 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>; }; - leds { + gpio-leds { compatible = "gpio-leds"; internet { diff --git a/target/linux/ramips/dts/F7C027.dts b/target/linux/ramips/dts/F7C027.dts index f3bf00e30a32cd..aab35ce3dcbb53 100644 --- a/target/linux/ramips/dts/F7C027.dts +++ b/target/linux/ramips/dts/F7C027.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status_orange; }; - leds { + gpio-leds { compatible = "gpio-leds"; status { @@ -40,7 +40,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/F9K1109V1.dts b/target/linux/ramips/dts/F9K1109V1.dts deleted file mode 100644 index cdd2b6b7142e8b..00000000000000 --- a/target/linux/ramips/dts/F9K1109V1.dts +++ /dev/null @@ -1,71 +0,0 @@ -// 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 deleted file mode 100644 index a34c3f3600e306..00000000000000 --- a/target/linux/ramips/dts/F9K110x.dtsi +++ /dev/null @@ -1,112 +0,0 @@ -// 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 2abc01b2afa21d..82b511cdb5e83e 100644 --- a/target/linux/ramips/dts/FIREWRT.dts +++ b/target/linux/ramips/dts/FIREWRT.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -34,7 +34,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -63,6 +63,7 @@ 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 83ce17317497b3..2c8629be373f35 100644 --- a/target/linux/ramips/dts/FONERA20N.dts +++ b/target/linux/ramips/dts/FONERA20N.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; wifi { @@ -74,7 +74,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/FREESTATION5.dts b/target/linux/ramips/dts/FREESTATION5.dts index b924229a7e092e..2f9d80ecc22aef 100644 --- a/target/linux/ramips/dts/FREESTATION5.dts +++ b/target/linux/ramips/dts/FREESTATION5.dts @@ -64,7 +64,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; /* diff --git a/target/linux/ramips/dts/GB-PC1.dts b/target/linux/ramips/dts/GB-PC1.dts index e09e9f75a92696..007879a7b98bce 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"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -36,7 +36,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; system { @@ -71,8 +71,8 @@ m25p80@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; - m25p,fast-read; + spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/GB-PC2.dts b/target/linux/ramips/dts/GB-PC2.dts index dff1b3d5f7b6ba..b07613b7ab1750 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"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -36,7 +36,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; system { @@ -81,8 +81,8 @@ m25p80@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <80000000>; - m25p,fast-read; + spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; 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 59640a179c2f7b..8aef0dcce8f9ed 100644 --- a/target/linux/ramips/dts/GHL-R-001.dts +++ b/target/linux/ramips/dts/GHL-R-001.dts @@ -55,10 +55,9 @@ status = "okay"; flash@0 { - compatible = "mx25l25635f", "jedec,spi-nor"; + compatible = "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 2cea9d9beb69b1..ad23ece7ec6b66 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; wan { @@ -37,7 +37,7 @@ }; }; - keys { + gpio-keys-polled { 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 e4220736d2a8e7..23669600a98d0f 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>; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -45,7 +45,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -105,6 +105,7 @@ 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 a30792cacea90d..9d9d6274faa3b6 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; wan { @@ -32,7 +32,7 @@ }; }; - keys { + gpio-keys-polled { 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 11133a126a2f83..8e2a968e4d8e8b 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; wan { @@ -32,7 +32,7 @@ }; }; - keys { + gpio-keys-polled { 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 091483a131f70f..f070705102c666 100644 --- a/target/linux/ramips/dts/HC5661.dts +++ b/target/linux/ramips/dts/HC5661.dts @@ -13,7 +13,7 @@ led-upgrade = &led_system; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { diff --git a/target/linux/ramips/dts/HC5661A.dts b/target/linux/ramips/dts/HC5661A.dts index 25f1ff1a027e35..6dfac50618054b 100644 --- a/target/linux/ramips/dts/HC5661A.dts +++ b/target/linux/ramips/dts/HC5661A.dts @@ -25,7 +25,7 @@ reg = <0x0 0x8000000>; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { @@ -42,7 +42,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -71,6 +71,7 @@ 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 dff129a93834f0..31ed99ad09b6ae 100644 --- a/target/linux/ramips/dts/HC5761.dts +++ b/target/linux/ramips/dts/HC5761.dts @@ -13,7 +13,7 @@ led-upgrade = &led_system; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { diff --git a/target/linux/ramips/dts/HC5861.dts b/target/linux/ramips/dts/HC5861.dts index b1d5ce4fa1459a..b9a613de70d948 100644 --- a/target/linux/ramips/dts/HC5861.dts +++ b/target/linux/ramips/dts/HC5861.dts @@ -13,7 +13,7 @@ led-upgrade = &led_system; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { @@ -103,3 +103,10 @@ 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 5cc2634dcc9356..ef2d70613e72f2 100644 --- a/target/linux/ramips/dts/HC5861B.dts +++ b/target/linux/ramips/dts/HC5861B.dts @@ -25,7 +25,7 @@ reg = <0x0 0x8000000>; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { @@ -38,7 +38,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -66,6 +66,7 @@ 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 817b571d2a7a9b..298502046d45a5 100644 --- a/target/linux/ramips/dts/HC5962.dts +++ b/target/linux/ramips/dts/HC5962.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -39,7 +39,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/HC5X61.dtsi b/target/linux/ramips/dts/HC5X61.dtsi index 09b303fd337b6b..8da05adeefb155 100644 --- a/target/linux/ramips/dts/HC5X61.dtsi +++ b/target/linux/ramips/dts/HC5X61.dtsi @@ -10,7 +10,7 @@ bootargs = "console=ttyS0,115200"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/HG255D.dts b/target/linux/ramips/dts/HG255D.dts index df8a72c8cb0d23..961fd8f91fbca8 100644 --- a/target/linux/ramips/dts/HG255D.dts +++ b/target/linux/ramips/dts/HG255D.dts @@ -59,7 +59,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -95,7 +95,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <10>; diff --git a/target/linux/ramips/dts/HLKRM04.dts b/target/linux/ramips/dts/HLKRM04.dts index 7b2791fa62d036..efbd517767b330 100644 --- a/target/linux/ramips/dts/HLKRM04.dts +++ b/target/linux/ramips/dts/HLKRM04.dts @@ -37,7 +37,7 @@ }; }; - keys { + gpio-keys-polled { 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 7ccd0781444681..d27eff8b87f20a 100644 --- a/target/linux/ramips/dts/HPM.dts +++ b/target/linux/ramips/dts/HPM.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -31,7 +31,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; power { diff --git a/target/linux/ramips/dts/HT-TM02.dts b/target/linux/ramips/dts/HT-TM02.dts index 4e73c6988dd535..d6954fe652004d 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wlan: wlan { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { 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 372d18e75e2cbf..fa5c4d72affb35 100644 --- a/target/linux/ramips/dts/HW550-3G.dts +++ b/target/linux/ramips/dts/HW550-3G.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; usb { @@ -79,7 +79,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/IP2202.dts b/target/linux/ramips/dts/IP2202.dts index 31478da694e857..c9c04dc34264aa 100644 --- a/target/linux/ramips/dts/IP2202.dts +++ b/target/linux/ramips/dts/IP2202.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_run: run { @@ -67,7 +67,7 @@ }; }; - keys { + gpio-keys-polled { 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 702d779aa2d599..f633bb26e649e4 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { 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 4c0640b881a630..12c5c90f2cb76b 100644 --- a/target/linux/ramips/dts/JHR-N825R.dts +++ b/target/linux/ramips/dts/JHR-N825R.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { label = "jhr-n825r:red:power"; @@ -61,7 +61,7 @@ }; }; - keys { + gpio-keys-polled { 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 9414828594f325..5990c0652ba498 100644 --- a/target/linux/ramips/dts/JHR-N926R.dts +++ b/target/linux/ramips/dts/JHR-N926R.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; wlan1 { @@ -100,7 +100,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/K2G.dts b/target/linux/ramips/dts/K2G.dts index 4ca52297459c67..96714944f2d19f 100644 --- a/target/linux/ramips/dts/K2G.dts +++ b/target/linux/ramips/dts/K2G.dts @@ -17,7 +17,7 @@ serial0 = &uartlite; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_blue: blue { @@ -36,7 +36,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/K2P.dts b/target/linux/ramips/dts/K2P.dts index 0b330aa20e36b1..56d207c2d19dbb 100644 --- a/target/linux/ramips/dts/K2P.dts +++ b/target/linux/ramips/dts/K2P.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - leds { + gpio-leds { compatible = "gpio-leds"; stat_r { @@ -44,7 +44,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -63,6 +63,7 @@ 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 eaa75f407df3f7..23a59aef545234 100644 --- a/target/linux/ramips/dts/LINKIT7688.dts +++ b/target/linux/ramips/dts/LINKIT7688.dts @@ -35,7 +35,7 @@ status = "okay"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wifi: wifi { @@ -44,7 +44,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -104,6 +104,7 @@ 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 20974c93e25474..2584457dfa6490 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { diff --git a/target/linux/ramips/dts/M2M.dts b/target/linux/ramips/dts/M2M.dts index 122c70e21f3b31..6c251af341ba94 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wifi: wifi { @@ -34,7 +34,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/M3.dts b/target/linux/ramips/dts/M3.dts index 1c894aff1271c6..bfc1f90576ddd0 100644 --- a/target/linux/ramips/dts/M3.dts +++ b/target/linux/ramips/dts/M3.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/M4.dtsi b/target/linux/ramips/dts/M4.dtsi index df8db131e96f8d..8a9548ef44cfae 100644 --- a/target/linux/ramips/dts/M4.dtsi +++ b/target/linux/ramips/dts/M4.dtsi @@ -13,7 +13,7 @@ led-upgrade = &led_status; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -22,7 +22,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MAC1200RV2.dts b/target/linux/ramips/dts/MAC1200RV2.dts index 7d13621135c793..a260e718803de0 100644 --- a/target/linux/ramips/dts/MAC1200RV2.dts +++ b/target/linux/ramips/dts/MAC1200RV2.dts @@ -25,7 +25,7 @@ reg = <0x0 0x2000000>; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { label = "mac1200rv2:green:status"; @@ -41,6 +41,7 @@ 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 5db1ce48a161ce..ccdea8000c774f 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"; - leds { + gpio-leds { compatible = "gpio-leds"; wlan { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MINIEMBWIFI.dts b/target/linux/ramips/dts/MINIEMBWIFI.dts index 2f045c7884b47b..641b9004fd88aa 100644 --- a/target/linux/ramips/dts/MINIEMBWIFI.dts +++ b/target/linux/ramips/dts/MINIEMBWIFI.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MIR3G.dts b/target/linux/ramips/dts/MIR3G.dts index b0b63f8085c73d..40bcf884fee538 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_yellow; - led-failsafe = &led_status_red; + led-boot = &led_status_blue; + led-failsafe = &led_status_blue; led-running = &led_status_blue; - led-upgrade = &led_status_yellow; + led-upgrade = &led_status_blue; }; memory@0 { @@ -25,10 +25,10 @@ bootargs = "console=ttyS0,115200n8"; }; - leds { + gpio-leds { compatible = "gpio-leds"; - led_status_red: status_red { + status_red { label = "mir3g:red:status"; gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; }; @@ -38,7 +38,7 @@ gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; - led_status_yellow: status_yellow { + status_yellow { label = "mir3g:yellow:status"; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; @@ -59,7 +59,7 @@ }; }; - button { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,7 @@ }; }; - reg_usb_vbus: regulator { + reg_usb_vbus: reg_usb_vbus { 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/MIR4.dts similarity index 54% rename from target/linux/ramips/dts/MIR3P.dts rename to target/linux/ramips/dts/MIR4.dts index cd929e5e336199..6360c3c351d20f 100644 --- a/target/linux/ramips/dts/MIR3P.dts +++ b/target/linux/ramips/dts/MIR4.dts @@ -1,4 +1,3 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; #include "mt7621.dtsi" @@ -7,65 +6,60 @@ #include / { - compatible = "xiaomi,mir3p", "mediatek,mt7621-soc"; - model = "Xiaomi Mi Router 3 Pro"; + compatible = "xiaomi,mir4", "mediatek,mt7621-soc"; + model = "Xiaomi Mi Router 4"; aliases { - led-boot = &led_status_yellow; - led-failsafe = &led_status_red; + led-boot = &led_status_blue; + led-failsafe = &led_status_blue; led-running = &led_status_blue; - led-upgrade = &led_status_yellow; + led-upgrade = &led_status_blue; }; memory@0 { device_type = "memory"; - reg = <0x0 0x1c000000>, <0x20000000 0x04000000>; + reg = <0x0 0x8000000>; }; chosen { bootargs = "console=ttyS0,115200n8"; }; - leds { + gpio-leds { compatible = "gpio-leds"; - led_status_red: status_red { - label = "mir3p:red:status"; + status_red { + label = "mir3g:red:status"; gpios = <&gpio0 6 GPIO_ACTIVE_LOW>; }; led_status_blue: status_blue { - label = "mir3p:blue:status"; + label = "mir3g:blue:status"; gpios = <&gpio0 8 GPIO_ACTIVE_LOW>; }; - led_status_yellow: status_yellow { - label = "mir3p:yellow:status"; + status_yellow { + label = "mir3g:yellow:status"; gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; }; wan_amber { - label = "mir3p:amber:wan"; - gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; + label = "mir3g:amber:wan"; + gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; }; - lan3_amber { - label = "mir3p:amber:lan3"; - gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; + lan1_amber { + label = "mir3g:amber:lan1"; + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; }; lan2_amber { - label = "mir3p:amber:lan2"; + label = "mir3g:amber:lan2"; gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; }; - - lan1_amber { - label = "mir3p:amber:lan1"; - gpios = <&gpio0 15 GPIO_ACTIVE_LOW>; - }; }; - button { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -75,19 +69,6 @@ linux,code = ; }; }; - - reg_usb_vbus: regulator { - compatible = "regulator-fixed"; - regulator-name = "usb_vbus"; - regulator-min-microvolt = <5000000>; - regulator-max-microvolt = <5000000>; - gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>; - enable-active-high; - }; -}; - -&xhci { - vbus-supply = <®_usb_vbus>; }; &nand { @@ -100,35 +81,35 @@ partition@0 { label = "Bootloader"; - reg = <0x0 0x40000>; + reg = <0x0 0x80000>; read-only; }; - partition@40000 { + partition@80000 { label = "Config"; - reg = <0x40000 0x40000>; + reg = <0x80000 0x40000>; }; - partition@80000 { + partition@c0000 { label = "Bdata"; - reg = <0x80000 0x40000>; + reg = <0xc0000 0x40000>; read-only; }; - factory: partition@c0000 { + factory: partition@100000 { label = "Factory"; - reg = <0x0c0000 0x40000>; + reg = <0x100000 0x40000>; read-only; }; - partition@100000 { + partition@140000 { label = "crash"; - reg = <0x100000 0x40000>; + reg = <0x140000 0x40000>; }; - partition@140000 { + partition@180000 { label = "crash_syslog"; - reg = <0x140000 0x80000>; + reg = <0x180000 0x40000>; }; partition@1c0000 { @@ -137,7 +118,20 @@ read-only; }; - /* We keep stock xiaomi firmware (kernel0) here */ + /* 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>; @@ -148,9 +142,17 @@ 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 0xf580000>; + reg = <0xa00000 0x7580000>; }; }; }; @@ -161,15 +163,16 @@ &pcie0 { wifi@0,0 { - compatible = "pci14c3,7615"; + 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,7615"; + compatible = "pci14c3,7662"; reg = <0x0000 0 0 0 0>; mediatek,mtd-eeprom = <&factory 0x8000>; ieee80211-freq-limit = <5000000 6000000>; @@ -178,7 +181,7 @@ ðernet { mtd-mac-address = <&factory 0xe000>; - mediatek,portmap = "llllw"; + mediatek,portmap = "lwlll"; }; &pinctrl { diff --git a/target/linux/ramips/dts/MIWIFI-MINI.dts b/target/linux/ramips/dts/MIWIFI-MINI.dts index e8ff02f2abc99d..e9f9c9663d14cc 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_blue: blue { @@ -40,7 +40,7 @@ }; }; - keys { + gpio-keys-polled { 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 bad37e21f13fb7..6aa300a7a84429 100644 --- a/target/linux/ramips/dts/MIWIFI-NANO.dts +++ b/target/linux/ramips/dts/MIWIFI-NANO.dts @@ -25,7 +25,7 @@ reg = <0x0 0x4000000>; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_blue: status_blue { @@ -42,7 +42,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -79,6 +79,7 @@ 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/MIWIFI-R3.dts b/target/linux/ramips/dts/MIWIFI-R3.dts new file mode 100644 index 00000000000000..c535a71c6e930d --- /dev/null +++ b/target/linux/ramips/dts/MIWIFI-R3.dts @@ -0,0 +1,175 @@ +/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 815370e6fd1e8d..e7b57f58cbcd9e 100644 --- a/target/linux/ramips/dts/MLW221.dts +++ b/target/linux/ramips/dts/MLW221.dts @@ -16,7 +16,7 @@ led-upgrade = &led_system; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MLWG2.dts b/target/linux/ramips/dts/MLWG2.dts index f88af718964c37..83c1a89db66fb4 100644 --- a/target/linux/ramips/dts/MLWG2.dts +++ b/target/linux/ramips/dts/MLWG2.dts @@ -16,7 +16,7 @@ led-upgrade = &led_system; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { 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 d20f2d2703efc9..24c9eb7004d331 100644 --- a/target/linux/ramips/dts/MOFI3500-3GN.dts +++ b/target/linux/ramips/dts/MOFI3500-3GN.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; usb { @@ -79,7 +79,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MPRA1.dts b/target/linux/ramips/dts/MPRA1.dts index 328351a5507315..cb6b49ef2ed848 100644 --- a/target/linux/ramips/dts/MPRA1.dts +++ b/target/linux/ramips/dts/MPRA1.dts @@ -16,7 +16,7 @@ led-upgrade = &led_system; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MPRA2.dts b/target/linux/ramips/dts/MPRA2.dts index fedb5b061ee2e4..22c0456d08dc72 100644 --- a/target/linux/ramips/dts/MPRA2.dts +++ b/target/linux/ramips/dts/MPRA2.dts @@ -16,7 +16,7 @@ led-upgrade = &led_system; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { 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 ffb76e3bf4d081..c431ff143aec97 100644 --- a/target/linux/ramips/dts/MR-102N.dts +++ b/target/linux/ramips/dts/MR-102N.dts @@ -63,7 +63,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; usb { @@ -84,7 +84,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MT7620a.dts b/target/linux/ramips/dts/MT7620a.dts index 9166fdc57653e0..be96fa9de97268 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"; - keys { + gpio-keys-polled { 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 e0ae57a0d95508..972b48af007334 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"; - keys { + gpio-keys-polled { compatible = "gpio-keys"; poll-interval = <20>; @@ -89,11 +89,3 @@ &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 d2863ee75cf2b7..4a88445f812549 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"; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MT7628.dts b/target/linux/ramips/dts/MT7628.dts index b4afc8ce967636..313c6347531bc2 100644 --- a/target/linux/ramips/dts/MT7628.dts +++ b/target/linux/ramips/dts/MT7628.dts @@ -32,6 +32,7 @@ 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 a4a6c9b8be8936..f4376d7059f16f 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; wps { @@ -35,7 +35,7 @@ }; }; - keys { + gpio-keys-polled { 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 41fb6e06d8fc0d..ea3fc8aeb11410 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { 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 6578d952c003b6..49046fdd0d2a5d 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; wifi { @@ -50,7 +50,7 @@ }; }; - keys { + gpio-keys-polled { 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 497693d3937865..08e34723fc7d37 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -55,7 +55,7 @@ }; }; - keys { + gpio-keys-polled { 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 ab749fc43d3ecb..a001598edc04dd 100644 --- a/target/linux/ramips/dts/MZK-W300NH2.dts +++ b/target/linux/ramips/dts/MZK-W300NH2.dts @@ -59,7 +59,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -78,7 +78,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/MicroWRT.dts b/target/linux/ramips/dts/MicroWRT.dts index a010a9c6262b34..051ff8a0a60482 100644 --- a/target/linux/ramips/dts/MicroWRT.dts +++ b/target/linux/ramips/dts/MicroWRT.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/NA930.dts b/target/linux/ramips/dts/NA930.dts index 6d85914265976d..43fea5670d93d9 100644 --- a/target/linux/ramips/dts/NA930.dts +++ b/target/linux/ramips/dts/NA930.dts @@ -54,7 +54,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -77,7 +77,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; zwave { diff --git a/target/linux/ramips/dts/NBG-419N.dts b/target/linux/ramips/dts/NBG-419N.dts index 625e1616d8e1f9..2f9c48c480512a 100644 --- a/target/linux/ramips/dts/NBG-419N.dts +++ b/target/linux/ramips/dts/NBG-419N.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -67,7 +67,7 @@ }; }; - keys { + gpio-keys-polled { 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 e150eff9e80e57..58361faa1cb660 100644 --- a/target/linux/ramips/dts/NBG-419N2.dts +++ b/target/linux/ramips/dts/NBG-419N2.dts @@ -57,7 +57,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -78,7 +78,7 @@ }; }; - keys { + gpio-keys-polled { 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 61af498fd89ecb..6db2e23c8ac839 100644 --- a/target/linux/ramips/dts/NW718.dts +++ b/target/linux/ramips/dts/NW718.dts @@ -16,7 +16,7 @@ led-upgrade = &led_cpu; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_cpu: cpu { @@ -37,7 +37,7 @@ }; }; - keys { + gpio-keys-polled { 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 2c180585c92700..37383fd3d84246 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; status-red { @@ -45,7 +45,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -82,10 +82,10 @@ status = "okay"; m25p80@0 { - compatible = "mx25l25635f", "jedec,spi-nor"; + compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <25000000>; - m25p,fast-read; + spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/Newifi-D2.dts b/target/linux/ramips/dts/Newifi-D2.dts index 31fc42cde25501..447701296e7f3d 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; power-amber { @@ -66,7 +66,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -102,6 +102,7 @@ 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 e36602d6c9adf7..adde7fcdd1835a 100644 --- a/target/linux/ramips/dts/OMEGA2.dtsi +++ b/target/linux/ramips/dts/OMEGA2.dtsi @@ -17,7 +17,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; system_led: system { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -109,6 +109,7 @@ 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 6b93b8d089886d..cc656d4137f19f 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: powerled { @@ -34,7 +34,7 @@ }; }; - keys { + gpio-keys-polled { 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 6d98a4492f026b..5fe72bbc395f8c 100644 --- a/target/linux/ramips/dts/PBR-D1.dts +++ b/target/linux/ramips/dts/PBR-D1.dts @@ -29,7 +29,7 @@ reg = <0x0 0x8000000>; }; - leds { + gpio-leds { compatible = "gpio-leds"; usb { @@ -46,7 +46,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -105,6 +105,7 @@ 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 e89a7ef93f1d8d..f3b85d50aa99d0 100644 --- a/target/linux/ramips/dts/PBR-M1.dts +++ b/target/linux/ramips/dts/PBR-M1.dts @@ -37,7 +37,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; power { @@ -67,7 +67,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -118,6 +118,7 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; @@ -145,7 +146,7 @@ partition@50000 { compatible = "denx,uimage"; label = "firmware"; - reg = <0x50000 0xfb0000>; + reg = <0x50000 0x1fb0000>; }; }; }; diff --git a/target/linux/ramips/dts/PSG1208.dts b/target/linux/ramips/dts/PSG1208.dts index 564b083f822dc8..de8d11abeebdfa 100644 --- a/target/linux/ramips/dts/PSG1208.dts +++ b/target/linux/ramips/dts/PSG1208.dts @@ -16,7 +16,7 @@ led-upgrade = &led_wps; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wps: wps { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/PSG1218.dtsi b/target/linux/ramips/dts/PSG1218.dtsi index 33eabb6f780239..23f1dd753ee8a9 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"; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/PSG1218A.dts b/target/linux/ramips/dts/PSG1218A.dts index 2ae8871d891761..767070dbb52d16 100644 --- a/target/linux/ramips/dts/PSG1218A.dts +++ b/target/linux/ramips/dts/PSG1218A.dts @@ -13,7 +13,7 @@ led-upgrade = &led_blue; }; - leds { + gpio-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 f6445e8c449dce..8f735a7d9a8638 100644 --- a/target/linux/ramips/dts/PSG1218B.dts +++ b/target/linux/ramips/dts/PSG1218B.dts @@ -13,7 +13,7 @@ led-upgrade = &led_blue; }; - leds { + gpio-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 260d0a14441956..cdda066a29c95c 100644 --- a/target/linux/ramips/dts/PSR-680W.dts +++ b/target/linux/ramips/dts/PSR-680W.dts @@ -57,7 +57,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wan: wan { @@ -66,7 +66,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/PWH2004.dts b/target/linux/ramips/dts/PWH2004.dts index 3280c93afbc3ee..885589a2e38feb 100644 --- a/target/linux/ramips/dts/PWH2004.dts +++ b/target/linux/ramips/dts/PWH2004.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; wifi { @@ -67,7 +67,7 @@ }; }; - keys { + gpio-keys-polled { 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 032a89cd1a9470..cbfd2d0f3a6330 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -24,7 +24,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wifi: wifi { diff --git a/target/linux/ramips/dts/R6120.dts b/target/linux/ramips/dts/R6120.dts index d263c7824be7b5..052933b766f812 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 R6120"; + model = "Netgear AC1200 R6120"; aliases { led-boot = &led_power; @@ -21,7 +21,7 @@ reg = <0x0 0x4000000>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -32,7 +32,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { @@ -55,36 +55,23 @@ gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; }; - wan { - label = "r6120:green:wan"; + wlan5 { + label = "r6120:green:wlan5g"; gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; }; - wan_orange { - label = "r6120:orange:wan"; + wlan5_orange { + label = "r6120:orange:wlan5g"; 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", "uart1"; + "p3led_an", "p4led_an", "wdt", "wled_an"; ralink,function = "gpio"; }; }; @@ -97,6 +84,7 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; @@ -115,7 +103,7 @@ read-only; }; - partition@60000 { + nvram: partition@60000 { label = "nvram"; reg = <0x60000 0x30000>; read-only; @@ -138,12 +126,12 @@ &wmac { status = "okay"; - mtd-mac-address = <&factory 0x4>; - mediatek,mtd-eeprom = <&factory 0x0>; + mtd-mac-address = <&nvram 0x100b0>; + mediatek,mtd-eeprom = <&factory 0x20000>; }; ðernet { - mtd-mac-address = <&factory 0x4>; + mtd-mac-address = <&nvram 0x100b0>; }; &pcie { @@ -153,9 +141,9 @@ &pcie0 { wifi@0,0 { reg = <0x0000 0 0 0 0>; - mediatek,mtd-eeprom = <&factory 0x8000>; + mediatek,mtd-eeprom = <&factory 0x28000>; ieee80211-freq-limit = <5000000 6000000>; - mtd-mac-address = <&factory 0x4>; + mtd-mac-address = <&nvram 0x100b0>; mtd-mac-address-increment = <(2)>; }; }; diff --git a/target/linux/ramips/dts/R6220.dts b/target/linux/ramips/dts/R6220.dts index 335351c8259ea5..f9b27daf2a613a 100644 --- a/target/linux/ramips/dts/R6220.dts +++ b/target/linux/ramips/dts/R6220.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -56,7 +56,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/R6350.dts b/target/linux/ramips/dts/R6350.dts index e49a5decde8fcb..b3f5281542eb97 100644 --- a/target/linux/ramips/dts/R6350.dts +++ b/target/linux/ramips/dts/R6350.dts @@ -26,7 +26,7 @@ bootargs = "console=ttyS0,57600"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -52,7 +52,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/RAK633.dts b/target/linux/ramips/dts/RAK633.dts deleted file mode 100644 index ac7218510f7981..00000000000000 --- a/target/linux/ramips/dts/RAK633.dts +++ /dev/null @@ -1,104 +0,0 @@ -// 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 4a303edddb8d52..6b18cce78fbc3e 100644 --- a/target/linux/ramips/dts/RB750Gr3.dts +++ b/target/linux/ramips/dts/RB750Gr3.dts @@ -1,4 +1,3 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT /dts-v1/; #include "mt7621.dtsi" @@ -8,13 +7,13 @@ / { compatible = "mikrotik,rb750gr3", "mediatek,mt7621-soc"; - model = "MikroTik RouterBOARD 750Gr3"; + model = "MikroTik RB750Gr3"; aliases { - led-boot = &led_usr; - led-failsafe = &led_usr; - led-running = &led_usr; - led-upgrade = &led_usr; + led-boot = &led_pwr; + led-failsafe = &led_pwr; + led-running = &led_pwr; + led-upgrade = &led_pwr; }; memory@0 { @@ -23,52 +22,52 @@ }; chosen { - bootargs = "console=ttyS0,115200"; + bootargs = "console=ttyS0,57600"; }; - leds { + gpio-leds { compatible = "gpio-leds"; - pwr { + led_pwr: pwr { label = "rb750gr3:blue:pwr"; gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>; - default-state = "on"; }; - led_usr: usr { + usr { label = "rb750gr3:green:usr"; gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; mode { label = "mode"; gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; - linux,code = ; + linux,code = ; }; - reset { - label = "reset"; + res { + label = "res"; 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>; - usb_power { - gpio-export,name = "usb_power"; + buzzer { + gpio-export,name = "buzzer"; + gpio-export,output = <0>; + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>; + }; + + usb { + gpio-export,name = "usb"; gpio-export,output = <1>; gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; }; @@ -78,10 +77,11 @@ &spi0 { status = "okay"; - flash@0 { + m25p80@0 { compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <20000000>; + spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; @@ -89,62 +89,41 @@ #size-cells = <1>; partition@0 { - label = "RouterBoot"; - reg = <0x0 0x40000>; + 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; - 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@40000 { - compatible = "mikrotik,minor"; + partition@50000 { + compatible = "denx,uimage"; label = "firmware"; - reg = <0x040000 0xfc0000>; + reg = <0x50000 0xfb0000>; }; }; }; }; ðernet { - mtd-mac-address = <&hard_config 0x0010>; + mtd-mac-address = <&factory 0xe000>; mtd-mac-address-increment = <1>; }; &pinctrl { state_default: pinctrl0 { gpio { - /* via gpio7 (uart3 group) the PoE status can be read */ - ralink,group = "uart2", "uart3", "jtag", "wdt"; + ralink,group = "i2c", "uart2", "uart3", "pcie", "rgmii2", "jtag"; ralink,function = "gpio"; }; }; diff --git a/target/linux/ramips/dts/RBM11G.dts b/target/linux/ramips/dts/RBM11G.dts index ce8d7208f11af1..4c01316495844d 100644 --- a/target/linux/ramips/dts/RBM11G.dts +++ b/target/linux/ramips/dts/RBM11G.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_usr: usr { @@ -59,7 +59,7 @@ }; }; - keys { + gpio-keys-polled { 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 f40c4f733fb113..08c5ab1f3828fa 100644 --- a/target/linux/ramips/dts/RBM33G.dts +++ b/target/linux/ramips/dts/RBM33G.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_usr: usr { @@ -34,7 +34,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/RE350.dts b/target/linux/ramips/dts/RE350.dts index 5414fe147ad61b..38218b6c9742c2 100644 --- a/target/linux/ramips/dts/RE350.dts +++ b/target/linux/ramips/dts/RE350.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -64,7 +64,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -101,6 +101,7 @@ 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 de5c310608620c..830dfe25ad6484 100644 --- a/target/linux/ramips/dts/RE6500.dts +++ b/target/linux/ramips/dts/RE6500.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - leds { + gpio-leds { compatible = "gpio-leds"; wifi { @@ -39,7 +39,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -64,6 +64,7 @@ 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 2d2820ed791a91..d73e7d18405432 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"; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -38,7 +38,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; backlight { diff --git a/target/linux/ramips/dts/RT-AC51U.dts b/target/linux/ramips/dts/RT-AC51U.dts index 3e54ffdad27101..b54e5b84742662 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -37,7 +37,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/RT-G32-B1.dts b/target/linux/ramips/dts/RT-G32-B1.dts index 8f0544e7ef36dc..581941c846706f 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"; - keys { + gpio-keys-polled { 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 3b77a4ce3c6b80..eaf32ece12d6cf 100644 --- a/target/linux/ramips/dts/RT-N10-PLUS.dts +++ b/target/linux/ramips/dts/RT-N10-PLUS.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wps: wps { @@ -62,7 +62,7 @@ }; }; - keys { + gpio-keys-polled { 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 83a7b6adf0f4c5..401e403cf3c5d5 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; wan { @@ -44,7 +44,7 @@ }; }; - keys { + gpio-keys-polled { 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 c3a3d2346ffb4f..f4a8720a095d60 100644 --- a/target/linux/ramips/dts/RT-N13U.dts +++ b/target/linux/ramips/dts/RT-N13U.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -67,7 +67,7 @@ }; }; - keys { + gpio-keys-polled { 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 834eb0ddf3ec4c..10ae9c0476bda0 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; wan { @@ -47,7 +47,7 @@ }; }; - keys { + gpio-keys-polled { 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 4ed6c1ed45f931..3cc929d51e6a94 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>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -78,7 +78,7 @@ }; }; - leds { + gpio-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 9c2a32a9888feb..39f6488ac040e5 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>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -76,7 +76,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/ramips/dts/RUT5XX.dts b/target/linux/ramips/dts/RUT5XX.dts index 52638f94e6f509..a7654c60b2e32f 100644 --- a/target/linux/ramips/dts/RUT5XX.dts +++ b/target/linux/ramips/dts/RUT5XX.dts @@ -16,7 +16,7 @@ led-upgrade = &led_status; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { 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 d1d6a534b6f293..1b2078990e98c7 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; usb { @@ -29,7 +29,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -54,6 +54,7 @@ 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 9511432e1596c4..8f85c704cdecee 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wps: wps { @@ -40,7 +40,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; wps { @@ -63,6 +63,7 @@ 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 dddb794a8f69bc..5aaf3ce161bb6c 100644 --- a/target/linux/ramips/dts/SKW92A.dts +++ b/target/linux/ramips/dts/SKW92A.dts @@ -24,7 +24,7 @@ reg = <0x0 0x4000000>; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: wps { @@ -38,7 +38,7 @@ }; }; - keys { + gpio-keys { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -75,6 +75,7 @@ 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 3d8a9ec4644adb..7c3d53aea65a5b 100644 --- a/target/linux/ramips/dts/SL-R7205.dts +++ b/target/linux/ramips/dts/SL-R7205.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wifi: wifi { @@ -62,7 +62,7 @@ }; }; - keys { + gpio-keys-polled { 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 a014b328025450..bacdb0b1f1daa6 100644 --- a/target/linux/ramips/dts/TEW-638APB-V2.dts +++ b/target/linux/ramips/dts/TEW-638APB-V2.dts @@ -53,7 +53,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,7 +70,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; wps { diff --git a/target/linux/ramips/dts/TEW-691GR.dts b/target/linux/ramips/dts/TEW-691GR.dts index aeed7fbb244395..8fee29b83ae45c 100644 --- a/target/linux/ramips/dts/TEW-691GR.dts +++ b/target/linux/ramips/dts/TEW-691GR.dts @@ -52,7 +52,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -75,7 +75,7 @@ }; }; - leds { + gpio-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 03395a92dd7d85..37b841c1dcd2e1 100644 --- a/target/linux/ramips/dts/TEW-692GR.dts +++ b/target/linux/ramips/dts/TEW-692GR.dts @@ -52,7 +52,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -69,7 +69,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; wps { diff --git a/target/linux/ramips/dts/TEW-714TRU.dts b/target/linux/ramips/dts/TEW-714TRU.dts index 00e3d2df12eb1c..4969aee4b97907 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"; - leds { + gpio-leds { compatible = "gpio-leds"; usb { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { 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 e36af1dc7f1b35..d5a232124dbdce 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; usb { @@ -29,7 +29,7 @@ }; }; - keys { + gpio-keys-polled { 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 7a9ef414463e7b..aa9bcaf81c74b2 100644 --- a/target/linux/ramips/dts/TL-MR3020V3.dts +++ b/target/linux/ramips/dts/TL-MR3020V3.dts @@ -25,7 +25,7 @@ reg = <0x0 0x4000000>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -48,7 +48,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -88,6 +88,7 @@ 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 a528152d38aa85..80436b870aad07 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { diff --git a/target/linux/ramips/dts/TL-WA801NDV5.dts b/target/linux/ramips/dts/TL-WA801NDV5.dts index fb944b07efb7cb..ad9177617c9bc0 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -27,7 +27,7 @@ }; }; - leds { + gpio-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 deleted file mode 100644 index 668da700c3040a..00000000000000 --- a/target/linux/ramips/dts/TL-WR802NV4.dts +++ /dev/null @@ -1,53 +0,0 @@ -// 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 5f5bb4fa47fb25..df892a0d28ac48 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -27,7 +27,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { diff --git a/target/linux/ramips/dts/TL-WR840NV5.dts b/target/linux/ramips/dts/TL-WR840NV5.dts index 773839098bfe0d..2d9b7e5c5577e6 100644 --- a/target/linux/ramips/dts/TL-WR840NV5.dts +++ b/target/linux/ramips/dts/TL-WR840NV5.dts @@ -25,7 +25,7 @@ reg = <0x0 0x4000000>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -36,7 +36,7 @@ }; }; /* LED used is dual-color,dual lead LED */ - leds { + gpio-leds { compatible = "gpio-leds"; led_power_green: power { @@ -58,6 +58,7 @@ 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 3dea06328630af..a9a01fea2a1e1d 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - leds { + gpio-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 0610b2025071dc..9d1e399668f8e1 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -33,7 +33,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { diff --git a/target/linux/ramips/dts/TL-WR902ACV3.dts b/target/linux/ramips/dts/TL-WR902ACV3.dts index 1d634314cf1136..b7860412861af7 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -45,7 +45,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { diff --git a/target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi b/target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi deleted file mode 100644 index c62079ee56a21e..00000000000000 --- a/target/linux/ramips/dts/TPLINK-8M-SPLIT-UBOOT.dtsi +++ /dev/null @@ -1,89 +0,0 @@ -// 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 9f7f7ccd6c78c9..017f5acd6e5aec 100644 --- a/target/linux/ramips/dts/TPLINK-8M.dtsi +++ b/target/linux/ramips/dts/TPLINK-8M.dtsi @@ -18,6 +18,7 @@ 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 deleted file mode 100644 index 4097dc6140d396..00000000000000 --- a/target/linux/ramips/dts/TUBE-E4G.dts +++ /dev/null @@ -1,190 +0,0 @@ -// 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/Timecloud.dts b/target/linux/ramips/dts/Timecloud.dts index 1b8aa9d85d1648..188aef226f33f8 100644 --- a/target/linux/ramips/dts/Timecloud.dts +++ b/target/linux/ramips/dts/Timecloud.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; statw { @@ -39,7 +39,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -68,6 +68,7 @@ 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 4b4d0b63569e94..d4caa8a90d7ebf 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -27,7 +27,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wifi: wifi { diff --git a/target/linux/ramips/dts/U35WF.dts b/target/linux/ramips/dts/U35WF.dts index d058b839496d91..854c9683f8248f 100644 --- a/target/linux/ramips/dts/U35WF.dts +++ b/target/linux/ramips/dts/U35WF.dts @@ -16,7 +16,7 @@ led-upgrade = &led_wifi; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -27,7 +27,7 @@ }; }; - leds { + gpio-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 e6cc4c9205dd02..ae66bd365fdcc5 100644 --- a/target/linux/ramips/dts/U7621-06-256M-16M.dts +++ b/target/linux/ramips/dts/U7621-06-256M-16M.dts @@ -56,6 +56,7 @@ 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 d710477c1380e7..4b064b2b3bfba5 100644 --- a/target/linux/ramips/dts/U7621-06-512M-64M.dts +++ b/target/linux/ramips/dts/U7621-06-512M-64M.dts @@ -57,6 +57,7 @@ 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 301edfe6804677..2bfd4d71f4c90d 100644 --- a/target/linux/ramips/dts/U7621-06.dtsi +++ b/target/linux/ramips/dts/U7621-06.dtsi @@ -62,7 +62,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -73,7 +73,7 @@ }; }; - leds { + gpio-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 ac9fd503cab22a..7b27bfb19ca17c 100644 --- a/target/linux/ramips/dts/U7628-01-128M-16M.dts +++ b/target/linux/ramips/dts/U7628-01-128M-16M.dts @@ -53,6 +53,7 @@ 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 03da1f88f21056..3ba6b8e800deb0 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"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; reset { @@ -61,7 +61,7 @@ }; }; - leds { + gpio-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 1d54713fe678c3..b3949a39f0f8e9 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"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -95,6 +95,7 @@ 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 d67c2e0ec5febe..88cf9642775712 100644 --- a/target/linux/ramips/dts/UR-326N4G.dts +++ b/target/linux/ramips/dts/UR-326N4G.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; 3g { @@ -82,7 +82,7 @@ }; }; - keys { + gpio-keys-polled { 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 937278db92e751..2ee1a8b8713e0d 100644 --- a/target/linux/ramips/dts/UR-336UN.dts +++ b/target/linux/ramips/dts/UR-336UN.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; 3g { @@ -82,7 +82,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/V11STFE.dts b/target/linux/ramips/dts/V11STFE.dts index 5007f271bba385..a8a569a8cdfce7 100644 --- a/target/linux/ramips/dts/V11STFE.dts +++ b/target/linux/ramips/dts/V11STFE.dts @@ -52,7 +52,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -63,7 +63,7 @@ }; }; - leds { + gpio-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 df56c808192082..df0fad3b21303f 100644 --- a/target/linux/ramips/dts/V22RW-2X2.dts +++ b/target/linux/ramips/dts/V22RW-2X2.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_security: security { @@ -67,7 +67,7 @@ }; }; - keys { + gpio-keys-polled { 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 cf4b7c54a16d23..1b93231308b89f 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_system: system { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/VIXMINI.dts b/target/linux/ramips/dts/VIXMINI.dts deleted file mode 100644 index 5a52fe2a1be06f..00000000000000 --- a/target/linux/ramips/dts/VIXMINI.dts +++ /dev/null @@ -1,114 +0,0 @@ -// 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 c5c26e77c803b9..cee7e38ca8500a 100644 --- a/target/linux/ramips/dts/VOCORE.dtsi +++ b/target/linux/ramips/dts/VOCORE.dtsi @@ -138,7 +138,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { diff --git a/target/linux/ramips/dts/VOCORE2.dts b/target/linux/ramips/dts/VOCORE2.dts index a78d2cc733e054..8ecfd7737c6f9c 100644 --- a/target/linux/ramips/dts/VOCORE2.dts +++ b/target/linux/ramips/dts/VOCORE2.dts @@ -15,7 +15,7 @@ led-upgrade = &led_status; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -32,6 +32,7 @@ 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 db45a95a810559..a09fa773f93e33 100644 --- a/target/linux/ramips/dts/VOCORE2LITE.dts +++ b/target/linux/ramips/dts/VOCORE2LITE.dts @@ -15,7 +15,7 @@ led-upgrade = &led_status; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -32,6 +32,7 @@ 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 4d74f2c9ceb648..3538ef793b7cb0 100644 --- a/target/linux/ramips/dts/VR500.dts +++ b/target/linux/ramips/dts/VR500.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -34,7 +34,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -53,6 +53,7 @@ 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 55b117c19423de..8c3bbe40588676 100644 --- a/target/linux/ramips/dts/W06.dts +++ b/target/linux/ramips/dts/W06.dts @@ -14,7 +14,7 @@ reg = <0x0 0x4000000>; }; - leds { + gpio-leds { compatible = "gpio-leds"; wps { @@ -33,7 +33,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -73,6 +73,7 @@ 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 e128580ec80b92..77e835558eb966 100644 --- a/target/linux/ramips/dts/W150M.dts +++ b/target/linux/ramips/dts/W150M.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; 3grouter { @@ -87,7 +87,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/W2914NSV2.dts b/target/linux/ramips/dts/W2914NSV2.dts index bd8e809447ee2b..4c13122c115c40 100644 --- a/target/linux/ramips/dts/W2914NSV2.dts +++ b/target/linux/ramips/dts/W2914NSV2.dts @@ -10,7 +10,7 @@ reg = <0x0 0x8000000>; }; - leds { + gpio-leds { compatible = "gpio-leds"; usb { diff --git a/target/linux/ramips/dts/W2914NSV2.dtsi b/target/linux/ramips/dts/W2914NSV2.dtsi index 63cff0c10d886b..332473375b1649 100644 --- a/target/linux/ramips/dts/W2914NSV2.dtsi +++ b/target/linux/ramips/dts/W2914NSV2.dtsi @@ -10,7 +10,7 @@ bootargs = "console=ttyS0,57600"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -39,6 +39,7 @@ 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 233a6d2e460224..2e1fd77c6f4120 100644 --- a/target/linux/ramips/dts/W306R_V20.dts +++ b/target/linux/ramips/dts/W306R_V20.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_sys: sys { @@ -67,7 +67,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/W502U.dts b/target/linux/ramips/dts/W502U.dts index a53c47819b47c2..0de66af84ca045 100644 --- a/target/linux/ramips/dts/W502U.dts +++ b/target/linux/ramips/dts/W502U.dts @@ -57,7 +57,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; usb { @@ -73,7 +73,7 @@ }; }; - keys { + gpio-keys-polled { 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 602ea8c5dec912..ca715c8ba5e5a9 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -40,7 +40,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; router_o { @@ -126,6 +126,7 @@ compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; @@ -151,7 +152,6 @@ }; 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 b209676807fcca..90298bf828d34b 100644 --- a/target/linux/ramips/dts/WCR150GN.dts +++ b/target/linux/ramips/dts/WCR150GN.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; user { @@ -69,7 +69,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WD03.dts b/target/linux/ramips/dts/WD03.dts index bbb2ca3dc91bc4..c685aeaf60d317 100644 --- a/target/linux/ramips/dts/WD03.dts +++ b/target/linux/ramips/dts/WD03.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; green-wifi { @@ -28,7 +28,7 @@ }; }; - keys { + gpio-keys-polled { 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 e7e64e251a0a16..e6c4b8c1b694c7 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { label = "we1026-5g:green:lan"; @@ -63,7 +63,7 @@ }; }; - keys { + gpio-keys-polled { 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 bc9d6d72295c42..aeff06b42b444f 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; usb { @@ -41,7 +41,7 @@ }; }; - keys { + gpio-keys-polled { 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 9a6ca335a8cad2..ddfa768b94ae32 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; power { @@ -55,7 +55,7 @@ }; }; - keys { + gpio-keys-polled { 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 8a79d6ab054758..efcd65d63c8d89 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; power { @@ -55,7 +55,7 @@ }; }; - keys { + gpio-keys-polled { 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 f4b5661eac9475..c96bd6828f8fe2 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; power { @@ -55,7 +55,7 @@ }; }; - keys { + gpio-keys-polled { 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 3871b55495aa09..f9756065cd41a0 100644 --- a/target/linux/ramips/dts/WHR-G300N.dts +++ b/target/linux/ramips/dts/WHR-G300N.dts @@ -10,9 +10,10 @@ model = "Buffalo WHR-G300N"; aliases { - led-boot = &led_diag; - led-failsafe = &led_diag; - led-upgrade = &led_diag; + led-boot = &led_router; + led-failsafe = &led_router; + led-running = &led_router; + led-upgrade = &led_router; }; cfi@1f000000 { @@ -58,15 +59,15 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; - led_diag: diag { + diag { label = "whr-g300n:red:diag"; gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; }; - router { + led_router: router { label = "whr-g300n:green:router"; gpios = <&gpio0 9 GPIO_ACTIVE_LOW>; }; @@ -77,7 +78,7 @@ }; }; - keys { + gpio-keys-polled { 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 9ed6b15334395e..1c1049094dba55 100644 --- a/target/linux/ramips/dts/WIDORA-NEO-16M.dts +++ b/target/linux/ramips/dts/WIDORA-NEO-16M.dts @@ -17,6 +17,7 @@ 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 cfd6ba709cece4..a9d0b6fc6096b7 100644 --- a/target/linux/ramips/dts/WIDORA-NEO-32M.dts +++ b/target/linux/ramips/dts/WIDORA-NEO-32M.dts @@ -17,6 +17,7 @@ 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 af3a1b1a1e978b..4d2ebb20c7961f 100644 --- a/target/linux/ramips/dts/WIDORA-NEO.dtsi +++ b/target/linux/ramips/dts/WIDORA-NEO.dtsi @@ -22,7 +22,7 @@ reg = <0x0 0x8000000>; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wifi: wifi { @@ -32,7 +32,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WITI.dtsi b/target/linux/ramips/dts/WITI.dtsi index 6e474e90bbcdb9..9e1e62fc33095b 100644 --- a/target/linux/ramips/dts/WITI.dtsi +++ b/target/linux/ramips/dts/WITI.dtsi @@ -24,7 +24,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -47,6 +47,7 @@ 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 f88d5ae63fa4eb..45c080be60ba44 100644 --- a/target/linux/ramips/dts/WIZFI630A.dts +++ b/target/linux/ramips/dts/WIZFI630A.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS1,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_run: run { @@ -44,7 +44,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WIZFI630S.dts b/target/linux/ramips/dts/WIZFI630S.dts deleted file mode 100644 index 13c8f68f151d9f..00000000000000 --- a/target/linux/ramips/dts/WIZFI630S.dts +++ /dev/null @@ -1,193 +0,0 @@ -//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 ee0cd0ad1fb210..e747d6097681e1 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; link { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WL-330N3G.dts b/target/linux/ramips/dts/WL-330N3G.dts index 235c90fc4d68a8..c562d95106da02 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; 3g { @@ -35,7 +35,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WL-351.dts b/target/linux/ramips/dts/WL-351.dts index 1b31bda7361f6a..aefb4c74adb0a2 100644 --- a/target/linux/ramips/dts/WL-351.dts +++ b/target/linux/ramips/dts/WL-351.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -72,7 +72,7 @@ }; }; - keys { + gpio-keys-polled { 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 a07490b8535855..14ca115607855b 100644 --- a/target/linux/ramips/dts/WL-WN570HA1.dts +++ b/target/linux/ramips/dts/WL-WN570HA1.dts @@ -17,7 +17,7 @@ reg = <0x0 0x4000000>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -28,7 +28,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; power { @@ -92,6 +92,7 @@ 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 76923d5cf60f2c..deeb7bbfb2f3e9 100644 --- a/target/linux/ramips/dts/WL-WN575A3.dts +++ b/target/linux/ramips/dts/WL-WN575A3.dts @@ -17,7 +17,7 @@ reg = <0x0 0x4000000>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -34,7 +34,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; wifi-high { @@ -62,7 +62,7 @@ &pinctrl { state_default: pinctrl0 { gpio { - ralink,group = "i2c", "wled_an", "gpio", "refclk", "wdt", "p0led_an"; + ralink,group = "i2c", "wled_an"; ralink,function = "gpio"; }; }; @@ -83,10 +83,11 @@ &spi0 { status = "okay"; - flash@0 { + m25p80@0 { compatible = "jedec,spi-nor"; reg = <0>; spi-max-frequency = <10000000>; + m25p,chunked-io = <32>; partitions { compatible = "fixed-partitions"; @@ -122,9 +123,10 @@ &wmac { status = "okay"; + ralink,mtd-eeprom = <&factory 0x4>; }; ðernet { - mtd-mac-address = <&factory 0x28>; + mtd-mac-address = <&factory 0x2e>; mediatek,portmap = "llllw"; }; diff --git a/target/linux/ramips/dts/WLI-TX4-AG300N.dts b/target/linux/ramips/dts/WLI-TX4-AG300N.dts index dcd30eb60ff96d..4a55a92127354e 100644 --- a/target/linux/ramips/dts/WLI-TX4-AG300N.dts +++ b/target/linux/ramips/dts/WLI-TX4-AG300N.dts @@ -55,7 +55,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -78,7 +78,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; diag { diff --git a/target/linux/ramips/dts/WLR-6000.dts b/target/linux/ramips/dts/WLR-6000.dts index 2b1f7076583133..2eeb4748b0ab00 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; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -27,7 +27,7 @@ }; }; - leds { + gpio-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 f0f1cc1337e7da..3b4551107a0012 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; aoss1 { @@ -35,7 +35,7 @@ }; }; - keys { + gpio-keys-polled { 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 deleted file mode 100644 index 14c851a3a880ba..00000000000000 --- a/target/linux/ramips/dts/WN-AC1167GR.dts +++ /dev/null @@ -1,216 +0,0 @@ -// 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 deleted file mode 100644 index ea837c4d34a757..00000000000000 --- a/target/linux/ramips/dts/WN-AC733GR3.dts +++ /dev/null @@ -1,198 +0,0 @@ -// 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 cc7f7f240ffe27..5163af1679e912 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -39,7 +39,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -78,6 +78,7 @@ 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 5399a49399ba6c..2fcfc96218a409 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -39,7 +39,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -78,6 +78,7 @@ 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 b067a4e448f54e..b22ce02d47c3c0 100644 --- a/target/linux/ramips/dts/WN3000RPV3.dts +++ b/target/linux/ramips/dts/WN3000RPV3.dts @@ -22,7 +22,7 @@ bootargs = "console=ttyS0,57600"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power_green: power_g { @@ -72,7 +72,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WNCE2001.dts b/target/linux/ramips/dts/WNCE2001.dts index 3f0d93d8a4c724..0a578205e27703 100644 --- a/target/linux/ramips/dts/WNCE2001.dts +++ b/target/linux/ramips/dts/WNCE2001.dts @@ -20,7 +20,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power_green: power-green { @@ -44,7 +44,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WNDR3700V5.dts b/target/linux/ramips/dts/WNDR3700V5.dts index 4ef0d70f180b10..92e7944f0cabad 100644 --- a/target/linux/ramips/dts/WNDR3700V5.dts +++ b/target/linux/ramips/dts/WNDR3700V5.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600 maxcpus=2"; }; - leds { + gpio-leds { compatible = "gpio-leds"; wps { @@ -39,7 +39,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -81,6 +81,7 @@ 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/WR1200JS.dts b/target/linux/ramips/dts/WR1200JS.dts index 6fd087ca0992e6..950a516a07ce0b 100644 --- a/target/linux/ramips/dts/WR1200JS.dts +++ b/target/linux/ramips/dts/WR1200JS.dts @@ -23,7 +23,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; internet { @@ -44,7 +44,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -75,6 +75,7 @@ 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 08c9b2c18fcbb9..be20717499bd50 100644 --- a/target/linux/ramips/dts/WR1201.dts +++ b/target/linux/ramips/dts/WR1201.dts @@ -25,7 +25,7 @@ bootargs = "console=ttyS0,57600"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -51,7 +51,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -70,6 +70,7 @@ 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 5761b8b532e700..f0612ab0b00c4b 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; 3g { @@ -42,7 +42,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WR6202.dts b/target/linux/ramips/dts/WR6202.dts index 26ec6de8f72ac7..b1030f5aee2e29 100644 --- a/target/linux/ramips/dts/WR6202.dts +++ b/target/linux/ramips/dts/WR6202.dts @@ -13,7 +13,7 @@ bootargs = "console=ttyS0,115200"; }; - leds { + gpio-leds { compatible = "gpio-leds"; wps { @@ -27,7 +27,7 @@ }; }; - keys { + gpio-keys-polled { 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 9587b3769d5077..4f0427050a6538 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; wlan2g { @@ -59,7 +59,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -88,6 +88,7 @@ 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 eb6dbe6d1afa62..828200b68757fd 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_wps: wps { @@ -35,7 +35,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WRTNODE.dts b/target/linux/ramips/dts/WRTNODE.dts index a8088182013849..e4cc3c587315b2 100644 --- a/target/linux/ramips/dts/WRTNODE.dts +++ b/target/linux/ramips/dts/WRTNODE.dts @@ -15,7 +15,7 @@ led-upgrade = &led_indicator; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_indicator: indicator { diff --git a/target/linux/ramips/dts/WRTNODE2.dtsi b/target/linux/ramips/dts/WRTNODE2.dtsi index 9bac82287242f9..6758d271f3ff2b 100644 --- a/target/linux/ramips/dts/WRTNODE2.dtsi +++ b/target/linux/ramips/dts/WRTNODE2.dtsi @@ -10,7 +10,7 @@ bootargs = "console=ttyS0,115200"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -29,6 +29,7 @@ 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 cd668d601eb42f..522df7cd9d7e41 100644 --- a/target/linux/ramips/dts/WRTNODE2P.dts +++ b/target/linux/ramips/dts/WRTNODE2P.dts @@ -13,7 +13,7 @@ led-upgrade = &led_indicator; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_indicator: indicator { diff --git a/target/linux/ramips/dts/WRTNODE2R.dts b/target/linux/ramips/dts/WRTNODE2R.dts index bfe533c0c36a07..ee1e2f91b9dd0e 100644 --- a/target/linux/ramips/dts/WRTNODE2R.dts +++ b/target/linux/ramips/dts/WRTNODE2R.dts @@ -13,12 +13,9 @@ led-upgrade = &led_indicator; }; - leds { + gpio-leds { compatible = "gpio-leds"; - pinctrl-names = "default"; - pinctrl-0 = <&led_pins>; - led_indicator: indicator { label = "wrtnode:blue:indicator"; gpios = <&gpio1 12 GPIO_ACTIVE_LOW>; @@ -29,14 +26,7 @@ &pinctrl { state_default: pinctrl0 { gpio { - ralink,group = "gpio"; - ralink,function = "gpio"; - }; - }; - - led_pins: led { - gpio { - ralink,group = "wled_an"; + ralink,group = "i2c", "gpio", "wled_an"; ralink,function = "gpio"; }; }; diff --git a/target/linux/ramips/dts/WSR-1166.dts b/target/linux/ramips/dts/WSR-1166.dts index ff033c41e4b92e..bb057453593598 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; internet_g { @@ -69,7 +69,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -126,6 +126,7 @@ 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 0cdd79cdda8981..7eb75b96496ba0 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -69,7 +69,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -126,6 +126,7 @@ 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 28d498bc87c32d..1a383876a31643 100644 --- a/target/linux/ramips/dts/WT1520.dtsi +++ b/target/linux/ramips/dts/WT1520.dtsi @@ -11,7 +11,7 @@ reg = <0x0 0x2000000>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/WT3020.dtsi b/target/linux/ramips/dts/WT3020.dtsi index 59558a2e963153..67ded65bd01082 100644 --- a/target/linux/ramips/dts/WT3020.dtsi +++ b/target/linux/ramips/dts/WT3020.dtsi @@ -13,7 +13,7 @@ led-upgrade = &led_power; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -24,7 +24,7 @@ }; }; - leds { + gpio-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 c6a90d426a3d2b..ba42d2591146d2 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>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <100>; @@ -84,7 +84,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_router: router { diff --git a/target/linux/ramips/dts/X5.dts b/target/linux/ramips/dts/X5.dts index 7e3d8b6f03a4da..2cb53facb26796 100644 --- a/target/linux/ramips/dts/X5.dts +++ b/target/linux/ramips/dts/X5.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -40,7 +40,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/X8.dts b/target/linux/ramips/dts/X8.dts index 3b6d60478fdb78..8edf4f703445d1 100644 --- a/target/linux/ramips/dts/X8.dts +++ b/target/linux/ramips/dts/X8.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -25,7 +25,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/XDXRN502J.dts b/target/linux/ramips/dts/XDXRN502J.dts index 0cab20f8f68b76..7b33fcb3d6b0fb 100644 --- a/target/linux/ramips/dts/XDXRN502J.dts +++ b/target/linux/ramips/dts/XDXRN502J.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; wifi { @@ -67,7 +67,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/Y1.dts b/target/linux/ramips/dts/Y1.dts index 87eb1bf4c5231a..1538ba92c69b52 100644 --- a/target/linux/ramips/dts/Y1.dts +++ b/target/linux/ramips/dts/Y1.dts @@ -13,7 +13,7 @@ led-upgrade = &led_power; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { diff --git a/target/linux/ramips/dts/Y1.dtsi b/target/linux/ramips/dts/Y1.dtsi index 5d6c9922fd3a99..9d171adbe8cf90 100644 --- a/target/linux/ramips/dts/Y1.dtsi +++ b/target/linux/ramips/dts/Y1.dtsi @@ -10,7 +10,7 @@ bootargs = "console=ttyS0,115200"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/Y1S.dts b/target/linux/ramips/dts/Y1S.dts index 6cdf0b5cdc88b6..d2b917e80dd0a3 100644 --- a/target/linux/ramips/dts/Y1S.dts +++ b/target/linux/ramips/dts/Y1S.dts @@ -34,7 +34,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; power1 { diff --git a/target/linux/ramips/dts/YOUKU-YK1.dts b/target/linux/ramips/dts/YOUKU-YK1.dts index 5d90b17a04e9c0..82540fb8dc8157 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; wan { label = "youku-yk1:blue:wan"; @@ -38,7 +38,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; reset { @@ -69,10 +69,9 @@ status = "okay"; m25p80@0 { - compatible = "mx25l25635f", "jedec,spi-nor"; + compatible = "jedec,spi-nor"; reg = <0>; - spi-max-frequency = <25000000>; - m25p,fast-read; + spi-max-frequency = <10000000>; partitions { compatible = "fixed-partitions"; diff --git a/target/linux/ramips/dts/YOUKU-YK2.dts b/target/linux/ramips/dts/YOUKU-YK2.dts deleted file mode 100644 index 55fdf2f224302a..00000000000000 --- a/target/linux/ramips/dts/YOUKU-YK2.dts +++ /dev/null @@ -1,157 +0,0 @@ -// SPDX-License-Identifier: GPL-2.0-or-later OR MIT -/dts-v1/; - -#include "mt7621.dtsi" - -#include -#include - -/ { - 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_wps; - }; - - memory@0 { - device_type = "memory"; - reg = <0x0 0x10000000>; - }; - - chosen { - bootargs = "console=ttyS0,115200"; - }; - - leds { - compatible = "gpio-leds"; - - led_power: power { - 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 = "yk-l2:blue:usb"; - gpios = <&gpio0 16 GPIO_ACTIVE_LOW>; - trigger-sources = <&xhci_ehci_port1>, <&ehci_port2>; - linux,default-trigger = "usbport"; - }; - }; - - keys { - compatible = "gpio-keys-polled"; - poll-interval = <20>; - - reset { - label = "reset"; - gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - - wps { - label = "wps"; - gpios = <&gpio0 17 GPIO_ACTIVE_LOW>; - linux,code = ; - }; - }; -}; - -&sdhci { - status = "okay"; -}; - -&xhci { - status = "okay"; -}; - -&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 0xfb0000>; - }; - }; - }; -}; - -&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>; - led { - 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 70ad0f0b58555a..231c1fd127cad4 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; sys1 { @@ -42,7 +42,7 @@ }; }; - keys { + gpio-keys-polled { 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 6f0213bf70b786..fce33e0752f222 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_4g_0: 4g-0 { @@ -38,7 +38,7 @@ }; }; - keys { + gpio-keys-polled { 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 21b56dcae17ba1..417989468eab51 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -41,7 +41,7 @@ }; }; - keys { + gpio-keys-polled { 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 aace0042e4d659..1a1a986ebe8759 100644 --- a/target/linux/ramips/dts/ZBT-WE1226.dts +++ b/target/linux/ramips/dts/ZBT-WE1226.dts @@ -24,7 +24,7 @@ reg = <0x0 0x4000000>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -35,7 +35,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; wan { @@ -76,6 +76,7 @@ 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 0bb8b91be92311..8b1311480fbb8e 100644 --- a/target/linux/ramips/dts/ZBT-WE1326.dts +++ b/target/linux/ramips/dts/ZBT-WE1326.dts @@ -18,7 +18,7 @@ reg = <0x0 0x1c000000>, <0x20000000 0x4000000>; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -46,6 +46,7 @@ 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 be8d13be90edf8..30ed4f785511c3 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -34,7 +34,7 @@ }; }; - keys { + gpio-keys-polled { 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 30c941c9c8dc9c..ed86249bc9ed1c 100644 --- a/target/linux/ramips/dts/ZBT-WE3526.dts +++ b/target/linux/ramips/dts/ZBT-WE3526.dts @@ -24,7 +24,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -47,6 +47,7 @@ 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.dtsi b/target/linux/ramips/dts/ZBT-WE826.dtsi index 0776ea7a7916d3..4fa81b73e1e469 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { label = "zbt-we826:green:power"; @@ -35,7 +35,7 @@ }; }; - keys { + gpio-keys-polled { 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 4ceee9bd6f025b..938a1445582a1f 100644 --- a/target/linux/ramips/dts/ZBT-WG2626.dts +++ b/target/linux/ramips/dts/ZBT-WG2626.dts @@ -31,7 +31,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -42,7 +42,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -63,6 +63,7 @@ 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 0cf94d57d26f96..13443e0ffd16d2 100644 --- a/target/linux/ramips/dts/ZBT-WG3526.dtsi +++ b/target/linux/ramips/dts/ZBT-WG3526.dtsi @@ -28,7 +28,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -39,7 +39,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_status: status { @@ -60,6 +60,7 @@ 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 5292c70dbbb4ba..eafe778cf93f48 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_sys: sys { @@ -37,7 +37,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/ZL5900V2.dts b/target/linux/ramips/dts/ZL5900V2.dts index d5d0ca3728dc60..026a524b3881ef 100644 --- a/target/linux/ramips/dts/ZL5900V2.dts +++ b/target/linux/ramips/dts/ZL5900V2.dts @@ -16,7 +16,7 @@ led-upgrade = &led_power; }; - leds { + gpio-leds { compatible = "gpio-leds"; lan { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { 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 5b4c5ee0474480..51f9122446966b 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; statred { @@ -30,7 +30,7 @@ }; }; - keys { + gpio-keys-polled { 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 40f16adb84a921..eb06b0478cdce5 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"; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power_green: power_green { @@ -47,7 +47,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -104,6 +104,7 @@ 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 56912a786e9cfd..818b4f8a0ddcd6 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"; }; - keys { + gpio-keys-polled { compatible = "gpio-keys-polled"; poll-interval = <20>; @@ -48,7 +48,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -94,6 +94,7 @@ 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 1f9928e59af039..3619aae603243e 100644 --- a/target/linux/ramips/dts/kn.dts +++ b/target/linux/ramips/dts/kn.dts @@ -53,7 +53,7 @@ }; }; - leds { + gpio-leds { compatible = "gpio-leds"; led_power: power { @@ -74,7 +74,7 @@ }; }; - keys { + gpio-keys-polled { 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 74396d1fc2dfce..90f740c1372dca 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; wan { @@ -42,7 +42,7 @@ }; }; - keys { + gpio-keys-polled { 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 765629548cd435..aaa98e8bc0a127 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; wan { @@ -42,7 +42,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/kn_st.dts b/target/linux/ramips/dts/kn_st.dts deleted file mode 100644 index 16ab9567c0d6a6..00000000000000 --- a/target/linux/ramips/dts/kn_st.dts +++ /dev/null @@ -1,115 +0,0 @@ -// 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 3d6d2c6f06a825..e8b152226205d9 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; }; - leds { + gpio-leds { compatible = "gpio-leds"; wan { @@ -47,7 +47,7 @@ }; }; - keys { + gpio-keys-polled { compatible = "gpio-keys"; poll-interval = <20>; diff --git a/target/linux/ramips/dts/mt7628an.dtsi b/target/linux/ramips/dts/mt7628an.dtsi index 61016c8b408123..91f715c2457a73 100644 --- a/target/linux/ramips/dts/mt7628an.dtsi +++ b/target/linux/ramips/dts/mt7628an.dtsi @@ -232,7 +232,6 @@ 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/mtk_offload.c b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c index 6c23bbc036c827..6e814ad72e7aae 100644 --- a/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c +++ b/target/linux/ramips/files-4.14/drivers/net/ethernet/mediatek/mtk_offload.c @@ -119,11 +119,11 @@ mtk_foe_set_mac(struct mtk_foe_entry *entry, u8 *smac, u8 *dmac) } static int -mtk_check_entry_available(struct mtk_eth *eth, u32 hash) +mtk_check_hashcollision(struct mtk_eth *eth, u32 hash) { struct mtk_foe_entry entry = ((struct mtk_foe_entry *)eth->foe_table)[hash]; - return (entry.bfib1.state == BIND)? 0:1; + return (entry.bfib1.state != BIND)? 0:1; } static void @@ -156,12 +156,6 @@ int mtk_flow_offload(struct mtk_eth *eth, if (otuple->l4proto != IPPROTO_TCP && otuple->l4proto != IPPROTO_UDP) return -EINVAL; - - if (type == FLOW_OFFLOAD_DEL) { - flow = NULL; - synchronize_rcu(); - return 0; - } switch (otuple->l3proto) { case AF_INET: @@ -180,25 +174,30 @@ int mtk_flow_offload(struct mtk_eth *eth, return -EINVAL; } - /* Two-way hash: when hash collision occurs, the hash value will be shifted to the next position. */ - if (!mtk_check_entry_available(eth, ohash)){ - if (!mtk_check_entry_available(eth, ohash + 1)) - return -EINVAL; - ohash += 1; - } - if (!mtk_check_entry_available(eth, rhash)){ - if (!mtk_check_entry_available(eth, rhash + 1)) - return -EINVAL; - rhash += 1; + if (type == FLOW_OFFLOAD_DEL) { + orig.bfib1.state = INVALID; + reply.bfib1.state = INVALID; + flow = NULL; + goto write; } + /* Two-way hash: when hash collision occurs, the hash value will be shifted to the next position. */ + if(mtk_check_hashcollision(eth, ohash)) + ohash += 1; + if(mtk_check_hashcollision(eth, rhash)) + rhash += 1; mtk_foe_set_mac(&orig, dest->eth_src, dest->eth_dest); mtk_foe_set_mac(&reply, src->eth_src, src->eth_dest); + +write: mtk_foe_write(eth, ohash, &orig); mtk_foe_write(eth, rhash, &reply); rcu_assign_pointer(eth->foe_flow_table[ohash], flow); rcu_assign_pointer(eth->foe_flow_table[rhash], flow); + if (type == FLOW_OFFLOAD_DEL) + synchronize_rcu(); + return 0; } @@ -384,8 +383,8 @@ static int mtk_ppe_start(struct mtk_eth *eth) mtk_w32(eth, 0x55555555, MTK_REG_PPE_DFT_CPORT); #endif - /* allow packets with TTL=0 */ - mtk_m32(eth, MTK_PPE_GLO_CFG_TTL0_DROP, 0, MTK_REG_PPE_GLO_CFG); + /* drop packets with TTL=0 */ + mtk_m32(eth, 0, MTK_PPE_GLO_CFG_TTL0_DROP, MTK_REG_PPE_GLO_CFG); /* send all traffic from gmac to the ppe */ mtk_m32(eth, 0xffff, 0x4444, MTK_GDMA_FWD_CFG(0)); diff --git a/target/linux/ramips/image/Makefile b/target/linux/ramips/image/Makefile index 6eef596caf099e..33c4f3132ffd39 100644 --- a/target/linux/ramips/image/Makefile +++ b/target/linux/ramips/image/Makefile @@ -114,7 +114,6 @@ define Build/mkdlinkfw -k $(IMAGE_KERNEL) \ -r $(IMAGE_ROOTFS) \ -o $@ \ - $(if $(DLINK_IMAGE_OFFSET), -O $(DLINK_IMAGE_OFFSET)) \ -s $(DLINK_FIRMWARE_SIZE) endef @@ -123,7 +122,6 @@ 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 diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk index da90568df0de98..f646437d7d9ab0 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_IMAGE_OFFSET + DLINK_ROM_ID DLINK_FAMILY_MEMBER DLINK_FIRMWARE_SIZE define Build/elecom-header cp $@ $(KDIR)/v_0.0.0.bin @@ -16,25 +16,6 @@ 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 @@ -51,24 +32,6 @@ define Device/alfa-network_ac1200rm endef TARGET_DEVICES += alfa-network_ac1200rm -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-pci -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 @@ -190,59 +153,61 @@ 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-mt76x0e + DEVICE_PACKAGES := kmod-usb2 kmod-usb-ohci jboot-tools 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 + DEVICE_PACKAGES := kmod-mt76x2 kmod-usb2 kmod-usb-ohci jboot-tools 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 - DEVICE_PACKAGES += kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi + 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 endef TARGET_DEVICES += dlink_dwr-921-c1 @@ -255,14 +220,18 @@ 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 - DEVICE_PACKAGES += kmod-usb-net-qmi-wwan kmod-usb-serial-option uqmi + 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 endef TARGET_DEVICES += dlink_dwr-922-e2 @@ -358,30 +327,6 @@ define Device/hc5861 endef TARGET_DEVICES += hc5861 -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 @@ -433,13 +378,16 @@ 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 - DEVICE_PACKAGES += kmod-mt76x0e + 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 endef TARGET_DEVICES += lava_lr-25g001 @@ -483,7 +431,6 @@ 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 @@ -765,6 +712,22 @@ 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 diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk index 9e42404f64dccc..5798be96c34e50 100644 --- a/target/linux/ramips/image/mt7621.mk +++ b/target/linux/ramips/image/mt7621.mk @@ -88,7 +88,7 @@ define Device/11acnas DTS := 11ACNAS IMAGE_SIZE := $(ralink_default_fw_size_16M) DEVICE_TITLE := WeVO 11AC NAS Router - DEVICE_PACKAGES := kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic + DEVICE_PACKAGES := kmod-mt7603 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic endef TARGET_DEVICES += 11acnas @@ -235,41 +235,44 @@ define Device/k2p endef TARGET_DEVICES += k2p -define Device/xiaomi_mir3p - DTS := MIR3P +define Device/mir3g + DTS := MIR3G BLOCKSIZE := 128k PAGESIZE := 2048 - KERNEL_SIZE:= 4096k + KERNEL_SIZE := 4096k + IMAGE_SIZE := 32768k UBINIZE_OPTS := -E 5 - IMAGE_SIZE := $(ralink_default_fw_size_32M) - DEVICE_TITLE := Xiaomi Mi Router 3 Pro - IMAGES += factory.bin + IMAGES += kernel1.bin rootfs0.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-ubi | check-size $$$$(IMAGE_SIZE) + DEVICE_TITLE := Xiaomi Mi Router 3G + SUPPORTED_DEVICES += R3G DEVICE_PACKAGES := \ - kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic uboot-envtools + kmod-mt7603 kmod-mt76x2 kmod-usb3 kmod-usb-ledtrig-usbport wpad-basic \ + uboot-envtools endef -TARGET_DEVICES += xiaomi_mir3p +TARGET_DEVICES += mir3g -define Device/xiaomi_mir3g - DTS := 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 + 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 - DEVICE_TITLE := Xiaomi Mi Router 3G - SUPPORTED_DEVICES += R3G - SUPPORTED_DEVICES += mir3g + 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 kmod-usb-ledtrig-usbport wpad-basic \ + kmod-mt7603 kmod-mt76x2 kmod-usb3 wpad-basic \ uboot-envtools endef -TARGET_DEVICES += xiaomi_mir3g +TARGET_DEVICES += mir4 define Device/mt7621 DTS := MT7621 @@ -299,7 +302,7 @@ TARGET_DEVICES += d-team_newifi-d2 define Device/pbr-m1 DTS := PBR-M1 - IMAGE_SIZE := $(ralink_default_fw_size_16M) + IMAGE_SIZE := $(ralink_default_fw_size_32M) DEVICE_TITLE := PBR-M1 DEVICE_PACKAGES := \ kmod-ata-core kmod-ata-ahci kmod-mt7603 kmod-mt76x2 kmod-sdhci-mt7620 \ @@ -324,17 +327,6 @@ 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 @@ -352,6 +344,14 @@ 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 @@ -363,14 +363,6 @@ 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 @@ -546,15 +538,6 @@ 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 diff --git a/target/linux/ramips/image/mt76x8.mk b/target/linux/ramips/image/mt76x8.mk index 571ddf3d51bc9c..3a2d8e3a5efd0d 100644 --- a/target/linux/ramips/image/mt76x8.mk +++ b/target/linux/ramips/image/mt76x8.mk @@ -2,22 +2,17 @@ # MT76x8 Profiles # -DEVICE_VARS += SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER +DEVICE_VARS += SERCOMM_KERNEL_OFFSET SERCOMM_HWID SERCOMM_HWVER SERCOMM_SWVER -define Build/sercom-seal +define Build/mksercommfw $(STAGING_DIR_HOST)/bin/mksercommfw \ - -i $@ \ - -b $(SERCOMM_HWID) \ - -r $(SERCOMM_HWVER) \ - -v $(SERCOMM_SWVER) \ - $(1) + $@ \ + $(SERCOMM_KERNEL_OFFSET) \ + $(SERCOMM_HWID) \ + $(SERCOMM_HWVER) \ + $(SERCOMM_SWVER) endef -define Build/sercom-footer - $(call Build/sercom-seal,-f) -endef - - define Device/tplink TPLINK_FLASHLAYOUT := TPLINK_HWID := @@ -66,14 +61,6 @@ 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) @@ -127,16 +114,16 @@ define Device/netgear_r6120 DTS := R6120 BLOCKSIZE := 64k IMAGE_SIZE := $(ralink_default_fw_size_16M) - DEVICE_TITLE := Netgear R6120 + DEVICE_TITLE := Netgear AC1200 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 := pad-extra 576k | $$(IMAGE/default) | \ - sercom-footer | pad-to 128 | zip R6120.bin | sercom-seal + IMAGE/factory.img := $$(IMAGE/default) | mksercommfw endef TARGET_DEVICES += netgear_r6120 @@ -164,13 +151,6 @@ 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 @@ -192,19 +172,6 @@ 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 @@ -275,21 +242,6 @@ 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 @@ -380,15 +332,6 @@ 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 @@ -406,6 +349,14 @@ 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) @@ -423,13 +374,6 @@ 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) diff --git a/target/linux/ramips/image/rt305x.mk b/target/linux/ramips/image/rt305x.mk index c67384f0711c7d..163726e1e1f1ae 100644 --- a/target/linux/ramips/image/rt305x.mk +++ b/target/linux/ramips/image/rt305x.mk @@ -910,13 +910,6 @@ define Device/kn 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 41b2c3dd5fb2c2..abee533d010194 100644 --- a/target/linux/ramips/image/rt3883.mk +++ b/target/linux/ramips/image/rt3883.mk @@ -41,18 +41,6 @@ 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 | patch-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 b604110b1e3953..88e83a487f6f60 100644 --- a/target/linux/ramips/modules.mk +++ b/target/linux/ramips/modules.mk @@ -116,7 +116,7 @@ $(eval $(call KernelPackage,hsdma-mtk)) define KernelPackage/sound-mt7620 TITLE:=MT7620 PCM/I2S Alsa Driver - DEPENDS:=@TARGET_ramips +kmod-sound-soc-core +kmod-regmap-i2c +kmod-dma-ralink @!TARGET_ramips_rt288x + DEPENDS:=@TARGET_ramips +kmod-sound-soc-core +kmod-regmap +kmod-dma-ralink @!TARGET_ramips_rt288x KCONFIG:= \ CONFIG_SND_RALINK_SOC_I2S \ CONFIG_SND_SIMPLE_CARD \ diff --git a/target/linux/ramips/mt7620/config-4.14 b/target/linux/ramips/mt7620/config-4.14 index 05f3963d437c23..e1a8e0c73bbd76 100644 --- a/target/linux/ramips/mt7620/config-4.14 +++ b/target/linux/ramips/mt7620/config-4.14 @@ -158,6 +158,7 @@ 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/mt7621/config-4.14 b/target/linux/ramips/mt7621/config-4.14 index b279c69879b548..5f4d76624fa668 100644 --- a/target/linux/ramips/mt7621/config-4.14 +++ b/target/linux/ramips/mt7621/config-4.14 @@ -24,8 +24,6 @@ CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_BLK_MQ_PCI=y CONFIG_BOARD_SCACHE=y CONFIG_BOUNCE=y -CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE=y -# CONFIG_CC_OPTIMIZE_FOR_SIZE is not set CONFIG_CEVT_R4K=y # CONFIG_CEVT_SYSTICK_QUIRK is not set CONFIG_CLKDEV_LOOKUP=y @@ -99,6 +97,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 diff --git a/target/linux/ramips/mt76x8/config-4.14 b/target/linux/ramips/mt76x8/config-4.14 index 5bcb9485857a40..81e08489315d6a 100644 --- a/target/linux/ramips/mt76x8/config-4.14 +++ b/target/linux/ramips/mt76x8/config-4.14 @@ -153,6 +153,7 @@ 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 @@ -192,8 +193,6 @@ 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/0043-spi-add-mt7621-support.patch b/target/linux/ramips/patches-4.14/0043-spi-add-mt7621-support.patch index b607f2bdf42af8..d9bc48d69b0977 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,45 +1,15 @@ -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 +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 -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 +Signed-off-by: John Crispin --- - .../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 + 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 --- a/drivers/spi/Kconfig +++ b/drivers/spi/Kconfig @@ -68,34 +38,45 @@ Signed-off-by: Mark Brown obj-$(CONFIG_SPI_OC_TINY) += spi-oc-tiny.o --- /dev/null +++ b/drivers/spi/spi-mt7621.c -@@ -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. -+ +@@ -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. ++ */ ++ ++#include ++#include +#include ++#include +#include +#include -+#include -+#include +#include +#include ++#include ++#include ++#include + -+#define DRIVER_NAME "spi-mt7621" ++#include + ++#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) @@ -106,33 +87,32 @@ Signed-off-by: Mark Brown +#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_controller *master; ++ struct spi_master *master; + void __iomem *base; + unsigned int sys_freq; + unsigned int speed; + struct clk *clk; -+ int pending_write; ++ ++ struct mt7621_spi_ops *ops; +}; + +static inline struct mt7621_spi *spidev_to_mt7621_spi(struct spi_device *spi) +{ -+ return spi_controller_get_devdata(spi->master); ++ return spi_master_get_devdata(spi->master); +} + +static inline u32 mt7621_spi_read(struct mt7621_spi *rs, u32 reg) @@ -145,25 +125,29 @@ Signed-off-by: Mark Brown + 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); @@ -187,36 +171,45 @@ Signed-off-by: Mark Brown + rate = 2; + + reg = mt7621_spi_read(rs, MT7621_SPI_MASTER); -+ reg &= ~MASTER_RS_CLK_SEL; -+ reg |= (rate - 2) << MASTER_RS_CLK_SEL_SHIFT; ++ reg &= ~(0xfff << 16); ++ reg |= (rate - 2) << 16; + 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 mt7621_spi *rs) ++static inline int mt7621_spi_wait_till_ready(struct spi_device *spi) +{ ++ 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); + } @@ -224,157 +217,205 @@ Signed-off-by: Mark Brown + return -ETIMEDOUT; +} + -+static void mt7621_spi_read_half_duplex(struct mt7621_spi *rs, -+ int rx_len, u8 *buf) ++static int mt7621_spi_transfer_half_duplex(struct spi_master *master, ++ struct spi_message *m) +{ -+ 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; -+ } ++ 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; + -+ rx_len -= i; -+ } -+} ++ mt7621_spi_wait_till_ready(spi); + -+static inline void mt7621_spi_flush(struct mt7621_spi *rs) -+{ -+ mt7621_spi_read_half_duplex(rs, 0, NULL); -+} ++ list_for_each_entry(t, &m->transfers, transfer_list) { ++ const u8 *buf = t->tx_buf; + -+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); -+ } ++ if (t->rx_buf) ++ rx_len += t->len; ++ ++ if (!buf) ++ continue; ++ ++ 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)); + } + -+ while (tx_len > 0) { -+ if (len >= 36) { -+ rs->pending_write = len; -+ mt7621_spi_flush(rs); -+ len = 0; -+ } ++ if (WARN_ON(rx_len > 32)) { ++ status = -EIO; ++ goto msg_done; ++ } + -+ 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 (mt7621_spi_prepare(spi, speed)) { ++ status = -EIO; ++ goto msg_done; + } ++ data[0] = swab32(data[0]); ++ if (len < 4) ++ data[0] >>= (4 - len) * 8; + -+ if (len & 3) { -+ if (len < 4) { -+ val = swab32(val); -+ val >>= (4 - len) * 8; -+ } -+ mt7621_spi_write(rs, MT7621_SPI_OPCODE + (len & ~3), val); ++ 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); ++ ++ 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; ++ 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)); + } + -+ rs->pending_write = len; ++msg_done: ++ m->status = status; ++ spi_finalize_current_message(master); ++ ++ return 0; +} + -+static int mt7621_spi_transfer_one_message(struct spi_controller *master, ++#ifdef CONFIG_SOC_MT7620 ++static int mt7621_spi_transfer_full_duplex(struct spi_master *master, + struct spi_message *m) +{ -+ struct mt7621_spi *rs = spi_controller_get_devdata(master); ++ 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(rs); ++ mt7621_spi_wait_till_ready(spi); + -+ list_for_each_entry(t, &m->transfers, transfer_list) -+ if (t->speed_hz < speed) ++ 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)) { ++ status = -EIO; ++ goto msg_done; ++ } ++ ++ 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; ++ } ++ ++ if (WARN_ON(rx_len > 16)) { ++ status = -EIO; ++ goto msg_done; ++ } + + if (mt7621_spi_prepare(spi, speed)) { + status = -EIO; + goto msg_done; + } + -+ /* Assert CS */ ++ 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); + -+ m->actual_length = 0; -+ list_for_each_entry(t, &m->transfers, transfer_list) { -+ 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); -+ } -+ m->actual_length += t->len; -+ } ++ 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)) { @@ -392,20 +433,26 @@ Signed-off-by: Mark Brown +}; +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_controller *master; ++ struct spi_master *master; + struct mt7621_spi *rs; + void __iomem *base; + struct resource *r; + int status = 0; + struct clk *clk; -+ int ret; ++ struct mt7621_spi_ops *ops; + + 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); @@ -424,47 +471,47 @@ Signed-off-by: Mark Brown + return status; + + master = spi_alloc_master(&pdev->dev, sizeof(*rs)); -+ if (!master) { ++ if (master == NULL) { + dev_info(&pdev->dev, "master allocation failed\n"); + return -ENOMEM; + } + -+ master->mode_bits = SPI_LSB_FIRST; -+ master->flags = SPI_CONTROLLER_HALF_DUPLEX; ++ master->mode_bits = RT2880_SPI_MODE_BITS; ++ + 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_controller_get_devdata(master); ++ rs = spi_master_get_devdata(master); + rs->base = base; + rs->clk = clk; + rs->master = master; + rs->sys_freq = clk_get_rate(rs->clk); -+ rs->pending_write = 0; ++ rs->ops = ops; + dev_info(&pdev->dev, "sys_freq: %u\n", rs->sys_freq); + -+ ret = device_reset(&pdev->dev); -+ if (ret) { -+ dev_err(&pdev->dev, "SPI reset failed!\n"); -+ return ret; -+ } ++ device_reset(&pdev->dev); ++ ++ mt7621_spi_reset(rs, 0); + -+ return devm_spi_register_controller(&pdev->dev, master); ++ return spi_register_master(master); +} + +static int mt7621_spi_remove(struct platform_device *pdev) +{ -+ struct spi_controller *master; ++ struct spi_master *master; + struct mt7621_spi *rs; + + master = dev_get_drvdata(&pdev->dev); -+ rs = spi_controller_get_devdata(master); ++ rs = spi_master_get_devdata(master); + -+ clk_disable_unprepare(rs->clk); ++ clk_disable(rs->clk); ++ spi_unregister_master(master); + + return 0; +} @@ -474,6 +521,7 @@ Signed-off-by: Mark Brown +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 1834e88538f47c..5f105c69e21fc8 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 @@ -1007,7 +1007,7 @@ Signed-off-by: John Crispin + if (ret) + goto err_debugfs; + -+ dev_info(i2s->dev, "mclk %luMHz\n", clk_get_rate(i2s->clk) / 1000000); ++ dev_info(i2s->dev, "mclk %luKHz\n", clk_get_rate(i2s->clk) / 1000000); + + return 0; + 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 deleted file mode 100644 index 0cb1fede306ec1..00000000000000 --- a/target/linux/ramips/patches-4.14/300-mt7620-export-chip-version-and-pkg.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- 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 deleted file mode 100644 index c8febaf73f9cef..00000000000000 --- a/target/linux/ramips/patches-4.14/304-spi-nor-enable-4B-opcodes-for-mx25l25635f.patch +++ /dev/null @@ -1,72 +0,0 @@ -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 new file mode 100644 index 00000000000000..0b825d61e0226c --- /dev/null +++ b/target/linux/ramips/patches-4.14/999-fix-m25p-shutdown.patch @@ -0,0 +1,34 @@ +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 9c713fd2bdf1f7..de4dffe885cf13 100644 --- a/target/linux/ramips/rt288x/config-4.14 +++ b/target/linux/ramips/rt288x/config-4.14 @@ -144,6 +144,7 @@ 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 1f00bdaae9e02f..346a8a8814f72f 100644 --- a/target/linux/ramips/rt305x/config-4.14 +++ b/target/linux/ramips/rt305x/config-4.14 @@ -135,6 +135,7 @@ 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 diff --git a/target/linux/ramips/rt3883/config-4.14 b/target/linux/ramips/rt3883/config-4.14 index 046e3732e20439..93d803e2edefb3 100644 --- a/target/linux/ramips/rt3883/config-4.14 +++ b/target/linux/ramips/rt3883/config-4.14 @@ -149,6 +149,8 @@ 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