Commit Graph

104 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Aleksander Jan Bajkowski f8ea7c53fd lantiq: xrx200: disable unused switch and phy
xrx200 has a 6 port built-in switch with 2 integrated PHY. None of the
xrx200 router uses external switch. Most boards use integrated or Lantiq
(Intel) PEF7071 PHY. Only some FritzBox routers use AT803X PHY and
VGV7510KW22 use ICPLUS PHY. Other unused PHY drivers may be removed.

This patch enables these symbols only on xway and xway_legacy subtargets:
 - CONFIG_PSB6970_PHY (Driver for PHY in PSB6970 - 7 port FE Switch)
 - CONFIG_RTL8366RB_PHY (Driver for PHY in RTL8366 - 6 port GE Switch)
 - CONFIG_RTL8366_SMI (Driver for RTL8366 - 6 port GE Switch)

Reduces image size by 7.3kB.

Continuation of 58a6f06978 (PR: #2983)

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
[fix sorting in config files, small fix in commit message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
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
Lars Wessels f855eb91b3 lantiq: added switch-config for ARV752DPW
Add missing switch config (4 LAN-Ports + CPU).

Grey WAN port (used for ADSL) is not part of the switch.

Signed-off-by: Lars Wessels <software@bytebox.org>
[rework commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
Mathias Kresin e3eaf57808 lantiq: kernel 5.4: debloat kernel config
The etop driver is used by all targets except xrx200.

Remove the UBIFS compression support for zlib and zstd from the xway
subtarget. The hardware is EOL for a long time and it's unlikely to ever
see a board shipped with an UBIFS using these compression methods.

Remove the JFFS2 support. Support for jjfs2 images was dropped years
ago.

It shrinks the compressed kernel up to 130 KByte.

Signed-off-by: Mathias Kresin <dev@kresin.me>
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
Aleksander Jan Bajkowski 84845123fe kernel: remove non-existant symbols from 4.19 config
These symbols only exist in kernel version <= 4.15

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
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 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
Johann Neuhauser 02d53e6a21 lantiq: add support for FritzBox 7312
The FritzBox 7312 is also known as 1&1 WLAN-MODEM. The device is almost
the same as FB7330, but only one ETH-Port and no USB.

Hardware
SoC: Lantiq Xway ARX188 PSB 50812 EL
RAM: 64MB DDR1 (Zentel A4S12D40FTP-G5)
Ethernet: Atheros 8030
Wireless: Atheros AR9227 b/g/n 2x2
DSL: Lantiq ADSL2+
DECT: Dialog SC14441
Buttons: WiFi, DECT
LEDs: Power/DSL, Fon, DECT, WLAN, Info

LEDs
Power: GPIO#44 (active low)
Internet: GPIO#47 (active low)
DECT: GPIO#38 (active low)
WLAN: GPIO#37 (active low)
Info: GPIO#35 (active low)

The Fon LED is labeled as internet in avm gpl sources.

Buttons
WLAN: GPIO#1 (active low)
DECT: GPIO#2 (active low)

Phy
GPIO#03: 25 MHz
GPIO#34: Reset (active low)
GPIO#39: Int
GPIO#42: MII MDIO
GPIO#43: MII MDC

PCIe
GPIO#21: reset (active low)

Installation:

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 MEDIA FLSH
  ftp> put /path/to/openwrt-lantiq-xway-avm_fritz7312-squashfs-sysupgrade.bin mtd1
  ftp> quote REBOOT

Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
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 d7a76be980 lantiq: xway: cleanup kernel config
CONFIG_SPI_LANTIQ was replaced by CONFIG_SPI_LANTIQ_SSC with the switch
to the upstreamed driver.

All other removed subtarget kernel config options are already set by
the target specific or global kernel config.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 1c45d11bb3 treewide: drop obsolete kernel config options
CONFIG_GPIO_DEVRES was removed with kernel commit f9c22ec6c1c5 ("gpio:
Remove GPIO_DEVRES option") during kernel 4.9 development.

CONFIG_HAVE_BPF_JIT was removed with kernel commit 6077776b5908 ("bpf:
split HAVE_BPF_JIT into cBPF and eBPF variant") during kernel 4.7
development.

Signed-off-by: Mathias Kresin <dev@kresin.me>
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
Mathias Kresin 5cdbc86329 lantiq: add swconfig to the default packages
The DEVICE_PACKAGES are not included in the initramfs image in case
TARGET_PER_DEVICE_ROOTFS is set. This might produces initramfs images
with a not working network configuration because of a missing swconfig.

Workaround the issues by adding the essential swconfig package to the
default packages selection and deselect swconfig for boards not having
swconfig included before via device packages.

Signed-off-by: Mathias Kresin <dev@kresin.me>
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
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
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 d5666b98fa lantiq: fix fritz7320 wifi support
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin ba42c1db41 lantiq: un-macro the image building code
Signed-off-by: John Crispin <john@phrozen.org>
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
John Crispin 27c10641a0 lantiq: use dwc2 by default on all ar9 boards
The dwc2 USB driver now works on Lantiq ar9, but the
default is still ltq-hcd-ar9. This patch switches to
dwc2 by default.

v2: all ar9 boards (v1 was just for BTHOMEHUBV3A and WBMR)

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>

SVN-Revision: 49254
8 years ago
John Crispin fa1927839e lantiq: install uboot-envtools by default on BTHOMEHUBV3A
The only way to access the u-boot console on the BTHOMEHUBV3A
is by soldering a serial console onto some really tiny pads.

To enable installation without soldering it would be helpful
to be able to modify the uboot environment from within
the ramdisk image used as part of the installation process.

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>

SVN-Revision: 49253
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
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
John Crispin b9963bbe80 lantiq: Add support for Arcadyan ARV8539PW22 (Speedport W 504V)
lantiq: Add support for Arcadyan ARV8539PW22 (Speedport W 504V)

Signed-off-by: Jannis Pinter <jannis@pinterjann.is>

SVN-Revision: 46224
9 years ago
John Crispin 257671615b lantiq: drop 3.14 support
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44812
9 years ago
John Crispin d15ac306fa kernel: move KERNFS to generic config
KERNFS symbol is selected by SYSFS, so place it in generic config.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 44615
9 years ago
John Crispin f04a268a04 kernel: disable ARCH_NEEDS_CPU_IDLE_COUPLED
Disable ARCH_NEEDS_CPU_IDLE_COUPLED by-default in generic config, since
only one platfrom (omap) needs them.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 44614
9 years ago
John Crispin 6617845711 kernel: move MTD_SPLIT_SUPPORT to generic config
CONFIG_MTD_SPLIT_SUPPORT symbol default value is 'y' and many platform
specific configs explicitly enables it, while no one platform disables
this symbol. So place it in generic config and remove from platform
specific configs.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 44612
9 years ago
John Crispin 7886cced18 kernel: remove GENERIC_NET_UTILS from platform configs
CONFIG_GENERIC_NET_UTILS is selected by CONFIG_NET and already enabled
in generic config, so we don't need this symbol in platform specific
configurations.

Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>

SVN-Revision: 44611
9 years ago
Jonas Gorski 3139140339 kernel: move CONFIG_MIPS_O32_FP64_SUPPORT to generic configs
Most MIPS targets have it disabled, so move the symbol to the generic
configs to keep target configs small.

Signed-off-by: Jonas Gorski <jogo@openwrt.org>

SVN-Revision: 44583
9 years ago
John Crispin 826b461427 lantiq: add 3.18 support
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 44348
9 years ago
John Crispin 9d7d29439b lantiq: BT Home Hub 3A - profile
BT Home Hub 3A - profile

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>

SVN-Revision: 43878
10 years ago
John Crispin ddb9bf4bac lantiq xway: generate ramdisk image by default
The installation process on nand-based boards using ubi
like the BTHOMEHUBV2B makes use of a ramdisk image, so it
makes sense to generate this by default.

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>

SVN-Revision: 42920
10 years ago
John Crispin 12b73579e4 lantiq: update to 3.14
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 42188
10 years ago
John Crispin 3836d40a8a lantiq: fix dgn3500 ethernet
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41854
10 years ago
John Crispin 6134a3de30 target/linux/*: more dead package cleanups
found 2 more

Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41574
10 years ago
John Crispin 32e93efc73 target/linux/*: more dead package cleanups
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 41571
10 years ago