aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
Commit message (Collapse)AuthorAgeFilesLines
* ath79: routerboard-92x: ensure explicit bios size in DTSIAdrian Schmutzler2020-08-121-0/+1
| | | | | | | | | | | | | | The missing "size" property was acceptable in the context of a single DTS as the underlying device is known to have a 64KB flash, and thus the bios partition fit exactly between the preceding and following ones. However as this block has moved in a DTSI, for the sake of clarity and explicitness the size property is added to ensure that if the flash happens to be larger than expected, the bios partition remains properly sized. Suggested-by: Thibaut VARÈNE <hacks@slashdirt.org> Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: harmonize appearance of ethX nodes in qca953x DTSesAdrian Schmutzler2020-08-1224-81/+90
| | | | | | | | | | | This harmonizes the appearance of ethX nodes in qca953x DTSes by: - having the same order of nodes and properties - removing redundant status property on eth1 (set in qca953x.dtsi) This is meant to help both copy-pasters and reviewers, since deviations and errors can be spotted easier. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for MikroTik SXT 5nD r2 (SXT Lite5)Roger Pueyo Centelles2020-08-127-2/+225
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik SXT Lite5 (product code RBSXT5nDr2, also SXT 5nD r2) is an outdoor 5GHz CPE with a 16 dBi integrated antenna built around the Atheros AR9344 SoC. It is based on the "sxt5n" board platform. Specifications: - SoC: Atheros AR9344 - RAM: 64 MB - Storage: 128 MB NAND - Wireless: Atheros AR9340 (SoC) 802.11a/n 2x2:2 - Ethernet: Atheros AR8229 switch (SoC), 1x 10/100 port, 8-32 Vdc PoE in - 6 user-controllable LEDs: · 1x power (blue) · 1x wlan (green) · 4x rssi (green) - 1 GPIO-controlled buzzer See https://mikrotik.com/product/RBSXT5nDr2 for more details. Notes: The device was already supported in the ar71xx target. There, the Ethernet port was handled by GMAC1. Here in ath79 it is handled by GMAC0, which allows to get link information (loss, speed, duplex) on the eth0 interface. Flashing: TFTP boot initramfs image and then perform sysupgrade. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Acknowledgments: Michael Pratt (@mpratt14) for helping on the network settings. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [rebase, use mikrotik LED label prefix, make names consistent, add reg for bootloader2, use led_user for boot indication etc., minor cosmetic changes] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for MikroTik RouterBOARD 921GS-5HPacD-15sSven Roederer2020-08-127-125/+175
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik RouterBOARD 921GS-5HPacD-15s (mANTBox 15s) is an outdoor antenna for 5 GHz with an built-in router. This ports the board from ar71xx. See https://mikrotik.com/product/RB921GS-5HPacD-15S for more info. Specifications: - SoC: Qualcomm Atheros QCA9558 (720 MHz) - RAM: 128 MB - Storage: 128 MB NAND - Wireless: external QCA9892 802.11a/ac 2x2:2 - Ethernet: 1x 1000/100/10 Mbps, integrated, via AR8031 PHY, passive PoE in - SFP: 1x host Working: - NAND storage detection - Ethernet - Wireless - 1x user LED (blinks during boot, sysupgrade) - Reset button - Sysupgrade Untested: - SFP cage (probably not working) Installation (untested): - Boot initramfs image via TFTP and then flash sysupgrade image As the embedded RB921-pcb is a stripped down version of the RB922 this patch adds a common dtsi for this series and includes this to the final dts-files. Signed-off-by: Sven Roederer <devel-sven@geroedel.de> [move ath10k-leds closer to ath10k definition in DTS files] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for MikroTik RouterBOARD LHG 2nDRoger Pueyo Centelles2020-08-127-0/+218
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik RouterBOARD LHG 2nD (sold as LHG 2) is a 2.4 GHz 802.11b/g/n outdoor device with a feed and an integrated dual polarization grid dish antenna based on the LHG-HB platform. See https://mikrotik.com/product/lhg_2 for more info. Specifications: - SoC: Qualcomm Atheros QCA9533 - RAM: 64 MB - Storage: 16 MB NOR - Wireless: Atheros AR9531 (SoC) 802.11b/g/n 2x2:2, 18 dBi antenna - Ethernet: Atheros AR8229 (SoC), 1x 10/100 port, 12-28 Vdc PoE in - 8 user-controllable LEDs: · 1x power (blue) · 1x user (green) · 1x lan (green) · 1x wlan (green) · 4x rssi (green) Note: The rssihigh LED is disabled, as it shares GPIO 16 with the reset button. Flashing: TFTP boot initramfs image and then perform sysupgrade. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net> [rebase, remove rssiled setup, adjust commit message, add DTSIs] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: Update kernel 4.19 to version 4.19.138Hauke Mehrtens2020-08-101-2/+2
| | | | | | Compile and run tested on lantiq/xrx200 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ath79: add support for ZyXEL NBG6616Christoph Krapp2020-08-108-145/+313
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SoC: Qualcomm Atheros QCA9557 RAM: 128 MB (Nanya NT5TU32M16EG-AC) Flash: 16 MB (Macronix MX25L12845EMI-10G) Ethernet: 5x 10/100/1000 (1x WAN, 4x LAN) Wireless: QCA9557 2.4GHz (nbg), QCA9882 5GHz (ac) USB: 2x USB 2.0 port Buttons: 1x Reset Switches: 1x Wifi LEDs: 11 (Pwr, WAN, 4x LAN, 2x Wifi, 2x USB, WPS) MAC addresses: WAN *:3f uboot-env ethaddr + 3 LAN *:3e uboot-env ethaddr + 2 2.4GHz *:3c uboot-env ethaddr 5GHz *:3d uboot-env ethaddr + 1 The label contains all four MAC addresses, however the one without increment is first, so this one is taken for label MAC address. Notes: The Wifi is controlled by an on/off button, i.e. has to be implemented by a switch (EV_SW). Despite, it appears that GPIO_ACTIVE_HIGH needs to be used, just like recently fixed for the NBG6716. Both parameters have been wrong at ar71xx. Flash Instructions: At first the U-Boot variables need to be changed in order to boot the new combined image format. ZyXEL uses a split kernel + root setup and the current kernel is too large to fit into the partition. As resizing didnt do the trick, I've decided to use the prefered combined image approach to be future-kernel-enlargement-proof (thanks to blocktrron for the assistance). First add a new variable called boot_openwrt: setenv boot_openwrt bootm 0x9F120000 After that overwrite the bootcmd and save the environment: setenv bootcmd run boot_openwrt saveenv After that you can flash the openwrt factory image via TFTP. The servers IP has to be 192.168.1.33. Connect to one of the LAN ports and hold the WPS Button while booting. After a few seconds the NBG6616 will look for a image file called 'ras.bin' and flash it. Return to vendor firmware is possible by resetting the bootcmd: setenv bootcmd run boot_flash saveenv and flashing the vendor image via the TFTP method as described above. Accessing the U-Boot Shell: ZyXEL uses a proprietary loader/shell on top of u-boot: "ZyXEL zloader v2.02" When the device is starting up, the user can enter the the loader shell by simply pressing a key within the 3 seconds once the following string appears on the serial console: | Hit any key to stop autoboot: 3 The user is then dropped to a locked shell. | NBG6616> ? | ATEN x,(y) set BootExtension Debug Flag (y=password) | ATSE x show the seed of password generator | ATSH dump manufacturer related data in ROM | ATRT (x,y,z,u) ATRT RAM read/write test (x=level, y=start addr, z=end addr, u=iterations | ATGO boot up whole system | ATUR x upgrade RAS image (filename) In order to escape/unlock a password challenge has to be passed. Note: the value is dynamic! you have to calculate your own! First use ATSE $MODELNAME (MODELNAME is the hostname in u-boot env) to get the challange value/seed. | NBG6616> ATSE NBG6616 | 00C91D7EAC3C This seed/value can be converted to the password with the help of this bash script (Thanks to http://www.adslayuda.com/Zyxel650-9.html authors): - tool.sh - ror32() { echo $(( ($1 >> $2) | (($1 << (32 - $2) & (2**32-1)) ) )) } v="0x$1" a="0x${v:2:6}" b=$(( $a + 0x10F0A563)) c=$(( 0x${v:12:14} & 7 )) p=$(( $(ror32 $b $c) ^ $a )) printf "ATEN 1,%X\n" $p - end of tool.sh - | # bash ./tool.sh 00C91D7EAC3C | ATEN 1,10FDFF5 Copy and paste the result into the shell to unlock zloader. | NBG6616> ATEN 1,10FDFF5 If the entered code was correct the shell will change to use the ATGU command to enter the real u-boot shell. | NBG6616> ATGU | NBG6616# Signed-off-by: Christoph Krapp <achterin@googlemail.com> [move keys to DTSI, adjust usb_power DT label, remove kernel config change, extend commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: make dependency on kmod-usb-net selectiveAdrian Schmutzler2020-08-102-3/+3
| | | | | | | | A bunch of kernel modules depends on kmod-usb-net, but does not select it. Make AddDepends/usb-net selective, so we can drop some redundant +kmod-usb-net definitions for DEVICE_PACKAGES. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Telco T1Nicholas Smith2020-08-104-2/+159
| | | | | | | | | | | | | | | | | | | | | | Description: 2x 100Mbps Etherent ports 24V passive PoE 64MB RAM 16MB Flash 2.4GHz WiFi 1x WiFi antenna (RP-SMA connector) 1x LTE antenna (SMA connector) Sierra Wireless MC7430 LTE modem Flash instructions: Original firmware is based on OpenWrt. Flash using sysupgrade -n SUPPORTED_DEVICES is added to support factory firmware. Signed-off-by: Nicholas Smith <nicholas.smith@telcoantennas.com.au> [add missing led_rssi0 DT label, add SUPPORTED_DEVICES] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: increase spi frequency on TL-WDR3500/3600/4300/4310Aleksander Jan Bajkowski2020-08-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SPI Flash chip supports up to 33 MHz wihout fast read opcode. Available frequencies are 112.5, 56.25, 37.5, 28.125, 22.5 etc. This patch increases the nominal maximum frequency to 33 MHz, reaching an effective increase from 22.5 to 28.125 MHz. Formula to calculate SPI frequency: Freq = 225 MHz / 2 / div Before: $ time dd if=/dev/mtd1 of=/dev/null bs=8M 0+1 records in 0+1 records out real 0m 3.58s user 0m 0.00s sys 0m 3.57s After: $ time dd if=/dev/mtd1 of=/dev/null bs=8M 0+1 records in 0+1 records out real 0m 2.95s user 0m 0.00s sys 0m 2.93s Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl> [minor commit message adjustments] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link TL-WPA8630P v2Andreas Böhler2020-08-107-1/+258
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TL-WPA8630P v2 is a HomePlug AV2 compatible device with a QCA9563 SoC and 2.4GHz and 5GHz WiFi modules. Specifications -------------- - QCA9563 750MHz, 2.4GHz WiFi - QCA9888 5GHz WiFi - 8MiB SPI Flash - 128MiB RAM - 3 GBit Ports (QCA8337) - PLC (QCA7550) MAC address assignment ---------------------- WiFi 2.4GHz and LAN share the same MAC address as printed on the label. 5GHz WiFi uses LAN-1, based on assumptions from similar devices. LAN Port assignment ------------------- While there are 3 physical LAN ports on the device, there will be 4 visible ports in OpenWrt. The fourth port (internal port 5) is used by the PowerLine Communication SoC and thus treated like a regular LAN port. Versions -------- Note that both TL-WPA8630 and TL-WPA8630P, as well as the different country-versions, differ in partitioning, and therefore shouldn't be cross-flashed. This adds support for the two known partitioning variants of the TL-WPA8630P, where the variants can be safely distinguished via the tplink-safeloader SupportList. For the non-P variants (TL-WPA8630), at least two additional partitioning schemes exist, and the same SupportList entry can have different partitioning. Thus, we don't support those officially (yet). Also note that the P version for Germany (DE) requires the international image version, but is properly protected by SupportList. In any case, please check the OpenWrt Wiki pages for the device before flashing anything! Installation ------------ Installation is possible from the OEM web interface. Make sure to install the latest OEM firmware first, so that the PLC firmware is at the latest version. However, please also check the Wiki page for hints according to altered partitioning between OEM firmware revisions. Additional thanks to Jon Davies and Joe Mullally for bringing order into the partitioning mess. Signed-off-by: Andreas Böhler <dev@aboehler.at> [minor DTS adjustments, add label-mac-device, drop chosen, move common partitions to DTSI, rename de to int, add AU support strings, adjust TPLINK_BOARD_ID, create common node in generic-tp-link.mk, adjust commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link TL-WA901ND v3Adrian Schmutzler2020-08-084-0/+64
| | | | | | | | | | | | | | | | | | | | | This ports support for the TL-WA901ND v3 from ar71xx to ath79. Most of the hardware is shared with the TL-WA850/860RE v1 range extenders. It completes the TL-WA901ND series in ath79. Specifications: Board: AP123 / AR9341 Flash/RAM: 4/32 MiB CPU: 535 MHz WiFi: 2.4 GHz b/g/n Ethernet: 1 port (100M) Flashing instructions: Upload the factory image via the vendor firmware upgrade option. This has not been tested on device, but port from ar71xx is straightforward and the device will be disabled by default anyway. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: drop redundant kmods-leds-gpioAdrian Schmutzler2020-08-081-7/+6
| | | | | | | The ath79 target has CONFIG_LEDS_GPIO=y set in kernel config, so no need to pull the kmod-leds-gpio module for specific devices. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79/nand: add support for Netgear WNDR4300TNDavy Hollevoet2020-08-0610-40/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the WNDR4300TN, marketed by Belgian ISP Telenet. The hardware is the same as the WNDR4300 v1, without the fifth ethernet port (WAN) and the USB port. The circuit board has the traces, but the components are missing. Specifications: * SoC: Atheros AR9344 * RAM: 128 MB * Flash: 128 MB NAND flash * WiFi: Atheros AR9580 (5 GHz) and AR9344 (2.4 GHz) * Ethernet: 4x 1000Base-T * LED: Power, LAN, WiFi 2.4GHz, WiFi 5GHz, WPS * UART: on board, to the right of the RF shield at the top of the board Installation: * Flashing through the OEM web interface: + Connect your computer to the router with an ethernet cable and browse to http://192.168.0.51/ + Log in with the default credentials are admin:password + Browse to Advanced > Administration > Firmware Upgrade in the Telenet interface + Upload the Openwrt firmware: openwrt-ath79-nand-netgear_wndr4300tn-squashfs-factory.img + Proceed with the firmware installation and give the device a few minutes to finish and reboot. * Flashing through TFTP: + Configure your wired client with a static IP in the 192.168.1.x range, e.g. 192.168.1.10 and netmask 255.255.255.0. + Power off the router. + Press and hold the RESET button (the factory reset button on the bottom of the device, with the gray circle around it, next to the Telenet logo) and turn the router on while keeping the button pressed. + The power LED will start flashing orange. You can release the button once it switches to flashing green. + Transfer the image over TFTP: $ tftp 192.168.1.1 -m binary -c put openwrt-ath79-nand-netgear_wndr4300tn-squashfs-factory.img Signed-off-by: Davy Hollevoet <github@natox.be> [use DT label reference for adding LEDs in DTSI files] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: unify CONFIG_GPIO_SYSFS in kernel configsFelix Fietkau2020-08-062-2/+0
| | | | | | Enable it for all platforms Signed-off-by: Felix Fietkau <nbd@nbd.name>
* ath79/mikrotik: create shared device definitions for nor and nandAdrian Schmutzler2020-08-012-13/+19
| | | | | | | Move the image preparation and nand-utils package selection into common device definitions for NOR/NAND devices. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: cosmetic fixes for partition node of D-Link DIR-825 B1Adrian Schmutzler2020-07-301-1/+1
| | | | | | | Make the node name match the reg property and remove the unused DT label. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for gl-e750Luochongjun2020-07-294-1/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The gl-e750 is a portable travel router that gives you safe access to the internet while traveling. Specifications: - SoC: Qualcomm Atheros AR9531 (650MHz) - RAM: 128 MB DDR2 - Flash: 16 MB SPI NOR (W25Q128FVSG) + 128 MB SPI NAND (GD5F1GQ4UFYIG) - Ethernet: 10/100: 1xLAN - Wireless: QCA9531 2.4GHz (bgn) + QCA9887 5GHz (ac) - USB: 1x USB 2.0 port - Switch: 1x switch - Button: 1x reset button - OLED Screen: 128*64 px MAC addresses based on vendor firmware: LAN *:a0 art 0x0 2.4GHz *:a1 art 0x1002 5GHz *:a2 art calculated from art 0x0 + 2 Flash firmware: Since openwrt's kernel already exceeds 2MB, upgrading from the official version of GL-inet (v3.100) using the sysupgrade command will break the kernel image. Users who are using version 3.100 can only upgrade via uboot. The official guidance for GL-inet is as follows: https://docs.gl-inet.com/en/3/troubleshooting/debrick/ In the future, GL-inet will modify the firmware to support the sysupgrade command, so users will be able to upgrade directly with the sysupgrade command in future releases. OLED screen control: OLED controller is connected to QCA9531 through serial port, and can send instructions to OLED controller directly through serial port. Refer to the links below for a list of supported instructions: https://github.com/gl-inet/GL-E750-MCU-instruction Signed-off-by: Luochongjun <luochongjun@gl-inet.com> [fix alphabetic sorting in 10-fix-wifi-mac, drop check-kernel-size] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: disable default build for devices with 4M flashAdrian Schmutzler2020-07-291-0/+4
| | | | | | | | | | | | | | | It has been decided that the 19.07 release will be last one to include 4/32 devices. This disables default build for the remaining devices with 4M flash on ath79. Note that this will leave exactly one enabled device for ath79/tiny subtarget, PQI Air-Pen, which was moved there due to kernel size restrictions. All 4M TP-Link devices have already been disabled in 8819faff47ff ("ath79: do not build TP-Link tiny images by default") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: reorganize common image definitions for NetgearAdrian Schmutzler2020-07-293-26/+21
| | | | | | | | | | | | | Netgear currently has a special definition for tiny devices, which is only used by two devices. Despite, it sets ups the IMAGE/default definition individually for all devices, although there is actually only one exception. This merges the common parts into a single netgear_generic definition (in contrast to netgear_ath79_nand), and adjusts the individual definitions accordingly. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Compex WPJ563Leon M. George2020-07-263-2/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SoC: QCA9563 DRAM: 128MB DDR2 Flash: 16MB SPI-NOR 2 Gigabit ethernet ports 3×3 2.4GHz on-board radio miniPCIe slot that supports 5GHz radio PoE 24V passive or 36V-56V passive with optional IEEE 802.3af/at USB 3.0 header Installation: To install, either start tftp in bin/targets/ath79/generic/ and use the u-boot prompt over UART: tftpboot 0x80500000 openwrt-ath79-generic-compex_wpj563-squashfs-sysupgrade.bin erase 0x9f680000 +1 erase 0x9f030000 +$filesize cp.b $fileaddr 0x9f030000 $filesize boot The cpximg file can be used with sysupgrade in the stock firmware (add SSH key in luci for root access) or with the built-in cpximg loader. The cpximg loader can be started either by holding the reset button during power up or by entering the u-boot prompt and entering 'cpximg'. Once it's running, a TFTP-server under 192.168.1.1 will accept the image appropriate for the board revision that is etched on the board. For example, if the board is labelled '7A02': tftp -v -m binary 192.168.1.1 -c put openwrt-ath79-generic-compex_wpj563-squashfs-cpximg-7a02.bin MAC addresses: <&uboot 0x2e010> *:71 (label) <&uboot 0x2e018> *:72 <&uboot 0x2e020> *:73 <&uboot 0x2e028> *:74 Only the first two are used (for ethernet), the WiFi modules have separate (valid) addresses. The latter two addresses are not used. Signed-off-by: Leon M. George <leon@georgemail.eu>
* ath79: mikrotik: use base mac on lan for RBwAPG-5HacT2HnDBjoern Dobe2020-07-251-0/+4
| | | | | | | | | The Mikrotik RBwAPG-5HacT2HnD has only a single ethernet interface (lan), and the vendor uses the base (label) MAC address for it. Signed-off-by: Bjoern Dobe <bjoern@dobecom.de> [commit title/message improvement] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* treewide: rename POWER_ON_STRIP registerSungbo Eo2020-07-2513-13/+13
| | | | | | | | | | AR8327 datasheet[1] calls the register at address 0x0010 "Power-on Strapping Register". As it has nothing to do with "strip", let's rename it to "POWER_ON_STRAP" to make it easier to grasp. [1] https://lafibre.info/images/doc/201106_spec_AR8327.pdf Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ath79: re-enable image generation for GL-AR750SDavid Bauer2020-07-224-33/+23
| | | | | | | | | | | | | | | | The bootloader only writes the first 2MB of the image to the NOR flash when installing the NAND factory image. The bootloader is capable of booting larger kernels as it boots from the memory mapped SPI flash. Disable the NAND factory image. The NAND can be bootstrapped by writing the NAND initramfs image using the NOR upgrade method in the bootloader web-recovery and sysupgrading from there. The NOR variant is not affected. Also refactor the partition definitions in the DTS to make them less annoying to read. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: correctly define WiFi switch for TL-WR841ND v8Adrian Schmutzler2020-07-214-34/+51
| | | | | | | | | | | | | | | | | | | | | | | | The TL-WR841ND v8 feature a WiFi switch instead of a button. This adds the corresponding input-type to prevent booting into failsafe regularly. This has been defined correctly in ar71xx, but was overlooked when migrating to ath79. In contrast, the TL-WR842ND v2, which has the key set up as switch in ar71xx, actually has a button. The TL-MR3420 v2 has a button as well and is set up correctly for both targets. (Information based on TP-Link user guide) Note: While looking into this, I found that support PR for TL-MR3420 v2 switched reset button to ACTIVE_HIGH. However, the other two device still use ACTIVE_LOW. This seems strange, but I cannot verify it lacking the affected devices. Fixes: FS#2733 Fixes: 9601d94138de ("add support for TP-Link TL-WR841N/ND v8") Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: harmonize model names for Ubiquiti devicesAdrian Schmutzler2020-07-1517-27/+26
| | | | | | | | | | | | | | | | | | | | This harmonizes the model names for the ath79 Ubiquiti devices by applying a few minor cosmetic adjustments: - Removes hyphens where they are not found in the product names (Ubiquiti uses hyphens only for the abbreviated version names like UAP-AC-PRO which we don't use anyway.) - Add (XM) suffix for DTS model strings to help with distinguishing them from their XW counterparts. - Remove DEVICE_VARIANT for LAP-120 which actually was an alternate device name. - Generally make DTS model names and those from generic-ubnt.mk more consistent. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Ubiquiti PowerBridge MVieno Hakkerinen2020-07-155-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds support for the Ubiquiti PowerBridge M, which has the same board/LEDs as the Bullet M XM, but different case and antennas. Specifications: - AR7241 SoC @ 400 MHz - 64 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet, 24 Vdc PoE-in - Internal antenna: 25 dBi - POWER/LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) on PCB Flashing via WebUI: Upload the factory image via the stock firmware web UI. Attention: airOS firmware versions >= 5.6 have a new bootloader with an incompatible partition table! Please downgrade to <= 5.5 _before_ flashing OpenWrt! Refer to the device's Wiki page for further information. Flashing via TFTP: Same procedure as other Bullet M (XM) boards. - Use a pointy tool (e.g., pen cap, paper clip) and keep the reset button on the device or on the PoE supply pressed - Power on the device via PoE (keep reset button pressed) - Keep pressing until LEDs flash alternatively LED1+LED3 => LED2+LED4 => LED1+LED3, etc. - Release reset button - The device starts a TFTP server at 192.168.1.20 - Set a static IP on the computer (e.g., 192.168.1.21/24) - Upload via tftp the factory image: $ tftp 192.168.1.20 tftp> bin tftp> trace tftp> put openwrt-ath79-generic-xxxxx-ubnt_powerbridge-m-squashfs-factory.bin Signed-off-by: Vieno Hakkerinen <vieno@hakkerinen.eu>
* ath79: use rgmii-id instead of rgmii in ubnt,lap-120Roger Pueyo Centelles2020-07-131-3/+2
| | | | | | | | | | | Since commit 6f2e1b7485 (ath79: disable delays on AT803X config init) the incoming incoming traffic on the ubnt,lap-120 devices Ethernet port was not making it through. Using rgmii-id instead of rgmii (same configuration as ubnt,litebeam-ac-gen2) fixes it. Fixes FS#2893. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ath79: fix dsa binding for TP-Link TL-WR941ND v2Chuanhong Guo2020-07-122-13/+9
| | | | | | | | | upstream changed dt-bindings for marvell 88e6060 to use mdio-device and dropped support for legacy bindings. fix it in our local dts. Fixes: FS#2524 Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: qihoo,c301: use phy-supply for usb vbusChuanhong Guo2020-07-121-2/+2
| | | | | | | | Linux phy subsystem provides support for a phy regulator defined via phy-supply property. Use it to turn on usb power only when usb is probed. Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
* ath79: disable TP-Link TL-WR941ND v2Adrian Schmutzler2020-07-111-1/+1
| | | | | | | | | | | | | The support for this device's Marvell MV88E6060 switch has been reported to be broken with kernels 4.19/5.4 (see bug report). Since this a 4/32 device and it has been confirmed to be working with stable 19.07 release (kernel 4.14), and since fixing it does not seem trivial, let's just disable it in master. Fixes: FS#2524 Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for D-Link DAP-1330/DAP-1365 A1Sebastian Schaper2020-07-098-3/+196
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Port device support for DAP-1330 from the ar71xx target to ath79. Additionally, images are generated for the European through-socket case variant DAP-1365. Both devices run the same vendor firmware, the only difference being the DAP_SIGNATURE field in the factory header. The vendor's Web UI will display a model string stored in the flash. Specifications: * QCA9533, 8 MiB Flash, 64 MiB RAM * One Ethernet Port (10/100) * Wall-plug style case (DAP-1365 with additional socket) * LED bargraph RSSI indicator Installation: * Web UI: http://192.168.0.50 (or different address obtained via DHCP) There is no password set by default * Recovery Web UI: Keep reset button pressed during power-on until LED starts flashing red, upgrade via http://192.168.0.50 * Some modern browsers may have problems flashing via the Web UI, if this occurs consider booting to recovery mode and flashing via: curl -F \ files=@openwrt-ath79-generic-dlink_dap-1330-a1-squashfs-factory.bin \ http://192.168.0.50/cgi/index The device will use the same MAC address for both wired and wireless interfaces, however it is stored at two different locations in the flash. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
* ath79: add support for Arduino YunSungbo Eo2020-07-086-0/+351
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Arduino Yun is a microcontroller development board, based on Atmel ATmega32u4 and Atheros AR9331. Specifications: - MCU: ATmega32U4 - SoC: AR9331 - RAM: DDR2 64MB - Flash: SPI NOR 16MB - WiFi: - 2.4GHz: SoC internal - Ethernet: 1x 10/100Mbps - USB: 1x 2.0 - MicroSD: 1x SDHC Notes: - Stock firmware is based on OpenWrt AA. - The SoC UART can be accessed only through the MCU. YunSerialTerminal is recommended for access to serial console. - Stock firmware uses non-standard 250000 baudrate by default. - The MCU can be reprogrammed from the SoC with avrdude linuxgpio. Installation: 1. Update U-Boot environment variables to adapt to new partition scheme. > setenv bootcmd "run addboard; run addtty; run addparts; run addrootfs; bootm 0x9f050000 || bootm 0x9fea0000" > setenv mtdparts "spi0.0:256k(u-boot)ro,64k(u-boot-env),15936k(firmware),64k(nvram),64k(art)ro" > saveenv 2. Boot into stock firmware normally and perform sysupgrade with sysupgrade image. # sysupgrade -n -F /tmp/sysupgrade.bin Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ath79: add support for D-Link DCH-G020 Rev. A1Sebastian Schaper2020-07-084-0/+207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DCH-G020 is a Smart Home Gateway for Z-Wave devices. Specifications: * QCA9531, 16 MiB Flash, 64 MiB RAM * On-Board USB SD3503A Z-Wave dongle * GL850 USB 2.0 Hub (one rear port, internal Z-Wave) * Two Ethernet Ports (10/100) Installation: * Web UI: http://192.168.0.60 (or different address obtained via DHCP) Login with 'admin' and the 6-digit PIN Code from the bottom label * Recovery Web UI: Keep reset button pressed during power-on until LED starts flashing red, upgrade via http://192.168.0.60 * Some modern browsers may have problems flashing via the Web UI, if this occurs consider booting to recovery mode and flashing via: curl -F \ files=@openwrt-ath79-generic-dlink_dch-g020-a1-squashfs-factory.bin \ http://192.168.0.60/cgi/index Known issues: * Real-Time-Clock is not working as there is currently no matching driver It is still included in the dts as compatible = "pericom,pt7c43390"; * openzwave was tested on v19.07 (running MinOZW as a proof-of-concept), but the package grew too big as lots of device pictures were included, thus any use of Z-Wave is up to the user (e.g. extroot and domoticz) The device will use the same MAC address for both wired and wireless interfaces, however it is stored at two different locations in the flash. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
* ath79: add support for 8devices Lima boardAndrey Bondar2020-07-083-3/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specification: • 650/600/216 MHz (CPU/DDR/AHB) • 64 MB of RAM (DDR2) • 32 MB of FLASH • 2T2R 2.4 GHz • 2x 10/100 Mbps Ethernet • 1x USB 2.0 Host socket • 1x miniPCIe slot • UART for serial console • 14x GPIO Flash instructions: Upgrading from ar71xx target: • Upload image into the board: scp openwrt-ath79-generic-8dev_lima-squashfs-sysupgrade.bin root@192.168.1.1/tmp/ • Run sysupgrade sysupgrade -F /tmp/openwrt-ath79-generic-8dev_lima-squashfs-sysupgrade.bin Upgrading from u-boot: • Set up tftp server with openwrt-ath79-generic-8dev_lima-initramfs-kernel.bin • Go to u-boot (reboot and press ESC when prompted) • Set TFTP server IP setenv serverip 192.168.1.254 • Set device ip from the same subnet setenv ipaddr 192.168.1.1 • Copy new firmware to board tftpboot 0x82000000 initramfs.bin • Boot OpenWRT bootm 0x82000000 • Upload image openwrt-ath79-generic-8dev_lima-squashfs-sysupgrade.bin into the board • Run sysupgrade. Signed-off-by: Andrey Bondar <a.bondar@8devices.com>
* ath79: nand: disable images for glinet_gl-ar750sPetr Štetiar2020-07-071-0/+2
| | | | | | | | | Fixes following build failures: WARNING: Image file glinet_gl-ar750s-nor-kernel.bin is too big WARNING: Image file glinet_gl-ar750s-nor-nand-kernel.bin is too big Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ath79: add support for 8devices Rambutan boardAndrey Bondar2020-07-075-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rambutan is a Wifi module based on QCA9550/9557 http://www.8devices.com/products/rambutan Specification: - 720/600/200 MHz (CPU/DDR/AHB) - 128 MB of DDR2 RAM - 128 MB of NAND Flash - 1x 100Mbps Ethernet - 1x 1000Mbps Ethernet (PHY on dev-kit) - 1x Wifi radio 2x2 MIMO, dualband 2.4 and 5 GHz - 2x U.FL connectors on module, chip antennas on dev-kit - 1x miniPCIe slot - 2x USB2.0 host - 2x UART - SPI, I2C, GPIO Flash instructions: Upgrade from ar71xx target: sysupgrade -F /tmp/openwrt-ath79-nand-8dev_rambutan-squashfs-sysupgrade.tar or upgrade from GUI (don't save config) Use factory image to flash from U-Boot: tftpboot 80060000 openwrt-ath79-nand-8dev_rambutan-squashfs-factory.ubi nand erase.part ubi nand write 80060000 ubi ${filesize} Signed-off-by: Petr Štetiar <ynezz@true.cz> [copy&pasted missing commit description] Signed-off-by: Andrey Bondar <a.bondar@8devices.com>
* ath79: switch to kernel 5.4David Bauer2020-07-071-1/+1
| | | | | | | | As the reported major bugs are ironed out, switch to the new kernel to begin testing with a broader audience. Signed-off-by: David Bauer <mail@david-bauer.net> Acked-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: Update kernel 5.4 to version 5.4.50Hauke Mehrtens2020-07-042-2/+2
| | | | | | | Run tested: ath79, ipq40xx Build tested: ath79, ipq40xx Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: Update kernel 4.19 to version 4.19.131Hauke Mehrtens2020-07-044-17/+11
| | | | | | | | | | | | | Fixes: - CVE-2020-10757 The "mtd: rawnand: Pass a nand_chip object to nand_release()" commit was backported which needed some adaptations to other code. Run tested: ath79 Build tested: ath79 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ath79: add support for GL.iNet GL-MiFiAntti Seppälä2020-07-034-0/+169
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for the ar71xx supported GL.iNet GL-MiFi to ath79. Specifications: - Atheros AR9331 - 64 MB of RAM - 16 MB of FLASH (SPI NOR) - 2x 10/100/1000 Mbps Ethernet - 2.4GHz (AR9330), 802.11b/g/n - 1x USB 2.0 (vbus driven by GPIO) - 4x LED, driven by GPIO - 1x button (reset) - 1x mini pci-e slot (vcc driven by GPIO) Flash instructions: Vendor software is based on openwrt so you can flash the sysupgrade image via the vendor GUI or using command line sysupgrade utility. Make sure to not save configuration over reflash as uci settings differ between versions. Note on MAC addresses: Even though the platform is capable to providing separate MAC addresses to the interfaces vendor firmware does not seem to take advantage of that. It appears that there is only single unique pre-programmed address in the art partition and vendor firmware uses that for every interface (eth0/eth1/wlan0). Similar behaviour has also been implemented in this patch. Note on GPIOs: In vendor firmware the gpio controlling mini pci-e slot is named 3gcontrol while it actually controls power supply to the entire mini pci-e slot. Therefore a more descriptive name (minipcie) was chosen. Also during development of this patch it became apparent that the polarity of the signal is actually active low rather than active high that can be found in vendor firmware. Acknowledgements: This patch is based on earlier work[1] done by Kyson Lok. Since the initial mailing-list submission the patch has been modified to comply with current openwrt naming schemes and dts conventions. [1] http://lists.openwrt.org/pipermail/openwrt-devel/2018-September/019576.html Signed-off-by: Antti Seppälä <a.seppala@gmail.com>
* ath79: drop redundant status for gpio target-wideAdrian Schmutzler2020-07-0337-136/+0
| | | | | | | | All definitions of gpio in SoC DTSI files do not set status, i.e. have it enabled. This drops all remaining redundant "status = okay" definitions in descendent files (mostly older ones). Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: enable gpio on ar933x by defaultAdrian Schmutzler2020-07-0316-60/+0
| | | | | | | | | | | All other SoC DTSI files have gpio enabled by default, only ar9330/ar9331 disable it by default, only to have it enabled again afterwards for each individual device. So, do not disable it in the first place, and drop all device-specific status statements afterwards. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Compex WPJ344Leon M. George2020-07-034-0/+180
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SoC: AR9344 DRAM: 128MB DDR2 Flash: 16MB SPI-NOR 2 Gigabit ethernet ports 2×2 2.4GHz on-board radio miniPCIe slot that supports 5GHz radio PoE 48V IEEE 802.3af/at - 24V passive optional USB 2.0 header Installation: To install, either start tftp in bin/targets/ath79/generic/ and use the u-boot prompt over UART: tftpboot 0x80500000 openwrt-ath79-generic-compex_wpj344-16m-squashfs-sysupgrade.bin erase 0x9f030000 +$filesize erase 0x9f680000 +1 cp.b $fileaddr 0x9f030000 $filesize boot The cpximg file can be used with sysupgrade in the stock firmware (add SSH key in luci for root access) or with the built-in cpximg loader. The cpximg loader can be started either by holding the reset button during power up or by entering the u-boot prompt and entering 'cpximg'. Once it's running, a TFTP-server under 192.168.1.1 will accept the image appropriate for the board revision that is etched on the board. For example, if the board is labelled '6A08': tftp -v -m binary 192.168.1.1 -c put openwrt-ath79-generic-compex_wpj344-16m-squashfs-cpximg-6a08.bin MAC addresses: <&uboot 0x2e010> *:99 (label) <&uboot 0x2e018> *:9a <&uboot 0x2e020> *:9b <&uboot 0x2e028> *:9c Only the first two are used (for ethernet), the WiFi modules have separate (valid) addresses. The latter two addresses are not used. Signed-off-by: Leon M. George <leon@georgemail.eu> [minor commit message adjustments, drop gpio in DTS, DTS style fixes, sorting, drop unused cpximg recipe] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: rearrange nand node by register addressSungbo Eo2020-07-022-36/+36
| | | | | | | All other nodes in the DTS are placed in order of address space. Harmonize the nand nodes as well. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ath79: replace custom uImageArcher generationDavid Bauer2020-06-291-9/+1
| | | | | | | | | | | The replaces the custom uImageArcher build step with the generic uImage build step. The only different between these two is the difference in the generated name. Tested on: TP-Link Archer C59 v1 Acked-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: do not build TP-Link tiny images by defaultAdrian Schmutzler2020-06-282-0/+3
| | | | | | | | | | | | | For quite some time, the tiny (4M flash) TP-Link sysupgrade and factory images cannot be built anymore by the buildbots, just the initramfs-kernel.bin files are still there. Disable these images for the buildbots and prevent useless builds. Note that these devices still build fine with default settings, even for kernel 5.4. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: build Compex WPJ531 cpximg filesLeon M. George2020-06-281-0/+28
| | | | | | | | | | | | | | | | | | | Generate additional images that are compatible to the cpximg loader. The cpximg loader can be started either by holding the reset button during power up or by entering the u-boot prompt and entering 'cpximg'. Once it's running, a TFTP-server under 192.168.1.1 will accept the image appropriate for the board revision that is etched on the board. For example, if the board is labelled '7A04': tftp -v -m binary 192.168.1.1 -c put openwrt-ath79-generic-compex_wpj531-16m-squashfs-cpximg-7A04.bin These files can also be used with the sysupgrade utility in stock images (add SSH key in luci for root access). Signed-off-by: Leon M. George <leon@georgemail.eu> [fix sorting of definitions] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Compex WPJ531 (16M)Leon M. George2020-06-284-0/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SoC: QCA9531 DRAM: 128MB DDR2 Flash: 16MB SPI-NOR 2 100MBit ethernet ports 2×2 2.4GHz on-board radio miniPCIe slot that supports 5GHz radio PoE 24V - 48V IEEE 802.3af optional USB 2.0 header Installation: To install, start a tftp server in bin/targets/ath79/generic/ and use the u-boot prompt over UART: tftpboot 0x80500000 openwrt-ath79-generic-compex_wpj531-16m-squashfs-sysupgrade.bin erase 0x9f030000 +$filesize erase 0x9f680000 +1 cp.b $fileaddr 0x9f030000 $filesize boot The cpximg file can be used with sysupgrade in the stock firmware (add SSH key in luci for root access). Another way is to hold the reset button during power up or running 'cpximg' in the u-boot prompt. Once the last LED starts flashing regularly, a TFTP-server under 192.168.1.1 will accept the image appropriate for the board revision that is etched on the board. For example, if the board is labelled '7A04': tftp -v -m binary 192.168.1.1 -c put openwrt-ath79-generic-compex_wpj531-16m-squashfs-cpximg-7A04.bin MAC addresses: <&uboot 0x2e010> *:cb (label) <&uboot 0x2e018> *:cc <&uboot 0x2e020> *:cd <&uboot 0x2e028> *:ce Only the first two are used (for ethernet), the WiFi modules have separate (valid) addresses. The latter two addresses are not used. Signed-off-by: Leon M. George <leon@georgemail.eu> [commit title/message facelift, fix rssileds, add led aliases] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: Fix ubnt_edgeswitch-8xp DEVICE_PACKAGESHauke Mehrtens2020-06-271-1/+1
| | | | | | | | switch-bcm53xx-mdio does not exists, use kmod-switch-bcm53xx-mdio instead. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Cc: Tobias Schramm <tobleminer@gmail.com>