Commit Graph

15 Commits (88689da65f56e0148503b8849334e810c0baf0db)

Author SHA1 Message Date
Adrian Schmutzler 88689da65f lantiq: fix cosmetic issues with partition offsets and sizes
This fixes a few cosmetic issues with partition offset and size
that are inconsistent probably due to copy/pasting.

Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Dustin Gathmann d5a148f5c8 lantiq/xrx200: make WLAN button responsive on Fritzbox 7360 & 7362
Pressing the 'WLAN' button should enable/disable wireless activity.
Currently, the button is mapped to the KEY_WLAN, which will not
have this effect.
This patch changes the mapping of the WLAN button, so a button
press will emit an action for the 'rfkill' key instead of 'wlan'.
Apparently, this is what stock OpenWRT expects.

This fix is analogous to the preceding patch for Fritzbox 3370.

Signed-off-by: Dustin Gathmann <dzsoftware@posteo.org>
4 years ago
Dustin Gathmann 0ee30adb46 lantiq/xrx200: fix WLAN button actions for Fritzbox 3370
The WLAN button actions are reversed, i.e. pressing the button emits a
'released' action, and vice versa.
This can easily be checked by adding
logger -t button_action "$BUTTON $ACTION"
as the second line of /etc/rc.button/rfkill, and using logread to read
the events (assuming the preceding patch has been applied).
Defining the GPIO as ACTIVE_LOW corrects this behavior.

Signed-off-by: Dustin Gathmann <dzsoftware@posteo.org>
4 years ago
Dustin Gathmann a53bf63756 lantiq/xrx200: make WLAN button responsive on Fritzbox 3370
Pressing the 'WLAN' button should enable/disable wireless activity.
However, on the Fritzbox 3370 this doesn't have an effect.
This patch changes the mapping of the physical WLAN button, so a button
press will emit an action for the 'rfkill' key instead of 'wlan'.
Apparently, this is what stock OpenWRT expects, and also what is
implemented for most other devices.

Signed-off-by: Dustin Gathmann <dzsoftware@posteo.org>
4 years ago
Willem van den Akker 0df71e01cf lantiq: set correct gphy pins for Zyxel P-2812
This fixes the gphy LED pins for Zyxel P-2812 devices. The have
been accidentally altered during a tidy-up operation (see Fixes:
below).

No ports were available, dmesg reported:

[ 0.658577] pinctrl-xway 1e100b10.pinmux: pin io5 already requested by
            1e100bb0.stp; cannot claim for 1e108000.eth
[ 0.667566] pinctrl-xway 1e100b10.pinmux: pin-5 (1e108000.eth) status -22
[ 0.685238] lantiq,xrx200-net 1e108000.eth: Error applying setting,
            reverse things back
[ 0.693270] lantiq,xrx200-net: probe of 1e108000.eth failed with error -22

Fixes: FS#3188
Fixes: 660200e53d ("lantiq: dts: assign the GPHY LED pins to the
Ethernet controller node")

Suggested-by: Mathias Kresin <dev@kresin.me>
Signed-off-by: Willem van den Akker <wvdakker@wilsoft.nl>
[commit message facelift]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Aleksander Jan Bajkowski f496939f15 lantiq: set port numbers corresponding to reg value
Fix inconsistencies found in DTS files and sort ethernet ports based on
updated names.

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
[squash two separate patches, rephrase commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Aleksander Jan Bajkowski 3866fefa38 lantiq: remove redundant includes from fritz736x DTS files
The removed lines are already included in vr9_avm_fritz736x.dtsi

Signed-off-by: Aleksander Jan Bajkowski <A.Bajkowski@stud.elka.pw.edu.pl>
[rephrase commit title/message]
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
4 years ago
Martin Blumenstingl 982468de35 lantiq: dts: Move the &usb_vbus nodes out of &gpio
Move the USB VBUS regulator nodes out of the GPIO controller node. This
fixes a problem where the "regulator-fixed" driver wasn't probed for
these regulators because the GPIO driver doesn't scan the child-nodes
and based on the dt-bindings documentation it's not supposed to.

This fixed the following error reported by Luca Olivetti:
  ...
  dwc2 1e101000.usb: DWC OTG Controller
  dwc2 1e101000.usb: new USB bus registered, assigned bus number 1
  dwc2 1e101000.usb: irq 62, io mem 0x1e101000
  dwc2 1e101000.usb: startup error -517
  dwc2 1e101000.usb: USB bus 1 deregistered
  dwc2 1e101000.usb: dwc2_hcd_init() FAILED, returning -517

Fixes: FS#1634
Cc: Luca Olivetti <luca@ventoso.org>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
4 years ago
Lars Wessels 702366a30b lantiq: wifi mac fix for ARV752DPW
Set wifi mac from flash partition 'board_config' to
match the label on the device (Easybox 802).

Currently the wifi mac is always set to 00:0c:43:28:60:00.
eth0 and WiFi will now share the same mac (as in original firmware).

Signed-off-by: Lars Wessels <software@bytebox.org>
[improve commit message]
Signed-off-by: David Bauer <mail@david-bauer.net>
4 years ago
Adrian Schmutzler 340de1d154 lantiq: fritz7312: set maximum speed to 100 mbit on 5.4
The fritz 7312 does not support 1000 gbit. Advertising it makes it
worse. Some NIC will change to 1000 gibt and turn off and on again for
ever.

The previous patch in 36f628910b was only applied to the 4.19 file,
so let's just make it consistent with this patch.

Cc: Alexander Couzens <lynxis@fe80.eu>
Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
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
Martin Blumenstingl 3d5d56487d lantiq: linux 5.4: remove support for the linux,mtd-name OF property
This is referenced in two .dts but never actually used from userspace.
Drop support for this property because it's not used and because it
makes updating to Linux 5.4 harder (as the patch doesn't apply anymore).

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