aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/mpc85xx
Commit message (Collapse)AuthorAgeFilesLines
* mpc85xx: fix incorrect CPU node / propertiesDavid Bauer2023-04-081-2/+8
| | | | | | | This adds properties normally filled by U-Boot. Also it fixes the node name, which is incorrectly referring to a P1010 core. Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: add localbus frequency for WS-AP3825iDavid Bauer2023-04-081-0/+4
| | | | | | This is normally filled by U-Boot. Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: add linux,stdout-path for WS-AP3825iDavid Bauer2023-04-081-0/+1
| | | | | | | This is normally filled by U-Boot. Prevents double-printing of early console messages. Also enables debug-output by the zImage wrapper. Signed-off-by: David Bauer <mail@david-bauer.net>
* Revert "mpc85xx: remove Watchguard T10 MAC override"David Bauer2023-04-031-0/+5
| | | | | | | | | | This reverts commit aa4a9058fbf4d2ca7ef3af9ebb5bbec896625e93. The assumption the bootloader fills out the MAC-address is not correct. The MAC-address has to be set from userspace based on information found in the device_id partition. Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: Refresh patchesHauke Mehrtens2023-03-241-2/+2
| | | | | | | Make the patches apply cleanly again. Fixes: ed82189339b8 ("mpc85xx: use bootwrapper for ws-ap3825i") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mpc85xx: poll PHY statusDavid Bauer2023-03-202-4/+4
| | | | | | | | | | Disable interrupts for the eth-PHYs, as the interrupts are either not firing or lost within the stack. Switch to polling the PHY status in the meantime until a proper fix is implemented. Ref: https://github.com/openwrt/openwrt/issues/12192 Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: use bootwrapper for ws-ap3825iDavid Bauer2023-03-204-2/+81
| | | | | | | | | | | | | | | The boot-procedure for the Extreme WS-AP3825I is vfragile to put it mildly. It does not relocate the FDT properly. It currently exercises every step manually as well as coming with a pre-padded dtb. Use the PowerPC bootwrapper code for legacy platforms with a pre-filles DTS instead. We still need to ship a fit image to not break the fdt resize / relocate instructions on existing boards. This does not require adapting the U-Boot bootcommand. Ref: https://github.com/openwrt/openwrt/issues/12223 Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: fix incorrect kernel targetDavid Bauer2023-03-201-1/+1
| | | | | | | | | | | | | | | The wrapper-image for the WL-WDR4900 was used as a build-target for the kernel. This workd fine as long as only a single wrapper is used with the OpenWrt build-system. If additional wrappers are used, the build becomes racy in the wrapper-stage. The wrapper images actually do not represent a target. They are built based on the kernel configuration. Only copy the resulting images to avoid race-conditions as explained. Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: remove Watchguard T10 MAC overrideDavid Bauer2023-03-201-5/+0
| | | | | | | | As the mac-address readout never worked, the mac-address fillout by the bootloader is sufficient. Remove the readout for the Watchguard T10 then. Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: fix missing system importDavid Bauer2023-03-201-0/+1
| | | | | | | The mac-address accessor functions were not included in the sourced script. Fix this by importing the correct script path. Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: add support for Watchguard Firebox T10David Bauer2023-03-0711-1/+437
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware -------- SoC: Freescale P1010 RAM: 512MB FLASH: 1 MB SPI-NOR 512 MB NAND ETH: 3x Gigabite Ethernet (Atheros AR8033) SERIAL: Cisco RJ-45 (115200 8N1) RTC: Battery-Backed RTC (I2C) Installation ------------ 1. Patch U-Boot by dumping the content of the SPI-Flash using a SPI programmer. The SHA1 hash for the U-Boot password is currently unknown. A tool for patching U-Boot is available at https://github.com/blocktrron/t10-uboot-patcher/ You can also patch the unknown password yourself. The SHA1 hash is E597301A1D89FF3F6D318DBF4DBA0A5ABC5ECBEA 2. Interrupt the bootmenu by pressing CTRL+C. A password prompt appears. The patched password is '1234' (without quotation marks) 3. Download the OpenWrt initramfs image. Copy it to a TFTP server reachable at 10.0.1.13/24 and rename it to uImage. 4. Connect the TFTP server to ethernet port 0 of the Watchguard T10. 5. Download and boot the initramfs image by entering "tftpboot; bootm;" in U-Boot. 6. After OpenWrt booted, create a UBI volume on the old data partition. The "ubi" mtd partition should be mtd7, check this using $ cat /proc/mtd Create a UBI partition by executing $ ubiformat /dev/mtd7 -y 7. Increase the loadable kernel-size of U-Boot by executing $ fw_setenv SysAKernSize 800000 8. Transfer the OpenWrt sysupgrade image to the Watchguard T10 using scp. Install the image by using sysupgrade: $ sysupgrade -n <path-to-sysupgrade> Note: The LAN ports of the T10 are 1 & 2 while 0 is WAN. You might have to change the ethernet-port. 9. OpenWrt should now boot from the internal NAND. Enjoy. Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: p2020: enable CONFIG_MAX63XX_WATCHDOGJosef Schlehofer2023-03-041-0/+1
| | | | | | | | | This enables CONFIG_MAX63XX_WATCHDOG [1], which can be used on P2020 RDB. [1] https://cateee.net/lkddb/web-lkddb/MAX63XX_WATCHDOG.html Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* kernel: Add CONFIG_PPC_QUEUED_SPINLOCKS configuration optionHauke Mehrtens2023-02-231-1/+0
| | | | | | | | | | The CONFIG_PPC_QUEUED_SPINLOCKS configuration option is not defined for kernel 5.15, it is defined for kernel 5.10. This fixes the compilation of mpc85xx/p2020 with kernel 5.15. Reviewed-by: Robert Marko <robimarko@gmail.com> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mpc85xx: switch default kernel to 5.15Nick Hainke2023-02-221-2/+1
| | | | | | | | | | The default kernel should be switched to 5.15 in order to enable testing by a broader audience. Tested on TP-Link TL-WDR4900 v1. Acked-by: Josef Schlehofer <pepe.schlehofer@gmail.com> Signed-off-by: Nick Hainke <vincent@systemli.org>
* mcp85xx: Switch TP-Link TL-WDR4900 v1 to DSAPawel Dembicki2023-02-208-25/+105
| | | | | | | | | This patch introduces DSA support for TP-Link TL-WDR4900 v1 switch. Swconfig driver for QCA8327 switch is removed because this router is only one device which use Qualcom swconfig switch. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com> Tested-by: Nick Hainke <vincent@systemli.org> # TP Link WDR4900 v1 (5.15)
* mpc85xx: refresh kernel configPawel Dembicki2023-02-202-27/+15
| | | | | | It was done by "make kernel_oldconfig" command for 5.10 and 5.15. Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
* mpc85xx: p2020: kernel: enable CONFIG_BLK_DEV_NVMEŠimon Bořek2023-02-071-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Enables use of NVMe storage devices with appropriate adapter in miniPCIe slots (including for boot) in Turris 1.x routers and possibly NXP P2020RDB boards (these are the only currently supported p2020 devices according to docs[^1]). Proper detection, mountability and readability was proved to be working on Turris 1.1, OpenWrt 21.02 with similar configuration. Increases gzip compressed kernel size by approximately 37 KiB (from 3 703 KiB to 3 740 KiB). Should boot from those devices be possible the driver needs to be built in. Inclusion as a module would prevent this functionality. CONFIG_BLK_DEV_NVME=y Includes NVMe driver in the kernel.[^2] CONFIG_NVME_CORE=y Selected by CONFIG_BLK_DEV_NVME.[^3] Not necessarily needed to be enabled explicitly, but included to match the form of similar functionality implementations for mvebu, x86_64 and rockchip_armv8 targets. CONFIG_NVME_MULTIPATH disabled explicitly to prevent using more space than necessary. [^1]: https://openwrt.org/docs/techref/targets/mpc85xx [^2]: https://cateee.net/lkddb/web-lkddb/BLK_DEV_NVME.html [^3]: https://cateee.net/lkddb/web-lkddb/NVME_CORE.html Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
* mpc85xx: p2020: kernel: refresh configurationŠimon Bořek2023-02-071-5/+15
| | | | | | | 'make kernel_oldconfig CONFIG_TARGET=subtarget' applied to current master Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
* treewide: replace wpad-basic-wolfssl defaultRosen Penev2023-02-041-1/+1
| | | | | | | 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>
* kernel: backport of changes & helpersRafał Miłecki2023-01-071-1/+1
| | | | | | This code is required for upcoming NVMEM changes. Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
* mpc85xx: change CPU_TYPE from 8540 to 8548Šimon Bořek2022-12-291-1/+1
| | | | | | | | | | | | | | | | | | All subtargets as p1010, p1020, p2020 uses e500v2 cores [1] [2] [3] [4], so let's force cpu type to 8545 for all mpc85xx target even though there might exist device with e500v1, but there is no such router supported in OpenWrt and because of that it does not make sense to to set CPU_TYPE for each subtarget. All MPC85xx SoC can be found here: https://www.nxp.com/products/processors-and-microcontrollers/legacy-mpu-mcus/powerquicc-processors:POWERQUICC_HOME#powerquicc-iii-mpc85xx [1] https://www.nxp.com/docs/en/application-note/AN2807.pdf [2] https://www.nxp.com/docs/en/fact-sheet/QP1010FS.pdf [3] https://www.nxp.com/docs/en/product-brief/P1020PB.pdf [4] https://www.nxp.com/docs/en/fact-sheet/QP20XXFS.pdf Co-authored-by: Pali Rohár <pali@kernel.org> Signed-off-by: Šimon Bořek <simon.borek@nic.cz>
* mpc85xx: drop empty patch as it backported to LTS kernel 5.15.70Josef Schlehofer2022-12-241-0/+0
| | | | | | | | | This patch is part of Linux kernel 5.15.70, the content was removed, but the empty file is still being carried over the repository, so remove it once for all Fixes: e1b009c ("kernel: bump 5.15 to 5.15.70") Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* mpc85xx: fix missing kernel config symbolJosef Schlehofer2022-11-161-0/+1
| | | | | | | | | | | | | While compiling OpenWrt master for Turris 1.x routers (p2020), it reported following error: Gianfar Ethernet (GIANFAR) [Y/n/m/?] y Freescale DPAA2 Ethernet Switch (FSL_DPAA2_SWITCH) [N/m/y/?] (NEW) Error in reading or end of file. Let's fix it by disabling it. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* kernel: bump 5.15 to 5.15.75John Audia2022-10-302-4/+4
| | | | | | | | | | | | | | | | | | | | | Removed upstreamed: bcm27xx/patches-5.15/950-0446-drm-vc4-Fix-timings-for-VEC-modes.patch[1] Manually rebased: patches-5.15/950-0600-xhci-quirks-add-link-TRB-quirk-for-VL805.patch bcm27xx/patches-5.15/950-0606-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch bcm27xx/patches-5.15/950-0717-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch bcm53xx/patches-5.15/180-usb-xhci-add-support-for-performing-fake-doorbell.patch All other patches automatically rebased 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.75&id=2810061452f9b748b096ad023d318690ca519aa3 Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.10 to 5.10.150John Audia2022-10-302-4/+4
| | | | | | | | | | | Manually rebased: bcm53xx/patches-5.10/180-usb-xhci-add-support-for-performing-fake-doorbell.patch All patches automatically rebased. Signed-off-by: John Audia <therealgraysky@proton.me> [Move gro_skip in 680-NET-skip-GRO-for-foreign-MAC-addresses.patch to old position] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* mpc85xx: fix unset kernel symbolDavid Bauer2022-10-141-0/+2
| | | | Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: p1010: make TP-Link WDR4900 v1 build againMatthias Schiffer2022-10-141-3/+17
| | | | | | | Add the spi-loader as a pre-kernel stage, so we can lift the kernel size limit. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* mpc85xx: add SPI kernel loader for TP-Link TL-WDR4900 v1Matthias Schiffer2022-10-1422-0/+1364
| | | | | | | | | | Similar to the lzma-loader on our MIPS targets, the spi-loader acts as a second-stage loader that will then load and start the actual kernel. As the TL-WDR4900 uses SPI-NOR and the P1010 family does not have support for memory mapping of this type of flash, this loader needs to contain a basic driver for the FSL ESPI controller. Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
* kernel: bump 5.10 to 5.10.145John Audia2022-10-021-37/+0
| | | | | | | | | | | | | | Manually rebased: hack-5.10/780-usb-net-MeigLink_modem_support.patch Removed upstreamed: patches-5.10/110-gpio-mpc8xxx-Fix-support-for-IRQ_TYPE_LEVEL_LOW-flow.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.10.145&id=24196210b198e8e39296e277bb93b362aa207775 Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.15 to 5.15.70John Audia2022-10-021-37/+0
| | | | | | | | | | | | | | | | | | Manually rebased: hack-5.15/780-usb-net-MeigLink_modem_support.patch Removed upstreamed: patches-5.15/110-gpio-mpc8xxx-Fix-support-for-IRQ_TYPE_LEVEL_LOW-flow.patch[1] All other patches automatically rebased. Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.70&id=89cfddd416bac41ff35f37f928ed3d7fefef908e Signed-off-by: John Audia <therealgraysky@proton.me>
* kernel: bump 5.15 to 5.15.68John Audia2022-09-175-40/+20
| | | | | | | | | | All patches automatically rebased Build system: x86_64 Build-tested: bcm2711/RPi4B, mt7622/RT3200 Run-tested: bcm2711/RPi4B, mt7622/RT3200 Signed-off-by: John Audia <therealgraysky@proton.me>
* mpc85xx: Add 5.15 kernel as testing and fix configsWojciech Dubowik2022-09-144-0/+6
| | | | | | | | | Build system: x86_64 Build-tested: generic Run-tested: generic/TL-WDR4900 v1 board from TP-Link Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@westermo.com> Signed-off-by: Petr Štetiar <ynezz@true.cz> [un-dmarc]
* mpc85xx: Copy over kernel 5.10 patches and config to 5.15Wojciech Dubowik2022-09-1412-0/+831
| | | | | | | Split patches for better change visibility. Signed-off-by: Wojciech Dubowik <Wojciech.Dubowik@westermo.com> Signed-off-by: Petr Štetiar <ynezz@true.cz> [un-dmarc, commit description]
* mpc85xx: Make AP3825i boot env partition writableMartin Kennedy2022-09-111-2/+0
| | | | | | | | | | | | | | | End-users may need to be able to rewrite u-boot configuration on the WS-AP3825i, which has had repeated issues with the exact configuration of u-boot, e.g. commit 1d06277407 ("mpc85xx: Fix output location of padded dtb") (alongside other failures documented for example in this post[^1] from the main AP3825i porting thread). To assist with this, remove the `read-only` property from the u-boot configuration partitions cfg1 and cfg2. [^1]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168/107 Signed-off-by: Martin Kennedy <hurricos@gmail.com>
* mpc85xx: add patch to fix gpio mpc8xxxJosef Schlehofer2022-09-111-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backports patch, which is currently on review [1] for kernel 5.10 and kernel 5.15, where it applies cleanly. This was tested on CZ.NIC Turris 1.1 router running OpenWrt 21.02.03 with kernel 5.15. Before: - In /var/log/messages: ``` [ 16.392988] lm90 0-004c: cannot request IRQ 48 [ 16.398280] lm90: probe of 0-004c failed with error -22 ``` - Sensors does not work: ``` root@turris:~# sensors No sensors found! Make sure you loaded all the kernel drivers you need. Try sensors-detect to find out which these are. ``` After: ``` root@turris:/# sensors sa56004-i2c-0-4c Adapter: MPC adapter (i2c@3000) temp1: +44.0°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C) temp2: +73.8°C (low = +0.0°C, high = +70.0°C) ALARM (HIGH) (crit = +85.0°C, hyst = +75.0°C) ``` [1] https://lore.kernel.org/linux-gpio/20220906105431.30911-1-pali@kernel.org/ Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* mpc85xx: Drop pci aliases to avoid domain changesMartin Kennedy2022-09-026-0/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As of upstream Linux commit 0fe1e96fef0a ("powerpc/pci: Prefer PCI domain assignment via DT 'linux,pci-domain' and alias"), the PCIe domain address is no longer numbered by the lowest 16 bits of the PCI register address after a fallthrough. Instead of the fallthrough, the enumeration process accepts the alias ID (as determined by `of_alias_scan()`). This causes e.g.: 9000:00:00.0 PCI bridge: Freescale Semiconductor Inc P1020E (rev 11) 9000:01:00.0 Network controller: Qualcomm Atheros AR958x 802.11abgn ... to become 0000:00:00.0 PCI bridge: Freescale Semiconductor Inc P1020E (rev 11) 0000:01:00.0 Network controller: Qualcomm Atheros AR958x 802.11abgn ... ... which then causes the sysfs path of the netdev to change, invalidating the `wifi_device.path`s enumerated in `/etc/config/wireless`. One other solution might be to migrate the uci configuration, as was done for mvebu in commit 0bd5aa89fcf2 ("mvebu: Migrate uci config to new PCIe path"). However, there are concerns that the sysfs path will change once again once some upstream patches[^2][^3] are merged and backported (and `CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT` is enabled). Instead, remove the aliases and allow the fallthrough to continue for now. We will provide a migration in a later release. This was first reported as a Github issue[^1]. [^1]: https://github.com/openwrt/openwrt/issues/10530 [^2]: https://lore.kernel.org/linuxppc-dev/20220706104308.5390-1-pali@kernel.org/t/#u [^3]: https://lore.kernel.org/linuxppc-dev/20220706101043.4867-1-pali@kernel.org/ Fixes: #10530 Tested-by: Martin Kennedy <hurricos@gmail.com> [Tested on the Aerohive HiveAP 330 and Extreme Networks WS-AP3825i] Signed-off-by: Martin Kennedy <hurricos@gmail.com>
* kernel: Activate CONFIG_GPIOLIB in generic configurationHauke Mehrtens2022-08-101-1/+0
| | | | | | | | All targets expect the malta target already activate the CONFIG_GPIOLIB option. Move it to generic kernel configuration and also activate it for malta. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* kernel: bump 5.10 to 5.10.122John Audia2022-06-271-1/+1
| | | | | | | | | All patches automatically rebased. Build system: x86_64 Build-tested: ipq806x/R7800 Signed-off-by: John Audia <therealgraysky@proton.me>
* generic: enable CRYPTO_LIB_BLAKE2S[_X86|_ARM]Tomasz Maciej Nowak2022-06-241-0/+2
| | | | | | | | | | | | This is now built-in, enable so it won't propagate on target configs. Link: https://lkml.org/lkml/2022/1/3/168 Fixes: 79e7a2552e89 ("kernel: bump 5.15 to 5.15.44") Fixes: 0ca93670693b ("kernel: bump 5.10 to 5.10.119") Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com> (Link to Kernel's commit taht made it built-in, CRYPTO_LIB_BLAKE2S[_ARM|_X86] as it's selectable, 5.10 backport) Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* mpc85xx: p2020: add RTC ds1307 to kernelJosef Schlehofer2022-06-191-0/+1
| | | | | | | | | | | | | | If the RTC module is compiled as a module, the hctosys fails to initialize because ds1307 is loaded later. Fixes: [ 2.004145] hctosys: unable to open rtc device (rtc0) [ 11.957997] rtc-ds1307 0-006f: registered as rtc0 This is similar to commit 5481ce9a1157a43d8b2c963e03fb243e70974361, which was done for imx6 target. Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* mpc85xx: enable NAND support for all subtargetsJosef Schlehofer2022-06-193-3/+1
| | | | | | | | | | | | | | In subtarget p2020, there wasn't enabled nand support, and because of that there weren't available tools from mtd-utils package, which has utilities for NAND flash memory even though reference board, which is the only currently supported device in p2020 subtarget has NAND [1]. All subtargets in mpc85xx has already enabled nand support, let's do it globally. [1] https://www.nxp.com/design/qoriq-developer-resources/p2020-reference-design-board:P2020RDB Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* mpc85xx: enable error reporting for RAM and PCIeJosef Schlehofer2022-05-141-0/+4
| | | | | | | | | | | | | | | | | | | | All Freescale processors used in this target are capable to detect error and correction. [1] It can not be used as kernel module. [2] This is helpful to report hardware errors. It enables three kernel options: - EDAC, which is a subsystem - EDAC_LEGACY_SYSFS, it enables sysfq nodes - MP85XX, support for Freescale MPC8349, MPC8560, MPC8540, MPC8548, T4240 EDAC is already enabled for following targets: qoriq, octeon, octeontx and zynq. [1] https://cateee.net/lkddb/web-lkddb/EDAC.html [2] https://patchwork.ozlabs.org/patch/554908/ Signed-off-by: Josef Schlehofer <pepe.schlehofer@gmail.com>
* mpc85xx: Fix output location of padded dtbMartin Kennedy2022-04-302-3/+3
| | | | | | | | | | | | | | | | | | | | | In commit 7e614820a892 ("mpc85xx: add support for Extreme Networks WS-AP3825i"), we borrowed a recipe convention from apm821xx for device tree blob padding. Unfortunately, in the apm821xx target, the image recipes name the device tree blob differently, meaning that in mpc85xx, the padded dtb is never consumed. Change the definition of `Build/dtb` so that it outputs the padded dtb to the correct location for it to be consumed. Also, rename the recipe to `Build/pad-dtb`, so it is clear we are building and padding the device tree blob. This change fixes Github issue #9779 [1]. [1]: https://github.com/openwrt/openwrt/issues/9779 Fixes: 7e614820a892 ("mpc85xx: add support for Extreme Networks WS-AP3825i") Signed-off-by: Martin Kennedy <hurricos@gmail.com>
* mpc85xx: set WS-AP3825i mac-address in preinitDavid Bauer2022-04-261-0/+12
| | | | | | | | | The bootloader does seem to not correctly patch in the MAC address for eth0 / eth1 in some cases. While the root cause is not known, manually applying the MAC-Address in preinit does not hurt. Reported-by: Tom Herbers <freifunk@tomherbers.de> Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: define reset-delay for WS-AP3825i eth PHYDavid Bauer2022-04-261-0/+4
| | | | | | | | | | | | The WS-AP3825i uses Atheros PHYs which according to the datasheet require the reset to be asserted for at least 1 ms. This fixes broken eth1 upon soft-reboot. eth0 is no affected, as the ifup / ifdown cycle in preinit prevents this issue from happening when the system is ready. Reported-by: Tom Herbers <freifunk@tomherbers.de> Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: overhaul WS-AP3825i LED setupDavid Bauer2022-03-242-12/+31
| | | | | | | | | | | | As the LED controller is working now, we can make good use of the LEDs now. - Drop the model-name prefix - Rename eth0 / eth1 LEDs to LAN1 / LAN2, as they are labeled as such on the casing - Enable wired LEDs in userspace Signed-off-by: David Bauer <mail@david-bauer.net>
* mpc85xx: move Extreme WS-AP3825i GPIO extenderDavid Bauer2022-03-241-23/+25
| | | | | | | Move the GPIO extender to the SoC node. Otherwise, the legacy PowerPC init code will not populate the BUS and thus never probe spi-gpio. Signed-off-by: David Bauer <mail@david-bauer.net>
* kernel: bump 5.10 to 5.10.107John Audia2022-03-191-7/+0
| | | | | | | | | | All 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>
* mpc85xx: fix missing kernel config symbol and DTS whitespace issuePetr Štetiar2022-03-172-1/+2
| | | | | | | | | | | | | Buildbot has reported following issue while crunching mpc85xx/p1010 subtarget: Extreme Networks WS-AP3825i (WS_AP3825I) [N/y/?] (NEW) Fix it by disabling that config symbol in target kernel config and while at it fix DTS whitespace issue. Fixes: 7e614820a892 ("mpc85xx: add support for Extreme Networks WS-AP3825i") Signed-off-by: Petr Štetiar <ynezz@true.cz>
* mpc85xx: add support for Extreme Networks WS-AP3825iMartin Kennedy2022-03-167-1/+407
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware: - SoC: Freescale P1020 - CPU: 2x e500v2 @ 800MHz - Flash: 64MiB NOR (1x Intel JS28F512) - Memory: 256MiB (2x ProMOS DDR3 V73CAG01168RBJ-I9H 1Gb) - WiFi1: 2.4+5GHz abgn 3x3 (Atheros AR9590) - Wifi2: 5GHz an+ac 3x3 (Qualcomm Atheros QCA9890) - ETH: 2x PoE Gigabit Ethernet (2x Atheros AR8035) - Power: 12V (center-positive barrel) or 48V PoE (active or passive) - Serial: Cisco-compatible RJ45 next to 12V power socket (115200 baud) - LED Driver: TI LV164A - LEDs: (not functioning) - 2x Power (Green + Orange) - 4x ETH (ETH1 + ETH2) x (Green + Orange) - 2x WiFi (WiFi2 + WiFi1) Installation: 1. Grab the OpenWrt initramfs <openwrt-initramfs-bin>, e.g. openwrt-mpc85xx-p1020-extreme-networks_ws-ap3825i-initramfs-kernel.bin. Place it in the root directory of a DHCP+TFTP server, e.g. OpenWrt `dnsmasq` with configuration `dhcp.server.enable_tftp='1'`. 2. Connect to the serial port and boot the AP with options e.g. 115200,N,8. Stop autoboot in U-Boot by pressing Enter after 'Scanning JFFS2 FS:' begins, then waiting for the prompt to be interrupted. Credentials are identical to the one in the APs interface. By default it is admin / new2day: if these do not work, follow the OEM's reset procedure using the reset button. 3. Set the bootcmd so the AP can boot OpenWrt by executing: ```uboot setenv boot_openwrt "cp.b 0xEC000000 0x2000000 0x2000000; interrupts off; bootm start 0x2000000; bootm loados; fdt resize; fdt boardsetup; fdt chosen; bootm prep; bootm go;" setenv bootcmd "run boot_openwrt" saveenv ``` If you plan on going back to the vendor firmware - the bootcmd for it is stored in the boot_flash variable. 4. Load the initramfs image to RAM and boot by executing ```uboot setenv ipaddr <ipv4 client address>; setenv serverip <tftp server address>; tftpboot 0x2000000 <openwrt-initramfs-bin>; interrupts off; bootm start 0x2000000; bootm loados; fdt resize; fdt boardsetup; fdt chosen; bootm prep; bootm go; ``` 5. Make a backup of the "firmware" partition if you ever wish to go back to the vendor firmware. 6. Upload the OpenWrt sysupgrade image via SCP to the devices /tmp folder. 7. Flash OpenWrt using sysupgrade. ```ash sysupgrade /tmp/<openwrt-sysupgrade-bin> ``` Notes: - We must step through the `bootm` process manually to avoid fdt relocation. To explain: the stock U-boot (and stock Linux) are configured with a very large CONFIG_SYS_BOOTMAPSZ (and the device's stock Linux kernel is configured to be able to handle it). The U-boot version predates the check for the `fdt_high` variable, meaning that upon fdt relocation, the fdt can (and will) be moved to a very high address; the default appears to be 0x9ffa000. This address is so high that when the Linux kernel starts reading the fdt at the beginning of the boot process, it encounters a memory access exception and panics[5]. While it is possible to reduce the highest address the fdt will be relocated to by setting `bootm_size`, this also has the side effect of limiting the amount of RAM the kernel can use[3]. - Because it is not relocated, the flattened device tree needs to be padded in the build process to guarantee that `fdt resize` has enough space. - The primary ethernet MAC address is stored (and set) in U-boot; they are shimmed into the device tree by 'fdt boardsetup' through the 'local-mac-address' property of the respective ethernet node, so OpenWrt does not need to set this at runtime. Note that U-boot indexes the ethernet nodes by alias, which is why the device tree explicitly aliases ethernet1 to enet2. - LEDs do not function under OpenWrt. Each of 8 LEDs is connected to an output of a TI LV164A shift register, which is wired to GPIO lines and operates through bit-banged SPI. Unfortunately, I am unable to get the spi-gpio driver to recognize the `led_spi` device tree node at all, as confirmed by patching in printk messages demonstrating spi-gpio.c::spi_gpio_probe never runs. It is possible to manually articulate the shift register by exporting the GPIO lines and stepping their values through the sysfs. - Though they do not function under OpenWrt, I have left the pinout details of the LEDs and shift register in the device tree to represent real hardware. - An archive of the u-boot and Linux source for the AP3825i (which is one device of a range of devices code-named 'CHANTRY') be found here[1]. - The device has an identical case to both the Enterasys WS-AP3725i and Adtran BSAP-2030[2] (and potentially other Adtran BSAPs). Given that there is no FCC ID for the board itself (only its WLAN modules), it's likely these are generic boards, and even that the WS-AP3725i is identical, with only a change in WLAN card. I have ordered one to confirm this. - For additional information: the process of porting the board is documented in an OpenWrt forum thread[4]. [1]: magnet:?xt=urn:btih:f5306a5dfd06d42319e4554565429f84dde96bbc [2]: https://forum.openwrt.org/t/support-for-adtran-bluesocket-bsap-2030/48538 [3]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168/29 [4]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168 [5]: https://forum.openwrt.org/t/adding-openwrt-support-for-ws-ap3825i/101168/26 Tested-by: Martin Kennedy <hurricos@gmail.com> Signed-off-by: Martin Kennedy <hurricos@gmail.com>