Commit graph

196 commits

Author SHA1 Message Date
Hauke Mehrtens
f036956e1f lantiq: update USB controller initialization
This adds USB initialization fixes for Danube, Amazon SE and xrx300 and
should fix the clock on at least Danube which hopefully closes FS#351.

The xrx200 usb driver now uses more memory for the dwc2 fifos, this was
increased in the chip compared to ar9.

This is based in part on the vendor documentation and the vendor code
base as a reference.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-01-09 23:25:34 +01:00
Hauke Mehrtens
8f0dc92afd lantiq: fix console print for additional boards
I missed 3 boards in this commit:
commit d8dde8c517
Author: Hauke Mehrtens <hauke@hauke-m.de>
Date:   Wed Jan 4 21:53:22 2017 +0100

    lantiq: fix console print

Add bootargs parameters for ARV4525PW, ARV7506PW11 and ARV8539PW22
again.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-01-06 23:00:02 +01:00
Hauke Mehrtens
d8dde8c517 lantiq: fix console print
The boot loader of many boards provides a kernel boot argument with a
broken console parameter to the kernel. This will be taken before the
stdout-path defined in device tree and the serial will not work on this
board. Multiple boards are affected by this problem, so revert this
patch for all boards. Later we can remove the boot arguments from the
device tree again, after the individual board was checked to work.

This partly reverts this commit:
commit 4995c64857
Author: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Date:   Sun Dec 11 21:55:00 2016 +0100

    lantiq: specify console using stdout-path instead of cmdline argument

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2017-01-05 23:10:44 +01:00
Mathias Kresin
ea9b71e5b1 lantiq: drop the FRITZ7360SL led-dsl alias
The power LED can not be used for indicating the xDSL line state and
the in system (boot) state at the same time in LEDE.  As soon as the
xDSL Line goes down, the power LED is switched off.

During xDSL handshake the power led would blink with the same or a
similar pattern as during boot.

Both might confuse users.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-12-24 10:03:38 +01:00
Mathias Kresin
7dd42d610d lantiq: add FRITZ7360SL phy reset gpios
Due to a hardware bug of Atheros 8030 phys, the driver need to reset
the phys on link state change.

Use the correct compatible string for the at903x phys connected to
switch port 0 and 1.

Fix the pinmux of the gpio lines connected to the reset pin of the phys
and define the reset-pins to let the driver do the fixups.

