Commit Graph

88 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Adrian Schmutzler b78a266888 lantiq: move 01_led_migration script to subtargets
Split the /etc/uci-defaults/01_led_migration scripts into subtargets
as already done for most of the other base-files.

While this introduces a minor amount of code duplication, it still
is considered an improvement, as device-specific settings are kept
together in the subtargets' base-files and the script at hand can be
removed entirely for two of the subtargets not needing it.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Petr Štetiar c7b750e7ac treewide: kernel: drop redundant USB_EHCI_HCD=n config symbol
Commit e53ec043ba ("kirkwood: move usb support to modules") has moved
this config symbol into generic configs, so it could be removed from
other configs.

Suggested-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
4 years ago
Aleksander Jan Bajkowski 58a6f06978 lantiq: remove unused PHY drivers on xrx200
All boards on xrx200 use builtin switch and there is no supported device
with external switch.
It was copy paste from xway subtarget and was added in commit 18b76c66fb.

Save 20.3 kB flash memory.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
4 years ago
Alexander Couzens 0962baae4e lantiq: fritz 7360 v2: rename device before it will be used
Use similiar naming scheme as ath79.
Since the fritz 7360 v2 was only in the tree for 2 days, there
is no compatibility for the old image.
Users which has installed the fritz 7360 v2 before this change, must
use sysupgrade --force to skip checks on the board.

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Yushi Nishida 78bebe680f
lantiq/xrx200: add support for the Fritzbox 7360v2
This commit adds support for the Fritzbox 7360v2

CPU: VR9 500MHz Cores: 2
RAM: 128 MB
NOR-Flash: 32 MB
WLAN: AR9287-BL1A

DECT is not working.

Thanks Sebastian Ortwein for adding 7360SL.
The dts file is derived from avm_fritz7360sl.dts.

Firmware can be flashed with this method:

1.) Set your client IP to 192.168.178.2
2.) Power on your your Fritzbox and connect to 192.168.178.1
    via ftp in the first 5 seconds.
3.) login with adam2/adam2
4.) type into the ftp prompt:

passive
binary
debug 1
quote MEDIA FLSH // (not FLASH)
put openwrt-lantiq-xrx200-avm_fritz7360v2-squashfs-sysupgrade.bin mtd1
// using the correct location for the squashfs-sysupgrade-firmware.bin

5.) wait till red light flashing turns off.
6.) type: exit

Run tested with kernel 4.19 and 5.4 on Fritzbox 7360 V2.

Issue:
Ethernet speed is slow, (iperf between a Xiaomi mir3g
and this router results in <80Mbits throughput
with a wired cable when using the gbit ports.)

Signed-off-by: Yushi Nishida <kyro2man@gmx.net>
4 years ago
Mathias Kresin 6bf179b270 lantiq: add Linux 5.4 support as testing kernel version
Switch to the mainline Lantiq PCIe PHY driver and update the vr9.dtsi
accordingly.

The Lantiq IRQ SMP support added upstream required changes to the SoC
dtsi as well.

