aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ath79
Commit message (Collapse)AuthorAgeFilesLines
* ath79: add support for Alcatel HH40VAndreas Böhler2023-04-234-0/+191
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Alcatel HH40V is a CAT4 LTE router used by various ISPs. Specifications ============== SoC: QCA9531 650MHz RAM: 128MiB Flash: 32MiB SPI NOR LAN: 1x 10/100MBit WAN: 1x 10/100MBit LTE: MDM9607 USB 2.0 (rndis configuration) WiFi: 802.11n (SoC integrated) MAC address assignment ====================== There are three MAC addresses stored in the flash ROM, the assignment follows stock. The MAC on the label is the WiFi MAC address. Installation (TFTP) =================== 1. Connect serial console 2. Configure static IP to 192.168.1.112 3. Put OpenWrt factory.bin file as firmware-system.bin 4. Press Power + WPS and plug in power 5. Keep buttons pressed until TFTP requests are visible 6. Wait for the system to finish flashing and wait for reboot 7. Bootup will fail as the kernel offset is wrong 8. Run "setenv bootcmd bootm 0x9f150000" 9. Reset board and enjoy OpenWrt Installation (without UART) =========================== Installation without UART is a bit tricky and requires several steps too long for the commit message. Basic steps: 1. Create configure backup 2. Patch backup file to enable SSH 3. Login via SSH and configure the new bootcmd 3. Flash OpenWrt factory.bin image manually (sysupgrade doesn't work) More detailed instructions will be provided on the Wiki page. Tested by: Christian Heuff <christian@heuff.at> Signed-off-by: Andreas Böhler <dev@aboehler.at>
* ath79: use gpios for switch management in WZR-HP-G300NH variantsTony Ambardar2023-04-231-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The RTL8366S/RB switch node in DTS defines "mii-bus = <&mdio0>" to permit management via SMI but this has likely never worked, instead falling back to using GPIOs in the past: rtl8366s switch: cannot find mdio bus from bus handle (yet) rtl8366s switch: using GPIO pins 19 (SDA) and 20 (SCK) rtl8366s switch: RTL8366 ver. 1 chip found Recently, the rtl8366s and rtl8366_smi drivers were changed from built-in to loadable modules. This affected driver probing order and caused switch initialization (and network access) to fail: rtl8366s switch: using MDIO bus 'ag71xx_mdio' rtl8366s switch: unknown chip id (ffff) rtl8366s switch: chip detection failed, err=-19 Force using GPIOs to manage the switch by dropping the "mii-bus" DTS definition, which works for both built-in and loadable switch drivers. Fixes: 6e0f0eae5b ("ath79: use rtl8366s and rtl8366_smi as a module") Fixes: 575ec7a4b1 ("ath79: use rtl8366rb as a module") Tested-by: Tony Ambardar <itugrok@yahoo.com> # WZR-HP-G300NH (RTL8366S) Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
* ath79: fix switch support for WZR-HP-G300NH devicesTony Ambardar2023-04-231-1/+2
| | | | | | | | | | | | Switch drivers for RTL8366S/RB were packaged as modules but not properly added to device definitions for WZR-HP-G300NH router variants, breaking network access to both after installation or upgrade. Assign the correct switch driver package for each router. Fixes: 6e0f0eae5b ("ath79: use rtl8366s and rtl8366_smi as a module") Fixes: 575ec7a4b1 ("ath79: use rtl8366rb as a module") Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
* ath79: mikrotik: update kernel on NAND using YafutMichał Kępień2023-04-183-8/+5
| | | | | | | | | | | | | | | | | | | | | Instead of erasing the entire NAND partition holding the kernel during every system upgrade and then flashing a Yaffs file system image prepared using kernel2minor (not accounting for bad blocks in the process), use the Yafut utility to replace the kernel executable on MikroTik NAND devices, preserving the existing Yaffs file system (including bad block information) on the partition holding the kernel. Add Yafut to DEFAULT_PACKAGES for the ath79/mikrotik target, so that the tool is included in the initramfs images created when building for multiple profiles. However, exclude Yafut from the images built for MikroTik devices with NOR flash as the tool is currently only meant to be used on devices with NAND flash. As this addresses the concerns for MikroTik NAND devices discussed in commit 9d96b6fb72 ("ath79/mikrotik: disable building NAND images"), re-enable building images for these devices. Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
* ath79: mikrotik: drop unused files from ramdiskMichał Kępień2023-04-181-2/+1
| | | | | | | | | | | | | | | | | | | The ramdisk used by sysupgrade on MikroTik devices currently includes U-Boot fw_* files that are not necessary for performing a system upgrade on that platform. The relevant lines were added to target/linux/ath79/mikrotik/base-files/lib/upgrade/platform.sh by commit a66eee6336 ("ath79: add mikrotik subtarget"), likely because they also existed in target/linux/ath79/nand/base-files/lib/upgrade/platform.sh, where the platform_do_upgrade_mikrotik_nand() function moved by commit a66eee6336 originally lived. However, these lines were added to target/linux/ath79/nand/base-files/lib/upgrade/platform.sh by commit 55e6c903ae ("ath79: GL-AR300M: provide NAND support; increase to 4 MB kernel"), which is not related to MikroTik devices in any way. Remove the code adding unused U-Boot fw_* files to the ramdisk used by sysupgrade on MikroTik devices. Signed-off-by: Michał Kępień <openwrt@kempniu.pl>
* ath79: create Aruba AP-105 APBoot compatible imageDavid Bauer2023-04-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alter the Aruba AP-105 image generation process so OpenWrt can be loaded with the vendor Aruba APBoot. This works by prepending the OpenWrt LZMA loader to the uImage and jumping directly to the loader. Aruba does not offer bootm on these boards. This approach keeps compatibility to devices which had their U-Boot replaced. Both bootloaders can boot the same image. The same modification is most likely also possible for the Aruba AP-175. With this patch, new installations do not require replacing the bootloader and can be performed from the serial console without opening the case. Installation ------------ 1. Attach to the serial console of the AP-105. Interrupt autoboot and change the U-Boot env. $ setenv apb_rb_openwrt "setenv ipaddr 192.168.1.1; setenv serverip 192.168.1.66; netget 0x84000000 ap105.bin; go 0x84000040" $ setenv apb_fb_openwrt "cp.b 0xbf040000 0x84000000 0x10000; go 0x84000040" $ setenv bootcmd "run apb_fb_openwrt" $ saveenv 2. Load the OpenWrt initramfs image on the device using TFTP. Place the initramfs image as "ap105.bin" in the TFTP server root directory, connect it to the AP and make the server reachable at 192.168.1.66/24. $ run apb_rb_openwrt 3. Once OpenWrt booted, transfer the sysupgrade image to the device using scp and use sysupgrade to install the firmware. Signed-off-by: David Bauer <mail@david-bauer.net>
* ath79: fix LED pinout for Comfast CF-E314N v2Mark Onstid2023-04-171-6/+6
| | | | | | | | | | | | In addition to standardizing LED names to match the rest of the systems, this commit fixes a possibly erroneous pinout for LEDs in Comfast CF-E314N v2. In particular, rssimediumhigh and rssihigh are moved from pins 13 and 14 to 14 and 16 respectively. In addition to working on a test device, this pinout better matches the one set out in the prototype support patch for the device in Github PR #1873. Signed-off-by: Mark Onstid <turretkeeper@mail.com>
* kernel: bump 5.10 to 5.10.177John Audia2023-04-081-1/+1
| | | | | | All patches automatically rebased. Signed-off-by: John Audia <therealgraysky@proton.me>
* ath79: Add Aruba AP-175 supportMartin Kennedy2023-03-273-0/+254
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This board is very similar to the Aruba AP-105, but is outdoor-first. It is very similar to the MSR2000 (though certain MSR2000 models have a different PHY[^1]). A U-Boot replacement is required to install OpenWrt on these devices[^2]. Specifications -------------- * Device: Aruba AP-175 * SoC: Atheros AR7161 680 MHz MIPS * RAM: 128MB - 2x Mira P3S12D40ETP * Flash: 16MB MXIC MX25L12845EMI-10G (SPI-NOR) * WiFi: 2 x DNMA-H92 Atheros AR9220-AC1A 802.11abgn * ETH: IC+ IP1001 Gigabit + PoE PHY * LED: 2x int., plus 12 ext. on TCA6416 GPIO expander * Console: CP210X linking USB-A Port to CPU console @ 115200 * RTC: DS1374C, with internal battery * Temp: LM75 temperature sensor Factory installation: - Needs a u-boot replacement. The process is almost identical to that of the AP105, except that the case is easier to open, and that you need to compile u-boot from a slightly different branch: https://github.com/Hurricos/u-boot-ap105/tree/ap175 The instructions for performing an in-circuit reflash with an SPI-Flasher like a CH314A can be found on the OpenWrt Wiki (https://openwrt.org/toh/aruba/ap-105); in addition a detailed guide may be found on YouTube[^3]. - Once u-boot has been replaced, a USB-A-to-A cable may be used to connect your PC to the CP210X inside the AP at 115200 baud; at this point, the normal u-boot serial flashing procedure will work (set up networking; tftpboot and boot an OpenWrt initramfs; sysupgrade to OpenWrt proper.) - There is no built-in functionality to revert back to stock firmware, because the AP-175 has been declared by the vendor[^4] end-of-life as of 31 Jul 2020. If for some reason you wish to return to stock firmware, take a backup of the 16MiB flash before flashing u-boot. [^1]: https://github.com/shalzz/aruba-ap-310/blob/master/platform/bootloader/apboot-11n/include/configs/msr2k.h#L186 [^2]: https://github.com/Hurricos/u-boot-ap105/tree/ap175 [^3]: https://www.youtube.com/watch?v=Vof__dPiprs [^4]: https://www.arubanetworks.com/support-services/end-of-life/#product=access-points&version=0 Signed-off-by: Martin Kennedy <hurricos@gmail.com>
* ath79: calibrate dlink dir-825 b1 with nvmemEdward Chow2023-03-263-5/+31
| | | | | | | | | | | | | | | | | Driver for both soc (2.4GHz Wifi) and pci (5 GHz) now pull the calibration data from the nvmem subsystem. This allows us to move the userspace caldata extraction for the pci-e ath9k supported wifi into the device-tree definition of the device. Currently, only ethernet devices uses the mac address of "mac-address-ascii" cells, while PCI ath9k devices uses the mac address within calibration data. Signed-off-by: Edward Chow <equu@openmail.cc> (restored switch configuration in 02_network, integrated caldata into partition) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ath79: support Ruckus ZoneFlex 7341/7343/7363Lech Perczak2023-03-226-1/+186
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruckus ZoneFlex 7363 is a dual-band, dual-radio 802.11n 2x2 MIMO enterprise access point. ZoneFlex 7343 is the single band variant of 7363 restricted to 2.4GHz, and ZoneFlex 7341 is 7343 minus two Fast Ethernet ports. Hardware highligts: - CPU: Atheros AR7161 SoC at 680 MHz - RAM: 64MB DDR - Flash: 16MB SPI-NOR - Wi-Fi 2.4GHz: AR9280 PCI 2x2 MIMO radio with external beamforming - Wi-Fi 5GHz: AR9280 PCI 2x2 MIMO radio with external beamforming - Ethernet 1: single Gigabit Ethernet port through Marvell 88E1116R gigabit PHY - Ethernet 2: two Fast Ethernet ports through Realtek RTL8363S switch, connected with Fast Ethernet link to CPU. - PoE: input through Gigabit port - Standalone 12V/1A power input - USB: optional single USB 2.0 host port on the -U variants. Serial console: 115200-8-N-1 on internal H1 header. Pinout: H1 ---------- |1|x3|4|5| ---------- Pin 1 is near the "H1" marking. 1 - RX x - no pin 3 - VCC (3.3V) 4 - GND 5 - TX Installation: - Using serial console - requires some disassembly, 3.3V USB-Serial adapter, TFTP server, and removing a single PH1 screw. 0. Connect serial console to H1 header. Ensure the serial converter does not back-power the board, otherwise it will fail to boot. 1. Power-on the board. Then quickly connect serial converter to PC and hit Ctrl+C in the terminal to break boot sequence. If you're lucky, you'll enter U-boot shell. Then skip to point 3. Connection parameters are 115200-8-N-1. 2. Allow the board to boot. Press the reset button, so the board reboots into U-boot again and go back to point 1. 3. Set the "bootcmd" variable to disable the dual-boot feature of the system and ensure that uImage is loaded. This is critical step, and needs to be done only on initial installation. > setenv bootcmd "bootm 0xbf040000" > saveenv 4. Boot the OpenWrt initramfs using TFTP. Replace IP addresses as needed. Use the Gigabit interface, Fast Ethernet ports are not supported under U-boot: > setenv serverip 192.168.1.2 > setenv ipaddr 192.168.1.1 > tftpboot 0x81000000 openwrt-ath79-generic-ruckus_zf7363-initramfs-kernel.bin > bootm 0x81000000 5. Optional, but highly recommended: back up contents of "firmware" partition: $ ssh root@192.168.1.1 cat /dev/mtd1 > ruckus_zf7363_fw_backup.bin 6. Copy over sysupgrade image, and perform actual installation. OpenWrt shall boot from flash afterwards: $ ssh root@192.168.1.1 # sysupgrade -n openwrt-ath79-generic-ruckus_zf7363-squashfs-sysupgrade.bin After unit boots, it should be available at the usual 192.168.1.1/24. Return to factory firmware: 1. Copy over the backup to /tmp, for example using scp 2. Unset the "bootcmd" variable: fw_setenv bootcmd "" 3. Use sysupgrade with force to restore the backup: sysupgrade -F ruckus_zf7363_backup.bin 4. System will reboot. Quirks and known issues: - Fast Ethernet ports on ZF7363 and ZF7343 are supported, but management features of the RTL8363S switch aren't implemented yet, though the switch is visible over MDIO0 bus. This is a gigabit-capable switch, so link establishment with a gigabit link partner may take a longer time because RTL8363S advertises gigabit, and the port magnetics don't support it, so a downshift needs to occur. Both ports are accessible at eth1 interface, which - strangely - runs only at 100Mbps itself. - Flash layout is changed from the factory, to use both firmware image partitions for storage using mtd-concat, and uImage format is used to actually boot the system, which rules out the dual-boot capability. - Both radio has its own EEPROM on board, not connected to CPU. - The stock firmware has dual-boot capability, which is not supported in OpenWrt by choice. It is controlled by data in the top 64kB of RAM which is unmapped, to avoid the interference in the boot process and accidental switch to the inactive image, although boot script presence in form of "bootcmd" variable should prevent this entirely. - On some versions of stock firmware, it is possible to obtain root shell, however not much is available in terms of debugging facitilies. 1. Login to the rkscli 2. Execute hidden command "Ruckus" 3. Copy and paste ";/bin/sh;" including quotes. This is required only once, the payload will be stored in writable filesystem. 4. Execute hidden command "!v54!". Press Enter leaving empty reply for "What's your chow?" prompt. 5. Busybox shell shall open. Source: https://alephsecurity.com/vulns/aleph-2019014 - There is second method to achieve root shell, using command injection in the web interface: 1. Login to web administration interface 2. Go to Administration > Diagnostics 3. Enter |telnetd${IFS}-p${IFS}204${IFS}-l${IFS}/bin/sh into "ping" field 4. Press "Run test" 5. Telnet to the device IP at port 204 6. Busybox shell shall open. Source: https://github.com/chk-jxcn/ruckusremoteshell Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* ath79: support Ruckus ZoneFlex 7351Lech Perczak2023-03-224-0/+375
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ruckus ZoneFlex 7351 is a dual-band, dual-radio 802.11n 2x2 MIMO enterprise access point. Hardware highligts: - CPU: Atheros AR7161 SoC at 680 MHz - RAM: 64MB DDR - Flash: 16MB SPI-NOR - Wi-Fi 2.4GHz: AR9280 PCI 2x2 MIMO radio with external beamforming - Wi-Fi 5GHz: AR9280 PCI 2x2 MIMO radio with external beamforming - Ethernet: single Gigabit Ethernet port through Marvell 88E1116R gigabit PHY - Standalone 12V/1A power input - USB: optional single USB 2.0 host port on the 7351-U variant. Serial console: 115200-8-N-1 on internal H1 header. Pinout: H1 ---------- |1|x3|4|5| ---------- Pin 1 is near the "H1" marking. 1 - RX x - no pin 3 - VCC (3.3V) 4 - GND 5 - TX Installation: - Using serial console - requires some disassembly, 3.3V USB-Serial adapter, TFTP server, and removing a single T10 screw. 0. Connect serial console to H1 header. Ensure the serial converter does not back-power the board, otherwise it will fail to boot. 1. Power-on the board. Then quickly connect serial converter to PC and hit Ctrl+C in the terminal to break boot sequence. If you're lucky, you'll enter U-boot shell. Then skip to point 3. Connection parameters are 115200-8-N-1. 2. Allow the board to boot. Press the reset button, so the board reboots into U-boot again and go back to point 1. 3. Set the "bootcmd" variable to disable the dual-boot feature of the system and ensure that uImage is loaded. This is critical step, and needs to be done only on initial installation. > setenv bootcmd "bootm 0xbf040000" > saveenv 4. Boot the OpenWrt initramfs using TFTP. Replace IP addresses as needed: > setenv serverip 192.168.1.2 > setenv ipaddr 192.168.1.1 > tftpboot 0x81000000 openwrt-ath79-generic-ruckus_zf7351-initramfs-kernel.bin > bootm 0x81000000 5. Optional, but highly recommended: back up contents of "firmware" partition: $ ssh root@192.168.1.1 cat /dev/mtd1 > ruckus_zf7351_fw_backup.bin 6. Copy over sysupgrade image, and perform actual installation. OpenWrt shall boot from flash afterwards: $ ssh root@192.168.1.1 # sysupgrade -n openwrt-ath79-generic-ruckus_zf7351-squashfs-sysupgrade.bin After unit boots, it should be available at the usual 192.168.1.1/24. Return to factory firmware: 1. Copy over the backup to /tmp, for example using scp 2. Unset the "bootcmd" variable: fw_setenv bootcmd "" 3. Use sysupgrade with force to restore the backup: sysupgrade -F ruckus_zf7351_backup.bin 4. System will reboot. Quirks and known issues: - Flash layout is changed from the factory, to use both firmware image partitions for storage using mtd-concat, and uImage format is used to actually boot the system, which rules out the dual-boot capability. - Both radio has its own EEPROM on board, not connected to CPU. - The stock firmware has dual-boot capability, which is not supported in OpenWrt by choice. It is controlled by data in the top 64kB of RAM which is unmapped, to avoid the interference in the boot process and accidental switch to the inactive image, although boot script presence in form of "bootcmd" variable should prevent this entirely. - On some versions of stock firmware, it is possible to obtain root shell, however not much is available in terms of debugging facitilies. 1. Login to the rkscli 2. Execute hidden command "Ruckus" 3. Copy and paste ";/bin/sh;" including quotes. This is required only once, the payload will be stored in writable filesystem. 4. Execute hidden command "!v54!". Press Enter leaving empty reply for "What's your chow?" prompt. 5. Busybox shell shall open. Source: https://alephsecurity.com/vulns/aleph-2019014 - There is second method to achieve root shell, using command injection in the web interface: 1. Login to web administration interface 2. Go to Administration > Diagnostics 3. Enter |telnetd${IFS}-p${IFS}204${IFS}-l${IFS}/bin/sh into "ping" field 4. Press "Run test" 5. Telnet to the device IP at port 204 6. Busybox shell shall open. Source: https://github.com/chk-jxcn/ruckusremoteshell Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* kernel: backport eth_addr_add()Rafał Miłecki2023-03-212-4/+4
| | | | | | It's required by upcoming NVMEM layout drivers. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* kernel: bump 5.10 to 5.10.173John Audia2023-03-201-2/+2
| | | | | | | | | Manually rebased: ramips/patches-5.10/810-uvc-add-iPassion-iP2970-support.patch All other patches automatically rebased. Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.15 to 5.15.100John Audia2023-03-182-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Manually rebased: bcm27xx/patches-5.15/950-0421-Support-RPi-DPI-interface-in-mode6-for-18-bit-color.patch bcm27xx/patches-5.15/950-0706-media-i2c-imx219-Scale-the-pixel-clock-rate-for-the-.patch ramips/patches-5.15/810-uvc-add-iPassion-iP2970-support.patch Removed upstreamed: bcm27xx/patches-5.15/950-0707-drm-vc4-For-DPI-MEDIA_BUS_FMT_RGB565_1X16-is-mode-1-.patch[1] bcm27xx/patches-5.15/950-0596-drm-vc4-dpi-Add-option-for-inverting-pixel-clock-and.patch[2] ipq807x/0006-v5.16-arm64-dts-qcom-Fix-IPQ8074-PCIe-PHY-nodes.patch [3] ipq807x/0034-v6.1-arm64-dts-qcom-ipq8074-fix-PCIe-PHY-serdes-size.patch [4] ipq807x/0103-arm64-dts-qcom-ipq8074-fix-Gen2-PCIe-QMP-PHY.patch [5] ipq807x/0104-arm64-dts-qcom-ipq8074-fix-Gen3-PCIe-QMP-PHY.patch [6] ipq807x/0105-arm64-dts-qcom-ipq8074-correct-Gen2-PCIe-ranges.patch [7] ipq807x/0108-arm64-dts-qcom-ipq8074-fix-Gen3-PCIe-node.patch [8] ipq807x/0109-arm64-dts-qcom-ipq8074-correct-PCIe-QMP-PHY-output-c.patch [9] ipq807x/0132-arm64-dts-qcom-ipq8074-correct-USB3-QMP-PHY-s-clock-.patch [10] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.99&id=d2991e6b30020e286f2dd9d3b4f43548c547caa6 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/gpu/drm/vc4/vc4_dpi.c?h=v5.15.100&id=8e04aaffb6de5f1ae61de7b671c1531172ccf429 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=a55a645aa303a3f7ec37db69822d5420657626da 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=d9df682bcea57fa25f37bbf17eae56fa05662635 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=7e6eeb5fb3aa9e5feffdb6e137dcc06f5f6410e1 6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=e88204931d9a60634cd50bbc679f045439c4b91d 7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=1563af0f28afd3b6d64ac79a2aecced3969c90bf 8. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=feb8c71f015d416f1afe90e1f62cf51e47376c67 9. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=69c7a270357a7d50ffd3471b14c60250041200e3 10. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/arch/arm64/boot/dts/qcom/ipq8074.dtsi?h=v5.15.99&id=dd3d021ae5471d98adf81f1e897431c8657d0a18 Build system: x86_64 Build-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3 Run-tested: bcm2711/RPi4B, ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me> Tested-by: Robert Marko <robimarko@gmail.com> #ipq807x/Dynalink WRX36 Tested-by: Stefan Lippers-Hollmann <s.l-h@gmx.de> #ipq807x/ax3600, x86_64/FW-7543B, ath79/tl-wdr3600, ipq806x/g10, ipq806x/nbg6817
* uencrypt: add support for mbedtlsEneas U de Queiroz2023-03-171-1/+1
| | | | | | | | | | | | | | This commit includes some additional changes: - better handling of iv and keys in openssl/wolfssl variants - fix compiler warnings and whitespace - build all 3 variants as separate packages - adjust the new package name in targets' DEVICE_PACKAGES - remove PKG_FLAGS:=nonshared [Beeline SmartBox Flash - OK] Tested-by: Mikhail Zhilkin <csharper2005@gmail.com> [after test: replaced a hardcoded IV size of 16 by cipher_info->iv_size] Signed-off-by: Eneas U de Queiroz <cotequeiroz@gmail.com>
* ath79: fix user LED glow on Mikrotik 911 Lite boardsLech Perczak2023-03-121-1/+1
| | | | | | | | | | GPIO3, to which the user LED is connected on RB911-Lite boards seems to still sink current, even when driven high. Enabling open drain for this pin fixes this behaviour and gets rid of the glow when LED is set to off, so enable it. Fixes: 43c7132bf8e7 ("ath79: add support for MikroTik RouterBOARD 911 Lite2/Lite5") Signed-off-by: Lech Perczak <lech.perczak@gmail.com>
* ath79: refactor devolo WiFi pro image definitionsDavid Bauer2023-03-101-18/+11
| | | | | | | | Reuse common parts for the devolo WiFi pro series. The series is discontinued and we support all existing devices, so changes due to new revisions or models are highly unlikely Signed-off-by: David Bauer <mail@david-bauer.net>
* kernel: bump 5.10 to 5.10.169John Audia2023-03-071-1/+1
| | | | | | | | | | | | | | | | | | | | Manually rebased: backport-5.10/811-v6.1-0001-nvmem-core-Fix-memleak-in-nvmem_register.patch Removed upstreamed: backport-5.10/811-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch[1] patches-5.10/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch[2] Add fix: target/linux/generic/backport-5.10/804-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[3] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.169&id=a19a0f67dbb89ad2bfc466f2003841acba645884 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.169&id=a5c51e0c3202820192db3f3809e072f3ca2b1177 3. https://lore.kernel.org/stable/20230227211548.13923-1-kuniyu@amazon.com Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.15 to 5.15.95John Audia2023-02-281-1/+1
| | | | | | | | | | | | | | | | | | | | | Removed upstreamed: backport-5.15/807-v6.1-0003-nvmem-core-add-error-handling-for-dev_set_name.patch[1] bcm47xx/patches-5.15/070-net-bgmac-fix-BCM5358-support-by-setting-correct-fla.patch[2] Added fix: backport-5.15/883-0001-net-Remove-WARN_ON_ONCE-sk-sk_forward_alloc-from-sk_.patch[3] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.95&id=14eea6449473c1f55e196cc104ba16d144465869 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.95&id=2603a5ca6223bb3a88814e2728335eec14f715ab 3. https://lore.kernel.org/stable/20230227211548.13923-1-kuniyu@amazon.com Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* ath79: add support for MikroTik RouterBOARD 911 Lite2/Lite5Tomasz Maciej Nowak2023-02-265-9/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Forward-port from ar71xx target the board introduced in commit eb9e3651dd1a (" ar71xx: add support for the MikroTik RB911-2Hn/5Hn boards"). Citing: The patch adds support for the MikroTik RB911-2Hn (911 Lite2) and the RB911-5Hn (911 Lite5) boards: https://mikrotik.com/product/RB911-2Hn https://mikrotik.com/product/RB911-5Hn The two boards are using the same hardware design, the only difference between the two is the supported wireless band. Specifications: * SoC: Atheros AR9344 (600MHz) * RAM: 64MiB * Storage: 16 MiB SPI NOR flash * Ethernet: 1x100M (Passive PoE in) * Wireless: AR9344 built-in wireless MAC, single chain 802.11b/g/n (911-2Hn) or 802.11a/g/n (911-5Hn) Notes: * Older versions of these boards might be equipped with a NAND flash chip instead of the SPI NOR device. Those boards are not supported (yet).[1] * The MikroTik RB911-5HnD (911 Lite5 Dual) board also uses the same hardware. Support for that can be added later with little effort probably.[2] End of citation. Follow intallation instruction from that commit message, using openwrt-ath79-mikrotik-mikrotik_routerboard-911-lite-initramfs-kernel.bin and openwrt-ath79-mikrotik-mikrotik_routerboard-911-lite-squashfs-sysupgrade.bin images found in ath79/mikrotik directory. Be advised that the board accepts 10-30 V on PoE input. Known issues Compared to ar71xx target image, there is still small leak of current to user LED, which makes it lit, although weaker, even if brightness is set to 0. The cause of that is still unknown. 1. https://github.com/openwrt/openwrt/pull/3652 2. RB911-5HnD should work with this commit or with [1], depending on what flash topology was used. Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
* ath79: mikrotik: stack ar9344 devices to single dtsiTomasz Maciej Nowak2023-02-265-271/+198
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of boards from MikroTik with AR9344 SoC (supported and un-supported) replicate the same schematic, so stack common device nodes to a single dtsi. ar9344_mikrotik_routerboard-16m-nor.dtsi: - remove include paragraph and wmac node, make it single nor flash node for others dts to include ar9344_mikrotik_routerboard-lhg-5nd.dts: - move all of the nodes to new file ar9344_mikrotik_routerboard.dtsi and leave only power, user and lan LEDs which differ from sxt-5nd-r2 and other yet unsupported devices ar9344_mikrotik_routerboard-sxt-5n.dtsi: - remove, it made no sense to keep it, as only ar9344_mikrotik_routerboard-sxt-5nd-r2.dts included this file and added only compatible and model ar9344_mikrotik_routerboard-sxt-5nd-r2.dts: - include ar9344_mikrotik_routerboard.dtsi - add nand gpio activating node, beeper, additional LEDs and flash chips which previously have been in ar9344_mikrotik_routerboard-sxt-5n.dtsi ar9344_mikrotik_routerboard.dtsi: - inherited most of the content from ar9344_mikrotik_routerboard-lhg-5nd.dts except three LEDs - add wmac node, removed from ar9344_mikrotik_routerboard-16m-nor.dtsi Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
* treewide: remove label = "cpu" from DSA dt-bindingArınç ÜNAL2023-02-262-2/+0
| | | | | | | This is not used by the DSA dt-binding, so remove it from all devicetrees. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9cc115d8d6f73dd260de1609182f3645844d6907 Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
* ath79: add support for GL.iNet GL-X1200Xinfa Deng2023-02-256-1/+296
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds supports for GL-X1200. Specification: - SOC: QCA9563 (775MHz) - Flash: 16 MiB - RAM: 128 MiB DDR2 - Ethernet: 4x 1Gbps LAN + 1x 1Gbps WAN - Wireless: QCA9563(2.4GHz) and QCA9886(5GHz) - SIM: 2x SIM card slots - MicroSD: 1x microSD slot - Antenna: 2x external 5dBi antennas - USB: 1x USB 2.0 port - Button: 1x reset button - LED: 16x LEDs (3x GPIO controllable) - UART: 1x UART on PCB (JP1: 3.3V, RX, TX, GND) - OEM U-Boot supplies HTTP/GUI access Implementation Notes ==================== Both the NOR and NAND variants boot off a NOR-based kernel, consistent with the OEM's firmware. The mode LEDs are * Boot, Running system * Failsafe 2G * Upgrade 5G Installation ============ Using sysupgrade ---------------- sysupgrade may be used to install a NAND image on a device running a NAND image or a NOR image on a device running a NOR image. It is recommended to *not* preserve config when upgrading from OEM firmware or previous versions of OpenWrt. No supported sysupgrade path should require "force". Transitioning from NOR to NAND can be accomplished Using U-Boot ------------ The OEM U-Boot can be put into a graphical, firmware-upload mode by holding down the button on the side of the router while applying power and for a bit more than five seconds following with the current OEM U-Boot. The power LED will come on, then the 5G LED will flash five times, about once a second. When the 5G LED stops flashing and the 2G LED lights solid, the router's U-Boot will provide an upload page at http://192.168.1.1/ Either a browser may be used to upload an image, or a utility such as curl may be used: curl -X POST -F gl_firmware=\@*-nand-squashfs-factory.img \ http://192.168.1.1/index.html or curl -X POST -F gl_firmware=\@*-nor-squashfs-sysupgrade.bin \ http://192.168.1.1/index.html Note that NOR vs. NAND is based on the file name extension. Signed-off-by: Xinfa Deng <xinfa.deng@gl-inet.com>
* tools/squashfs: rename to squashfs3-lzmaChristian Marangi2023-02-181-1/+1
| | | | | | | | | | | | | | | | The name of squashfs is confusing since in reality it's a really old version using an old lzma library. This tools is used for old ath79 netgear target and to produde a fake squasfs3 image needed for some specific bootloader from some OEM (AVM for example) Rename squashfs tool to squasfs3-lzma to better describe it. Rename the installed bin from mksquashfs-lzma to mksquashfs3-lzma. Use tar transform to migrate the root directory in tar to the new naming. Drop redundant PKG_CAT variable not needed anymore. Also update any user of this tool. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
* kernel: bump 5.10 to 5.10.168John Audia2023-02-181-2/+2
| | | | | | | | | | | | | | | | | | Manually rebased: backport-5.10/804-v5.14-0001-nvmem-core-allow-specifying-of_node.patch Removed upstreamed: generic-backport/807-v5.17-0003-nvmem-core-Fix-a-conflict-between-MTD-and-NVMEM-on-w.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.168&id=34ec4c7831c416ac56619477f1701986634a7efc Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.15 to 5.15.94John Audia2023-02-181-2/+2
| | | | | | | | | | Patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Signed-off-by: John Audia <therealgraysky@proton.me>
* ath79: bump SPI frequency of Senao qca955x routersMichael Pratt2023-02-121-1/+1
| | | | | | | | All boards using this DTSI are expected to have the same 16 MB MX25L12845EMI-10G flash chip, or a larger one which can also use 40 MHz frequency. Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: add eth0 mac and initvals for Engenius EPG5000Michael Pratt2023-02-122-1/+9
| | | | | | | | | | | | | | | | | | Although VLANs are used, the "eth0" device by itself does not have a valid MAC, so fix that with preinit script. More initvals added by editing the driver to print switch registers, after the bootloader sets them but before openwrt changes them. The register bits needed for the QCA8337 switch can be read from interrupted boot (tftpboot, bootm) by adding print lines in the switch driver ar8327.c before 'qca,ar8327-initvals' is parsed from DTS and written for example: pr_info("0x04 %08x\n", ar8xxx_read(priv, AR8327_REG_PAD0_MODE)); Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: convert Engenius EPG5000 radios to nvmem-cellsMichael Pratt2023-02-124-18/+23
| | | | | | | | | | | Use nvmem kernel subsystem to pull radio calibration data with the devicetree instead of userspace scripts. Existing blocks for caldata_extract are reordered alphabetically. MAC address is set using the hotplug script. Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: add support for Senao Engenius ESR1200Michael Pratt2023-02-125-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FCC ID: A8J-ESR900 Engenius ESR1200 is an indoor wireless router with a gigabit ethernet switch, dual-band wireless, internal antenna plates, and a USB 2.0 port **Specification:** - QCA9557 SOC 2.4 GHz, 2x2 - QCA9882 WLAN PCIe mini card, 5 GHz, 2x2 - QCA8337N SW 4 ports LAN, 1 port WAN - 40 MHz clock - 16 MB FLASH MX25L12845EMI-10G - 2x 64 MB RAM - UART at J1 populated, RX grounded - 6 internal antenna plates (omni-directional) - 5 LEDs, 1 button (power, 2G, 5G, WAN, WPS) (reset) **MAC addresses:** Base MAC address labeled as "MAC ADDRESS" MAC "wanaddr" is not similar to "ethaddr" eth0 *:c8 MAC u-boot-env ethaddr phy0 *:c8 MAC u-boot-env ethaddr phy1 *:c9 --- u-boot-env ethaddr +1 WAN *:66:44 u-boot-env wanaddr **Serial Access:** RX on the board for UART is shorted to ground by resistor R176 therefore it must be removed to use the console but it is not necessary to remove to view boot log optionally, R175 can be replaced with a solder bridge short the resistors R175 and R176 are next to the UART RX pin **Installation:** Method 1: Firmware upgrade page OEM webpage at 192.168.0.1 username and password "admin" Navigate to Settings (gear icon) --> Tools --> Firmware select the factory.bin image confirm and wait 3 minutes Method 2: TFTP recovery Follow TFTP instructions using initramfs.bin use sysupgrade.bin to flash using openwrt web interface **Return to OEM:** MTD partitions should be backed up before flashing using TFTP to boot openwrt without overwriting flash Alternatively, it is possible to edit OEM firmware images to flash MTD partitions in openwrt to restore OEM firmware by removing the OEM header and writing the rest to "firmware" **TFTP recovery:** Requires serial console, reset button does nothing at boot rename initramfs.bin to 'uImageESR1200' make available on TFTP server at 192.168.99.8 power board, interrupt boot by pressing '4' rapidly execute tftpboot and bootm **Note on ETH switch registers** Registers must be written to the ethernet switch in order to set up the switch's MAC interface. U-boot can write the registers on it's own which is needed, for example, in a TFTP transfer. The register bits from OEM for the QCA8337 switch can be read from interrupted boot (tftpboot, bootm) by adding print lines in the switch driver ar8327.c before 'qca,ar8327-initvals' is parsed from DTS and written. for example: pr_info("0x04 %08x\n", ar8xxx_read(priv, AR8327_REG_PAD0_MODE)); Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: add support for Senao Engenius ESR1750Michael Pratt2023-02-125-0/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FCC ID: A8J-ESR1750 Engenius ESR1750 is an indoor wireless router with a gigabit ethernet switch, dual-band wireless, internal antenna plates, and a USB 2.0 port **Specification:** - QCA9558 SOC 2.4 GHz, 3x3 - QCA9880 WLAN PCIe mini card, 5 GHz, 3x3 - QCA8337N SW 4 ports LAN, 1 port WAN - 40 MHz clock - 16 MB FLASH MX25L12845EMI-10G - 2x 64 MB RAM - UART at J1 populated, RX grounded - 6 internal antenna plates (omni-directional) - 5 LEDs, 1 button (power, 2G, 5G, WAN, WPS) (reset) **MAC addresses:** Base MAC address labeled as "MAC ADDRESS" MAC "wanaddr" is similar to "ethaddr" eth0 *:58 MAC u-boot-env ethaddr phy0 *:58 MAC u-boot-env ethaddr phy1 *:59 --- u-boot-env ethaddr +1 WAN *:10:58 u-boot-env wanaddr **Serial Access:** RX on the board for UART is shorted to ground by resistor R176 therefore it must be removed to use the console but it is not necessary to remove to view boot log optionally, R175 can be replaced with a solder bridge short the resistors R175 and R176 are next to the UART RX pin **Installation:** Method 1: Firmware upgrade page NOTE: ESR1750 might require the factory.bin for ESR1200 instead, OEM provides 1 image for both. OEM webpage at 192.168.0.1 username and password "admin" Navigate to Settings (gear icon) --> Tools --> Firmware select the factory.bin image confirm and wait 3 minutes Method 2: TFTP recovery Follow TFTP instructions using initramfs.bin use sysupgrade.bin to flash using openwrt web interface **Return to OEM:** MTD partitions should be backed up before flashing using TFTP to boot openwrt without overwriting flash Alternatively, it is possible to edit OEM firmware images to flash MTD partitions in openwrt to restore OEM firmware by removing the OEM header and writing the rest to "firmware" **TFTP recovery:** Requires serial console, reset button does nothing at boot rename initramfs.bin to 'uImageESR1200' make available on TFTP server at 192.168.99.8 power board, interrupt boot by pressing '4' rapidly execute tftpboot and bootm **Note on ETH switch registers** Registers must be written to the ethernet switch in order to set up the switch's MAC interface. U-boot can write the registers on it's own which is needed, for example, in a TFTP transfer. The register bits from OEM for the QCA8337 switch can be read from interrupted boot (tftpboot, bootm) by adding print lines in the switch driver ar8327.c before 'qca,ar8327-initvals' is parsed from DTS and written. for example: pr_info("0x04 %08x\n", ar8xxx_read(priv, AR8327_REG_PAD0_MODE)); Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: add support for Senao Engenius ESR900Michael Pratt2023-02-125-1/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FCC ID: A8J-ESR900 Engenius ESR900 is an indoor wireless router with a gigabit ethernet switch, dual-band wireless, internal antenna plates, and a USB 2.0 port **Specification:** - QCA9558 SOC 2.4 GHz, 3x3 - AR9580 WLAN PCIe on board, 5 GHz, 3x3 - AR8327N SW 4 ports LAN, 1 port WAN - 40 MHz clock - 16 MB FLASH MX25L12845EMI-10G - 2x 64 MB RAM - UART at J1 populated, RX grounded - 6 internal antenna plates (omni-directional) - 5 LEDs, 1 button (power, 2G, 5G, WAN, WPS) (reset) **MAC addresses:** Base MAC address labeled as "MAC ADDRESS" MAC "wanaddr" is not similar to "ethaddr" eth0 *:06 MAC u-boot-env ethaddr phy0 *:06 MAC u-boot-env ethaddr phy1 *:07 --- u-boot-env ethaddr +1 WAN *:6E:81 u-boot-env wanaddr **Serial Access:** RX on the board for UART is shorted to ground by resistor R176 therefore it must be removed to use the console but it is not necessary to remove to view boot log optionally, R175 can be replaced with a solder bridge short the resistors R175 and R176 are next to the UART RX pin **Installation:** Method 1: Firmware upgrade page OEM webpage at 192.168.0.1 username and password "admin" Navigate to Settings (gear icon) --> Tools --> Firmware select the factory.bin image confirm and wait 3 minutes Method 2: TFTP recovery Follow TFTP instructions using initramfs.bin use sysupgrade.bin to flash using openwrt web interface **Return to OEM:** MTD partitions should be backed up before flashing using TFTP to boot openwrt without overwriting flash Alternatively, it is possible to edit OEM firmware images to flash MTD partitions in openwrt to restore OEM firmware by removing the OEM header and writing the rest to "firmware" **TFTP recovery:** Requires serial console, reset button does nothing at boot rename initramfs.bin to 'uImageESR900' make available on TFTP server at 192.168.99.8 power board, interrupt boot by pressing '4' rapidly execute tftpboot and bootm **Note on ETH switch registers** Registers must be written to the ethernet switch in order to set up the switch's MAC interface. U-boot can write the registers on it's own which is needed, for example, in a TFTP transfer. The register bits from OEM for the AR8327 switch can be read from interrupted boot (tftpboot, bootm) by adding print lines in the switch driver ar8327.c before 'qca,ar8327-initvals' is parsed from DTS and written. for example: pr_info("0x04 %08x\n", ar8xxx_read(priv, AR8327_REG_PAD0_MODE)); Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: split Engenius EPG5000 DTS to common DTSIMichael Pratt2023-02-122-108/+128
| | | | | | | | | | | | Split the DTS to be used with similar boards made by Senao, dual-band routers with Atheros / Qualcomm ethernet switch. Set initvals for the switch in each device's DTS. Set some common calibration nvmem-cells in DTSI. While at it, fix MTD partition node names. Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: fix dts whitespaceFelix Baumann2023-02-096-30/+30
| | | | | | | Replace blanks with tabs Remove whitespace from otherwise empty lines Signed-off-by: Felix Baumann <felix.bau@gmx.de>
* treewide: replace wpad-basic-wolfssl defaultRosen Penev2023-02-046-10/+10
| | | | | | | The newly merged mbedtls backend is smaller and has fewer ABI related issues than the wolfSSL one. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* treewide: strip useless `default n` Kconfig linesTony Butler2023-02-031-2/+0
| | | | | | | | | | Kconfig docs say: > The default value deliberately defaults to 'n' in order to avoid > bloating the build. Apply this rule everywhere, to avoid more cloning of bad examples Signed-off-by: Tony Butler <spudz76@gmail.com>
* ath79: add LTE packages for GL-XE300Tom Herbers2023-01-281-1/+2
| | | | | | | | | | | | | | | | | Add LTE packages required for operating the LTE modems shipped with the GL-XE300. Example configuration for an unauthenticated dual-stack APN: network.wwan0=interface network.wwan0.proto='qmi' network.wwan0.device='/dev/cdc-wdm0' network.wwan0.apn='internet' network.wwan0.auth='none' network.wwan0.delay='10' network.wwan0.pdptype='IPV4V6' Signed-off-by: Tom Herbers <mail@tomherbers.de>
* ath79: improve support for Letv LBA-047-CHShiji Yang2023-01-282-37/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Convert wireless calibration data to NVMEM. 2. Enable control green status LED and change default LED behaviors. The three LEDs of LBA-047-CH are in the same position, and the green LED will be completely covered by the other two LEDs. So don's use green LED as WAN indicator to ensure that only one LED is on at a time. LED Factory OpenWrt blue internet fail failsafe && upgrade green internet okay run red boot boot 3. Reduce the SPI clock to 30 MHz because the ath79 target does not support 50 MHz SPI operation well. Keep the fast-read support to ensure the spi-mem feature (b3f9842330) is enabled. 4. Remove unused package "uboot-envtools". 5. Split the factory image into two parts: rootfs and kernel. This change can reduce the factory image size and allow users to upgrade the OpenWrt kernel loader uImage (OKLI) independently. The new installation method: First, rename "squashfs-kernel.bin" to "openwrt-ar71xx-generic-ap147-16M-kernel.bin" and rename "rootfs.bin" to "openwrt-ar71xx-generic-ap147-16M-rootfs-squashfs.bin". Then we can press reset button for about 5 seconds to enter tftp download mode. Finally, set IP address to 192.168.67.100 and upload the above two parts via tftp server. Tested on Letv LBA-047-CH Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* ath79: calibrate dlink dir-825 c1 and dir-835 a1 with nvmemEdward Chow2023-01-283-8/+39
| | | | | | | | | | | | | Driver for both soc (2.4GHz Wifi) and pci (5 GHz) now pull the calibration data from the nvmem subsystem. This allows us to move the userspace caldata extraction for the pci-e ath9k supported wifi into the device-tree definition of the device. Currently, "mac-address-ascii" cells only works for ethernet and wmac devices, so PCI ath9k device uses the old method to calibrate. Signed-off-by: Edward Chow <equu@openmail.cc>
* ath79: add label-mac-device for GL-XE300Tom Herbers2023-01-281-0/+4
| | | | | | | This adds an label-mac-device alias which refrences the mac which is printed on the Label of the device. Signed-off-by: Tom Herbers <mail@tomherbers.de>
* ath79: add support for Senao Engenius EWS660APMichael Pratt2023-01-284-0/+146
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | FCC ID: A8J-EWS660AP Engenius EWS660AP is an outdoor wireless access point with 2 gigabit ethernet ports, dual-band wireless, internal antenna plates, and 802.3at PoE+ **Specification:** - QCA9558 SOC 2.4 GHz, 3x3 - QCA9880 WLAN mini PCIe card, 5 GHz, 3x3, 26dBm - AR8035-A PHY RGMII GbE with PoE+ IN - AR8033 PHY SGMII GbE with PoE+ OUT - 40 MHz clock - 16 MB FLASH MX25L12845EMI-10G - 2x 64 MB RAM - UART at J1 populated, RX grounded - 6 internal antenna plates (5 dbi, omni-directional) - 5 LEDs, 1 button (power, eth0, eth1, 2G, 5G) (reset) **MAC addresses:** Base MAC addressed labeled as "MAC" Only one Vendor MAC address in flash eth0 *:d4 MAC art 0x0 eth1 *:d5 --- art 0x0 +1 phy1 *:d6 --- art 0x0 +2 phy0 *:d7 --- art 0x0 +3 **Serial Access:** the RX line on the board for UART is shorted to ground by resistor R176 therefore it must be removed to use the console but it is not necessary to remove to view boot log optionally, R175 can be replaced with a solder bridge short the resistors R175 and R176 are next to the UART RX pin **Installation:** 2 ways to flash factory.bin from OEM: Method 1: Firmware upgrade page: OEM webpage at 192.168.1.1 username and password "admin" Navigate to "Firmware Upgrade" page from left pane Click Browse and select the factory.bin image Upload and verify checksum Click Continue to confirm and wait 3 minutes Method 2: Serial to load Failsafe webpage: After connecting to serial console and rebooting... Interrupt uboot with any key pressed rapidly execute `run failsafe_boot` OR `bootm 0x9fd70000` wait a minute connect to ethernet and navigate to "192.168.1.1/index.htm" Select the factory.bin image and upload wait about 3 minutes **Return to OEM:** If you have a serial cable, see Serial Failsafe instructions otherwise, uboot-env can be used to make uboot load the failsafe image ssh into openwrt and run `fw_setenv rootfs_checksum 0` reboot, wait 3 minutes connect to ethernet and navigate to 192.168.1.1/index.htm select OEM firmware image from Engenius and click upgrade **TFTP recovery:** Requires serial console, reset button does nothing rename initramfs.bin to '0101A8C0.img' make available on TFTP server at 192.168.1.101 power board, interrupt boot execute tftpboot and bootm 0x81000000 **Format of OEM firmware image:** The OEM software of EWS660AP is a heavily modified version of Openwrt Kamikaze. One of the many modifications is to the sysupgrade program. Image verification is performed simply by the successful ungzip and untar of the supplied file and name check and header verification of the resulting contents. To form a factory.bin that is accepted by OEM Openwrt build, the kernel and rootfs must have specific names... openwrt-ar71xx-generic-ews660ap-uImage-lzma.bin openwrt-ar71xx-generic-ews660ap-root.squashfs and begin with the respective headers (uImage, squashfs). Then the files must be tarballed and gzipped. The resulting binary is actually a tar.gz file in disguise. This can be verified by using binwalk on the OEM firmware images, ungzipping then untaring. Newer EnGenius software requires more checks but their script includes a way to skip them, otherwise the tar must include a text file with the version and md5sums in a deprecated format. The OEM upgrade script is at /etc/fwupgrade.sh. OKLI kernel loader is required because the OEM software expects the kernel to be no greater than 1536k and the factory.bin upgrade procedure would otherwise overwrite part of the kernel when writing rootfs. Note on PLL-data cells: The default PLL register values will not work because of the external AR8035 switch between the SOC and the ethernet port. For QCA955x series, the PLL registers for eth0 and eth1 can be see in the DTSI as 0x28 and 0x48 respectively. Therefore the PLL registers can be read from uboot for each link speed after attempting tftpboot or another network action using that link speed with `md 0x18050028 1` and `md 0x18050048 1`. The clock delay required for RGMII can be applied at the PHY side, using the at803x driver `phy-mode`. Therefore the PLL registers for GMAC0 do not need the bits for delay on the MAC side. This is possible due to fixes in at803x driver since Linux 5.1 and 5.3 Tested-by: Niklas Arnitz <openwrt@arnitz.email> Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: add pcie1 wifi device to Senao qca955x AP DTSIMichael Pratt2023-01-288-5/+38
| | | | | | Each individual device DTS now enables either pcie0 or pcie1. Signed-off-by: Michael Pratt <mcpratt@pm.me>
* ath79: add support for D-Link DIR-629 A1Shiji Yang2023-01-264-0/+188
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Specifications: SOC: QCA9588 CPU 720 MHz AHB 200 MHz Switch: AR8236 RAM: 64 MiB DDR2-600 Flash: 8 MiB WLAN: Wi-Fi4 2.4 GHz 3*3 LAN: LAN ports *4 WAN: WAN port *1 Buttons: reset *1 + wps *1 LEDs: ethernet *5, power, wlan, wps MAC Address: use address source label 70:62:b8:xx:xx:96 lan && wlan lan 70:62:b8:xx:xx:96 mfcdata@0x35 wan 70:62:b8:xx:xx:97 mfcdata@0x6a wlan 70:62:b8:xx:xx:96 mfcdata@0x51 Install via Web UI: Apply factory image in the stock firmware's Web UI. Install via Emergency Room Mode: DIR-629 A1 will enter recovery mode when the system fails to boot or press reset button for about 10 seconds. First, set IP address to 192.168.0.1 and server IP to 192.168.0.10. Then we can open http://192.168.0.1 in the web browser to upload OpenWrt factory image or stock firmware. Some modern browsers may need to turn on compatibility mode. Signed-off-by: Shiji Yang <yangshiji66@qq.com>
* ath79: convert Netgear EX7300 caldata to nvmemWenli Looi2023-01-252-7/+22
| | | | | | Transition to specify caldata in the DTS. Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
* ath79: consolidate Netgear EX7300 series imagesWenli Looi2023-01-257-251/+282
| | | | | | | | | | | | | | | | | | | | | | | This change consolidates Netgear EX7300 series devices into two images corresponding to devices that share the same manufacturer firmware image. Similar to the manufacturer firmware, the actual device model is detected at runtime. The logic is taken from the netgear GPL dumps in a file called generate_board_conf.sh. Hardware details for EX7300 v2 variants --------------------------------------- SoC: QCN5502 Flash: 16 MiB RAM: 128 MiB Ethernet: 1 gigabit port Wireless 2.4GHz (currently unsupported due to lack of ath9k support): - EX6250 / EX6400 v2 / EX6410 / EX6420: QCN5502 3x3 - EX7300 v2 / EX7320: QCN5502 4x4 Wireless 5GHz: - EX6250: QCA9986 3x3 (detected by ath10k as QCA9984 3x3) - EX6400 v2 / EX6410 / EX6420 / EX7300 v2 / EX7320: QCA9984 4x4 Signed-off-by: Wenli Looi <wlooi@ucalgary.ca>
* kernel: bump 5.10 to 5.10.163John Audia2023-01-141-3/+3
| | | | | | | | | | | | | | | Removed upstreamed: generic/101-Use-stddefs.h-instead-of-compiler.h.patch[1] All patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.163&id=ddd2bb08bd99b7ee4442fbbe0f9b80236fdd71d2 Build system: x86_64 Build-tested: ramips/tplink_archer-a6-v3 Run-tested: ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me>
* ath79: Fix glinet ar300m usb not workingLuo Chongjun2023-01-142-13/+8
| | | | | | | | | | | | | | | | | | glinet forum users reported the problem at https://forum.gl-inet.com/t/gl-ar300m16-openwrt-22-03-0-rc5-usb-port-power-off-by-default/23199 The current code uses the regulator framework to control the USB power supply. Although usb0 described in DTS refers to the regulator by vbus-supply, but there is no code related to regulator implemented in the USB driver of QCA953X, so the USB of the device cannot work. Under the regulator framework, adding the regulator-always-on attribute fixes this problem, but it means that USB power will not be able to be turned off. Since we need to control the USB power supply in user space, I didn't find any other better way under the regulator framework of Linux, so I directly export gpio. Signed-off-by: Luo Chongjun <luochongjun@gl-inet.com>
* kernel: bump 5.15 to 5.15.87John Audia2023-01-131-2/+2
| | | | | | | | | | | | | Removed upstreamed: generic/hack-5.15/290-net-dsa-mv88e6xxx-depend-on-PTP-conditionally.patch[1] Build system: x86_64 Build-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod Run-tested: bcm2711/RPi4B, filogic/xiaomi_redmi-router-ax6000-ubootmod 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.87&id=945e58bdaf6faf6e3f957d182244fa830acddab4 Signed-off-by: John Audia <therealgraysky@proton.me>
* ath79: combine UniFi AC dual firmware-partitionsDavid Bauer2023-01-072-8/+3
| | | | | | | | | | | | | | | In order to maximize the available space on UniFi AC boards using a dual-image partition layout, combine the two OS partitions into a single partition. This allows users to access more usable space for additional packages. Don't limit the usable image size to the size of a single OS partition. The initial installation has to be done with an older version of OpenWrt in case the generated image exceeds the space of a single kernel partition in the future. Signed-off-by: David Bauer <mail@david-bauer.net>