aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
Commit message (Collapse)AuthorAgeFilesLines
* ath79: fix various dts warningsChristian Lamparter2021-12-1113-5/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ar9344_openmesh_mr600-v1.dts:40.10-44.5: Warning (gpios_property): /leds-ath9k/wifi2g: Missing property '#gpio-cells' in node /ahb/pcie-controller@180c0000/wifi@0,0 or bad phandle => added gpio-controller + #gpio-cells qca955x_zyxel_nbg6x16.dtsi:121.3-13: Warning (reg_format): /ahb/usb@1b000000/port@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) ../dts/qca955x_zyxel_nbg6x16.dtsi:131.3-13: Warning (reg_format): /ahb/usb@1b400000/port@1:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) qca955x_zyxel_nbg6x16.dtsi:120.20-123.4: Warning (avoid_default_addr_size): /ahb/usb@1b000000/port@1: Relying on default #address-cells value => ath79's usb-nodes are missing the address- and size-cells properties. These are needed for usb led trigger support. ar7242_ubnt_sw.dtsi:54.4-14: Warning (reg_format): /gpio_spi/gpio_spi@0:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1) => the #address-cells and #size-cells had to be nudged. qca9531_dlink_dch-g020-a1.dts:19.6-39.4: Warning (i2c_bus_bridge): /i2c: incorrect #size-cells for I2C bus => #size-cells = <0>; Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: add support for WD My Net N600Ryan Mounce2021-12-116-87/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SoC: AR9344 RAM: 128MB Flash: 16MiB SPI NOR 5GHz WiFi: AR9382 PCIe 2x2:2 802.11n 2.4GHz WiFi: AR9344 (SoC) AHB 2x2:2 802.11n 5x Fast ethernet via SoC switch (green LEDs) 1x USB 2.0 4x front LEDs from SoC GPIO 1x front WPS button from SoC GPIO 1x bottom reset button from SoC GPIO UART header JP1, 115200 no parity 1 stop TX GND VCC (N/P) RX Flash factory image via "emergency room" recovery: - Configure your computer with a static IP 192.168.1.123/24 - Connect to LAN port on the N600 switch - Hold reset putton - Power on, holding reset until the power LED blinks slowly - Visit http://192.168.1.1/ and upload OpenWrt factory image - Wait at least 5 minutes for flashing, reboot and key generation - Visit http://192.168.1.1/ (OpenWrt LuCI) and upload OpenWrt sysupgrade image Signed-off-by: Ryan Mounce <ryan@mounce.com.au> [dt leds preparations] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: add support for jjPlus JWAP230Olivier Valentin2021-12-113-0/+195
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The jjPlus JWAP230 is an access point board built around the QCA9558, with built-in 2.4GHz 3x3 N WiFi (28dBm). It can be expanded with 2 mini-PCIe boards, and has an USB2 root port. Specifications: - SOC: Qualcomm Atheros QCA9558 - CPU: 720MHz - H/W switch: QCA8327 rev 2 - Flash: 16 MiB SPI NOR (en25qh128) - RAM: 128 MiB DDR2 - WLAN: AR9550 built-in SoC bgn 3T3R (ath9k) - PCI: 2x mini-PCIe (optional 5V) - LEDs: 6x LEDs (3 are currently available) - Button: 1x Reset (not yet defined) - USB2: - 1x Type A root port - 1x combined mini-PCIe - Ethernet: - 2x 10/100/1000 (1x PoE 802.3af (36-57 V)) Notes: The device used to be supported in the ar71xx target. For upgrades: Please use "sysupgrade --force -n <image>". This will restore the device back to OpenWrt defaults! MAC address assignment: use source LAN art 0x0 WAN art 0x6 WLAN art 0x1002 (as part of the calibration data) Flash instructions: - install from u-boot with tftp (requires serial access) > setenv ipaddr a.b.c.d > setenv serverip e.f.g.h > tftp 0x80060000 \ openwrt-ath79-generic-jjplus_jwap230-squashfs-sysupgrade.bin > erase 0x9f050000 +${filesize} > cp.b $fileaddr 0x9f050000 $filesize > setenv bootcmd bootm 0x9f050000 > saveenv Signed-off-by: Olivier Valentin <valentio@free.fr> [Added DT-Leds (based on ar71xx), Added more notes about sysupgrade, fixed "qca9550" to match SoC in commit and dts file name] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: add support for TP-Link EAP225 v1Sander Vanheule2021-12-054-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link EAP225 v1 is an AC1200 (802.11ac Wave-1) ceiling mount access point. Device specifications: * SoC: QCA9563 @ 775MHz * RAM: 128MiB DDR2 * Flash: 16MiB SPI-NOR * Wireless 2.4GHz (SoC): b/g/n, 2x2 * Wireless 5Ghz (QCA9882): a/n/ac, 2x2 * Ethernet (AR8033): 1× 1GbE, 802.3at PoE Flashing instructions: * Ensure the device is upgraded to firmware v1.4.0 * Exploit the user management page in the web interface to start telnetd by changing the username to `;/usr/sbin/telnetd -l/bin/sh&`. * Immediately change the malformed username back to something valid (e.g. 'admin') to make ssh work again. * Use the root shell via telnet to make /tmp world writeable (chmod 777) * Extract /usr/bin/uclited from the device via ssh and apply the binary patch listed below. The patch is required to prevent `uclited -u` in the last step from crashing. * Copy the patched uclited binary back to the device at /tmp/uclited (via ssh) * Upload the factory image to /tmp/upgrade.bin (via ssh) * Run `chmod +x /tmp/uclited && /tmp/uclited -u` to install OpenWrt. uclited patching: --- xxd uclited +++ xxd uclited-patched @@ -53811,7 +53811,7 @@ 000d2330: 8c44 0000 0320 f809 0000 0000 8fbc 0010 .D... .......... 000d2340: 8fa6 0a4c 02c0 2821 8f82 87c4 0000 0000 ...L..(!........ -000d2350: 8c44 0000 0c13 461c 27a7 0018 8fbc 0010 .D....F.'....... +000d2350: 8c44 0000 2402 0000 0000 0000 8fbc 0010 .D..$........... 000d2360: 1040 001d 0000 1821 8f99 8378 3c04 0058 .@.....!...x<..X 000d2370: 3c05 0056 2484 ad68 24a5 9f00 0320 f809 <..V$..h$.... .. To make sure the correct file is patched, the following MD5 checksums should match the unpatched and patched files: 4bd74183c23859c897ed77e8566b84de uclited 4107104024a2e0aeaf6395ed30adccae uclited-patched Debricking: * Serial port can be soldered on unpopulated 4-pin header (1: TXD, 2: RXD, 3: GND, 4: VCC) * Bridge unpopulated resistors running from pins 1 (TXD) and 2 (RXD). Do NOT bridge the pull-down for pin 2, running parallel to the header. * Use 3.3V, 115200 baud, 8n1 * Interrupt bootloader by holding CTRL+B during boot * tftp initramfs to flash via the LuCI web interface setenv ipaddr 192.168.1.1 # default, change as required setenv serverip 192.168.1.10 # default, change as required tftp 0x80800000 initramfs.bin bootelf $fileaddr Tested by forum user KernelMaker. Link: https://forum.openwrt.org/t/eap225-v1-firmware/87116 Signed-off-by: Sander Vanheule <sander@svanheule.net>
* ath79: add Embedded Wireless Balin PlatformCatrinel Catrinescu2021-12-033-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | Add the Embedded Wireless "Balin" platform, it is in ar71xx too SoC: QCA AR9344 or AR9350 RAM: DDR2-RAM 64MBytes Flash: SPI-NOR 16MBytes WLAN: 2 x 2 MIMO 2.4 & 5 GHz IEEE802.11 a/b/g/n Ethernet: 3 x 10/100 Mb/s USB: 1 x USB2.0 Host/Device bootstrap-pin at power-up PCIe: MiniPCIe - 1 x lane PCIe 1.2 Button: 1 x Reset-Button UART: 1 x Normal, 1 x High-Speed JTAG: 1 x EJTAG LED: 1 x Green Power/Status LED GPIO: 10 x Input/Output multiplexed The module comes already with the current vanilla OpenWrt firmware. To update, use "sysupgrade -n --force <image>" image directly in vendor firmware. This resets the existing configurations back to default! Signed-off-by: Catrinel Catrinescu <cc@80211.de> [indent, led function+color properties, fix partition unit-address, re-enable pcie port, mention button+led in commit message] Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: bump 5.4 to 5.4.161John Audia2021-11-282-55/+1
| | | | | | | | | | | | | | | Removed upstreamed: ath79/patches-5.4/921-serial-core-add-support-for-boot-console-with-arbitr.patch[1] Manually rebased: layerscape/patches-5.4/804-crypto-0016-MLKU-114-1-crypto-caam-reduce-page-0-regs-access-to-.patch octeontx/patches-5.4/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch All other patches automatically rebased. 1. Private email exchange with patch author, Hauke Mehrtens Signed-off-by: John Audia <graysky@archlinux.us>
* ath79: convert TP-Link Archer C7v1/2 Wifis to nvmem-cellsChristian Lamparter2021-11-283-10/+38
| | | | | | | | | | | | | | | For v2, both ath9k (2.4GHz Wifi) and ath10k (5 GHz) driver now pull the (pre-)calibration data from the nvmem subsystem. v1 is slightly different as only the ath9k Wifi is supported. This allows us to move the userspace caldata extraction and mac-address patching for the 5GHZ ath10k supported wifi into the device-tree definition of the device. ath9k's nodes are also changed over to use nvmem-cells over OpenWrt's custom mtd-cal-data property. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* Revert "ath79: add support for Mikrotik LHG 5"Hauke Mehrtens2021-11-236-177/+0
| | | | | | | | This reverts commit 48774decea9b42e97edd53ce33e574de7d85f3df. This commit does not contain a valid name in the Signed-off-by line. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* ath79: merge D-Link DAP-2695 with dtsiSebastian Schaper2021-11-202-81/+25
| | | | | | | | | | | | Further devices from the series have been added in the meantime, introducing `qca955x_dlink_dap-2xxx.dtsi`. Thus, merge support for DAP-2695 with the existing dtsi. This implies factory images can now be flashed via the regular OEM Web UI, as well as the bootloader recovery. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
* ath79: move cal-data extraction to dts for DAP-2695Sebastian Schaper2021-11-203-5/+2
| | | | | | | | | | This device can be merged with the existing dtsi, which declares the location of ath9k cal-data via devicetree, correcting the 2.4G mac address in `10_fix_wifi_mac` rather than `10-ath9k-eeprom`. To make these changes more visible, apply before merging with dtsi. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
* ath79: increase SPI frequency for D-Link DAP-2695Sebastian Schaper2021-11-201-1/+1
| | | | | | | | | This device can be merged with the existing dtsi, which will increase spi-max-frequency to 50 MHz. To make this change more visible, increase to 50 MHz before merging. Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net>
* ath79: add support for Mikrotik LHG 5Jakob (Jack/XDjackieXD)2021-11-206-0/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MikroTik LHG 5 series (product codes RBLHG-5nD, RBLHG-5HPnD and RBLHG-5HPnD-XL) devices are an outdoor 5GHz CPE with a 24.5dBi or 27dBi integrated antenna built around the Atheros AR9344 SoC. It is very similar to the SXT Lite5 series which this patch is based upon. Specifications: - SoC: Atheros AR9344 - RAM: 64 MB - Storage: 16 MB SPI NOR - Wireless: Atheros AR9340 (SoC) 802.11a/n 2x2:2 - Ethernet: Atheros AR8229 switch (SoC), 1x 10/100 port, 8-32 Vdc PoE in - 8 user-controllable LEDs: - 1x power (blue) - 1x user (white) - 1x ethernet (green) - 5x rssi (green) See https://mikrotik.com/product/RBLHG-5nD for more details. Notes: The device was already supported in the ar71xx target. Flashing: TFTP boot initramfs image and then perform a sysupgrade. Follow common MikroTik procedure as in https://openwrt.org/toh/mikrotik/common. Signed-off-by: Jakob (Jack/XDjackieXD) <jakob@chaosfield.at>
* ath79: mikrotik: enable USB module on RouterBoard wAPR-2nDRoger Pueyo Centelles2021-11-202-1/+9
| | | | | | | | | | | The MikroTik RouterBOARD wAPR-2nD (wAP R) router features a miniPCI-e slot with USB lines connected, which are used by some USB cards with miniPCI-e form factor, like the R11e-LR8. Enabling USB support is required for such cards to work. Tested on a MikroTik wAP LR8 kit (RB wAPR-2nD + R11e-LR8). Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* kernel: bump 5.10 to 5.10.80Rui Salvaterra2021-11-192-55/+1
| | | | | | | | | | | | | | | | | | | | | | Deleted (upstreamed): ath79/patches-5.10/921-serial-core-add-support-for-boot-console-with-arbitr.patch [1] bcm53xx/patches-5.10/033-v5.15-0012-ARM-dts-BCM5301X-Fix-memory-nodes-names.patch [2] lantiq/patches-5.10/0016-mtd-rawnand-xway-Keep-the-driver-compatible-with-on-.patch [3] lantiq/patches-5.10/0110-MIPS-lantiq-dma-add-small-delay-after-reset.patch [4] lantiq/patches-5.10/0111-MIPS-lantiq-dma-reset-correct-number-of-channel.patch [5] lantiq/patches-5.10/0112-MIPS-lantiq-dma-fix-burst-length-for-DEU.patch [6] Manually rebased: ipq806x/patches-5.10/0065-arm-override-compiler-flags.patch [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=47462c5e600fbaffd755cd13dedd80d04e41ff83 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=2fde76df1885a6bec04317e457121326070450eb [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=9b366f5221d8aa64b22f35be137a5749326444ce [4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=5af57ce8a6155fe3e4270d28d171abf8903bebc0 [5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=b92a5df2c7adc79a57481445f67de0c1c716581f [6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.80&id=6b72caabc47011d03f44064452b2c65e8ed18326 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ath79: WNDR3700/3800/MAC: utilize nvmem for caldata fetchingChristian Lamparter2021-11-068-40/+74
| | | | | | | | converts the still popular WNDR3700 Series to fetch the caldata through nvmem. As the "MAC with NVMEM" has shown, there could pitfalls along the way. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: add support for Netgear R6100Piotr Dymacz2021-11-035-0/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Netgear R6100 is a dual-band Wi-Fi 5 (AC1200) router based on Qualcomm Atheros (AR9344 + QCA9882) platform. Support for this device was first introduced in 15f6f67d18 (ar71xx). FCC ID: PY312400225. Specifications: - Atheros AR9344 (560 MHz) - 128 MB of RAM (DDR2) - 128 MB of flash (parallel NAND) - 2T2R 2.4 GHz Wi-Fi (AR9344) - 2T2R 5 GHz Wi-Fi (QCA9882) - 5x 10/100 Mbps Ethernet (AR9344) - 4x internal antenna - 1x USB 2.0 (GPIO-controlled power) - 6x LED, 3x button (reset, Wi-Fi, WPS) - UART (4-pin, 2.54 mm pitch) header on PCB - 1x mechanical power switch - DC jack for main power input (12 V) WARNING: sysupgrade from older stable releases is not possible, fresh installation (via vendor's GUI or TFTP based recovery) is required. Reason for that is increased kernel partition size. Installation: Use the 'factory' image under vendor's GUI or via TFTP U-Boot recovery. You can use the 'nmrpflash' tool at a boot time, before kernel is loaded or start it manually by pressing the 'reset' button for ~20 seconds from powering up the device (U-Boot will start TFTP server on 192.168.1.1, use TFTP client to send the image). Signed-off-by: Enrico Mioso <mrkiko.rs@gmail.com> Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> Signed-off-by: Michael Pratt <mcpratt@pm.me> Signed-off-by: Piotr Dymacz <pepe2k@gmail.com>
* kernel: 5.10: packet mangling code only for ar8216 driverMathias Kresin2021-11-021-0/+1
| | | | | | | | Only the ar8216 switch driver uses the packet mangling code. Update the kernel configs accordingly. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ath79: fix UBNT Aircube AC gpiosNicolò Veronese2021-11-012-4/+4
| | | | | | | | | | GPIOs on the Aircube AC are wrong: - Reset GPIO moved from 17 to 12 - PoE Pass Through GPIO for Aircube AC is 3 Fixes: 491ae3357e10 ("ath79: add support for Ubiquiti airCube AC") Signed-off-by: Nicolò Veronese <nicveronese@gmail.com>
* ath79: add support for Letv LBA-047-CHShiji Yang2021-11-013-0/+178
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SOC: QCA9531 650 MHz ROM: 16 MiB Flash (Winbond W25Q128FV) RAM: 128 MiB DDR2 (Winbond W971GG6SB) LAN: 10/100M *2 WAN: 10/100M *1 LED: BGR color *1 Mac address: label C8:0E:77:xx:xx:68 art@0x0 lan C8:0E:77:xx:xx:62 art@0x6 wan C8:0E:77:xx:xx:68 art@0x0 (same as the label) wlan C8:0E:77:xx:xx:B2 art@0x1002 (load automatically) TFTP installation: * Set local IP to 192.168.67.100 and open tftpd64, link lan port to computer. Rename "xxxx-factory.bin" to "openwrt-ar71xx-generic-ap147-16M-rootfs-squashfs.bin". * Make sure firmware file is in the tftpd's directory, push reset button and plug in, hold it for 5 seconds, and then it will download firmware from tftp server automatically. More information: * This device boot from flash@0xe80000 so we need a okli loader to deal with small kernel partition issue. In order to make full use of the storage space, connect a part of the previous kernel partition to the firmware. Stock Modify 0x000000-0x040000(u-boot) 0x000000-0x040000(u-boot) 0x040000-0x050000(u-boot-env) 0x000000-0x050000(u-boot-env) 0x050000-0xe80000(rootfs) 0x050000-0xe80000(firmware part1) 0xe80000-0xff0000(kernel) 0xe80000-0xe90000(okli-loader) 0xe90000-0xff0000(firmware part2) 0xff0000-0x1000000(art) 0xff0000-0x1000000(art) Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* ath79: add support for Dongwon T&I DW02-412HJihoon Han2021-10-317-0/+310
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dongwon T&I DW02-412H is a 2.4/5GHz band 11ac (WiFi-5) router, based on Qualcomm Atheros QCA9557. Specifications -------------- - SoC: Qualcomm Atheros QCA9557-AT4A - RAM: DDR2 128MB - Flash: SPI NOR 2MB (Winbond W25Q16DVSSIG / ESMT F25L16PA(2S)) + NAND 64/128MB - WiFi: - 2.4GHz: QCA9557 WMAC - 5GHz: QCA9882-BR4A - Ethernet: 5x 10/100/1000Mbps - Switch: QCA8337N-AL3C - USB: 1x USB 2.0 - UART: - JP2: 3.3V, TX, RX, GND (3.3V is the square pad) / 115200 8N1 Installation -------------- 1. Connect a serial interface to UART header and interrupt the autostart of kernel. 2. Transfer the factory image via TFTP and write it to the NAND flash. 3. Update U-Boot environment variable. > tftpboot 0x81000000 <your image>-factory.img > nand erase 0x1000000 > nand write 0x81000000 0x1000000 ${filesize} > setenv bootpart 2 > saveenv Revert to stock firmware -------------- 1. Revert to stock U-Boot environment variable. > setenv bootpart 1 > saveenv MAC addresses as verified by OEM firmware -------------- WAN: *:XX (label) LAN: *:XX + 1 2.4G: *:XX + 3 5G: *:XX + 4 The label MAC address was found in art 0x0. Credits -------------- Credit goes to the @manatails who first developed how to port OpenWRT to this device and had a significant impact on this patch. And thanks to @adschm and @mans0n for guiding me to revise the code in many ways. Signed-off-by: Jihoon Han <rapid_renard@renard.ga> Reviewed-by: Sungbo Eo <mans0n@gorani.run> Tested-by: Sungbo Eo <mans0n@gorani.run>
* ath79: fix parallel image generation for Zyxel NBG6716André Valentin2021-10-311-5/+4
| | | | | | | | | This changes the image generation to use a unique directory. With parallel building it may occur that two concurrent jobs try to create an image which leds to errors. It also removes a needless subdirecory. Signed-off-by: André Valentin <avalentin@marcant.net>
* ath79: mikrotik: enable SFP on RB921GS-5HPacD (mANTBox 15s)Roger Pueyo Centelles2021-10-314-51/+51
| | | | | | | | | | | | This patch enables the SFP cage on the MikroTik RouterBOARD 921GS-5HPacD (mANTBox 15s). The RB922UAGS-5HPacD had it already working, so the support code is moved to the common DTSI file both devices share. Tested on a RouterBOARD 921GS-5HPacD with a MikroTik S-53LC20D module. Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* kernel: bump 5.10 to 5.10.76Rui Salvaterra2021-10-301-1/+1
| | | | | | | | | | | | | | | | Deleted (upstreamed): bcm27xx/patches-5.10/950-0145-xhci-add-quirk-for-host-controllers-that-don-t-updat.patch [1] Manually rebased: bcm27xx/patches-5.10/950-0355-xhci-quirks-add-link-TRB-quirk-for-VL805.patch bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch Note: although automatically rebaseable, the last patch has been edited to avoid conflicting bit definitions. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=b6f32897af190d4716412e156ee0abcc16e4f1e5 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ath9k: OF: qca,disable-(2|5)ghz => ieee80211-freq-limitChristian Lamparter2021-10-304-6/+6
| | | | | | | | | | | | | | | | | | OpenWrt maintains two special out-of-tree DT properties: "qca,disable-5ghz" and "qca,disable-2ghz". These are implemented in a mac80211 ath9k patch "550-ath9k-disable-bands-via-dt.patch". With the things being what they are, now might be a good point to switch the devices to the generic and upstream "ieee80211-freq-limit" property. This property is much broader and works differently. Instead of disabling the drivers logic which would add the affected band and channels. It now disables all channels which are not within the specified frequency range. Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> # HH5A Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: ag71xx: Disable napi related interrupts during probeSven Eckelmann2021-10-231-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ag71xx_probe is registering ag71xx_interrupt as handler for the gmac0/gmac1 interrupts. The handler is trying to use napi_schedule to handle the processing of packets. But the netif_napi_add for this device is called a lot later in ag71xx_probe. It can therefore happen that a still running gmac0/gmac1 is triggering the interrupt handler with a bit from AG71XX_INT_POLL set in AG71XX_REG_INT_STATUS. The handler will then call napi_schedule and the napi code will crash the system because the ag->napi is not yet initialized: libphy: Fixed MDIO Bus: probed CPU 0 Unable to handle kernel paging request at virtual address 00000000, epc == 00000000, ra == 81373408 Oops[#1]: CPU: 0 PID: 1 Comm: swapper Not tainted 5.4.152 #0 $ 0 : 00000000 00000001 00000000 8280bf28 $ 4 : 82a98cb0 00000000 81620000 00200140 $ 8 : 00000000 00000000 74657272 7570743a $12 : 0000005b 8280bdb9 ffffffff ffffffff $16 : 00000001 82a98cb0 00000000 8280bf27 $20 : 8280bf28 81620000 ffff8b00 8280bf30 $24 : 00000000 8125af9c $28 : 82828000 8280bed8 81610000 81373408 Hi : 00005fff Lo : 2e48f657 epc : 00000000 0x0 ra : 81373408 __napi_poll+0x3c/0x11c Status: 1100dc03 KERNEL EXL IE Cause : 00800008 (ExcCode 02) BadVA : 00000000 PrId : 00019750 (MIPS 74Kc) Modules linked in: Process swapper (pid: 1, threadinfo=(ptrval), task=(ptrval), tls=00000000) Stack : ffff8afb ffff8afa 81620000 00200140 00000000 82a98cb0 00000008 0000012c 81625620 81373684 ffffffff ffffffff ffffffef 00000008 816153d8 81620000 815b0d60 815bbd54 00000000 81753700 8280bf28 8280bf28 8280bf30 8280bf30 81753748 00000008 00000003 00000004 0000000c 00000100 3fffffff 8175373c 816059f0 814ddb48 00000001 8160ab30 81615488 810618bc 00000006 00000000 ... Call Trace: [<81373684>] net_rx_action+0xfc/0x26c [<814ddb48>] __do_softirq+0x118/0x2ec [<810618bc>] handle_percpu_irq+0x50/0x80 [<8125ab8c>] plat_irq_dispatch+0x94/0xc8 [<81004e98>] handle_int+0x138/0x144 Code: (Bad address in epc) ---[ end trace a60d797432b656b2 ]--- The gmcc0/gmac1 must be brought in a state in which it doesn't signal a AG71XX_INT_POLL related status bits as interrupt before registering the interrupt handler. ag71xx_hw_start will take care of re-initializing the AG71XX_REG_INT_ENABLE. Fixes: f529a3742043 ("surprise :p") Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ath79: lzma-loader: fix & re-enable per-board CONFIG_BOARD_DEVChristian Lamparter2021-10-221-2/+5
| | | | | | | | | | | | | | | | | | | Back in the AR71XX days, the lzma-loader code could be customized based on the $BOARD variable. These would be passed as a compile-time -DCONFIG_BOARD_$DEVICE_MODEL flag to the compiler. Hence, the lzma-loader would be able to include device-specific fixups. Note: There's still a fixup for the TpLink TL-WR1043ND V1 found in the lzma-loader's board.c code. But since the days of AR71XX I couldn't find a forum post or bug reported. So, I left it as is to not break anything by enabling it. => If you have a TL-WR1043ND V1 and you have problem with the ethernet: let me know. Because otherwise, the fixup might simply no longer needed with ath79 and it can be removed. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: mikrotik: use 64 KiB SPI NOR erase sectorsRoger Pueyo Centelles2021-10-221-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes CONFIG_MTD_SPI_NOR_USE_4K_SECTORS from the default symbols for the ath79/mikrotik target. MikroTik devices hold some of their user-configurable settings in the soft_config partition, which is typically sized 4 KiB, of the SPI NOR flash memory. Previously, in the ar71xx target, it was possible to use 64 KiB erase sectors but also smaller 4 KiB ones when needed. This is no longer the case in ath79 with newer kernels so, to be able to write to these 4 KiB small partitions without erasing 60 KiB around, the CONFIG_MTD_SPI_NOR_USE_4K_SECTORS symbol was added to the defaults. However, this ended up making sysupgrade images which were built with 64 KiB size blocks not to keep settings (e.g., the files under /etc/config/) over the flashing process. Using 4 KiB erase sector size on the sysupgrade images (by setting BLOCKSIZE = 4k) allows keeping settings over a flashing process, but renders the process terribly slow, possibly causing a user to mistakenly force a manual device reboot while the process is still on- going. Instead, ditching the 4 KiB erase sectors for the default 64 KiB erase size provides normal SPI write speed and sysupgrade times, at the expense of not being able to modify the soft_config partition (which is rarely a required thing). An OpenWrt patch for MTD_SPI_NOR_USE_4K_SECTORS_LIMIT may once have allowed to use different per-partition erase sector sizes. Due to changes on recent kernels it now only works on a per-device basis. Also, partial eraseblock write can be performed in ath79 with kernels 5.4 and lower, by copying the blocks from the 64 KiB, erasing the whole sector and restoring those blocks not meant to be modified. A kernel bump had that patch broken for a long time, but got fixed in bf2870c. Note: the settings in the soft_config partition can be reset to their defaults by holding the reset button for 5 seconds (and less than 10 seconds) at device boot. Fixes: FS#3492 (sysupgrade […] loses settings...) Fixes: a66eee63368e (ath79: add mikrotik subtarget) Signed-off-by: Roger Pueyo Centelles <roger.pueyo@guifi.net>
* ath79: use correct USB package for DIR-505David Bauer2021-10-211-1/+1
| | | | | | | AR9331 requires kmod-usb2-chipidea to use the USB ports. Include the correct package so they can be used with the base image. Signed-off-by: David Bauer <mail@david-bauer.net>
* kernel: bump 5.10 to 5.10.74Rui Salvaterra2021-10-211-1/+1
| | | | | | Patches automatically refreshed. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: bump 5.4 to 5.4.154John Audia2021-10-211-1/+1
| | | | | | All patches automatically rebased. Signed-off-by: John Audia <graysky@archlinux.us>
* kernel: bump 5.10 to 5.10.71John Audia2021-10-101-1/+1
| | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, ipq806x/R7800 Run-tested: bcm2711/RPi4B, ipq806x/R7800 Signed-off-by: John Audia <graysky@archlinux.us>
* ath79: add recipe for common setup with loader-okli-compileAdrian Schmutzler2021-10-023-25/+13
| | | | | | | These instructions are repeated for a few devices now, let's move them to shared definition so we do not repeat ourselves too often. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for TP-Link CPE710-v1Andrew Cameron2021-09-255-1/+172
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | TP-Link CPE710-v1 is an outdoor wireless CPE for 5 GHz with one Ethernet port based on the AP152 reference board Specifications: - SoC: QCA9563-AL3A MIPS 74kc @ 775MHz, AHB @ 258MHz - RAM: 128MiB DDR2 @ 650MHz - Flash: 16MiB SPI NOR Based on the GD25Q128 - Wi-Fi 5Ghz: ath10k chip (802.11ac for up to 867Mbps on 5GHz wireless data rate) Based on the QCA9896 - Ethernet: one 1GbE port - 23dBi high-gain directional 2×2 MIMO antenna and a dedicated metal reflector - Power, LAN, WLAN5G Blue LEDs - 3x Blue LEDs Flashing instructions: Flash factory image through stock firmware WEB UI or through TFTP To get to TFTP recovery just hold reset button while powering on for around 30-40 seconds and release. Rename factory image to recovery.bin Stock TFTP server IP:192.168.0.100 Stock device TFTP address:192.168.0.254 Signed-off-by: Andrew Cameron <apcameron@softhome.net> [convert to nvmem, fix MAC assignment in 11-ath10k-caldata] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* kernel: bump 5.4 to 5.4.144John Audia2021-09-131-1/+1
| | | | | | | | | | | | | Manually rebased: backport-5.4/370-netfilter-nf_flow_table-fix-offloaded-connection-tim.patch All other patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Run-tested: ipq806x/R7800 Signed-off-by: John Audia <graysky@archlinux.us>
* kernel: bump 5.10 to 5.10.62Rui Salvaterra2021-09-091-1/+1
| | | | | | Patches automatically refreshed. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ath79: add support for TP-Link TL-WA1201 v2Robert Balas2021-09-055-2/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This device is a wireless access point working on the 2.4 GHz and 5 GHz band, based on Qualcomm/Atheros QCA9563 + QCA9886. Specification - 775 MHz CPU - 128 MB of RAM (DDR2) - 16 MB of FLASH (SPI NOR) - QCA9563: 2.4 GHz 3x3 - QCA9886: 5 GHz - AR8033: 1x 1 Gbs Ethernet - 4x LED, WPS factory reset and power button - bare UART on PCB (accessible through testpoints) Methods for Flashing: - Apply factory image in OEM firmware web-gui. Wait a minute after the progress bar completes and restart the device. - Sysupgrade on top of existing OpenWRT image - Solder wires onto UART testpoints and attach a terminal. Boot the device and press enter to enter u-boot's menu. Then issue the following commands 1. setenv serverip your-server-ip setenv ipaddr your-device-ip 2. tftp 0x80060000 openwrt-squashfs.bin (Rembember output of size in hex, henceforth "sizeinhex") 3. erase 0x9f030000 +"sizeinhex" 4. cp.b 0x80060000 0x9f030000 0x"sizeinhex" 5. reboot Recover: - U-boot serial console Signed-off-by: Robert Balas <balasr@iis.ee.ethz.ch> [convert to nvmem] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: remove redundant BLOCKSIZE of 64k from devicesAdrian Schmutzler2021-08-302-4/+0
| | | | | | | BLOCKSIZE = 64k is set in Device/Default, i.e. global default on the target. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix spelling of DEVICE_MODEL for D-Link DAP-2695Sebastian Schaper2021-08-281-1/+1
| | | | | | | | | | Change `DAP-2965` to `DAP-2695` for device selection in menuconfig. Fixes: cd09f26660b6 ("ath79: add support for D-Link DAP-2695-A1") Signed-off-by: Sebastian Schaper <openwrt@sebastianschaper.net> [add Fixes] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: remove obsolete pci-ath9k-fixup.[c,h] filesChristian Lamparter2021-08-262-132/+0
| | | | | | | | | | | | This was old code from the AR71XXs target days that doesn't get compiled and used anymore. Bringing up AR92xx and earlier chips from their OWL-Emulator state is currently done by the upstream ath9k-pci-owl-loader module. (see the kmod-owl-loader package). Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: add support for onion omegaJan-Niklas Burfeind2021-08-263-0/+151
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Onion Omega is a hardware development platform with built-in WiFi. https://onioniot.github.io/wiki/ Specifications: - QCA9331 @ 400 MHz (MIPS 24Kc Big-Endian Processor) - 64MB of DDR2 RAM running at 400 MHz - 16MB of on-board flash storage - Support for USB 2.0 - Support for Ethernet at 100 Mbps - 802.11b/g/n WiFi at 150 Mbps - 18 digital GPIOs - A single Serial UART - Support for SPI - Support for I2S Flash instructions: The device is running OpenWrt upon release using the ar71xx target. Both a sysupgrade and uploading the factory image using u-boots web-UI do work fine. Depending on the ssh client, it might be necessary to enable outdated KeyExchange methods e.g. in the clients ssh-config: Host 192.168.1.1 KexAlgorithms +diffie-hellman-group1-sha1 The stock credentials are: root onioneer For u-boots web-UI manually configure `192.168.1.2/24` on your computer, connect to `192.168.1.1`. MAC addresses as verified by OEM firmware: 2G phy0 label LAN eth0 label - 1 LAN is only available in combination with an optional expansion dock. Based on vendor acked commit: commit 5cd49bb067ca ("ar71xx: add support for Onion Omega") Partly reverts: commit fc553c7e4c8e ("ath79: drop unused/incomplete dts") Signed-off-by: Jan-Niklas Burfeind <git@aiyionpri.me>
* ath79: add support for Compex WPJ558 (16M)Romain Mahoux2021-08-253-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: - SoC: QCA9558 - DRAM: 128MB DDR2 - Flash: 16MB SPI-NOR - Wireless: on-board abgn 2×2 2.4GHz radio - Ethernet: 2x 10/100/1000 Mbps (1x 802.11af PoE) - miniPCIe slot Flash instruction: - From u-boot tftpboot 0x80500000 openwrt-ath79-generic-compex_wpj558-16m-squashfs-sysupgrade.bin erase 0x9f030000 +$filesize cp.b $fileaddr 0x9f030000 $filesize boot - From cpximg loader The cpximg loader can be started either by holding the reset button during power up. 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 '6A07': tftp -v -m binary 192.168.1.1 -c put openwrt-ath79-generic-compex_wpj558-16m-squashfs-cpximg-6a07.bin Signed-off-by: Romain Mahoux <romain@mahoux.fr> [convert to nvmem, remove redundant lan_mac in 02_network] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Atheros DB120 reference boardZoltan HERPAI2021-08-224-14/+292
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Atheros DB120 reference board. Specifications: SoC: QCA9344 DRAM: 128Mb DDR2 Flash: 8Mb SPI-NOR, 128Mb NAND flash Switch: 5x 10/100Mbps via AR8229 switch (integrated into SoC), 5x 10/100/1000Mbps via QCA8237 via RGMII WLAN: AR9300 (SoC, 2.4G+5G) + AR9340 (PCIe, 5G-only) USB: 1x 2.0 UART: standard QCA UART header JTAG: yes Button: 1x reset LEDs: a lot Slots: 2x mPCIe + 1x mini-PCI, but using them requires additional undocumented changes. Misc: The board allows to boot off NAND, and there is I2S audio support as well - also requiring additional undocumented changes. Installation: 1. Original bootloader Connect the board to ethernet Set up a server with an IP address of 192.168.1.10 Make the openwrt-ath79-generic-atheros_db120-squashfs-factory.bin available via TFTP tftpboot 0x80060000 openwrt-ath79-generic-atheros_db120-squashfs-factory.bin erase 0x9f050000 +$filesize cp.b $fileaddr 0x9f050000 $filesize 2. pepe2k's u-boot_mod Connect the board to ethernet Set up a server with an IP address of 192.168.1.10 Make the openwrt-ath79-generic-atheros_db120-squashfs-factory.bin available via TFTP, as "firmware.bin" run fw_upg Reboot the board. Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu> [explicit factory recipe in generic.mk, sorting in 10-ath9k-eeprom, convert to nvmem, use fwconcat* names in DTS, remove unneeded DT labels, remove redundant uart node] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: add support for Ubiquiti PowerBeam M2 (XW)Russell Senior2021-08-224-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Ubiquiti PowerBeam M2 (XW), e.g. PBE-M2-400, a 802.11n wireless with a feed+dish form factor. This device was previously supported by the ar71xx loco-m-xw firmware. Specifications: - Atheros AR9342 SoC - 64 MB RAM - 8 MB SPI flash - 1x 10/100 Mbps Ethernet port, 24 Vdc PoE-in - Power and LAN green LEDs - 4x RSSI LEDs (red, orange, green, green) - UART (115200 8N1) Flashing via stock GUI: - Downgrade to AirOS v5.5.x (latest available is 5.5.10-u2) first (see https://openwrt.org/toh/ubiquiti/powerbeam installation instructions) - Upload the factory image via AirOS web GUI. Flashing via TFTP: - Use a pointy tool (e.g., unbent paperclip) to keep the reset button pressed. - Power on the device (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-ubnt_powerbeam-m2-xw-squashfs-factory.bin WARNING: so far, no non-destructive method has been discovered for opening the enclosure to reach the serial console. Internal photos are available here: https://fcc.io/SWX-NBM2HP Signed-off-by: Russell Senior <russell@personaltelco.net>
* ath79: rename Ubiquiti PowerBeam M (XW) to PowerBeam M5 (XW)Russell Senior2021-08-224-7/+7
| | | | | | | | | | | | | | The commit [1] added support for Ubiquiti PowerBeam M (XW), tested on the PBE-M5-400. But, it turns out the PBE-M2-400 has a different ethernet configuration, so make the support specific to the m5 version in anticipation of adding specific support for the m2 in a separate commit. [1] 12eb5b2384a6 ("ath79: add support for Ubiquiti PowerBeam M (XW)") Signed-off-by: Russell Senior <russell@personaltelco.net> [fix model name in DTS, format commit reference in commit message] Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: remove redundant nvmem definitionsAdrian Schmutzler2021-08-2020-172/+22
| | | | | | | | | Due to use of a script when migrating from mtd-mac-address, a few of the definitions are redundant in DTSI and DTS files. Remove those and consolidate the definitions in parent DTSI files in a few cases. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: convert remaining mtd-mac-address cases to nvmemAdrian Schmutzler2021-08-1864-157/+1406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the nvmem-based approach for retrieving MAC addresses appears to depend on the addresses being set up after the partitions, it is no longer possible to keep the MAC address setup in shared DTSI files while the partitions itself are set up in DTS files for the individual devices. In ath79 the firmware partition is typically located somewhere "in the middle" of the partition table. Thus, it's not trivial to share the partitions containing MAC address information in a common DTSI (like we did in some cases on ramips). In this commit, MAC address setup is thus moved to the relevant partitions, and in most cases needs to be duplicated. While the duplication is not really nice, it eventually provides a cleaner and more tidy setup, making the DTS(I) file fragmentation a bit more logical. This should also help with adding new devices, as information is distributed across less locations. For consistency, this commit also moves the mtd-cal-data property "down" together with the MAC address setup, so it's not based on a partition before the latter is defined either. (This is only done for those files touched due to nvmem conversion.) Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
* ath79: fix the AR7{1,2}00 USB PHY patchesRui Salvaterra2021-08-082-4/+4
| | | | | | | PHY_SIMPLE is a bogus kconfig symbol, what we really need to select is GENERIC_PHY. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ath79: add support for GL.iNet GL-X300BJohn Marrett2021-08-054-0/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The GL-X300B is a industrial 4G LTE router based on the Qualcomm QCA9531 SoC. Specifications: - Qualcomm QCA9531 @ 650 MHz - 128 MB of RAM - 16 MB of SPI NOR FLASH - 2x 10/100 Mbps Ethernet - 2.4GHz 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) - RS-485 Serial Port (untested) Flash instructions: This firmware can be flashed using either sysupgrade from the GL.iNet firmware or the recovery console as follows: - Press and hold the reset button - Connect power to the router, wait five seconds - Manually configure 192.168.1.2/24 on your computer, connect to 192.168.1.1 - Upload the firmware image using the web interface RS-485 serial port is untested and may depend on the following commit in the GL.iNet repo: https://github.com/gl-inet/openwrt/commit/202e83a32ae308fbb70502b6dbe3bb0bf8b1fba9 MAC addresses as verified by OEM firmware: vendor OpenWrt address WAN eth0 label LAN eth1 label + 1 2g phy0 label + 2 The label MAC address was found in the art partition at 0x0 Based on vendor commit: https://github.com/gl-inet/openwrt/commit/16c5708b207eb76ff19a040dc973e560d3d8074b Signed-off-by: John Marrett <johnf@zioncluster.ca>
* treewide: backport support for nvmem on non platform devicesAnsuel Smith2021-08-051-5/+2
| | | | | | | | | | | | In the current state, nvmem cells are only detected on platform device. To quickly fix the problem, we register the affected problematic driver with the of_platform but that is more an hack than a real solution. Backport from net-next the required patch so that nvmem can work also with non-platform devices and rework our current patch. Drop the mediatek and dsa workaround and rework the ath10k patches. Rework every driver that use the of_get_mac_address api. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* kernel: bump 5.4 to 5.4.135John Audia2021-07-311-1/+1
| | | | | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Run-tested: ipq806x/R7800 No dmesg regressions, everything functional Signed-off-by: John Audia <graysky@archlinux.us>