Fixes FS#343

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-12-24 10:03:38 +01:00
Mathias Kresin
9aa420b00e lantiq: fix DGN1000B boot status leds
The alias node should not be a child of the chosen node.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-12-24 10:03:38 +01:00
Martin Blumenstingl
6b94234a65 lantiq: remove "init" kernel command line parameter from bootargs
/etc/preinit has been the default init-script for a very long time (at
least since Linux 2.6.30 in OpenWrt). Remove the kernel command line
"init" parameter to get rid of duplicate and inconsistent definitions
of this parameter (some boards, like FRITZ3370 for example did not use
it at all, while it's just copy and paste on others).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-12-12 09:57:40 +01:00
Martin Blumenstingl
4995c64857 lantiq: specify console using stdout-path instead of cmdline argument
Use devicetree's /chosen/stdout-path instead of the kernel command line
(embedded in the .dts-files) to specify the serial console. Using the
chosen node is recommended on devicetree based platforms.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-12-12 09:57:40 +01:00
Hauke Mehrtens
7c47f43fe6 lantiq: falcon: remove bootargs-append
This attribute is not evaluated any more and the boot loader on these
reference boards does not provide a broken root= or console= parameter.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-12-10 16:08:06 +01:00
Mathias Kresin
d9d838bc97 lantiq: fix image validation errors
The boards did not have the name set that is expected during metadata
validation on sysupgrade.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-12-04 07:03:17 +01:00
Mathias Kresin
0e34459e6b lantiq: use BT HomeHub 5 Type A OEM partition layout
This way the on nand bad block table is preserved and used. Add support
for nand OOB ECC checksums as well. It should fix all reported ubi
errors, which were all related to bad nand blocks and a purged on nand
bad block table.

The existing ubi partition will be reused, which eliminates the need
to touch the caldata during initial install. The BT u-boot has support
for loading a kernel from an ubi volume. It isn't necessary any longer
to replace the BT u-boot with a custom compiled one to use LEDE.

It is required to restore the BT Firmware and install LEDE from scratch
to switch to the new partition layout.

An image for restoring the BT firmware and installing LEDE is provided
at https://github.com/mkresin/lede/releases.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-29 21:40:16 +01:00
Mathias Kresin
860210c373 lantiq: backport kernel patch to pass of node to nand_dt_init
Backport upstream commit a61ae81a1907af1987ad4c77300508327bc48b23.

The actually purpose of the patch was to do some cleanup. As a side
effect of this cleanup, the device node is now passed to nand_dt_init.

This allows to use the common nand device tree properties

 - nand-bus-width
 - nand-on-flash-bbt
 - nand-ecc-mode
 - nand-ecc-step-size
 - nand-ecc-strength

for the plat_nand driver.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-29 21:40:16 +01:00
Martin Blumenstingl
a20616863d lantiq: use ath9k device tree bindings binding/owl-loader
This moves the extraction of the eeprom/calibration data to a hotplug
firmware script. Additionally it modifies all .dts to configure ath9k
directly from within the .dts.

The owl-loader approach enables support on devices with exotic eeprom
data locations (such as unaligned positions on the flash or data
inside an UBI volume).

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
[add ath9k caldata mac address patcher]
[fixes DGN3500 wifi mac]
[fixes BTHOMEHUBV3A wifi mac]
[set invalid mac for BTHOMEHUB2B, FRITZ3370, FRITZ7320 & FRITZ7360SL to restore previous random mac behavior]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-29 21:40:16 +01:00
Hauke Mehrtens
9371542783 lantiq: add Falcon support
This adds support for the Intel Falcon SoC for GPON.

Support for the Falcon SoC was removed in commit c821836395 svn rev:
40392 from OpenWrt, this commit adds it again.

This patch adds a new subtarget for the Falcon SoC, but it still misses
all the drivers needed to control the GPON part.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-11-27 17:40:20 +01:00
Mathias Kresin
18c64f41c7 treewide: fix button keys codes used in dts
Use keycodes that matches the intended use case based on the label.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-27 15:34:23 +01:00
Martin Blumenstingl
d76ee5bfac lantiq: specify the PCIe controller's interrupt, size and address cells
This allows adding devices to the PCIe controller in the .dts files.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-11-26 22:39:27 +01:00
Eddi De Pieri
d596c21ebd lantiq: write protect vgv7519 u-boot and u-boot-env partitions
Signed-off-by: Eddi De Pieri <eddi@depieri.net>
2016-11-23 10:18:19 +01:00
Ben Mulvihill
5c06a31e23 lantiq: device tree bindings for dwc2 on danube
Device tree binding for dwc2 usb driver on danube.
Leave old ifxhcd-danube driver as an alternative.

Also adds dr_mode = "host" to eliminate warning on boot.

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>
2016-11-21 11:04:05 +01:00
dpeddi
0ce929228a lantiq: enable VMMC for VGV7519
Signed-off-by: Eddi De Pieri <eddi@depieri.net>
2016-11-16 10:57:48 +01:00
Eddi De Pieri
fe9a757984 lantiq: enable VMMC for VGV7510KW22
Signed-off-by: Eddi De Pieri <eddi@depieri.net>
2016-11-16 10:57:14 +01:00
Mathias Kresin
2b55c83e68 treewide: dts: use keycode defines from input dt-binding
All compiled device tree files not mentioned are binary identical to the
former ones.

Fix the obvious decimal/hex confusion for the power key of ramips/M2M.dts.

Due to the include of the input binding header, the BTN_* node names in:

  - ramips/GL-MT300A.dts
  - ramips/GL-MT300N.dts
  - ramips/GL-MT750.dts
  - ramips/Timecloud.dts

will be changed by the compiler to the numerical equivalent.

Move the binding include of lantiq boards to the file where they are
used the first time to hint the user where the values do come from.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-13 07:07:58 +01:00
Mathias Kresin
7fd5171a34 lantiq: use the device tree bindings from rt2x00 driver
Set a device specific wireless mac address for ARV7506PW11, VGV7519 and
VGV7510KW22. The one from the EEPROM is a generic one and the same on
all boards.

Use the wifi@0,0 label and the pci0,0 compatible string for the
ARV7519PW and ARV7525PW since the pci vendor and device id is unknown.
It should work anyway since the compatible string isn't evaluated
(yet).

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-09 20:02:18 +01:00
Mathias Kresin
13208e89d0 lantiq: fix VGV7519 and VGV7510KW22 mac addresses
The VGV7510KW22 stock firmware uses the following mac-addresses:

lan      (ifno 1): AA:BB:CC:DD:EE:60
wlan     (ifno 2): AA:BB:CC:DD:EE:61
atm0     (ifno 3): AA:BB:CC:DD:EE:62
atm1/wan (ifno 4): AA:BB:CC:DD:EE:63

The VGV7519 stock firmware uses the following mac-addresses:

lan:  AA:BB:CC:DD:EE:EF
wlan: AA:BB:CC:DD:EE:EF
wan:  AA:BB:CC:DD:EE:EE

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-09 20:02:18 +01:00
Mathias Kresin
3db1a5c8fa lantiq: use external pci clock on ARV7506PW11
Fixes a ralink wireless driver related kernel crash as soon as a lot of
data is tranfered via wireless.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-03 19:00:28 +01:00
Mathias Kresin
112cf52d45 lantiq: cleanup dts files
- remove not existing properties
- remove properties having the same values as the included dtsi
- remove nodes which are disabled in the included dtsi and not enabled
  in dts
- replace the deprecated pinctrl-* compatible strings
- use the same labels for nodes as the included dtsi
- move common used vr9 pci properties to vr9.dtsi
- remove the unused stp node from HomeHub 2B devcie tree source file
- fix spaces vs. tabs and remove superfluous linebreaks

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-03 19:00:28 +01:00
Stefan Koch
01ab5209c0 lantiq: modify vr9.dts to support vmmc
(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 8d924d43c0ea6839a3a33e54982e8da48b736001)

Modified after cherry-pick:
compatible attribute

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
2016-10-31 16:51:32 +01:00
Stefan Koch
b760afa09a lantiq: danube fxs bugfix: changed compatible attribute of vmmc
This bugfix enables FXS support on dabube based devices.
Changed "compatible" attribute from "vmmc" to "vmmc-xway".
The vmmc driver uses "vmmc-xway".

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
2016-10-26 12:37:46 +02:00
Mathias Kresin
3c5a8a2cbc lantiq: enable cpu temp driver for all vr9 boards
Only present on v1.2 vr9 SoCs but the driver takes care to not load on
boards having a v1.1 SoC.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-19 19:55:06 +02:00
Andreas Eberlein
eba84bee4c lantiq: Sanitize device tree files
The device tree file of ARV752DPW uses numbers/hex values for gpio states and input event codes.

This cleans it up and uses the available macros from header files. This way the functions are easier to read and comprehend.

Signed-off-by: Andreas Eberlein <foodeas@aeberlein.de>
[sanitize all device tree files]
Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-19 19:55:04 +02:00
Andreas Eberlein
72d12672de lantiq: Fix buttons for ARV752DPW
The GPIO for reset switch is wrong in definition. Further the key codes for the two additional buttons are ineffective.

Both is fixed here.

Signed-off-by: Andreas Eberlein <foodeas@aeberlein.de>
2016-10-19 19:06:15 +02:00
Mathias Kresin
17094e9e64 lantiq: rework VG3503J image
Use the new image build code and remove the lzma loader. The lzma
loader was used to cheat the signature validation of the bootloader and
I found another way to do this.

To migrate boards already using LEDE/OpenWrt to the new image the
following steps need to be done once:

  VR9 # run reset_uboot_config
  VR9 # reset
  VR9 # setenv ethaddr AA:BB:CC:DD:EE:FF
  VR9 # setenv preboot ping 1.1.1.1\;bootm 0xb001f000
  VR9 # saveenv
  VR9 # tftp 0x81000000 lede-lantiq-xrx200-VG3503J-squashfs-sysupgrade.bin
  VR9 # erase 0xb0020000 $(filesize)
  VR9 # cp.b 0x81000000 0xb0020000 $(filesize)

The mac address is printed on the label at the bottom of the case.

The following steps are need to be done during first install:

  VR9 # setenv preboot ping 1.1.1.1\;bootm 0xb001f000
  VR9 # saveenv
  VR9 # tftp 0x81000000 lede-lantiq-xrx200-VG3503J-squashfs-sysupgrade.bin
  VR9 # erase 0xb0020000 $(filesize)
  VR9 # cp.b 0x81000000 0xb0020000 $(filesize)

The image uses the uImage firmware splitter now instead of hardcoded
kernel and rootfs partitions. The firmware partition size was extended
to use flash space that was reserved for partitions required only by
the ECI firmware.

Due to the changes an upgrade to a later LEDE revision from a running
LEDE is supported now.

A default switch config was added and the device uses the same MAC
addresses as the ECI firmware now instead of the same for all VG3503J.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-19 19:06:15 +02:00
Mathias Kresin
335ccddc10 lantiq: fix ARV452CQW keys
Fix the typo in the gpio-keys-polled compatible string.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-15 09:01:45 +02:00
Mathias Kresin
116adaa3a4 lantiq: fixup last commits
Revert the rename of unrelated device tree nodes. Rename the missed
leds of the Speedport W 504V Typ A.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-05 20:26:35 +02:00
Mathias Kresin
7659f9ad9e lantiq: fix usb leds/trigger
Add USB led aliases to boards having an led which is meant to be used
as USB led according to the manuals.

Remove the kmod-ledtrig-usbdev from the default package selection for
boards not having an USB led. Add the kmod-ledtrig-usbdev to boards
where it is missing.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-05 19:23:23 +02:00
Mathias Kresin
e07c80dfc8 lantiq: use aliases device tree node for leds
The chosen node is clearly the wrong place for aliases.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-05 19:23:23 +02:00
Mathias Kresin
7d02e94e41 lantiq: enable cpu temp driver for more tested boards
Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-09-10 15:28:38 +02:00
Martin Schiller
ddd1882811 lantiq/xrx200-net: add interrupt for second DMA TX channel to vr9.dtsi
Signed-off-by: Martin Schiller <mschiller@tdt.de>
2016-08-15 15:32:36 +02:00
Mathias Kresin
5947f7f85e lantiq: enable cpu temp driver for selected boards
According to the author of the cpu temp driver, not all xrx200 boards
have a cpu temperature sensor. For that reason enable the sensor only
for tested boards.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-08-10 02:04:31 +02:00
Mathias Kresin
91d5067091 lantiq: use the etop driver DT bindings only
Use the generic mtd-mac-address dts property to get a mac address from
flash instead of the lantiq specific one.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-08-10 02:04:31 +02:00
Mathias Kresin
1b7d6583a5 lantiq: fix mac address increments
Use the same mac address increment in device tree source file and
userspace.

Don't add a mac address increment to either the only mtd mac-address or
to all mac-addresses.

Fix a typo in the TDW89X0.dtsi file to add an increment.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-08-10 02:04:31 +02:00
Mathias Kresin
12fe4b5798 lantiq: use ath, eep-flash/mac-offset for ath eep nodes
No functional change, just easier to get what's the purpose of the hex
values.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-08-10 02:04:31 +02:00
Hauke Mehrtens
47cce1d5e4 lantiq: fix switch configuration for EASY80920
The device tree description misses some Ethernet ports and there was no
model specified for this board. In addition there was no switch
specific default configuration created.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-07-28 22:42:16 +02:00
Ben Mulvihill
1cc092f72b lantiq: mac address setting on BTHOMEHUBV3A
Rename uboot environment partition on BT Home Hub 3A so that mac address
setting works correctly.

Also, the mac address field in the ath9k calibration data is not used,
and should not be referenced in the dts.

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>
2016-07-05 22:59:14 +02:00
Oswald Buddenhagen
9759fde40a lantiq: add support for ARV7506PW11 (Alice/O2 IAD 4421)
Ethernet, ADSL2+ and LEDs are fully functional.

Supporting the two TAE ports and SIP gateway was not attempted.

The WiFi is unreliable, due to experimental support for rt35xx family
devices by the rt2800pci driver.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
[rebase to LEDE HEAD]
[switch to normal image instead of brnboot image]
[remove not required pinmux child nodes keys, leds, ebu, exin, pci_in and pci_out]
[remove switch_rst pinmux child node (no support for hw reset in driver/setting a default GPIO value in DT]
[enable usage of the wireless LED]
[fixup mac address configuration]
Sgned-off-by: Mathias Kresin <dev@kresin.me>
2016-06-22 19:32:06 +02:00
Daniel Gimpelevich
34fdfbf328 lantiq: Slow down SPI flash on the DGN3500
The bootloader uses 30 MHz as the SPI frequency for flash on the Germany and
North America models, and 50 MHz for it on the worldwide model, but the Lantiq
SPI driver in OpenWrt and LEDE may access the flash differently such that
writes are capped at 20 MHz, leading to read errors reported on the worldwide
model at 30 MHz.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
Acked-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
2016-06-22 19:32:06 +02:00
John Crispin
f054e82bdc lantiq: remove gr7000 support
this seems to have never worked as the wrong SoC is selected

Signed-off-by: John Crispin <john@phrozen.org>
2016-06-22 19:32:06 +02:00
Hauke Mehrtens
84b3d92180 lantiq: make EASY80920 work with both chip versions
The EASY80920 is available with the A1X and the A2X chip version
depending on the board version. Add both firmware versions to device
tree and make the driver load the correct version depending on the chip
version.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-06-21 21:58:59 +02:00
Hauke Mehrtens
7f5b8cc376 lantiq: use new partition layout for EASY80920NAND
This matches the EASY80920NAND boards with UGW.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-06-21 21:58:59 +02:00
Mathias Kresin
153b3f05d4 lantiq: BTHOMEHUBV5A - use the power event code for the restart button
The restart event code is used in LEDE to trigger a factory reset on
long press as well.

By using the power event code, the restart functionality can be used
without being prone to trigger a factory reset.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-06-20 11:45:44 +02:00
John Crispin
d5666b98fa lantiq: fix fritz7320 wifi support
Signed-off-by: John Crispin <john@phrozen.org>
2016-06-14 06:43:02 +02:00