aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq
Commit message (Collapse)AuthorAgeFilesLines
* lantiq: kernel 4.14: use vbus-supply devicetree propertyMathias Kresin2018-05-1725-32/+32
| | | | | | | | It isn't a phy supply, as the phy is still up if the GPIO is low. It rather is the supply for the vbus. A correct setting/definition will be relevant as soon as USB peripheral mode is supported. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: complete AVM FRITZ!Box 3370 supportMathias Kresin2018-05-178-70/+238
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the image and use a compatible string which indicates that only hardware revision 2 and higher is supported. It allows to use the wireless LED, as HWRev 1 uses GPIO#39 for the wireless LED and starting with HWRev 2 GPIO#35 is used for the wireless LED and GPIO#39 for IFX_GPIO_MODULE_EXTPHY_MDIO. The HWREV can be checked by connecting to the fritzbox right after power on via ftp: ftp> quote GETENV HWSubRevision Within the same HW revision 5 of the Fritz!Box 3370 different NAND flash chips are used. Usually it isn't a big deal but depending on the used NAND flash chip, the ECC calculation is done different (and incompatible of course). Boards with a Micron MT29F1G08ABADA NAND flash chip are using the NAND chip to calculate the ECC (on-die). Boards with a Hynix HY27UF081G2M NAND flash chip are doing the ECC calculation in software. Supporting both with a single DTS isn't possible. It might be possible to add a patch selecting the ECC mode dynamicaly based on the found NAND flash chip. But such a patch has no chance to get accepted upstream and most likely need to be touched with every kernel update. Instead two images are created. One for Micron NAND flash chip and one for Hynix NAND flash chip. So far no pattern is known to identify the used flash chip without opening the box. Add the power off GPIO. At least EVA version 2186 sets/keeps the GPIO as input, which will cause a reboot 30sec after power on. For boards with EVA version 2186 the installation is tricky as it has to be finished within the 30sec time frame. The EVA version can be checked by connecting to the fritzbox right after power on via ftp: ftp> quote GETENV urlader-version The ath9k eeprom/caldata is at a different and offset and stored in reverse order (from the last byte to the beginning) on the flash. Reverse the bits to bring the data into the format expected by the ath9k driver. Since the ath9k eeprom is stored in reverse order on flash, we can not use the mac address from the on flash eeprom. Get the MAC address from the tffs instead. Within the same HW revision 5 of the Fritz!Box 3370 both version of the vr9 SoC are used. During preparation of kernel 4.14 support, all devicetree source files were changed to load the vr9 v1.1 and vr9 v1.2 gphy firmware, which fixed the embedded phys for boards using the version 1.2 of the vr9 SoC. While at it, add a trigger to make use of the LAN LED. Setup the build-in switch and add a hint for LuCI two show the ports in order matching the labels on the case Add support for the second USB port and provide the volatage GPIOs. Use GPIO#21 as PCIe reset pin. The lan led is connected to GPIO#38. Name the rootfs partition ubi and remove the mtd/rootfs related kernel bootargs to use the OpenWrt autoprobing based on the partition name. Enable sysupgrade support to allow an upgrade from a running system. Since sysupgrade wasn't supported till now, drop image build code which was added to allow a sysupgrade from earlier OpenWrt versions. Build images that allow an (initial) installation via EVA bootloader. To install OpenWrt via Eva bootloader, within the first seconds after power on a ftp connection need to be established to the FRITZ!Box at 192.168.178.1 and the the following ftp commands need to be run: ftp> quote USER adam2 ftp> quote PASS adam2 ftp> binary ftp> debug ftp> passive ftp> quote SETENV linux_fs_start 0 ftp> quote MEDIA FLSH ftp> put /path/to/openwrt-lantiq-xrx200-FRITZ3370-eva-kernel.bin mtd1 ftp> put /path/to/openwrt-lantiq-xrx200-FRITZ3370-eva-filesystem.bin mtd0 Signed-off-by: Andrea Merello <andrea.merello@gmail.com> Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: switch to kernel 4.14Mathias Kresin2018-05-17117-28894/+1
| | | | | | Use kernel 4.14 by default. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: kernel 4.14: Remove reboot/remove reset assertsMathias Kresin2018-05-071-0/+86
| | | | | | | | | | | | | | | Backport patch accepted upstream which removes the reset asserts of the xrx200 gphy driver on reboot/remove. While doing a global software reset, these bits are not cleared and let some bootloader fail to initialise the GPHYs. The bootloader don't expect these bits to be set, as they aren't during power on. The asserts were a workaround for a wrong syscon-reboot mask. With a mask set which includes the GPHY resets of the first reset register, the resets of the second reset register arn't required any more. Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: bump 4.9 to 4.9.96Kevin Darbyshire-Bryant2018-04-262-4/+4
| | | | | | | | | | | | | | | | | | Refresh patches, following required reworking: ar71xx/patches-4.9/930-chipidea-pullup.patch layerscape/patches-4.9/302-dts-support-layercape.patch sunxi/patches-4.9/0052-stmmac-form-4-12.patch Fixes for CVEs: CVE-2018-1108 CVE-2018-1092 Tested on: ar71xx Archer C7 v2 Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk> Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com> Tested-by: Arjen de Korte <build+openwrt@de-korte.org>
* build: consolidate fake uImage header build commandsMathias Kresin2018-04-201-2/+2
| | | | | | | | | | | Merge the two existing functions and use a parameter for the type header field. It updates the syntax of the former mpc85xx fake ramdisk header command to be compatible with mkimage from u-boot 2018.03 and fixes the build error spotted by the build bot. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: kernel 4.14: fix vr9 reboot maskMathias Kresin2018-04-041-1/+1
| | | | | | | We need to reset the GPHYs on reboot as well. Otherwise the bootloader might have issues to reset/find the GPHYs. Signed-off-by: Mathias Kresin <dev@kresin.me>
* kernel: update kernel 4.14 to 4.14.32Hauke Mehrtens2018-04-034-88/+2
| | | | | | | | | | | | | The following patches are now included upstream: * 0052-MIPS-lantiq-fix-usb-clocks.patch * 0053-MIPS-lantiq-enable-AHB-Bus-for-USB.patch * 0060-lantiq-ase-enable-MFD-SYSCON.patch Closes: FS#1466 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Tested-by: Stijn Segers <foss@volatilesystems.org> Tested-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
* lantiq: intel-xway: add vr9 v1.1 phy supportMathias Kresin2018-03-234-0/+264
| | | | | | | | | | | | During upstreaming the intel phy driver, support for the vr9 v1.1 embedded phys got lost. Backport the upstream send patch adding support for the vr9 v1.1 embbeded phys to the driver. Signed-off-by: Mathias Kresin <dev@kresin.me> cosmetic fixes Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: fix DM200 boot with fake uImage headersThomas Nixon2018-03-181-0/+4
| | | | | | | | | | | | | | The latest bootloader versions load the firmware into memory and call `chk_dniimg` (defined in Netgear GPL release), which expects to find three consecutive block-aligned uImages. Add two fake uImage headers after the kernel to fool this check. This wastes up to 128k of space for alignment. The alternative would be to put the rootfs in a second uImage, but this would limit the firmware size to 0x710000 (the number of bytes loaded and verified by the bootloader) instead of 0x7b0000 (the size of the firmware partition). Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
* lantiq: fix AVM initramfs imageValentin Spreckels2018-03-181-0/+1
| | | | | | Create an initramfs that can be used with the EVA bootloader. Signed-off-by: Valentin Spreckels <Valentin.Spreckels@Informatik.Uni-Oldenburg.DE>
* kernel: make mtd patches apply againHauke Mehrtens2018-03-152-12/+12
| | | | | | | | | This makes some of the mtd patches apply again after some generic patches were changed. These problems where found by build bot. Fixes: ac9bcefa3b044 ("kernel: use V10 of mtd patchset adding support for "compatible" string") Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* lantiq/xrx200: add usif support to dts filesMartin Schiller2018-03-062-8/+8
| | | | | | | | The Lantiq XRX200 aka VR9 doesn't have an asc0. Instead, there is an USIF module which can either be an UART or a SPI Controller. Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* kernel: bump 4.9 to 4.9.85Magnus Kroken2018-03-031-1/+1
| | | | Signed-off-by: Magnus Kroken <mkroken@gmail.com>
* kernel: m25p80: allow fallback from spi_flash_read to regular SPI transferFelix Fietkau2018-02-262-4/+4
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* kernel: optimize for performance by default starting with 4.14Felix Fietkau2018-02-241-0/+2
| | | | | | Keep size optimizations for smaller targets that already switched Signed-off-by: Felix Fietkau <nbd@nbd.name>
* lantiq: kernel 4.14: update dts filesHauke Mehrtens2018-02-2038-159/+794
| | | | | | | | | | | | | | | | | | | | Updated the devicetree source files to make use of the following upstreamed drivers: - xrx200 ethernet phy - reset controller unit - dwc2 - fpi Use our custom xrx200 ethernet phy compatible to support boards, which have switched the vr9 revision during lifetime, with a single devicetree source file. By switching to the dwc2 driver + usb phy framework, we don't need to used our custom gpio power patch and can use a fixed regulator instead. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: kernel 4.14: cleanup dts filesMathias Kresin2018-02-2055-4194/+4033
| | | | | | | Move common used parts to dtsi. Add labels to nodes and reference nodes via labels in dts files. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: kernel 4.14: fix usbMathias Kresin2018-02-202-0/+62
| | | | | | | | | | On danube the USB0 registers are at 1e101000 similar to all other lantiq SoCs. On Danube and AR9 the USB core is connected to the AHB bus, hence we need to enable the AHB Bus as well. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: kernel 4.14: autoselect matching vr9 rev firmwareMathias Kresin2018-02-201-0/+45
| | | | | | | | | | | | Add a custom xrx200 ethernet phy compatible to load the firmware matching the vr9 revision without specifing an expected revision. We have quite a few boards in the tree were later produced ones are using a more recent vr9. It is impossible to distinguish which revision of the vr9 is used without opening the case and removing a heatsink for some of them. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: kernel 4.14: don't use CPU interrupt controller IPI IRQ domain supportMathias Kresin2018-02-201-0/+271
| | | | | | | | | | | | | | | | This reverts kernel commit 1eed40043579 ("MIPS: smp-mt: Use CPU interrupt controller IPI IRQ domain support"). With the patch applied, the kernel hangs during boot if SMP is active. The Lantiq IRQ controller gets registered first and it directly handles the MIPS native SW1/2 and HW0 - HW5 IRQs. It looks like this controller already registers IRQ 0 - 7 and the generic driver only gets the following IRQs starting later. The upstream discussion can be found at https://www.linux-mips.org/archives/linux-mips/2017-05/msg00059.html. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: kernel 4.14: select MFD SYSCON for aseMathias Kresin2018-02-201-0/+24
| | | | | | Enable syscon to use it for the RCU MFD on Amazon SE as well. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: kernel 4.14: update patches and configHauke Mehrtens2018-02-2035-3208/+333
| | | | | Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: kernel 4.14: copy patches, config and dts filesHauke Mehrtens2018-02-20114-0/+28761
| | | | | | | This just copies the patches, configuration and dts files into the directories hich are used for kernel 4.14. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* lantiq: make dts files and kernel config kernel version specificMathias Kresin2018-02-2080-2/+1
| | | | | | | | | | Move the devicetree source files to a kernel specific directory in preparation of adding kernel 4.14 support. Rename the subtarget kernel config files to match a specific kernel version. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: rename gphy firmwareMathias Kresin2018-02-2019-30/+30
| | | | | | | | | | Rename the gphy firmware to match the name requested by kernel 4.14 and update the devicetree source files to use the new name. Update the u-boot lantiq Makefile to be compatible with the new names as well. Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: move nand_do_upgrade call to platform_do_upgradeMathias Kresin2018-02-161-3/+4
| | | | | | | | | | Calling nand_do_upgrade() from platform_pre_upgrade() was deprecated with 30f61a34b4cf ("base-files: always use staged sysupgrade"). Update the platform upgrade code to use platform_do_upgrade() for NAND images as well. Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: remove obsolete sysupgrade watchdog killMathias Kresin2018-02-161-9/+0
| | | | | | | | | The watchdog kill command was meant for busybox watchdog. Busybox watchdog was replaced by the procd watchdog mid 2013 with commit df7ce9301a25 ("busybox: disable the watchdog utility by default"), which makes the kill command obsolete since quite some time. Signed-off-by: Mathias Kresin <dev@kresin.me>
* build: replace uses of OpenWrt with $(VERSION_DIST)Felix Fietkau2018-02-051-1/+1
| | | | | | This makes the distribution name more configurable. Signed-off-by: Felix Fietkau <nbd@nbd.name>
* build: add config option KERNEL_MIPS_FPU_EMULATORYousong Zhou2018-01-291-1/+0
| | | | | | | To make it more accessible for nodejs users to configure and run a build on mips target lacking hardware fpu Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
* lantiq: create ATM/PTM interfaces with dsl as netdev nameMathias Kresin2018-01-102-1/+13
| | | | | | | | | | | | | | | | | | | | | Renaming an atm etherbride using 'ip link' (via hotplug) is racy since the original netdev might disappear before br2684ctl has finished appling it's setting: local2.notice br2684ctl[1667]: Interface "nas0" created sucessfully local2.notice br2684ctl[1667]: Communicating over ATM 0.8.35, encapsulation: LLC kern.info kernel: dsl0: renamed from nas0 kern.err kernel: br2684:br2684_regvcc: tried to attach to non-existent device local2.err br2684ctl[1667]: Could not configure interface:No such device or address By passing the final used netdev name to br2684ctl_wrap another race condition workaround will be enabled again. Change the lantiq ptm driver to create a netdev with the name dsl as well. Albeit the rename via 'ip link' works fine so far, using a different approach for ptm then atm could be confusing. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: fix wbmr-hp-g300h image metadataMathias Kresin2018-01-041-2/+2
| | | | | | | The Annex A and Annex B version are using the same (old) userspace boardname. Update the SUPPORTED_DEVICES to allow an update from lede-17.01. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: fix dts compatible stringThomas Nixon2017-12-292-2/+2
| | | | | | | | | | This was broken in 7bab49fd ("lantiq: add compatible strings to dts files"), causing for the dm200 garbled serial output during boot, and likely other issues. Signed-off-by: Thomas Nixon <tom@tomn.co.uk> [fix the compat string of the P2601HNFX as well] Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: remove DSL_ChipSetHWVersion from status informationMartin Schiller2017-12-231-4/+2
| | | | | | | | | | | | The value DSL_ChipSetHWVersion is fetched from the dsl frontend via the dsl_control service, but not really provided by the dsl frontend firmware and for now always "UNKNOWN". The lantiq support told us that this information wouldn't be provided in the foreseeable future, so let's remove this useless "UNKNOWN" information. Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* kernel: Update kernel 4.9 to 4.9.70Hauke Mehrtens2017-12-192-2/+2
| | | | | | Runtime tested on lantiq. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
* lantiq: sync image filename with boardnameMathias Kresin2017-12-162-185/+227
| | | | | | | | | | | | | Use <manufacturer>_<modelname> as image name. Use the BOARD_NAME variable to ensure that the former used boardname is still used as the subdirectory name for the sysupgrade-tar image, to not break sysupgrade from earlier versions. While at it, normalise the image filenames by using only lower case characters and bin as file extension for sysupgrade images. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: drop unused variable from image build codeMathias Kresin2017-12-161-3/+0
| | | | | | | Remove the DEVICE_PROFILE variable. The variable isn't used at all. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: use the generic board detectMathias Kresin2017-12-161-19/+0
| | | | | | | Drop the target specific detection function in favour of the generic one provided by base-files. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: add missing model namesMathias Kresin2017-12-161-0/+1
| | | | Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: remove the former board name from device tree modelMathias Kresin2017-12-1660-60/+60
| | | | | | | Remove the former used board name from the device model property and use the model name as it is. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: use the compatible string as board nameMathias Kresin2017-12-169-67/+131
| | | | | | | | | | | Use the first compatible string as board name in userspace. Add the new board name as well as the former used board name to the image metadata to keep compatibilty with already deployed installations. Don't add the former used boardname for boards which exists only in master or evaluation boards. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: drop SoC name from eval boards compatible stringMathias Kresin2017-12-1611-11/+11
| | | | | | Keep it in the same format as used for the other eval boards. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: add compatible strings to dts filesMathias Kresin2017-12-1653-0/+59
| | | | | | The compatible string is mandetory for devicetree source file. Signed-off-by: Mathias Kresin <dev@kresin.me>
* base-files: unify get_dt_led helper functionChristian Lamparter2017-12-143-23/+10
| | | | | | | | | | | | | | Lantiq and IPQ806X (which includes IPQ40XX) both define the same custom function {ipq806x|lantiq}_get_dt_led. This patch moves the function into the base-file package at lib/functions/leds.sh to make it more accessible for other targets as well. Cc: Mathias Kresin <dev@kresin.me> Cc: John Crispin <john@phrozen.org> Cc: Hannu Nyman <hannu.nyman@iki.fi> Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
* treewide: add only one device when appending to TARGET_DEVICESLuis Araneda2017-12-121-1/+3
| | | | | | | | | This will avoid some conflicts when doing a git rebase or merge, specially when adding support to a new device. Signed-off-by: Luis Araneda <luaraneda@gmail.com> [drop brcm47xx changes which rename the images] Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: dgn3500 drop worldwide suffixMathias Kresin2017-12-111-6/+6
| | | | | | | | | | Remove the WW suffix, everything without a region suffix is world wide anyway. While at it, normalise the image filenames by using only lower case characters. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: nand: drop ubifs imagesMathias Kresin2017-12-112-2/+2
| | | | | | | | | | | | | | | Users are confused which image type they should use and there are more drawbacks than adavantages in using a r/w ubifs rootfs in constrast to a read-only squashfs rootfs like: - less available free flash space due to better compression of squashfs images - no support for factory reset due to r/w filesystem - possibility to break failsafe due to r/w filesystem Therefore, drop support for r/w ubifs rootfs images. Signed-off-by: Mathias Kresin <dev@kresin.me>
* merge: targets: update image generation and targetsZoltan HERPAI2017-12-081-1/+1
| | | | Signed-off-by: Zoltan HERPAI <wigyori@uid0.hu>
* kernel: bump 4.9 to 4.9.67Stijn Tintel2017-12-071-1/+1
| | | | | | | | | | | | | | | | | | | Refresh patches. Remove upstreamed patches: - generic/190-1-5-e1000e-Fix-error-path-in-link-detection.patch - generic/190-3-5-e1000e-Fix-return-value-test.patch - generic/190-4-5-e1000e-Separate-signaling-for-link-check-link-up.patch - generic/190-5-5-e1000e-Avoid-receiver-overrun-interrupt-bursts.patch - ramips/0102-MIPS-ralink-Fix-MT7628-pinmux.patch - ramips/0103-MIPS-ralink-Fix-typo-in-mt7628-pinmux-function Update patches that no longer apply: - layerscape/815-spi-support-layerscape.patch - ramips/0099-pci-mt7620.patch Compile-tested on ar71xx, brcm2708/bcm2708, octeon and x86/64. Runtime-tested on ar71xx, brcm2708/bcm2708, octeon and x86/64. Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* kernel: bump 4.9 to 4.9.63Koen Vandeputte2017-11-221-1/+1
| | | | | | | | | | | Refreshed all patches. Removed upstreamed parts. Compile-tested: cns3xxx, imx6, mvebu, layerscape Run-tested: cns3xxx, imx6 Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>