Following changes are made to the Lantiq kernel patches:

  0005-lantiq_etop-pass-struct-device-to-DMA-API-functions.patch
  0006-MIPS-lantiq-pass-struct-device-to-DMA-API-functions.patch
    applied upstream

  0008-MIPS-lantiq-backport-old-timer-code.patch
    access_ok API update because it lost it's type (which was the first)
    parameter in upstream commit 96d4f267e40f95 ("Remove 'type' argument
    from access_ok() function")

  0024-MIPS-lantiq-autoselect-soc-rev-matching-fw.patch
    merged into 0026-MIPS-lantiq-Add-GPHY-Firmware-loader.patch

  0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch
    revert upstream changes required for upstream xrx200 ethernet and
    xrx200 (DSA) switch driver but breaking our driver

  0026-MIPS-lantiq-Add-GPHY-Firmware-loader.patch
    required for our driver but dropped upstream, add former upstream
    version

  0028-NET-lantiq-various-etop-fixes.patch
    now has to use the phy_set_max_speed API instead of modifying
    phydev->supported. Also call ltq_dma_enable_irq() in
    ltq_etop_open() based on upstream commit cc973aecf0b054 ("MIPS:
    lantiq: Do not enable IRQs in dma open")

Signed-off-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
4 years ago
Mathias Kresin 005dedd348 lantiq: copy target to kernel 5.4
Duplicate kernel 4.19 config and patches for kernel 5.4.

Duplicate the devicetree source files as well, they need kernel 5.4
specific adjustments.

Signed-off-by: Mathias Kresin <dev@kresin.me>
4 years ago
Adrian Schmutzler 2fe464a712 lantiq: reorganize 02_network board.d files
This reorganizes 02_network board.d files based on what's done for
ath79 and ramips: Instead of putting all settings into a single big
case, the interface/dsl/MAC address setup is put into separate
functions with a specific switch case for each of them. This makes
grouping of devices much easier and should be easier to read, too.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 18e089aaed lantiq: move common DSL setup into lantiq.sh
DSL setup consists of the same commands for all subtargets, so move it
into a helper function.

While at it, remove shebang from library file.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Adrian Schmutzler 355f0444f3 lantiq: split base-files into subtargets
This splits the device-dependent base-files into subtarget directories,
like done recently for ath79 and ramips. While this increases the
overall lines of codes, it will make the code per subtarget smaller
and easier to keep track of features and devices.

While at it, several variables at the top of 02_network are removed,
as they were never changed. The values are put directly into the
function calls where they are used.

Remove unneeded LED setup from 01_leds, and remove 01_leds entirely
for falcon subtarget (as it is not used there).

Applies alphabetic reordering to device cases in base-files.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Mathias Kresin cb689f2723 lantiq: drop kernel 4.14 support
The current state of the kernel 4.14 support is in the openwrt-19.07
branch. No need to keep a not default used kernel in this branch.

Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Hauke Mehrtens f0c740650b lantiq: make patches apply
The following patches are dropped because they are now upstreamed:
- 0002-gpio-stp-xway-Implement-get-callback.patch
  upstreamed with commit 5b9b2b5284f819 ("gpio: stp-xway: Implement get
  callback")
- 0027-01-net-phy-intel-xway-add-VR9-version-number.patch
  upstreamed with commit 5b73d9955fb4b0 ("net: phy: intel-xway: add VR9
  version number")
- 0027-02-net-phy-intel-xway-add-VR9-v1.1-phy-ids.patch
  upstreamed with commit f452518c982e57 ("net: phy: intel-xway: add VR9
  v1.1 phy ids")

The following patches were updated:
- 0018-MTD-nand-lots-of-xrx200-fixes.patch
  the mainline driver now resides in drivers/mtd/nand/raw/xway_nand.c
  (instead of drivers/mtd/nand/xway_nand.c)
- 0025-NET-MIPS-lantiq-adds-xrx200-net.patch
  the DMA API now requires a valid device to be passed to all operations
- 0028-NET-lantiq-various-etop-fixes.patch
  the DMA API now requires a valid device to be passed to all operations

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
5 years ago
Hauke Mehrtens eee1b34ce6 lantiq: copy target to kernel 4.19
This just copies the files from the kernel 4.14 specific folders into
the kernel 4.19 specific folder, no changes are done to the files in
this commit.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
5 years ago
Stijn Segers 5cd49395d3 lantiq/xrx200: enable initramfs images
Commit eae6cac6a3 ("lantiq: add support for AVM FRITZ!Box 7362 SL"), but
one needs an initramfs image to flash OpenWrt from stock firmware (as
described in the commit log). This patch has the initramfs image built
by default.

Thanks to blogic (for pointing to the FEATURES declaration in the target
Makefiles) and Musashino on the forum for suggesting
config/Config-images.in needed editing too. While at it, reorder the
TARGET_INITRAMFS_COMPRESSION_LZMA declarations alphabetically.

This patch will result in initramfs images for all lantiq subtargets
that have the ramdisk flag set. I tested on the falcon and ase
subtargets, which lack that flag, to confirm they don't produce any
initramfs images with this patch - which they do not.

Given the limited scope of the lantiq (sub)target(s), blogic indicated
this should be OK.

Signed-off-by: Stijn Segers <foss@volatilesystems.org>
Signed-off-by: Petr Štetiar <ynezz@true.cz>
[fixed the wrong reference to eae6cac6a3 commit]
5 years ago
Daniel Golle 0653e31270 lantiq-vdsl-fw: update to provide recent vectoring firmware
Recent Speedport firmware downloads only work over HTTPS, so the user
either needs to provide the already downloaded file or install
ustream-ssl-* as well as ca-certificates or ca-bundle.

So to get VDSL2 with vectoring on xRX200, simply run
vdsl_fw_install.sh
on the target and either provide the downloaded file as instructed or
make sure the device is connected to the Internet and can download that
HTTPS url itself.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Daniel Golle 8e2f8b0c83 Revert "lantiq: get rid of ltq-vdsl-fw"
This reverts commit 0938233fcd.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
6 years ago
Mathias Kresin d7b7483343 lantiq: switch to kernel 4.14
Use kernel 4.14 by default.

Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Hauke Mehrtens f1d84023cb lantiq: kernel 4.14: update patches and config
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Hauke Mehrtens 5eeaba31b8 lantiq: kernel 4.14: copy patches, config and dts files
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>
6 years ago
Mathias Kresin f8a6987cd1 lantiq: make dts files and kernel config kernel version specific
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>
6 years ago
Mathias Kresin 0c7ad4e5d3 lantiq: nand: drop ubifs images
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>
7 years ago
Mathias Kresin 66a0f3a397 lantiq: select PCI support in subtargets
AmazonSE and Falcon do not have support for PCI and it can't be
unselected in the subtarget kernel config. This way the enabled PCI
support is inherit from the higher level config to the subtarget.

If CONFIG_PCI is selected, PCI_SUPPORT will be autoselected as well and
all packages depending on this config symbol will be build and at least
some of them fail due to missing pci functions.

The issue can be observed if all kmods and all non-shared packages are
build. Fix the issue by enabling PCI support only in subtargets with
PCI support.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin d3f3b817ac lantiq: xrx200: cleanup kernel config
CONFIG_MTSCHED & CONFIG_PERFCTRS were never defined in the kernel.

CONFIG_LANTIQ_PHY was replaced by CONFIG_INTEL_XWAY_PHY with the switch
to the upstreamed driver.

Add autoselected dependecies to the kernel config.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 054f01ac16 lantiq: xrx200: fix sorting of kernel config
Use the kconfig script to sort the kernel config. It makes further
changes more obvious.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Hauke Mehrtens 863e79f8d5 lantiq: add support for kernel 4.9
The following patches were dropped because they are already applied
upstream:
0012-pinctrl-lantiq-fix-up-pinmux.patch
0013-MTD-lantiq-xway-fix-invalid-operator.patch
0014-MTD-lantiq-xway-the-latched-command-should-be-persis.patch
0015-MTD-lantiq-xway-remove-endless-loop.patch
0016-MTD-lantiq-xway-add-missing-write_buf-and-read_buf-t.patch
0017-MTD-xway-fix-nand-locking.patch
0044-pinctrl-lantiq-introduce-new-dedicated-devicetree-bi.patch
0045-pinctrl-lantiq-Fix-GPIO-Setup-of-GPIO-Port3.patch
0046-pinctrl-lantiq-2-pins-have-the-wrong-mux-list.patch
0047-irq-fixes.patch
0047-mtd-plat-nand-pass-of-node.patch
0060-usb-dwc2-Add-support-for-Lantiq-ARX-and-XRX-SoCs.patch
0120-MIPS-lantiq-add-support-for-device-tree-file-from-bo.patch
0121-MIPS-lantiq-make-it-possible-to-build-in-no-device-t.patch
122-MIPS-store-the-appended-dtb-address-in-a-variable.patch

The PHY driver was reduced to the code adding the LED configuration,
the rest is already upstream:
0023-NET-PHY-adds-driver-for-lantiq-PHY11G.patch

The SPI driver was replaced with the version pending for upstream
inclusion:
New driver:
0090-spi-add-transfer_status-callback.patch
0091-spi-lantiq-ssc-add-support-for-Lantiq-SSC-SPI-controller.patch
Old driver:
0100-spi-add-support-for-Lantiq-SPI-controller.patch

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
7 years ago
Felix Fietkau 71e86199ff lantiq: enable SMP for XRX200
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau bfdc56d3a2 build: remove mips16 feature flag from target makefiles
It can be implicitly derived from the MIPS32 revision support in the
kernel configuration

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 018d80007e kernel: remove ubifs xz decompression support
It has been unused, and less useful than squashfs for cases where flash
space usage matters.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Stefan Koch 7929ab60bf lantiq: add vpe/watchdog modules to kernel
(required not-distributable firmware blob - dump it by yourself from original firmware)

Signed-off-by: Eddi De Pieri <eddi@depieri.net>

(cherry picked from commit 064f467264c5c9b6eca0bb96b587f9412b770cc5)
Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
8 years ago
Jonas Gorski 46b88b56bf lantiq: switch from 34k to 24k
GCC treats 24kc and 34kc exactly the same and will generate identical
code, so there is no need to tune to 34kc instead of 24kc.

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
8 years ago
Florian Eckert 828e25e325 lantiq: add cpu temperatur sensor driver for xrx200
Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
8 years ago
Felix Fietkau 9abbaa9539 build: remove MIPS dsp/dsp2 CPU_SUBTYPE
There does not seem to be any meaningful difference in generated code.
This will save some time and space on snapshot builds

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau ceee47ba64 lantiq: disable jffs2 support on xrx200
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 2270fc5947 Revert "lantiq: enable SMP for XRX200"
This reverts commit cc3bfdb62f.

Apparently the ethernet driver is not SMP safe, as reported in
https://bugs.lede-project.org/index.php?do=details&task_id=27

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
John Crispin a6f7536a73 lantiq: convert remaining legacy targets to the new image generation code
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin bf007a480a lantiq: Add Support for Fritz!Box 7360 SL
Signed-off-by: Sebastian Ortwein <krone@animeland.de>
Tested-by: Guido Lipke <lipkegu@gmail.com>
8 years ago
Felix Fietkau 69c99a423a lantiq: enable swconfig LED support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau cc3bfdb62f lantiq: enable SMP for XRX200
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 2d48f93ff4 lantiq: add Buffalo WBMR-300HPD support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau cc87d144e1 lantiq: refresh xrx200 kernel config
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
John Crispin ba42c1db41 lantiq: un-macro the image building code
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Mathias Kresin db66b157db lantiq: VGV7510KW22 - enable the IP101A phy
The RJ45 WAN port is used for xDSL as well as the IP101A.

The pins 1,2,3,6 of the RJ45 are connected to the IP101A and the
pins 4,5 are connected to the xdsl chip.

Drop the ip101a-rst node. It can't be controlled and is not required
at all.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Mathias Kresin 9d0608eef3 lantiq: VG3503J - merge profiles
The only difference between the VG3503J profiles is the version of the
gphy firmware that gets loaded. This can be handled perfect fine in one
device tree source file.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Felix Fietkau 311faaa1bd lantiq: move ubi/ubifs options to the image makefile
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau 06b630047f lantiq: add dsl firmware to default packages
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48942
8 years ago
Hauke Mehrtens 13b8b8c2e7 lantiq: add support for TP-Link VR200v
This adds basic support for TP-Link VR200v.
Currently the following parts are not working: FXO, Voice, DECT, WIFI (both)

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48328
8 years ago
Felix Fietkau 04ad02d132 lantiq: Switch to the new SPI driver
Compared to the "old" driver:
- Each device must assign a pinctrl setting to the SPI node to allow the
  new SPI driver to configure the SPI pins.
  While here we are also using separate input and output settings so we
  are independent of whether the bootloader configures the pins correctly.
- We use the new "compatible" strings to make the driver choose the
  correct number of chip-selects for each SoC.
- The new driver starts counting the chip-selects at 1 (instead of 0, like
  the old one did). Thus we have to adjust the devices accordingly.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

SVN-Revision: 48293
8 years ago
Felix Fietkau af857db692 lantiq: Disable CONFIG_SPI_GPIO
All devices are now using the HW SPI driver, so this is not necessary
anymore.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

SVN-Revision: 48291
8 years ago
John Crispin 0938233fcd lantiq: get rid of ltq-vdsl-fw
Because of dsl-vrx200-firmware-xdsl-* there's no need anymore to
download a dsl firmware at runtime.

Signed-off-by: Andre Heider <a.heider@gmail.com>

SVN-Revision: 47851
9 years ago
Felix Fietkau 435e7fb295 lantiq: move esi calls to dsl_cpe_control scripts to fix ordering wrt. loading vr9 drivers
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 47764
9 years ago