aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ramips
Commit message (Collapse)AuthorAgeFilesLines
...
* ramips: add label MAC address for TP-Link Archer C20iAdrian Schmutzler2019-12-111-0/+4
| | | | | | | | | | | | | | Current OpenWrt MAC setup: eth0 &rom 0xf100 :48 eth0.2 eth0+1 :49 wlan0 (5 GHz) &radio 0x8004 different OUI wlan1 (2.4 GHz) &radio 0x4 same OUI as wlan0 Label MAC address corresponds to eth0 (&ethernet). No additional addresses found in hexdump of rom/radio. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump 4.14 to 4.14.158Koen Vandeputte2019-12-102-2/+2
| | | | | | | | | | | | Refreshed all patches. Altered patches: - 400-mtd-add-rootfs-split-support.patch Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* treewide: remove dts-v1 identifier from DTSI filesAdrian Schmutzler2019-12-089-10/+0
| | | | | | | | | | | | | | | | The "/dts-v1/;" identifier is supposed to be put once at the beginning of a device tree file. Thus, it makes no sense to provide it a second time in to-be-included DTSI files. This removes the identifier from all DTSI files in /target/linux. Most of the DTS files in OpenWrt do contain the "/dts-v1/;". It is missing for most of the following targets, though: mvebu, ipq806x, mpc85xx, ipq40xx This does not touch ipq806x for now, as the bump to 4.19 is close. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: convert mediatek,mtd-eeprom from decimal to hex notationAdrian Schmutzler2019-12-083-6/+6
| | | | | | | | | | A small subset of devices uses decimal notation for mediatek,mtd-eeprom in DTS files. Convert to hexadecimal notation to be consistent with all the rest. Also change "0" to "0x0" in the same files for consistency. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix number of LAN Ports for Mikrotik RBM33GMartin Schiller2019-12-081-1/+4
| | | | | | | | The Mikrotik RBM33G has only 2 LAN ports. Signed-off-by: Martin Schiller <ms@dev.tdt.de> [moved node in 02_network to maintain alphabetic sorting] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix switch port order for TP-Link Archer C20iWalter Sonius2019-12-081-1/+1
| | | | | | | | | | | | | | | | | | Physical port order watched from the backside of the C20i (from left to right) is: Internet / 1 / 2 / 3 / 4 Physical Port Switch port WAN 0 LAN 3 1 LAN 4 2 LAN 1 3 LAN 2 4 (not used) 5 CPU 6 Signed-off-by: Walter Sonius <walterav1984@gmail.com> [commit message/title improvements] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump 4.14 to 4.14.156Koen Vandeputte2019-11-292-2/+2
| | | | | | | | | Refreshed all patches. Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ramips: reorganize NETGEAR sercomm boardsDavid Bauer2019-11-245-65/+126
| | | | | | | | | | | | This re-organizes the device-tree files for the Sercomm-manufactured NETGEAR routers. They are now split into two different base-boards, from which the respective model is extended. This partially reverts commit c7842ceaaa27 ("ramips: reorganize DTSI files for Netgear R devices"), which introduced inheritance between two completely unrelated base-boards. Signed-off-by: David Bauer <mail@david-bauer.net>
* kernel: bump 4.14 to 4.14.154Koen Vandeputte2019-11-191-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Refreshed all patches. Altered patches: - 902-debloat_proc.patch - 040-dmaengine-qcom-bam-Process-multiple-pending-descript.patch - 807-usb-support-layerscape.patch - 809-flexcan-support-layerscape.patch - 816-pcie-support-layerscape.patch Remove upstreamed: - 150-MIPS-bmips-mark-exception-vectors-as-char-arrays.patch - 303-spi-nor-enable-4B-opcodes-for-mx66l51235l.patch New symbols: X86_INTEL_MPX X86_INTEL_MEMORY_PROTECTION_KEYS X86_INTEL_TSX_MODE_OFF X86_INTEL_TSX_MODE_ON X86_INTEL_TSX_MODE_AUTO SGL_ALLOC Compile-tested on: cns3xxx, x86_64 Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ramips: set uImage name of WeVO 11AC NAS and W2914NS v2Sungbo Eo2019-11-171-0/+2
| | | | | | | | | | | | | The stock firmware and bootloader only accept uImage with names that match certain patterns. This patch enables OpenWrt installation from stock firmware without having to reflash the bootloader or access the UART console. Installation via web interface: 1. Flash **initramfs** image through the stock web interface. 2. Boot into OpenWrt and perform sysupgrade with sysupgrade image. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: assign correct key-code to wps buttonsChristian Lamparter2019-11-163-3/+3
| | | | | | | | | | The ASUS WL-330N(3G) and the Edimax RG21S had the reset keycode assigned to the WPS button. This patch changes all three devices to use KEY_WPS_BUTTON in the hopes that this fixes unwanted restarts/ unexpected behavior from the users point of view. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ramips: add support for ALFA Network Quad-E4GPiotr Dymacz2019-11-146-11/+276
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ALFA Network Quad-E4G is a universal Wi-Fi/4G platform, which offers three miniPCIe (PCIe, USB 2.0, SIM) and a single M.2 B-key (dual-SIM, USB 3.0) slots, RTC and five Gigabit Ethernet ports with PoE support. Specification: - MT7621A (880 MHz) - 256/512 MB of RAM (DDR3) - 16/32+ MB of FLASH (SPI NOR) - optional second SPI flash (8-pin WSON/SOIC) - 1x microSD (SDXC) flash card reader - 5x 10/100/100 Mbps Ethernet, with passive PoE support (24 V) in LAN1 - optional 802.3at/af PoE module for WAN - 3x miniPCIe slot (with PCIe and USB 2.0 buses, micro SIM and 5 V) - 1x M.2/NGFF B-key 3042 (USB 3.0/2.0, mini + micro SIM) - RTC (TI BQ32002, I2C bus) with backup battery (CR2032) - external hardware watchdog (EM Microelectronic EM6324) - 1x USB 2.0 Type-A - 1x micro USB Type-B for system serial console (Holtek HT42B534) - 11x LED (5 for Ethernet, 5 driven by GPIO, 1x power indicator) - 3x button (reset, user1, user2) - 1x I2C (4-pin, 2.54 mm pitch) header on PCB - 4x SIM (6-pin, 2.00 mm pitch) headers on PCB - 2x UART2/3 (4-pin, 2.54 mm pitch) headers on PCB - 1x mechanical power switch - 1x DC jack with lock (24 V) Other: - U-Boot selects default SIM slot, based on value of 'default_sim' env variable: '1' or unset -> SIM1 (mini), '2' -> SIM2 (micro). This board has additional logic circuit for M.2 SIM switching. The 'sim-select' will work only if both SIM slots are occupied. Otherwise, always slot with SIM inside is selected, no matter 'sim-select' value. - U-Boot enables power in all three miniPCIe and M.2 slots before loading the kernel - this board supports 'dual image' feature (controlled by 'dual_image' U-Boot environment variable) - all three miniPCIe slots have additional 5 V supply on pins 47 and 49 - the board allows to install up to two oversized miniPCIe cards (vendor has dedicated MediaTek MT7615N/D cards for this board) - this board has additional logic circuit controlling PERSTn pins inside miniPCIe slots. By default, PERSTn (GPIO19) is routed to all miniPCIe slots but setting GPIO22 to high allows PERSTn control per slot, using GPIO23-25 (value is inverted) You can use the 'sysupgrade' image directly in vendor firmware which is based on OpenWrt (make sure to not preserve settings - use 'sysupgrade -n -F ...' command). Alternatively, use web recovery mode in U-Boot: 1. Power the device with reset button pressed, the modem LED will start blinking slowly and after ~3 seconds, when it starts blinking faster, you can release the button. 2. Setup static IP 192.168.1.2/24 on your PC. 3. Go to 192.168.1.1 in browser and upload 'sysupgrade' image. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ramips: mt7621: refresh kernel configPiotr Dymacz2019-11-141-2/+2
| | | | Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ramips: provide label MAC for ALFA Network Tube-E4GPiotr Dymacz2019-11-141-0/+1
| | | | Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ramips: add support for ALFA Network R36M-E4GPiotr Dymacz2019-11-136-8/+244
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ALFA Network R36M-E4G is a dual-SIM, N300 Wi-Fi, compact size platform based on MediaTek MT7620A WiSoC. This product is designed for operation with 4G modem (can be bought in bundle with Quectel EC25, EG25 or EP06) but supports also Wi-Fi modules (miniPCIe slot has USB and PCIe buses). Specification: - MT7620A (580 MHz) - 64/128/256 MB of RAM (DDR2) - 16/32+ MB of FLASH (SPI NOR) - 2x 10/100 Mbps Ethernet, with passive PoE support (24 V) - 2T2R 2.4 GHz (MT7620A), with ext. LNA (RFFM4227) - 1x miniPCIe slot (with PCIe and USB 2.0 buses and optional 5 V) - 2x SIM slot (mini, micro) with detect and switch driven by GPIO - 2x u.fl antenna connectors (for Wi-Fi) - 8x LED (7 driven by GPIO) - 2x button (reset, wifi) - 2x UART (4-pin/2.54 mm pitch, 10-pin/1.27 mm pitch) headers on PCB - 1x I2C (4-pin, 1.27 mm pitch) header on PCB - 1x LED (8-pin, 1.27 mm pitch) header on PCB - 1x DC jack with lock (12 V) Other: - there is a dedicated, 4-pin connector for optional RTC module (Holtek HT138x) with 'enable' input, not available at the time of preparing support for this board - miniPCIe slot supports additional 5 V supply on pins 47 and 49 but a jumper resistor (R174) is not installed by default - U-Boot selects default SIM slot, based on value of 'default_sim' env variable: '1' or unset -> SIM1 (mini), '2' -> SIM2 (micro). This will work only if both slots are occupied, otherwise U-Boot will always select slot with SIM card inside (user can override it later, in user-space) - U-Boot resets the modem, using PERSTn signal, before starting kernel - this board supports 'dual image' feature (controlled by 'dual_image' U-Boot environment variable) Flash instruction: You can use the 'sysupgrade' image directly in vendor firmware which is based on OpenWrt (make sure to not preserve settings - use 'sysupgrade -n -F ...' command). Alternatively, use web recovery mode in U-Boot: 1. Power the device with reset button pressed, the modem LED will start blinking slowly and after ~3 seconds, when it starts blinking faster, you can release the button. 2. Setup static IP 192.168.1.2/24 on your PC. 3. Go to 192.168.1.1 in browser and upload 'sysupgrade' image. Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ramips: support dual image feature on ALFA Network boardsPiotr Dymacz2019-11-134-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | New U-Boot version for MediaTek MT76x8/MT762x based ALFA Network boards includes support for a 'dual image' feature. Users can enable it using U-Boot environment variable 'dual_image' ('1' -> enabled). When 'dual image' feature is enabled, U-Boot will modify DTB and divide the original 'firmware' flash area into two, equal in size and aligned to 64 KB partitions: 'firmware' and 'backup'. U-Boot will also adjust size of 'firmware' area to match installed flash chip size. U-Boot will load kernel from active partition which is marked with env variable 'bootactive' ('1' -> first partition, '2' -> second partition) and rename both partitions accordingly ('firmware' <-> 'backup'). There are 3 additional env variables used to control 'dual image' mode: - bootlimit - maximum number of unsuccessful boot tries (default: '3') - bootcount - current number of boot tries - bootchanged - flag which informs that active partition was changed; if it is set and 'bootcount' reaches 'bootlimit' value, U-Boot will start web-based recovery which then updates both partitions with provided image Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* ramips: add usb-ledtrig-usbport to DEVICE_PACKAGES of CY-SWR1100Sungbo Eo2019-11-131-1/+1
| | | | | | | | | CY-SWR1100 has a USB LED but kmod-usb-ledtrig-usbport is missing in default images. This commit adds it. Signed-off-by: Sungbo Eo <mans0n@gorani.run> [changed commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: change status LED of Samsung CY-SWR1100Sungbo Eo2019-11-131-4/+6
| | | | | | Use power LED for status indication and free WPS LED for other uses. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: improve Samsung CY-SWR1100 supportSungbo Eo2019-11-132-5/+10
| | | | | | | | | | | | | | | | | | | | | | This patch does the following: - rename "devdata" flash partition and make it read-only - switch from gpio-keys-polled to gpio-keys - add missing power LED - set correct PCI ID to compatible string in wifi node - remove ralink,5ghz property in wifi node - provide label MAC address Rename devdata partition to devconf as indicated in the stock firmware partition table: 00030000-00040000: "devdata" 00040000-00050000: "devconf" Power LED can be controlled by SoC GPIO. Add it in the dts leds node. RT3092L supports only bgn mode, so it is unnecessary to disable 5GHz band. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: fix MAC address setup for Samsung CY-SWR1100Sungbo Eo2019-11-131-1/+2
| | | | | | | | | Ethernet MAC address setup has been broken since c3e420f28cf1. Restore original setting. Fixes: c3e420f28cf1 ("ramips: Add support for D-Link DCH-M225") Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: read label MAC address from flash instead of using phy0/phy1Adrian Schmutzler2019-11-134-11/+14
| | | | | | | | This replaces all uses of $(cat /sys/class/ieee80211/phyX/macaddress) by retrieval from the proper flash locations. This will make 02_network independent of WiFi setup again. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: split further base-files across subtargetsAdrian Schmutzler2019-11-116-21/+68
| | | | | | | | | | | As started in 19724e28c81e ("ramips: split base-files into subtargets"), this moves some smaller left-over files to the appropriate base-files folder of their subtarget: - /etc/init.d/bootcount - /etc/uci-defaults/04_led_migration Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: correct Netgear WNDR3700v5 button flagDavid Bauer2019-11-101-3/+3
| | | | | | | | | This adjusts the GPIO state flag to ACTIVE_LOW as FCC pictures indicate the base board is identical to the one of the R6220. Fixes commit 3459013257e0 ("ramips: correct R6220 button flag") Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: correct R6220 button flagDavid Bauer2019-11-091-3/+3
| | | | | | | | | | | | | | All buttons on the Netgear R6220 are active-low while they are flagged as active-high. The GPIO status reads the following for no buttons pressed: root@64367-r6220:~# cat /sys/kernel/debug/gpio gpio-7 ( |wps ) in hi gpio-8 ( |wifi ) in hi gpio-14 ( |reset ) in hi Signed-off-by: David Bauer <mail@david-bauer.net>
* ramips: create shared DTSI for Netgear EX2700 and WN3000RP v3Adrian Schmutzler2019-11-083-162/+104
| | | | | | | | | This moves shared code of the named devices into a common DTSI. Remove setting status="okay" for &gpio0 as it's not disabled in mt7620a.dtsi. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: increase max SPI frequency to 50 MHz for EX3700/EX6130Frederik Noe-Sdun2019-11-081-1/+1
| | | | | | | | | Based on Macronix MX25L3205DM2I datasheet this is maximum supported speed. Signed-off-by: Frederik Noe-Sdun <Frederik.Sdun@googlemail.com> [rebased, improved commit title/message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Netgear EX6130Frederik Noe-Sdun2019-11-086-114/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: * SoC: MT7620A * RAM: 64 MB DDR * Flash: 8MB NOR SPI flash * WiFi: MT7612E (5Ghz) and builtin MT7620A (2.4GHz) * LAN: 1x100M The -factory images can be flashed from the device's web interface or via nmrpflash. The device seems to use base PCB as EX3700/EX3800, but supporting AC1200 using MT7612E. MAC adresses: 5.0 GHz 0x8004 *:9a 2.4 GHz 0x4 *:9b lan 0x28 *:9b wan 0x2e *:9c Since this is a one-port device, although wan MAC address is set in flash, it is not used in OpenWrt setup. Signed-off-by: Frederik Noe-Sdun <Frederik.Sdun@googlemail.com> [rebased, extended commit message, tiny DTS style fixes] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: rename keys node formerly named buttonAdrian Schmutzler2019-11-073-3/+3
| | | | | | | For some devices, the keys node is named "button". Change name to match the rest of the target. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips, mt7620: reproducible elecom-header uid/gidPaul Spooren2019-11-061-1/+1
| | | | | | | | | | | | | | | | | | | | | The elecom-header renames the firmware image to v_0.0.0.bin, stores its MD5 sum as v_0.0.0.md5 and tars both files again. Both v_0.0.0 files are created as the build user making it harder to reproduce. This commit sets the owner/group of both files to root by adding extra options to the final tar command. Before: 0 buildbot (101) buildbot (102) 3932164 2019-11-05 14:43:22.000000 v_0.0.0.bin 0 buildbot (101) buildbot (102) 33 2019-11-05 14:43:22.000000 v_0.0.0.md5 After: 0 root (0) root (0) 3932164 2019-11-05 23:43:08.000000 v_0.0.0.bin 0 root (0) root (0) 33 2019-11-05 23:43:08.000000 v_0.0.0.md5 Signed-off-by: Paul Spooren <mail@aparcar.org>
* ramips: reorganize DTSI files for Netgear R devicesAdrian Schmutzler2019-11-068-217/+141
| | | | | | | | | This reorganizes DTSI files for the Netgear R devices in mt7621 (and the WNDR3700 v5). It creates a common DTSI for all R (sercomm) devices and distributes the remaining code in r6220.dtsi to R6220 and WNDR3700 v5. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: improve support for WeVO 11AC NAS and W2914NS v2Sungbo Eo2019-11-062-11/+25
| | | | | | | | | | | | | | | | | | | | | | | | | - remove WAN port index - load WAN MAC address directly from the flash - provide label MAC address - increase flash's SPI frequency to 80MHz - add mt76 led nodes to make WiFi LEDs work - drop unnecessary pinmux groups The factory partition scheme for MAC addresses (verified on both devices): 0x4 : WiFi 2.4GHz (label_mac-9) 0x28 : unused 0x2e : WAN (label_mac) 0x8004: WiFi 5GHz (label_mac-5) 0xe000: LAN (label_mac-1) 0xe006: unused By improving flash speed, `time dd if=/dev/mtdblock3 of=/dev/null bs=64k` has been reduced from 14.51s to 3.11s. Signed-off-by: Sungbo Eo <mans0n@gorani.run> [rebased] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove default case for MAC address assignmentAdrian Schmutzler2019-11-066-30/+152
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | So far, MAC address assignment in ramips has contained a default case, which defined wan_mac = eth0 + 1 for _every_ device not having an explicit case there. This is not desirable, as many device supporters will just not care or know about this definition, so another MAC address will be introduced by accident. In some cases the wan_mac is assigned although it is not needed, in other cases even addresses not dedicated to the device will be used (e.g. wan_mac actually is eth0 - 1, but during support nobody cared, so eth0 + 1 is used now, which might actually belong to another device ...). Thus, in this PR the former default case is converted to an explicit case. This one comprises all devices not being accounted for by other cases, reduced by those not having wan at all. The big number of entries for this node might be another indication that many of them wouldn't actually be there if there hadn't been default wan_mac setup. In exchange, the current "do nothing" case can be removed, as it will be the new default case. The devices being put in the newly created explicit case were determined as follows: 1. Create a list of all devices based on the DTS files. 2. Remove all devices already having an explicit entry setting their address. 3. Remove all devices that only have lan set up in the first part of 02_network: mt7620: - alfa-network,tube-e4g - asus,rp-n53 - buffalo,wmr-300 - comfast,cf-wr800n - edimax,ew-7476rpc - edimax,ew-7478ac - elecom,wrh-300cr - hnet,c108 - kimax,u25awf-h1 - kimax,u35wf - kingston,mlw221 - kingston,mlwg2 - microduino,microwrt - netgear,ex2700 - netgear,ex3700 - netgear,wn3000rp-v3 - planex,cs-qr10 - planex,mzk-ex300np - planex,mzk-ex750np - ravpower,wd03 - sercomm,na930 - yukai,bocco - zbtlink,zbt-cpe102 - zte,q7 mt7621: - gnubee,gb-pc1 - gnubee,gb-pc2 - linksys,re6500 - mikrotik,rbm11g - netgear,ex6150 - thunder,timecloud - tplink,re350-v1 - tplink,re650-v1 mt76x8: - alfa-network,awusfree1 - d-team,pbr-d1 - glinet,vixmini - vocore,vocore2-lite - tama,w06 - tplink,tl-mr3020-v3 - tplink,tl-wa801nd-v5 - tplink,tl-wr802n-v4 - tplink,tl-wr902ac-v3 - vocore,vocore2 - widora,neo-16m - widora,neo-32m rt288x: - buffalo,wli-tx4-ag300n - dlink,dap-1522-a1 rt305x: - allnet,all0256n-4m - allnet,all0256n-8m - allnet,all5002 - allnet,all5003 - alphanetworks,asl26555-16m - alphanetworks,asl26555-8m - asus,wl-330n - aximcom,mr-102n - dlink,dcs-930 - easyacc,wizard-8800 - hame,mpr-a2 - hootoo,ht-tm02 - huawei,d105 - intenso,memory2move - planex,mzk-dp150n - rt305x dlink,dcs-930l-b1 - sparklan,wcr-150gn - tenda,3g150b - tenda,3g300m - tenda,w150m - trendnet,tew-638apb-v2 - unbranded,a5-v11 - vocore,vocore-16m - vocore,vocore-8m - wansview,ncs601w - zorlik,zl5900v2 rt3883: - loewe,wmdr-143n - omnima,hpm 4. Put the remaining devices in the new case. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: improve netis WF-2881 supportSungbo Eo2019-11-062-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch does the following: 1. remove u-boot-env partition Stock bootloader saves env variables at 0x80000 in flash, and there is nothing stored at 0x30000. By merging the partition "u-boot-env" with "u-boot", the partition table becomes the same as used in stock firmware: 00000000-00080000: "Bootloader" 00080000-00100000: "Config" 00100000-00140000: "Factory" 00140000-07f80000: "Kernel" 2. fix LAN/WAN MAC addresses and provide label MAC address Ethernet MAC addresses are stored in factory partition at: 0xe000: LAN (label_mac) 0xe006: WAN (label_mac+1) 3. fix LAN port order WF-2881 LAN ports are in reverse order of switch ports. 4. fix WiFi LEDs mt76 led nodes are added to make WiFi LEDs work. On top of this, mt76 node names are changed to more generic ones, and compatible strings are also added. 5. fix pinmux groups uart3 and uart2 pins are used as button and led, but jtag pins are not. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: fix MTK_SOC for RT3662 devicesSungbo Eo2019-11-047-12/+12
| | | | | | | | | | | rt3883.mk contains both RT3662 and RT3883 device profiles, but commit 6a104ac77206 set MTK_SOC to rt3883 for all devices. This patch fixes it, and renames dts files accordingly. And SoC compatible strings are also appended in the dts. Fixes: 6a104ac77206 ("ramips/rt288x,rt3883: Name DTS files based on scheme") Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ramips: add support for ZBT WE1026-HKristian Evensen2019-11-035-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds support for the ZBT WE1026-H, an outdoor AP with support for adding an internal LTE modem. The detailed specs are: * CPU: MT7620A * 2x 10/100Mbps Ethernet (LAN port has passive PoE support). * 16/32 MB Flash. * 128/256 MB RAM. * 1x USB 2.0 port. * 1x mini-PCIe slot (only USB2.0 bus). * 1x SIM slot (standard size). * 1x 2.4Ghz WIFI (rt2800). * 1x button. * 6x LEDS (4 GPIO-controlled). * 1x micro-SD reader. The following have been tested and working: - Ethernet switch - Wifi - Mini-PCIe slot + SIM slot - USB port - microSD slot - sysupgrade - reset button Installation and recovery: In order to install OpenWRT the first time or ito recover the router, you can use the web-based recovery system. Keep the reset button pressed during boot and access 192.168.1.1 in your browser when your machine obtains an IP address. Upload the firmware to start the recovery process. Notes: * When binding the USB LED to a usbport, the LED is switched on all the time due to the presence of an internal hub. Thus, it does not really signal any USB-information. * I only have the 32MB version and have only added support for this device. However, the files are structured so that adding support for the 16MB version should be easy. * Only the LAN port is accessible from the outside of the casing and LEDs are not visible. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> [rebased onto base-files split, minor style fixes, removed use of USB led as power LED] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: update ZBT WE1026 DTS-filesKristian Evensen2019-11-034-160/+116
| | | | | | | | | | | | | | | | | | | | | | This commit makes the following changes to the WE1026 DTS-files: * The parts that are unique to the -5G-version (LED and 5GHz wifi) are moved to a separate file, so that WE1026.dtsi can be referenced also by the DTS for the -H version. * Use the generic "flash"-name for the spi-nor node. * Add label MAC. All changes have been tested on the WE1026-5G-16M and work fine. I.e., the device works as before the DTS-changes. Signed-off-by: Kristian Evensen <kristian.evensen@gmail.com> Acked-by: Mathias Kresin <dev@kresin.me> Acked-by: Alex Maclean <monkeh@monkeh.net> Acked-by: INAGAKI Hiroshi <musashino.open@gmail.com> Acked-by: Petr Štetiar <ynezz@true.cz> [minor style fixes, rebased onto base-files split, remove obsolete gpio-keys comment] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: improve common definition for Netgear R6xxx in mt7621.mkAdrian Schmutzler2019-11-031-31/+36
| | | | | | | | | | | | | This patch renames and reassembles the common definition for Netgear R6xxx devices in mt7621.mk. The following goals should be achieved: - Give the node a more generic name instead of adding devices to it - Use the common definition in the (less) similar R6220 node - Include/exclude settings into the common definition so the common node contains the common definitions - Prepare for support of R6700 v2 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix Xiaomi MiWiFi Mini switch definitionChih-Wei Chen2019-11-031-2/+2
| | | | | | | | | | | | | | | | | | | | | Based on OpenWRT Table of Hardware > Xiaomi > Xiaomi Mi WiFi Mini Switch Ports Defaults: 0, 1: LAN 4: WAN 6: CPU Port in Web GUI (word printed on bottom of case) WAN(Internet) map to switch port 4 LAN1(.) map to switch port 1 LAN2(..) map to switch port 0 CPU map to switch port 6 current setting is 1 WAN/ 4 LAN port, fix it. Signed-off-by: Chih-Wei Chen <changeway@gmail.com> [rebased after base-files split, fixed commit title] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: split base-files into subtargetsAdrian Schmutzler2019-11-0327-1266/+1902
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While most of the target's contents are split into subtargets, the base-files are maintained for the target as a whole. However, OpenWrt already implements a mechanism that will use (and even prefer) files in the subtargets' directories. This can be exploited to make several scripts subtarget-specific and thus save some space. In certain cases, keeping files in parent (=target) base-files was more convenient, and thus no splitting was performed for those. Note that this will increase overall code lines, but reduce code per subtarget. base-files ipk size reduction: master (mt7621) 60958 B split (mt7620) 46358 B (- 14.3 kiB) split (mt7621) 48759 B (- 11.9 kiB) split (mt76x8) 44948 B (- 15.6 kiB) split (rt288x) 43508 B (- 17.0 kiB) split (rt305x) 45616 B (- 15.0 kiB) split (rt3883) 44176 B (- 16.4 kiB) Run-tested on: GL.iNet GL-MT300N-V2 (mt76x8) D-Link DWR-116 (mt7620) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add newline for ASUS RT-ACx5P DTSesAdrian Schmutzler2019-11-032-2/+2
| | | | | | Those files are missing the newline at the end. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: ethernet: Replace random_ether_addr with eth_hw_addr_randomRosen Penev2019-10-271-1/+1
| | | | | | eth_hw_addr_random additionally sets addr_assign_type to NET_ADDR_RANDOM. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ramips: add support for Xiaomi Mi Wi-Fi Router 3G v2Paul Fertser2019-10-273-1/+166
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - CMIIT ID: 2019AP2581 - SoC: MediaTek MT7621 - Flash: 16MiB NOR SPI (GigaDevice GD25Q128B) - RAM: 128MiB DDR3 (ESMT M15T1G1664A) - Serial: As marked on PCB, 3V3 logic, baudrate is 115200, 8n1 - Ethernet: 3x 10/100/1000 Mbps (switched, 2xLAN + WAN) - WIFI0: MT7603E 2.4GHz 802.11b/g/n - WIFI1: MT7612E 5GHz 802.11ac - Antennas: 4x external (2 per radio), non-detachable - LEDs: Programmable "power" LED (two-coloured, yellow/blue) Non-programmable "internet" LED (shows WAN activity) - Buttons: Reset INSTALLATION: Bootloader won't accept any serial input unless "boot_wait" u-boot environment variable is changed to "on". Vendor firmware (looks like an illegal OpenWrt fork) won't accept any serial input unless "uart_en" is set to "1". Tricks to force u-boot to use default environment do not help as it's restricted in the same way. With bootloader unlocked the easiest way would be to TFTP the sysupgrade image or to sysupgrade after loading an initramfs one. For porting the flash contents were changed externally with an SPI programmer (after lifting Vcc flash IC pin away from the PCB). Forum thread [0] indicates that this device is identical to "Xiaomi Mi Router 4A Gigabit Edition". [0] https://forum.openwrt.org/t/xiaomi-mi-router-4a-gigabit-edition-r4ag-r4a-gigabit-fully-supported-but-requires-overwriting-spi-flash-with-programmer/36685 Signed-off-by: Paul Fertser <fercerpav@gmail.com>
* ramips: remove phy0tpt trigger from RT-AC65P/RT-AC85P power LEDAdrian Schmutzler2019-10-271-1/+0
| | | | | | | | | | | | This patch removes a phy0tpt trigger from the power LED, which seems to have been added by mistake. WiFi LEDs using phy0radio and phy1radio triggers are present and used correctly. Cc: Birger Koblitz <mail@birger-koblitz.de> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove redundant mtd-eeprom in mt76x8 DTS filesAdrian Schmutzler2019-10-278-9/+0
| | | | | | | | | | In mt7628an.dtsi, calibration data for wmac is already defined: mediatek,mtd-eeprom = <&factory 0x0>; Thus, this patch removes redundant entries of this property in derived DTS files. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove redundant mtd-mac-address for WiFiAdrian Schmutzler2019-10-273-4/+1
| | | | | | | | | | When caldata locations are defined with mediatek,mtd-eeprom the MAC address is automatically read from offset +4. Thus, specifying that location explicitly is redundant. This patch removes those redundant definitions. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: add support for Asus RT-AC65PGabor Varga2019-10-246-155/+190
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Asus RT-AC65P router is identical with the RT-AC85P, but better to make separate images for it. On both routers the installation can be done also via SSH: Note: The user/password for SSH is identical with the one used in the Web-interface. 1. Complete the initial setup wizard. 2. Activate SSH under "Administration" -> "System". 3. Transfer the OpenWrt factory image via scp: > scp openwrt-ramips-mt7621-asus_rt-ac65p-squashfs-factory.bin admin@192.168.50.1:/tmp 4. Connect via SSH to the router. > ssh admin@192.168.50.1 5. Write the OpenWrt image to flash. > mtd-write -i /tmp/openwrt-ramips-mt7621-asus_rt-ac65p-squashfs-factory.bin -d linux 6. Reboot the router > reboot Changelog: v3: removed [] from filename, rebased to latest master v2: Rebased to latest master v1: Initial release Signed-off-by: Gabor Varga <vargagab@gmail.com>
* ramips: fix LAN/WAN MAC addresses of Xiaomi MiWiFi Mini boardAdrian Schmutzler2019-10-221-3/+1
| | | | | | | | | | | | | | | | | | | Based on stock firmware tests, both LAN and WAN ports use the MAC address from 0x28 on factory partition. In OpenWrt, this one is already set in DTS. This patch removes the local bit set in 02_network previously, and adjusts LAN/WAN addresses as on stock firmware. Note that in tests we found a MAC address in 0x2e that is the one in 0x28 plus 1. Since stock firmware does not use it though, we do not use it either. Thanks to Chih-Wei Chen for testing this on his device. ref: https://github.com/openwrt/openwrt/pull/2497 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: fix TARGET_DEVICES after UniElec renameAdrian Schmutzler2019-10-212-3/+3
| | | | | | | | | | Device node names were updated, but updating TARGET_DEVICES was overlooked. Fixes: 4408723d42e0 ("ramips: remove RAM size from device name for UniElec devices") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips: remove RAM size from device name for UniElec devicesAdrian Schmutzler2019-10-217-18/+19
| | | | | | | | | | | UniElec devices are the last ones in ramips target still having the RAM size in device name although RAM size is auto-detected. Remove this from device name, compatible, etc., as it's not required and might be misleading to users and developers adding device support copying those devices. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ramips/mt762x: convert devices to interrupt-driven gpio-keysAdrian Schmutzler2019-10-21161-314/+197
| | | | | | | | | | | This converts all remaining devices to use interrupt-driven gpio-keys compatible instead of gpio-keys-polled. The poll-interval is removed. While at it, add/remove newlines in keys and leds node where necessary. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>