aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ipq806x
Commit message (Collapse)AuthorAgeFilesLines
* ipq-wifi: drop upstreamed board-2.binChristian Lamparter2022-05-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The BDFs for the: Aruba AP-303 ASUS RT-AC42U AVM FRITZ!Repeater 1200 Buffalo WTR-M2133HP Cell C RTL30VW D-Link DAP-2610 EnGenius EAP2200 EnGenius EMD1 EnGenius EMR3500 EnGenius EMR5000 EZVIZ CS-W3-WD1200G EUP Google Wifi Linksys MR8300 V1.0 Luma WRTQ-329ACN MobiPromo CM520-79F NEC Platforms WG2600HP3 Plasma Cloud PA1200 (updated version) Plasma Cloud PA2200 ZTE MF286D were upstreamed to the ath10k-firmware repository and landed in linux-firmware.git. Furthermore the BDFs for the: 8devices Habanero OpenMesh A62 OpenMesh A42 AVM FRITZ!Box 4040 have been updated. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: bump 5.15 to 5.15.38Rui Salvaterra2022-05-091-3/+3
| | | | | | | | | | | Deleted (upstreamed): mediatek/patches-5.15/120-10-v5.18-mtd-nand-fix-ecc-parameters-for-mt7622.patch [1] Other patches automatically rebased. [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.38&id=3ec920d755ae69c201b358e8d8e96c32f51145d8 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ipq806x: add support for Arris TR4400 v2 / RAC2V1ARodrigo Balerdi2022-05-056-3/+449
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware specs: SoC: Qualcomm IPQ8065 (dual core Cortex-A15) RAM: 512 MB DDR3 Flash: 256 MB NAND, 32 MB NOR WiFi: QCA9983 2.4 GHz, QCA9984 5 GHz Switch: QCA8337 Ethernet: 5x 10/100/1000 Mbit/s USB: 1x USB 3.0 Type-A Buttons: WPS, Reset Power: 12 VDC, 2.5 A Ethernet ports: 1x WAN: connected to eth2 4x LAN: connected via the switch to eth0 and eth1 (eth0 is disabled in OEM firmware) MAC addresses (OEM and OpenWrt): fw_env @ 0x00 d4:ab:82:??:??:?a LAN (eth1) fw_env @ 0x06 d4:ab:82:??:??:?b WAN (eth2) fw_env @ 0x0c d4:ab:82:??:??:?c WLAN 2.4 GHz (ath1) fw_env @ 0x12 d4:ab:82:??:??:?d WLAN 5 GHz (ath0) fw_env @ 0x18 d4:ab:82:??:??:?e OEM usage unknown (eth0 in OpenWrt) OID d4:ab:82 is registered to: ARRIS Group, Inc., 6450 Sequence Drive, San Diego CA 92121, US More info: https://openwrt.org/inbox/toh/arris/tr4400_v2 IMPORTANT: This port requires moving the 'fw_env' partition prior to first boot to consolidate 70% of the usable space in flash into a contiguous partition. 'fw_env' contains factory-programmed MAC addresses, SSIDs, and passwords. Its contents must be copied to 'rootfs_1' prior to booting via initramfs. Note that the stock 'fw_env' partition will be wiped during sysupgrade. A writable 'stock_fw_env' partition pointing to the old, stock location is included in the port to help rolling back this change if desired. Installation: - Requires serial access and a TFTP server. - Fully boot stock, press ENTER, type in: mtd erase /dev/mtd21 dd if=/dev/mtd22 bs=128K count=1 | mtd write - /dev/mtd21 umount /config && ubidetach -m 23 && mtd erase /dev/mtd23 - Reboot and interrupt U-Boot by pressing a key, type in: set mtdids 'nand0=nand0' set mtdparts 'mtdparts=nand0:155M@0x6500000(mtd_ubi)' set bootcmd 'ubi part mtd_ubi && ubi read 0x44000000 kernel && bootm' env save - Setup TFTP server serving initramfs image as 'recovery.bin', type in: set ipaddr 192.168.1.1 set serverip 192.168.1.2 tftpboot recovery.bin && bootm - Use sysupgrade to install squashfs image. This port is based on work done by AmadeusGhost <amadeus@jmu.edu.cn>. Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com> [add 5.15 changes for 0069-arm-boot-add-dts-files.patch] Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ipq806x: RT4230W: utilize nvmem-cells for ath10k caldataChukun Pan2022-04-162-17/+66
| | | | | | | | | | | Converts extraction entries from 11-ath10k-caldata into nvmem-cells in the individual board's device-tree file. Same as commit 2047058 ("ipq806x: utilize nvmem-cells for pre-calibration data") Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn> Reviewed-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq806x: Askey RT4230W REV6: enable onboard spi flashChukun Pan2022-04-161-0/+29
| | | | | | | | | | | There is a mr25h256 spi flash on this machine. From the mtd backup of the stock firmware, this spi flash is empty. [ 3.652745] spi_qup 1a280000.spi: IN:block:16, fifo:64, OUT:block:16, fifo:64 [ 3.653925] spi-nor spi0.0: mr25h256 (32 Kbytes) Signed-off-by: Chukun Pan <amadeus@jmu.edu.cn>
* kernel: bump 5.15 to 5.15.34Rui Salvaterra2022-04-161-2/+2
| | | | | | | | | Deleted (upstreamed): generic/pending-5.15/850-0003-PCI-aardvark-Fix-support-for-MSI-interrupts.patch [1] [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.34&id=60eabd66d17fa2cbc31f670b2f201f0bc54090a2 Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: bump 5.10 to 5.10.111John Audia2022-04-161-1/+1
| | | | | | | | | | | | | | Removed upstreamed: pending-5.10/850-0003-PCI-aardvark-Fix-support-for-MSI-interrupts.patch apm821xx/patches-5.10/150-ata-sata_dwc_460ex-Fix-crash-due-to-OOB-write.patch All other patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <graysky@archlinux.us>
* ipq806x: fix wrong CPU OPP for ipq8062Ansuel Smith2022-04-161-16/+16
| | | | | | | | | Fix wrong CPU OPP for ipq8062. Revision of the SoC added an extra 25mV for every pvs. Also fix the voltage min/max value that were wrong. Reviewed-by: Robert Marko robimarko@gmail.com Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq806x: fix USB bug in 5.10 dtsi additionsRodrigo Balerdi2022-04-161-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The existing device tree has incorrect definitions for usb3_0 and usb3_1 and the blocks they depend upon: their addresses and interrupts are swapped. However, their clocks and resets are not. The result is that the USB blocks are non-functional if only one of them is enabled. This fix backports the definitions from mainline Linux 5.15 to OpenWrt's 5.10 dtsi additions. See the relevant mainline code here: https://github.com/torvalds/linux/blob/v5.17/arch/arm/boot/dts/qcom-ipq8064.dtsi#L1062-L1148 This fix does not break existing ports. But some ports may have enabled both USB blocks even thought their board only implements one, because enabling a single USB block would not have worked before this fix. This means that revisiting all ports of ipq806x devices that implement a single USB port is advised. This work must be done by maintainers that can determine which USB block corresponds to the implemented port on their hardware. Note that this fix swaps the names of the hardware ports. This is unfortunate, but will happen anyway when switching to kernel 5.15. Thus, it is best to do this ASAP, before users get to depend on port names. It is strongly recommended that this fix is backported to 22.03 before its release. This will minimize the number of users affected by the port name swap. Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
* ipq806x: remove non-working fixes for USB bug in 5.10 dtsi additionsRodrigo Balerdi2022-04-162-4/+0
| | | | | | These workarrounds are incomplete and non-functional, and thus not needed. Signed-off-by: Rodrigo Balerdi <lanchon@gmail.com>
* kernel: bump 5.10 to 5.10.110John Audia2022-04-091-1/+1
| | | | | | | | | | | | | | | | Removed upstreamed: generic/backport-5.10/350-v5.18-MIPS-pgalloc-fix-memory-leak-caused-by-pgd_free.patch generic/pending-5.10/850-0014-PCI-aardvark-Fix-reading-PCI_EXP_RTSTA_PME-bit-on-em.patch ipq40xx/patches-5.10/105-ipq40xx-fix-sleep-clock.patch All patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Compile-/run-tested: ath79/generic (Archer C7 v2). Signed-off-by: John Audia <graysky@archlinux.us>
* kernel: bump 5.15 to 5.15.33Rui Salvaterra2022-04-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | Deleted (upstreamed): generic/backport-5.15/350-v5.18-MIPS-pgalloc-fix-memory-leak-caused-by-pgd_free.patch [1] generic/backport-5.15/730-v5.16-hv-utils-add-PTP_1588_CLOCK-to-Kconfig-to-fix-build.patch [2] generic/pending-5.15/850-0014-PCI-aardvark-Fix-reading-PCI_EXP_RTSTA_PME-bit-on-em.patch [3] generic/pending-5.15/850-0002-PCI-aardvark-Fix-reading-MSI-interrupt-number.patch [4] Manually rebased: generic/pending-5.15/850-0002-PCI-aardvark-Fix-reading-MSI-interrupt-number.patch ramips/patches-5.15/710-at803x.patch [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.33&id=d29cda15cab086d82d692de016f7249545d4b6b4 [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.33&id=d5aad7d63b1b5c1f3c4b69e12c05e7c7d196fae8 [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.33&id=ed750e22e44366e264bcdf7b1cf0713f08f7980a [4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.33&id=0fe94b84c43cfea867e1721606185e8686d7d32f Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> [Refresh patches again] [Remove generic/pending-5.15/850-0002-PCI-aardvark-Fix-reading-MSI-interrupt-number.patch] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: bump 5.15 to 5.15.32Rui Salvaterra2022-04-0914-61/+62
| | | | | | Patches automatically rebased. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: move some symbols to generic configAleksander Jan Bajkowski2022-04-091-5/+0
| | | | | | | | | | | | | | | | | | | This commit add some enabled symbols to generic config. LTO is only supported by clang compiler and therefore should be disabled in the generic config instead of duplicating this symbol in each target. CONFIG_LTO_NONE do this job. The second group of symbols is enabled by the options available in the generic config and is therefore added here: * CONFIG_AF_UNIX_OOB is selected by CONFIG_NET && CONFIG_UNIX, * CONFIG_BINARY_PRINTF is selected by CONFIG_BPF_SYSCALL, * CONFIG_NET_SOCK_MSG is selected by CONFIG_BPF_SYSCALL && CONFIG_NET. The other symbols are disabled and should be in the generic config. This commit also removes these symbols from subtargets. Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
* ipq806x: 5:15: fix dedicated krait cpufreqAnsuel Smith2022-03-272-29/+55
| | | | | | | | | Fix dedicated cpufreq for kernel 5.15 as they changed module order and now it can happen that cpufreq probe after cache driver. Also add lock between cache scaling in set_target as it's now required by opp functions. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq806x: backport nand raname to kernel 5.10Ansuel Smith2022-03-271-1/+1
| | | | | | Rename nand_controller to nand in kernel 5.10 to use the same dts across kernel version. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq806x: rework rootfs conflicts patch for smemAnsuel Smith2022-03-271-15/+16
| | | | | | | | | | Now that smem actually free the leaked parts, when a rootfs partition is detected, the kernel panics as it try to free the static space allocated for the "ubi" name. Change the logic and fix the name at the allocate_partition function to correctly free the space allocated by smem. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq806x: 5:15: add testing kernel versionAnsuel Smith2022-03-2728-722/+274
| | | | | | | | | Refresh patch for 5.15 Rework tweak patch to sync with upstream ipq8064 dtsi and fix regression introduced. Rename nand_controller to nand in every dts. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq806x: 5:15: drop upstream patchAnsuel Smith2022-03-2714-2244/+0
| | | | | | | | | - Drop stmmac upstream patches - Drop tsens patches - Drop ADM driver - Drop SMEM parser Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq806x: 5:15: refresh configAnsuel Smith2022-03-271-15/+16
| | | | | | Refreshed using make kernel_menuconfig CONFIG_TARGET=generic Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq806x: 5:15: copy config and patch from 5.10Ansuel Smith2022-03-2744-0/+6995
| | | | | | Copy config and patch from kernel 5.10 to kernel 5.15 Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ipq806x: fix TP-Link Archer VR2600v bootloopingChristian Lamparter2022-03-161-1/+2
| | | | | | | | | | | | | | | | Timo Schroeder reported: "The TP-Link Archer VR2600v is stuck in a boot loop on written snapshot image. It's able to boot using the snapshot uimage though, but there ath10k firmware can't be found. 21.02.2 release version doesn't have either problem." The VR2600v has a 512 byte header at the beginning of the firmware that needs to be accounted for. Fixes: f6a01d7f5c3d ("ipq806x: convert TP-Link Archer VR2600v to denx,uimage") Reported-by: Timo Schroeder <der.timosch@gmail.com> References: <https://github.com/openwrt/openwrt/issues/9467> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq806x: provide ramoops for R7800/XR500 by defaultHannu Nyman2022-03-081-2/+2
| | | | | | | | | | | | | Add kmod-ramoops to the default set of device packages in R7800 and XR500, so that the ramoops kernel crash logs are provided by default for these routers. The capability was earlier defined by 97158fe1 and cf346dfa, but the feature was not yet turned on by default. The possible kernel crashes are stored into /sys/fs/pstore/* Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* kernel: 5.10: allocate last level PTEs in high memoryRui Salvaterra2022-03-011-1/+1
| | | | | | | | | | Enable support for allocating user space page table entries in high memory [1], for the targets which support this feature. This saves precious low memory (permanently mapped, the only type of memory directly accessible by the kernel). [1] https://www.kernel.org/doc/html/latest/vm/highmem.html Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* kernel: bump 5.10 to 5.10.102John Audia2022-03-011-19/+19
| | | | | | | | | | | | | | | Removed upstreamed: bcm4908/patches-5.10/180-i2c-brcmstb-fix-support-for-DSL-and-CM-variants.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.102&id=f333c1916fd6b55900029bf8f918cc00009e2111 Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <graysky@archlinux.us>
* kernel: bump 5.10 to 5.10.101John Audia2022-03-011-1/+1
| | | | | | | | | | | | | | | | | Removed upstreamed: pending-5.10/841-USB-serial-option-add-ZTE-MF286D-modem.patch[1] bcm27xx/950-0592-drm-vc4-Allow-DBLCLK-modes-even-if-horz-timing-is-od.patch[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.101&id=7113440a36c741efd7c76e3d70b3634100120cdb 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.101&id=21c890ca8eaecea06cabb92be2a53a6f26f56383 Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <graysky@archlinux.us>
* ipq806x: base-files: asrock: fix bootcount includePetr Štetiar2022-02-281-1/+1
| | | | | | | | | | | | | | | Fixes following warning message during image building process: Finalizing root filesystem... root-ipq806x/lib/upgrade/asrock.sh: line 1: /lib/functions.sh: No such file or directory Enabling boot root-ipq806x/lib/upgrade/asrock.sh: line 1: /lib/functions.sh: No such file or directory Enabling bootcount Fixes #9350 Fixes: 98b86296e67d ("ipq806x: add support for ASRock G10") Signed-off-by: Petr Štetiar <ynezz@true.cz>
* ipq806x: Increase kernel size to 4 MB for EA8500/EA7500v1Hannu Nyman2022-02-263-9/+27
| | | | | | | | | | | | | | | | | | | Increase the kernel size from 3 MB to 4 MB for EA8500 and EA7500v1. * modify the common .dtsi * modify the kernel size in the image recipes Define compat-version 2.0 to force factory image usage for sysupgrade. Add explanation message. Reenable both devices. As for 4MiB (and not more): Hannu Nyman noted that: "We have lots of ipq806x devices with 4 MB kernel, so will need action at that point in future in any case. (Assuming that the bootloader did not have a 4 MB limit that has been tested...)" Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi> (squashed, added 4MiB notice of support in ipq806x) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq806x: kernel crash log ramoops storage for R7800 and XR500Hannu Nyman2022-02-241-0/+9
| | | | | | | | | | | | Define the kernel crash log storage ramoops/pstore feature for R7800 and its sister XR500. Reference to the ramoops admin guide in upstream Linux: https://www.kernel.org/doc/html/v5.10/admin-guide/ramoops.html Tested with R7800. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* ipq806x: disable Linksys EA7500v1 and EA8500Christian Lamparter2022-02-201-0/+2
| | | | | | | | | | | | The kernel of both images will no longer fit into the 3072KiB / 3MiB kernel partition: |Image Name: ARM OpenWrt Linux-5.10.100 |Created: Sat Feb 19 00:11:55 2022 |Image Type: ARM Linux Kernel Image (uncompressed) |Data Size: 3147140 Bytes = 3073.38 KiB = 3.00 MiB Disable both targets for now, until a solution is available. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq806x: update defconfigJohn Audia2022-02-191-7/+1
| | | | | | | | | | | | Enabled `CONFIG_ALL_KMODS` and ran `make kernel_menuconfig` against ipq806x to update defconfig. The removed symbols are in fact present in target/linux/generic/config-5.10. CONFIG_MDIO_DEVRES was likely added due to this: <https://elixir.bootlin.com/linux/v5.10.100/source/drivers/net/phy/Kconfig#L16> Signed-off-by: John Audia <graysky@archlinux.us>
* ipq806x: TP-Link VR2600v convert legacy partitioningChristian Lamparter2022-02-191-88/+92
| | | | | | | | | | | | | This device still had the legacy flash partitioning. This is a problem, because neither the nvmem-cells for mac-address and calibration. Nor the denx,uimage mtd-splitter compatible would be picked up. The patch also changes the node-names of the flash and partition nodes to hopefully meet all the current FDT trends. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq806x: Enlarge D7800 flash - use netgear partitionMike Lothian2022-02-082-7/+4
| | | | | | | | | | | | | | | | | | | | | | Increase the available flash memory size in Netgear R7800 by repurposing the unused "netgear" partition that is located after the firmware partition. Available flash space for kernel+rootfs+overlay increases by 68 MB from 32 MB to 100 MB. In a typical build, overlay space increases from 15 to 85, increasing the package installation possibilities greatly. Reverting to the OEM firmware is still possible, as the OEM firmware contains logic to initialise the "netgear" partition if its contents do not match expectations. In OEM firmware, "netgear" contains 6 UBI sub-partitions that are defined in /etc/netgear.cfg and initialisation is done by /etc/preinit This is based on https://github.com/openwrt/openwrt/commit/fb8a578aa70572b3e56b64d296e22c2931e77b69 Signed-off-by: Mike Lothian <mike@fireburn.co.uk>
* target/linux: replace egrep with grep -ERosen Penev2022-02-071-1/+1
| | | | | | | egrep is deprecated and replaced by grep -E. The latter is used throughout the tree. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ipq806x: convert TP-Link Archer VR2600v to denx,uimageChristian Lamparter2022-02-063-11/+7
| | | | | | | | | | | | | | | | | | | | | The recent device-tree modification that added pre-cal nvmem-cells pushed the device's kernel+dtb over the allotted 3072k KERNEL_SIZE. > WARNING: Image file tplink_vr2600v-uImage is too big: 3147214 > 3145728 There was a previous kernel partition size upgrade: commit 0c967d92b3d9 ("ipq806x: increase kernel partition size for the TP-Link Archer VR2600v") It has been seemingly upgraded from a 2048k KERNEL_SIZE in the past. The commit talks about using the MTD_SPLIT_TPLINK_FW. But looking at the image make recipe, there is no code that adds a TPLINK header. So instead the board will use "denx,umimage". This requires MTD_SPLIT_UIMAGE_FW, but this is present thanks to some NEC devices. (Maybe the MTD_CONFIG_ARGS can be removed as well? But it could be there because of the padding at the beginning. This needs testing.) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq806x: G10: use ASROCK's wifi calibration dataChristian Lamparter2022-02-051-0/+26
| | | | | | | | brings back the ath10k QCA9980 wifi nodes to which it adds ASROCK's wifi calibration data. These are now provided by the ath10k_firmware.git's board-2.bin. Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* ipq806x: utilize nvmem-cells for pre-calibration dataChristian Lamparter2022-02-0511-139/+169
| | | | | | | | | | | | | converts extraction entries from 11-ath10k-caldata into nvmem-cells in the individual board's device-tree file. The patch also moves previously existing referenced nvmem-cells data nodes which were placed at the end back into the partitions node. As well as removing some duplicated properties from qcom-ipq8065-xr500.dts's art (the included nighthawk.dtsi defines those already). Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* kernel: bump 5.10 to 5.10.96Rui Salvaterra2022-02-011-2/+2
| | | | | | Patches automatically rebased. Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com>
* ipq806x: convert remaining mtd-mac-address-incrementSungbo Eo2022-02-011-1/+1
| | | | | | | | | | Commit d284e6ef0f06 ("treewide: convert mtd-mac-address-increment* to generic implementation") renamed "mtd-mac-address-increment" property to "mac-address-increment". Convert remaining usages that have been added after that. Fixes: f44e933458b1 ("ipq806x: provide WiFI mac-addresses from dts") Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* kernel: move bootargs-append patch to genericSungbo Eo2022-01-292-14/+2
| | | | | | | | | | This moves bootargs-append support patch from ipq40xx and ipq806x to generic. This way we can append additional boot arguments from DTS instead of only being able to overwrite them. This is a preparation for kirkwood support of ipTIME NAS1. Signed-off-by: Sungbo Eo <mans0n@gorani.run>
* ipq806x: Netgear D7800: Fix RAM and enable PCIe #2David Woodhouse2022-01-211-1/+15
| | | | | | | This board has 512MiB of RAM like the R7800, and the VDSL modem is attached to the second PCIe port. Signed-off-by: David Woodhouse <dwmw2@infradead.org>
* ipq806x: janitorial work, respect line lengthsAlex Lewontin2022-01-081-19/+41
| | | | | | | This commit breaks up some lines so that they are shorter than 74 charcters. Signed-off-by: Alex Lewontin <alex.c.lewontin@gmail.com>
* ipq806x: modularize generic subtargetAlex Lewontin2022-01-082-430/+431
| | | | | | | | This commit moves the device profiles within the ipq806x/generic subtarget into their own includable .mk file, to support eventually having subtargets other than generic. Signed-off-by: Alex Lewontin <alex.c.lewontin@gmail.com>
* ipq806x: ASRock g10: fix bogus read errorsStefan Lippers-Hollmann2022-01-021-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Properly declare that the g10 is booting from NAND and define its correct (larger than on other devices-) boot_pages_size, to prevent the kernel from constantly falling over missing OOB error correction for the bootloader. This patch prevents a constant slew of (bogus) read errors reported by the kernel and keeping the CPU busy and fixes: blk_update_request: I/O error, dev mtdblock0, sector 0 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0 blk_update_request: I/O error, dev mtdblock0, sector 8 op 0x0:(READ) flags 0x80700 phys_seg 3 prio class 0 blk_update_request: I/O error, dev mtdblock0, sector 16 op 0x0:(READ) flags 0x80700 phys_seg 2 prio class 0 blk_update_request: I/O error, dev mtdblock0, sector 24 op 0x0:(READ) flags 0x80700 phys_seg 1 prio class 0 blk_update_request: I/O error, dev mtdblock0, sector 0 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0 Buffer I/O error on dev mtdblock0, logical block 0, async page read blk_update_request: I/O error, dev mtdblock0, sector 32 op 0x0:(READ) flags 0x80700 phys_seg 8 prio class 0 blk_update_request: I/O error, dev mtdblock0, sector 40 op 0x0:(READ) flags 0x80700 phys_seg 7 prio class 0 blk_update_request: I/O error, dev mtdblock0, sector 48 op 0x0:(READ) flags 0x80700 phys_seg 6 prio class 0 blk_update_request: I/O error, dev mtdblock0, sector 56 op 0x0:(READ) flags 0x80700 phys_seg 5 prio class 0 blk_update_request: I/O error, dev mtdblock0, sector 64 op 0x0:(READ) flags 0x80700 phys_seg 4 prio class 0 Buffer I/O error on dev mtdblock0, logical block 1, async page read Buffer I/O error on dev mtdblock1, logical block 0, async page read Buffer I/O error on dev mtdblock1, logical block 1, async page read Buffer I/O error on dev mtdblock2, logical block 0, async page read Buffer I/O error on dev mtdblock2, logical block 1, async page read Buffer I/O error on dev mtdblock3, logical block 0, async page read Buffer I/O error on dev mtdblock3, logical block 0, async page read Buffer I/O error on dev mtdblock4, logical block 0, async page read Buffer I/O error on dev mtdblock4, logical block 1, async page read Suggested-by: Ansuel Smith <ansuelsmth@gmail.com> Signed-off-by: Stefan Lippers-Hollmann <s.l-h@gmx.de>
* kernel: 5.10: consolidate mac80211 crypto optionsSergey Ryazanov2021-12-171-7/+0
| | | | | | | | | | | | | | | | | | | | | | Each of - CRYPTO_AEAD2 - CRYPTO_AEAD - CRYPTO_GF128MUL - CRYPTO_GHASH - CRYPTO_HASH2 - CRYPTO_HASH - CRYPTO_MANAGER2 - CRYPTO_MANAGER - CRYPTO_NULL2 either directly required for mac80211 crypto support, or directly selected by such options. Support for the mac80211 crypto was enabled in the generic config since c7182123b9 ("kernel: make cryptoapi support needed by mac80211 built-in"). So move the above options from the target configs to the generic config to make it clear why do we need them. CC: Felix Fietkau <nbd@nbd.name> Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
* 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>
* kernel: bump 5.10 to 5.10.83John Audia2021-12-122-9/+9
| | | | | | | | | | | | | | | | | | | | | | | Removed upstreamed: bcm53xx/patches-5.10/033-v5.16-0024-ARM-dts-BCM5301X-Fix-I2C-controller-interrupt.patch[1] bcm53xx/patches-5.10/033-v5.16-0025-ARM-dts-BCM5301X-Add-interrupt-properties-to-GPIO-no.patch[2] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.83&id=b2cd6fdcbe0a5cb44e4610a08cc58261d494a885 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.83&id=9db1d4a3c2700e1cc84c3d61199411d75c2a3ec6 Build system: x86_64* Build-tested: bcm2711/RPi4B, ipq806x/R7800† Run-tested: bcm2711/RPi4B, ipq806x/R7800† * Had to revert 7c99085bd69742f66207d61e9f2da5ec4f8f9d2f in order to build (latest bump of ca-certificates) † Had to revert 7f1edbd41295dff9f2127b169fbc086c0fb2c14e in order to build (binutils 2.37, https://bugs.openwrt.org/index.php?do=details&task_id=4149) Signed-off-by: John Audia <graysky@archlinux.us>
* ipq806x: revert SDC clock changes for NBG6817 MMCShane Synan2021-12-052-24/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert the SDC "CLK_SET_RATE_GATE" changes to the SDC clock regulator structures. See https://elinux.org/images/b/b8/Elc2013_Clement.pdf > if ((clk->flags & CLK_SET_RATE_GATE) && clk->prepare_count) { > > For this particular clock, setting its rate is possible only if the > clock is ungated (not yet prepared) This fixes the MMC failing to initialize on newer ZyXEL NBG6817 hardware revisions with Kingston MMC. Older revisions should hopefully be unaffected. Check MMC hardware details with: cd /sys/block/mmcblk0/device/ && \ tail -v cid date name manfid fwrev hwrev oemid rev Known problematic MMC names (broken before this commit): * M62704 (dated 12/2018) via myself * M62704 (dated 11/2018) via Drake Stefani Known unaffected MMC names (already working without this commit): * S10004 (dated 12/2015) via slh Without enabling dynamic debugging, this error manifests in the kernel hardware serial console as the following: [ 2.746605] mmc0: error -110 whilst initialising MMC card […trimmed other messages…] [ 2.877832] Waiting for root device /dev/mmcblk0p5... Enabling Linux dynamic kernel debugging provides additional messages. For guidance, see the Linux kernel documentation: https://www.kernel.org/doc/html/latest/admin-guide/dynamic-debug-howto.html First, enable dynamic debugging in OpenWRT's configuration: 1. Run "make menuconfig" 2. Select "Global build settings --->" 3. Select "Kernel build options --->" 4. Enable "Compile the kernel with dynamic printk" via spacebar 5. Save and exit (arrow key to "Exit" until prompted to save, save) Alternatively, set "CONFIG_KERNEL_DYNAMIC_DEBUG=y" in your .config. Then, turn on dynamic debugging at boot: Modify bootargs in target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts to add… bootargs = "[…existing bootargs…] dyndbg=\"file drivers/mmc/* +p\" dynamic_debug.verbose=1 loglevel=8"; For example: chosen { - bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd fstools_ignore_partname=1"; + bootargs = "rootfstype=squashfs,ext4 rootwait noinitrd fstools_ignore_partname=1 dyndbg=\"file drivers/mmc/* +p\" dynamic_debug.verbose=1 loglevel=8"; append-rootblock = "root=/dev/mmcblk0p"; Then, compile and flash the resulting build. If you are testing before this commit on newer MMC hardware, be prepared to recover! NOTE: If you have hardware serial console access, you don't need to use TFTP recovery to change the active boot partition. Reboot to working alternative partition via serial console: 1. Connect to hardware serial console * See https://openwrt.org/toh/zyxel/nbg6817#serial 2. Interrupt boot at "Hit any key to stop autoboot:" 3. Run "ATSE NBG6817" 4. Copy the result (e.g. "001976FE4B04") * Changes with **every boot** - can't reuse this 5. On your local system, run "./zyxel-uboot-password-tool.sh <copied value here>" * Example: "./zyxel-uboot-password-tool.sh 001976FE4B04" 6. Run the command provided by the password tool * Example: "ATEN 1,910F129B" * Changes with **every boot** - can't reuse this 7. Run "ATGU" * You now have full u-boot shell until next boot - unlocking is not remembered 8. Run either "run boot_mmc" (for booting partition set "FF") or "run boot_mmc_1" (for booting partition set "01") * These commands are not affected by dual-boot partition flags NOTE: This will NOT set the dual-boot partition flag. You'll need to fix that manually. The "nbg6817-dualboot" script may help: https://github.com/pkgadd/nbg6817/blob/master/nbg6817-dualboot zyxel-uboot-password-tool.sh - sourced from commit 459c8c9ef816156107e297964d088ddee2b4eef5: ror32() { echo $(( ($1 >> $2) | (($1 << (32 - $2) & (2**32-1)) ) )) } v="0x$1" a="0x${v:2:6}" b=$(( a + 0x10F0A563)) c=$(( 0x${v:12:14} & 7 )) p=$(( $(ror32 $b $c) ^ a )) printf "ATEN 1,%X\n" $p Kernel serial console log BEFORE commit with dynamic debug enabled: […trimmed…] [ 3.171343] mmci-pl18x 12400000.sdcc: designer ID = 0x51 [ 3.171397] mmci-pl18x 12400000.sdcc: revision = 0x0 [ 3.175811] mmci-pl18x 12400000.sdcc: clocking block at 96000000 Hz [ 3.181134] mmci-pl18x 12400000.sdcc: No vqmmc regulator found [ 3.186788] mmci-pl18x 12400000.sdcc: mmc0: PL180 manf 51 rev0 at 0x12400000 irq 41,0 (pio) [ 3.192902] mmci-pl18x 12400000.sdcc: DMA channels RX dma1chan1, TX dma1chan2 [ 3.215609] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0 [ 3.227532] mmci-pl18x 12400000.sdcc: Initial signal voltage of 3.3v [ 3.247518] mmc0: clock 52000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0 […trimmed…] [ 3.997725] mmc0: req done (CMD2): -110: 00000000 00000000 00000000 00000000 [ 4.003631] mmci-pl18x 12400000.sdcc: irq0 (data+cmd) 00000000 [ 4.003659] mmc0: error -110 whilst initialising MMC card [ 4.016481] mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 1 timing 0 Notice how the initial clock is 52 MHz, which is incorrect - MMC requires negotiation to enable higher speeds. Kernel serial console log AFTER commit with dynamic debug enabled: […trimmed…] [ 3.168996] mmci-pl18x 12400000.sdcc: designer ID = 0x51 [ 3.169051] mmci-pl18x 12400000.sdcc: revision = 0x0 [ 3.173492] mmci-pl18x 12400000.sdcc: clocking block at 96000000 Hz [ 3.178808] mmci-pl18x 12400000.sdcc: No vqmmc regulator found [ 3.184702] mmci-pl18x 12400000.sdcc: mmc0: PL180 manf 51 rev0 at 0x12400000 irq 41,0 (pio) [ 3.190573] mmci-pl18x 12400000.sdcc: DMA channels RX dma1chan1, TX dma1chan2 [ 3.217873] mmc0: clock 0Hz busmode 2 powermode 1 cs 0 Vdd 21 width 1 timing 0 [ 3.229250] mmci-pl18x 12400000.sdcc: Initial signal voltage of 3.3v [ 3.249111] mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 0 […trimmed…] [ 4.392652] mmci-pl18x 12400000.sdcc: irq0 (data+cmd) 00000000 [ 4.392785] mmc0: clock 52000000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 1 timing 1 [ 4.406554] mmc0: starting CMD6 arg 03b70201 flags 0000049d […trimmed…] Now, the MMC properly initializes and later switches to high speed. Thanks to: * Ansuel for maintaining/help with the IPQ806x platform, kernel code * slh for additional debugging and suggestions * dwfreed for confirming newer MMC details, clock frequency * robimarko for device driver debug printing help, clock debugging * Drake for testing and confirmation with their own newer NBG6817 ...and anyone else I missed! Signed-off-by: Shane Synan <digitalcircuit36939@gmail.com> Tested-by: Shane Synan <digitalcircuit36939@gmail.com>
* ipq806x: sysupgrade: drop unnecessary UBI to UBI logicBjørn Mork2021-12-031-17/+1
| | | | | | | | | | | | | The purpose of this code seems to be to avoid issues caused by partially overwriting an existing UBI partition, where some of the erase counters would be reset but not the unmodified ones. This problem has been solved in a more generic way by the UBI EOF marker. This ensures that any old PEBs after the marker are properly initialized. It is therefore unnecessary to erase the whole partition before flashing a new OpenWrt factory image. Signed-off-by: Bjørn Mork <bjorn@mork.no>
* ipq806x: add support for Cisco Meraki MR42/MR52Matthew Hagan2021-11-289-1/+755
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The MR42 and MR52 are two similar IPQ806x based devices from the Cisco Meraki "Cryptid" series. MR42 main features: - IPQ8068 1.4GHz - 512MB RAM - 128MB NAND - 2x QCA9992 (2.4 & 5GHz) - 1x QCA9889 (2.4 & 5GHz) - 1x AR8033 PHY - PoE/AC power MR52 main features: - IPQ8068 1.4GHz - 512MB RAM - 128MB NAND - 2x QCA9994 (2.4 & 5GHz) - 1x QCA9889 (2.4 & 5GHz) - 2x AR8033 PHYs - PoE/AC power (MR42 Only) Installation via diagnostic mode: If you can successfully complete step 1 then you can continue to install via this method without having to open the device. Otherwise please use the standard UART method. Please note that when booting via TFTP, some Ethernet devices, in particular those on laptops, will not connect in time, resulting in TFTP boot not succeeding. In this instance it is advised to connect via a switch. 1. Hold down reset at power on and keep holding, after around 10 seconds if the orange LED changes behaviour to begin flashing, proceed to release reset, then press reset two times. Ensure that the LED has turned blue. Note that flashing will occur on some devices, but it will not be possible to change the LED colour using the reset button. In this case it will still be possible to continue with this install method. 2. Set your IP to 192.168.1.250. Set up a TFTP server serving mr42_u-boot.mbn and openwrt-ipq806x-generic-meraki_mr42-initramfs-fit-uImage.itb, obtained from [1]. 3. Use telnet and connect to 192.168.1.1. Run the following commands to install u-boot. Note that all these commands are critical, an error will likely render the device unusable. Option 3.1: If you are sure you have set up the TFTP server correctly you can run this script on the device. This will download and flash the u-boot image immediately: `/etc/update_uboot.sh 192.168.1.250 mr42_u-boot.mbn` Once completed successfully, power off the device. Option 3.2: If you are unsure the TFTP server is correctly set up you can obtain the image and flash manually: 3.2.1. `cd /tmp` 3.2.2. `tftp-hpa 192.168.1.250 -m binary -c get mr42_u-boot.mbn` 3.2.3. Confirm file has downloaded correctly by comparing the md5sum: `md5sum mr42_u-boot.mbn` 3.2.4. The following are the required commands to write the image. `echo 1 > /sys/devices/platform/msm_nand/boot_layout mtd erase /dev/mtd1 nandwrite -pam /dev/mtd1 mr42_u-boot.mbn echo 0 > /sys/devices/platform/msm_nand/boot_layout` Important: You must observe the output of the `nandwrite` command. Look for the following to verify writing is occurring: `Writing data to block 0 at offset 0x0 Writing data to block 1 at offset 0x20000 Writing data to block 2 at offset 0x40000` If you do not see this then do not power off the device. Check your previous commands and that mr42_u-boot.mbn was downloaded correctly. Once you are sure the image has been written you can proceed to power off the device. 4. Hold the reset button and power on the device. This will immediately begin downloading the appropriate initramfs image and boot into it. Note: If the device does not download the initramfs, this is likely due to the interface not being brought up in time. Changing Ethernet source to a router or switch will likely resolve this. You can also try manually setting the link speed to 10Mb/s Half-Duplex. 5. Once a solid white LED is displayed on the device, continue to the UART installation method, step 6. Standard installation via UART - MR42 & MR52 1. Disassemble the device and connect a UART header. The header pinout is as follows: 1 - 3.3v 2 - TXD 3 - RXD 4 - GND Important: You should only connect TXD, RXD and GND. Connecting 3.3v may damage the device. 2. Set your IP to 192.168.1.250. Set up a TFTP server serving openwrt-ipq806x-generic-meraki_(mr42|mr52)-initramfs-fit-uImage.itb. Separately obtain the respective sysupgrade image. 3. Run the following commands, preferably from a Linux host. The mentioned files, including ubootwrite.py and u-boot images, can be obtained from [1]. `python ubootwrite.py --write=(mr42|mr52)_u-boot.bin` The default for "--serial" option is /dev/ttyUSB0. 4. Power on the device. The ubootwrite script will upload the image to the device and launch it. The second stage u-boot will in turn load the initramfs image by TFTP, provided the TFTP server is running correctly. This process will take about 13 minutes. Once a solid white LED is displayed, the image has successfully finished loading. Note: If the image does not load via TFTP, try again with the Ethernet link to 10Mb/s Half-Duplex. 5. (MR42 only) Do not connect over the network. Instead connect over the UART using minicom or similar tool. To replace u-boot with the network enabled version, please run the following commands. Note that in the provided initramfs images, the u-boot.mbn file is located in /root: If you have not used the provided initramfs, you must ensure you are using an image with "boot_layout" ECC configuration enabled in the Kernel. This will be version 5.10 or higher. If you do not do this correctly the device will be bricked. `insmod mtd-rw i_want_a_brick=1 mtd erase /dev/mtd8 nandwrite -pam /dev/mtd8 /root/mr42_u-boot.mbn` After running nandwrite, ensure you observe the following output: `Writing data to block 0 at offset 0x0 Writing data to block 1 at offset 0x20000 Writing data to block 2 at offset 0x40000` 6. (Optional) If you have no further use for the Meraki OS, you can remove all other UBI volumes on ubi0 (mtd11), including diagnostic1, part.old, storage and part.safe. You must not remove the ubi1 ART partition (mtd12). `for i in diagnostic1 part.old storage part.safe ; do ubirmvol /dev/ubi0 -N $i done` 7. Proceed to flash the sysupgrade image via luci, or else download or scp the image to /tmp and use the sysupgrade command. [1] The mentioned images and ubootwrite.py script can be found in this repo: https://github.com/clayface/openwrt-cryptid [2] The modified u-boot sources for the MR42 and MR52 are available: https://github.com/clayface/U-boot-MR52-20200629 Signed-off-by: Matthew Hagan <mnhagan88@gmail.com>