aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
Commit message (Collapse)AuthorAgeFilesLines
...
* ath79: qca955x: remove double declarationKoen Vandeputte2022-01-131-2/+1
| | | | | | No need to mention the same value twice Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: rb912: remove unused propertyKoen Vandeputte2022-01-131-1/+0
| | | | | | | ar934x does not define property 'rgmii-enabled' in the parsing code remove it Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* ath79: rb912: fix pll init issuesKoen Vandeputte2022-01-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | It was reported that some rb912 boards (ar934x) have issues with some ethernet speeds. Investigation shows that the board failed to adapt the ethernet pll values as shown here: [ 5.284359] ag71xx 19000000.eth: failed to read pll-handle property added custom prints in code and triggering a link switch: [ 62.821446] Atheros AG71xx: fast reset [ 62.826442] Atheros AG71xx: update pll 2 [ 62.830494] Atheros AG71xx: no pll regmap! Comparison with another very similar board (rb922 - QCA955x) showed a missing reference clock frequency in dts, which seems to cause a pll init issue. Unfortunately, no errors are printed when this occurs. Adding the frequency property fixes the pll init as it can be parsed now by the ethernet driver. [ 55.861407] Atheros AG71xx: fast reset [ 55.866403] Atheros AG71xx: update pll 2 [ 55.870462] Atheros AG71xx: ath79_set_pllval: regmap: 0x81548000, pll_reg: 0x2c, pll_val: 0x02000000 Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com> Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* mikrotik: make soft_config writableOskari Lemmela2022-01-133-3/+0
| | | | | | Parent mtd partition needs to be writable Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* mikrotik: enable variable size eraseOskari Lemmela2022-01-131-0/+1
| | | | | | | Add support for variable size erase blocks. Enable it to all targets which has mikrotik targets. Signed-off-by: Oskari Lemmela <oskari@lemmela.net>
* ath79: Add support for OpenMesh OM5P-AC v1Sven Eckelmann2022-01-095-0/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: ====================== * Qualcomm/Atheros QCA9558 ver 1 rev 0 * 720/600/240 MHz (CPU/DDR/AHB) * 128 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 2T2R 2.4 GHz Wi-Fi (11n) * 2T2R 5 GHz Wi-Fi (11ac) * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * external h/w watchdog (enabled by default)) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * TI tmp423 (package kmod-hwmon-tmp421) for temperature monitoring * 2x ethernet - eth0 + AR8035 ethernet PHY (RGMII) + 10/100/1000 Mbps Ethernet + 802.3af POE + used as LAN interface - eth1 + AR8035 ethernet PHY (SGMII) + 10/100/1000 Mbps Ethernet + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ath79: Add support for OpenMesh OM5P-ANSven Eckelmann2022-01-095-2/+247
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Device specifications: ====================== * Qualcomm/Atheros AR9344 rev 2 * 560/450/225 MHz (CPU/DDR/AHB) * 64 MB of RAM * 16 MB of SPI NOR flash - 2x 7 MB available; but one of the 7 MB regions is the recovery image * 1T1R 2.4 GHz Wi-Fi * 2T2R 5 GHz Wi-Fi * 6x GPIO-LEDs (3x wifi, 2x ethernet, 1x power) * 1x GPIO-button (reset) * external h/w watchdog (enabled by default) * TTL pins are on board (arrow points to VCC, then follows: GND, TX, RX) * TI tmp423 (package kmod-hwmon-tmp421) for temperature monitoring * 2x ethernet - eth0 + AR8035 ethernet PHY + 10/100/1000 Mbps Ethernet + 802.3af POE + used as LAN interface - eth1 + 10/100 Mbps Ethernet + builtin switch port 1 + 18-24V passive POE (mode B) + used as WAN interface * 12-24V 1A DC * internal antennas Flashing instructions: ====================== Various methods can be used to install the actual image on the flash. Two easy ones are: ap51-flash ---------- The tool ap51-flash (https://github.com/ap51-flash/ap51-flash) should be used to transfer the image to the u-boot when the device boots up. initramfs from TFTP ------------------- The serial console must be used to access the u-boot shell during bootup. It can then be used to first boot up the initramfs image from a TFTP server (here with the IP 192.168.1.21): setenv serverip 192.168.1.21 setenv ipaddr 192.168.1.1 tftpboot 0c00000 <filename-of-initramfs-kernel>.bin && bootm $fileaddr The actual sysupgrade image can then be transferred (on the LAN port) to the device via scp <filename-of-squashfs-sysupgrade>.bin root@192.168.1.1:/tmp/ On the device, the sysupgrade must then be started using sysupgrade -n /tmp/<filename-of-squashfs-sysupgrade>.bin Signed-off-by: Sven Eckelmann <sven@narfation.org>
* ath79: add support for ASUS RP-AC66Tamas Balogh2022-01-096-0/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Asus RP-AC66 Repeater Hardware specifications: Board: AP152 SoC: QCA9563 DRAM: 64MB DDR2 Flash: 25l128 16MB SPI-NOR LAN/WAN: 1x1000M QCA8033 WiFi 5GHz: QCA9880 Clocks: CPU:775.000MHz, DDR:650.000MHz, AHB:258.333MHz, Ref:25.000MHz MAC addresses as verified by OEM firmware: use address source Lan/Wan *:24 art 0x1002 (label) 2G *:24 art 0x1002 5G *:26 art 0x5006 Installation: Asus windows recovery tool: - install the Asus firmware restoration utility - unplug the router, hold the reset button while powering it on - release when the power LED flashes slowly - specify a static IP on your computer: IP address: 192.168.1.75 Subnet mask 255.255.255.0 - Start the Asus firmware restoration utility, specify the factory image and press upload - Do not power off the device after OpenWrt has booted until the LED flashing. TFTP Recovery method: - set computer to a static ip, 192.168.1.75 - connect computer to the LAN 1 port of the router - hold the reset button while powering on the router for a few seconds - send firmware image using a tftp client; i.e from linux: $ tftp tftp> binary tftp> connect 192.168.1.1 tftp> put factory.bin tftp> quit Signed-off-by: Tamas Balogh <tamasbalogh@hotmail.com>
* ath79: add usb-phy-analog to reset list in qca953x.dtsiJinfan Lei2021-12-291-2/+2
| | | | | | | | | | | | | On startup the USB of QCA9531 board can't be initialized successfully. lsusb result as below: root@OpenWrt:~# lsusb unable to initialize libusb: -99 This is because usb-phy-analog is not added to reset list. Signed-off-by: Jinfan Lei <153869379@qq.com> (added linebreaks and small little changes to the commit message) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: 5.10: add patches to fix macronix flashNick Hainke2021-12-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | mtd: spi-nor: locking support for MX25L6405D Macronix MX25L6405D supports locking with four block-protection bits. Currently, the driver only sets three bits. If the bootloader does not sustain the flash chip in an unlocked state, the flash might be non-writeable. Add the corresponding flag to enable locking support with four bits in the status register. mtd: spi-nor: disable 16-bit-sr for macronix Macronix flash chips seem to consist of only one status register. These chips will not work with the "16-bit Write Status (01h) Command". Disable SNOR_F_HAS_16BIT_SR for all Macronix chips. Refreshed: - 0052-mtd-spi-nor-use-4-bit-locking-for-MX25L12805D.patch Fixes: 15aa53d7ee65 ("ath79: switch to Kernel 5.10") Signed-off-by: Nick Hainke <vincent@systemli.org>
* ath79: remove pre-5.10 specific kernel codeDavid Bauer2021-12-295-65/+2
| | | | | | With Kernel 5.4 support removed, we can get rid of this legacy code. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: remove kernel 5.4David Bauer2021-12-2741-4607/+0
| | | | Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: add missing UBNT_REVISIONNick Hainke2021-12-271-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The UBNT_REVISION was already added for the ubnt-xw target because: U-boot bootloader on M-XW devices expects factory image revision version in specific format. On airOS v6.1.7 with `U-Boot 1.1.4-s1039 (May 24 2017 - 15:58:18)` bootloader checks if the revision major(?) number is actually a number, but in currently generated images there's OpenWrt text and so the check fails ... By placing arbitrary correct number first in major version, we make the bootloader happy and we can flash factory images over TFTP again. commit d42a7c469909 ("ath79: ubnt-m-xw: Fix factory image flashing using TFTP recovery method") Fixes errors in the form of (tftp flashing): sent DATA <block=8577, 412 bytes> received ERROR <code=2, msg=Firmware check failed> Error code 2: Firmware check failed The missing UBNT_REVISION was not noticed before, since the UBNT_REVISION field for the ubnt-xm target was also set to: "42.OpenWrt-..." Probably, UBNT_REVISION for the ubnt-xm target was set by the ubnt-xw and was never overridden somewhere else. However, it is missing and should be part of the ubnt-xm device. Signed-off-by: Nick Hainke <vincent@systemli.org>
* ath79: switch to Kernel 5.10Paul Spooren2021-12-211-2/+1
| | | | | | | | | | Kernel 5.10 is used by many people since quite a while. With other targets already moved to 5.10, let ath79 follow suit. Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> [ath79/tl-wdr3600; ath79/tl-wdr4300] Tested-by: Aleksander Jan Bajkowski <olek2@wp.pl> [ath79/tl-wdr4300] Signed-off-by: Paul Spooren <mail@aparcar.org> Signed-off-by: David Bauer <mail@david-bauer.net>
* kernel: filter out both Clang and LLD versionsSergey Ryazanov2021-12-171-1/+0
| | | | | | | | Both CLANG_VERSION and LLD_VERISON are autogenerated runtime configuration options, so add them to the kernel configuration filter and remove from generic and per-target configs to keep configs clean. Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* 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>