Commit graph

890 commits

Author SHA1 Message Date
Mathias Kresin
c0e66478b5 lantiq: drop obsolete patch
ifxhcd never had roothub support but since kernel 3.x it was expected
that a roothub always exists.

The patched fixed a null pointer deref in the usb subsystem because of
the missing roothub.

Since ifxhcd is gone, this whole patch isn't required any longer.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-29 21:40:16 +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
Mathias Kresin
62a347b1d9 lantiq: drop ath9k device tree binding & ath9k pci fixup
Due to the addition of the bindings to the ath9k driver, this code
isn't used any longer. The fixup is now done by the owloader.

Rename the ath_eep.c file to ath5k_eep.c to indicate that this files
includes ath5k related code only.

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
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>
2016-11-27 15:34:23 +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
Martin Blumenstingl
79741dc379 lantiq: Register the device tree node with the PCIe controller
This allows specifying PCI devices as children of the PCIe controller
node to pass configuration data to them.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-11-26 22:39:26 +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
Felix Fietkau
c2582f58dc lantiq: add missing metadata for tp-link images
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-21 16:13:55 +01:00
Ben Mulvihill
ffd7c15500 lantiq: use dwc2 by default on danube
Use dwc2 by default on all danube boards.

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>
2016-11-21 11:04:17 +01:00
Ben Mulvihill
6f60926bab lantiq: dwc2 parameters for danube
Parameters for dwc2 on lantiq.

A separate dwc2_core_params structure is defined for danube because danube
fifo sizes are large enough to be autodetected. This is not the case on
arx and vrx.

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>
2016-11-21 11:04:12 +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
Ben Mulvihill
c82d5b30e1 lantiq: initialise dwc2 on danube
Initialise dwc2 usb driver on danube boards as well as ar9 and vr9.

Signed-off-by: Ben Mulvihill <ben.mulvihill@gmail.com>
2016-11-21 11:03:59 +01:00
Felix Fietkau
16adf49620 lantiq: remove device specific sysupgrade image checks
Replaced by image metadata

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-20 20:08:48 +01:00
Felix Fietkau
7738227321 lantiq: run append-metadata before check-size to fix build errors
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-19 14:19:27 +01:00
Felix Fietkau
be296745f8 lantiq: append metadata to images
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-19 11:24:10 +01:00
Stijn Tintel
8e47655d4e kernel: update kernel 4.4 to version 4.4.32
Refresh patches for all targets that support kernel 4.4.
Compile-tested on all targets that use kernel 4.4 and aren't marked broken.
Runtime-tested on ar71xx, octeon.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2016-11-16 17:31:29 +01:00
dpeddi
8565630e14 lantiq: add tapi/vmmc to VGV7519 defaults
Signed-off-by: Eddi De Pieri <eddi@depieri.net>
2016-11-16 10:57:48 +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
904a6751b6 lantiq: add tapi/vmmc to VGV7510KW22 defaults
Signed-off-by: Eddi De Pieri <eddi@depieri.net>
2016-11-16 10:57:14 +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
Felix Fietkau
ecab500232 lantiq: fix port indexing for WBMR-300
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-11-14 20:03:02 +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
Eddi De Pieri
07bc0d6089 lantiq: fix pci issue if mem kernel parameter is used
As specified by e0229a16b0 if the VR9
based router provides FXS ports and they should enabled then the
following must added to the kernel command line:

  mem=[TOTALMEMSIZE-2M] vpe1_load_addr=ADDRESS vpe1_mem=2M

By adding mem= parameter a pci device stop working correctly. The
pci-lantiq.c module use get_num_physpages() to compute dynamically the
memory amount of the board.

The mem= make the module to compute in the wrong way the BAR11MASK, so
in this situation the mask is misaligned with the dma area that the
hardware expects.

This patch is a port of what legacy ifxmips_pci.c does.

Signed-off-by: Eddi De Pieri <eddi@depieri.net>
2016-11-12 21:04:15 +01:00
Mathias Kresin
21d8de78dc lantiq: drop ralink eeprom handling function
The eeprom handling function from the rt2x00 driver is used and this
code is obsolete.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-11-09 20:02:18 +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
Stijn Segers
2f2ea7b44c kernel: update kernel 4.4 to version 4.4.30
This patch bumps the 4.4 kernel from .28 to .30 and refreshes the patches.
Compile-tested on ar71xx, x86/64, ramips/mt7621, brcm47xx and kirkwood.

Run-tested on ar71xx & ramips/mt7621, brcm47xx and kirkwood (last two confirmed
by P. Wassi).

Signed-off-by: Stijn Segers <francesco.borromini@inventati.org>
2016-11-02 10:25:44 +01:00
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>
2016-10-31 16:51:33 +01:00
Stefan Koch
4552bf158c lantiq: vpe softdog
(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 eb0ce57270d0b5b81b224b9336cf54707497eede)

Modified after cherry-pick:
obj in Makefile

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
2016-10-31 16:51:33 +01:00
Stefan Koch
e0229a16b0 lantiq: added support for VPE1
Created minimal patchset based on BB rev 43158 by Eddi De Pieri
14.07/openwrt.git 79472c025449efae9310defad0d3a73cff14d756

If the VR9 based router provides FXS ports and they shoud enabled then
the following must added to the kernel command line:
mem=[TOTALMEMSIZE-2M] vpe1_load_addr=ADDRESS vpe1_mem=2M maxvpes=1
maxtcs=1

To use FXS 2M of RAM are needed for the VPE firmware. The size is set
by vpe1_mem.
The available RAM must be reduced by this size using the mem argument.
A correct load address (example 0x83e00000) for the firmware must be given,
too.

Signed-off-by: Stefan Koch <stefan.koch10@gmail.com>
2016-10-31 16:51:33 +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
Mathias Kresin
23e3314cad lantiq: fix thermal sensors driver
Read the temperature including the decimale place from the CGU_GPHY1_CR
register.

Decrement the temperature read from the register by 38.0 degree celsius.
The temperature range of the sensor is -38.0 to +154 °C and the register
value 0 is equal to -38.0 °C. This fixes the report of unrealistic
temperatures as seen on all tested boards.

Give the SoC a few milliseconds to get the first temperature value. On
some rare occasions there is no temperature value in the register when
read the first time after activation. This leads to a reported
temperature of -38.0 °C on boot.

Only version 1.2 of the vr9 SoC has a temperature sensor. Add a check
to make sure the driver doesn't load on v1.1 vr9 SoCs.

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
fa14124616 lantiq: use new build code for DGN3500
Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-19 19:06:15 +02:00
Mathias Kresin
1f7a03a706 lantiq: drop lzma-loader
It isn't used any more.

Signed-off-by: Mathias Kresin <dev@kresin.me>
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
Rafał Miłecki
0658527e1e switch to the new usbport LED trigger
This makes init.d script handle existing UCI entries using the new
trigger. It also switches all targets to use its package.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
2016-10-19 12:09:45 +02:00
Mathias Kresin
36afaae847 lantiq: use wpad-mini for WBMR boards
The WBMR boards are the only ones in the whole tree selecting the wpad
and hostapd-utils package by default.

Remove the wps uci-default script as well, there is no obvious reason
why the wps config need to be set only for this board.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-15 09:01:45 +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
0547b3ca64 lantiq: fix lantiq-dsl output spam
In case the adsl/vdsl service is disabled intentional, the output is
cluttered with the following message multiple times if the status of
the dsl line is queried:

  killall: vdsl_cpe_control: no process killed

If the dsl line status is queried by LuCI, the logfile is spammed with
the message.

Fix the issue by using killall in quite mode. In quite mode killall
still returns a non-zero value if the to be killed process can not be
found so that existing logic based on the return value still works.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-11 09:31:57 +02:00
Mathias Kresin
993ca3b747 lantiq: fix BTHOMEHUBV2B default packages
Due to the introduced double whitespace the default package selection
isn't applied. This leads to errors like a not working networking
because of a missing swconfig binary.

Fixes FS#208.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-06 22:58:50 +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
8b639410d1 lantiq: cleanup led handling functions
Use a more generic name for the lantiq_get_dt_led_chosen function.

Drop the lantiq_is_dt_led_chosen function. The lantiq_get_dt_led
function can be used to achieve the same.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-05 19:23:23 +02:00
Mathias Kresin
dbb13a81b9 lantiq: board.d: apply alphabetical order to led file
Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-10-05 19:23:23 +02:00
Hauke Mehrtens
8370b9eede ntiq: make i2c-lantiqi driver compile again
It missed some changes needed for kernel 4.4. This is only used by the
Falcon SoC and not for the xRX SoCs.

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-10-03 00:13:11 +02:00
Álvaro Fernández Rojas
7d559169c5 kernel: update to v4.4.23
Refresh patches for all targets that support kernel 4.4.
compile/run-tested on brcm2708/bcm2710 only.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2016-09-30 20:08:21 +02:00
Jo-Philipp Wich
1c09849f6c treewide: remove bad local shell variable declarations
Local variable declarations outside of functions are illegal since the Busybox
update to v1.25.0, therfore remove them from the appropriate places.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-09-24 14:38:20 +02:00
Martin Blumenstingl
e9de6e5203 lantiq: do not "local" variables outside of a function
Older busybox versions allowed using the local keyword outside of
functions, whereas 1.25.0 (which was introduced in 06fa1c46fc) do not
allow this anymore (leading to the following error when executing the
script: "file: local: line nn: not in a function").

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-09-24 01:17:17 +02:00
Álvaro Fernández Rojas
d14c28fc80 kernel: update kernel 4.4 to version 4.4.20
Refresh patches for all targets that support kernel 4.4.
Compile-tested on brcm2708 only.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2016-09-15 08:10:55 +02:00
Daniel Gimpelevich
993ad29359 kernel: Backport pending appended DTB handling patches
Backport patches from upstream Linux kernel which are making the
kernel stores the appended dtb not in the same resisters as defined in
the UHI specification, use a separate variable on MIPS.

Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
[some modifications]
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
2016-09-12 22:36:55 +02:00
Mathias Kresin
c1578d4fc9 cleanup ucidef_set_interface* usage
- quote the interface name
- remove call of not existing function
- remove the proto if it's the default proto

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-09-10 15:32:25 +02:00
Mathias Kresin
92eaf27c62 use immediate set in target Makefiles
No functional change, it's just to have the same style everywhere. This
way I don't need to use any regex magic to extract all subtargets for
compile tests.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-09-10 15:30:38 +02:00
Mathias Kresin
64d72880bc lantiq: board.d: apply alphabetical order
Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-09-10 15:28:38 +02:00
Mathias Kresin
96f6bd501a lantiq: board.d: cleanup default switch config
Add or fix the physical port number of switch ports to allow LuCI to
display the ports in physical order.

Remove the physical port number in case bridge port and physical port
order are the same.

Reorder the ucidef_add_switch parameter to be aligned with the switch
port number.

Remove board settings which are covered by the default case and remove
comments.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-09-10 15:28:38 +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
Mathias Kresin
e7ec7a08aa image: use k as unit suffix for blocksize
Use k as unit suffix for kilobyte to have a the same unit regardless of
the used filesystem.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-09-04 08:56:05 +02:00
Mathias Kresin
6fdc527793 lantiq: fix ath5k EEPROM loading
With 12fe4b5798 I switched the ath5k
eeprom extraction to an alternate code path. Unfortunately this code
seams to be broken since ages and broke the ath5k EEPROM extraction.

Reported-by: Mohammed Berdai <mohammed.berdai@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
Acked-by: John Crispin <john@phrozen.org>
2016-08-24 19:30:52 +02:00
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>
2016-08-23 11:55:32 +02:00
Martin Blumenstingl
c6164d9610 lantiq: fix building AVM/EVA sysupgrade images on NOR devices
Device/AVM unconditionally inherits Device/NAND, which changes the
sysupgrade image to sysupgrade-tar (instead of a "raw" sysupgrade image
as used in the Device/Default template).
This moves the Device/NAND call to the FRITZ3370 device definition, as
this is the only AVM/EVA device that uses NAND.
Additionally we have to define the IMAGE_SIZE for the AVM/EVA NOR
devices to ensure that the images are not discarded.

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
2016-08-22 07:43:11 +02:00
Sigurd Hogsbro
63857a2d6a lantiq: generate switch configuration for BTHOMEHUBV2B.
Split from HH3A as it appears to have a different switch.
https://en.wikipedia.org/wiki/BT_Home_Hub#Models_and_technical_specifications

Signed-off-by: Sigurd Hogsbro <sigurd@hogsbro.org>
2016-08-20 05:35:42 +02:00
Martin Schiller
528b769d42 lantiq/xrx200-net: Add support for eth0 as WAN interface
Use priv->wan instead of priv->id as indicator if packets should go to the
Ethernet WAN group (DPID=1) or not (DPID=0). This way, it's independant of
interface names or indexes.

Signed-off-by: Martin Schiller <mschiller@tdt.de>
2016-08-15 21:52:04 +02:00
Matti Laakso
9f5ee6f6c0 lantiq: add kmod-ledtrig-usbdev to device packages which have usb led
By default USB LEDs are associated with usbdev trigger. However,
not all devices which have USB LEDs have kmod-ledtrig-usbdev in their
list of default packages. Add it to the relevant devices.

Signed-off-by: Matti Laakso <matti.laakso@outlook.com>
2016-08-15 15:32: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
Martin Schiller
8f02f7c7f8 lantiq/xrx200-net: fix "tx ring full" error by introducing second DMA TX channel
With an own DMA TX channel for each network device (eth0 + eth1) there
won't be any "tx ring full" errors any more.

This patch also move the spinlocks to the channel level instead of locking
the whole xrx200_hw structure.

Signed-off-by: Martin Schiller <mschiller@tdt.de>
2016-08-15 15:32:36 +02:00
Felix Fietkau
eae422eb94 lantiq: fix some ethernet driver SMP issues
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-08-11 10:45:33 +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
0b327c1652 lantiq: board.d: set lan mac address only where necessary
Do not set the lan mac address for boards which having the lan mac
address already set in device tree source file.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-08-10 02:04:31 +02:00
Mathias Kresin
47d3909415 lantiq: drop duplicate and now unused "lantiq, eth-mac" binding
The device tree binding and the associated code duplicates functionality
already patched into the etop driver. The compatible string isn't used
any more. Therefore the whole code can be dropped.

The "mac-increment" property allowed to increment a mac address received
via kernel cmdline. This functionality isn't used by any device and
should be added as etop driver device tree property if required again.

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
a7cce111db lantiq: drop orphaned eeprom-handling code branches
All device tree nodes are using the named properties now and the code
path handling the reg property isn't required any more.

The code related to the ath,eep-flash property has been reformatted to
be better readable.

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
Felix Fietkau
1b9dbb8532 Revert "kernel: remove long obsolete gpio spi controller driver patch"
This reverts commit 9e62a7668c.
2016-08-04 23:10:15 +02:00
Felix Fietkau
9e62a7668c kernel: remove long obsolete gpio spi controller driver patch
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-08-04 20:53:02 +02:00
Florian Eckert
828e25e325 lantiq: add cpu temperatur sensor driver for xrx200
Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
2016-08-03 15:30:13 +02:00
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>
2016-08-03 14:56:45 +02:00
Felix Fietkau
941ebafda0 lantiq: enable missing ath10k firmware for BT Home Hub 5A
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-08-01 18:32:36 +02:00
Felix Fietkau
63b525dd6b image: add a helper variable for getting kernel/rootfs from within image Build/* templates
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-31 12:25:25 +02:00
Jo-Philipp Wich
db49dd894e build: rename sysupgrade-nand to sysupgrade-tar
Now that the "sysupgrade-nand" step is used by non-NAND targets as well,
rename it to "sysupgrade-tar" to make it more generic.

Signed-off-by: Jo-Philipp Wich <jo@mein.io>
2016-07-29 16:53:03 +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
Felix Fietkau
eb28a0cde6 lantiq: fix WBMR-300HPD switch port assignment
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-28 21:25:42 +02:00
Mathias Kresin
e6a7e6ed25 lantiq: fix image creation of P2812HNUF3 & BTHOMEHUBV3A
Both devices were converted to the new image build code but still using
the LegacyDevice define. Therefore an image isn't created for the
mentioned devices.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-07-22 09:46:44 +02:00
Felix Fietkau
ab92f57684 lantiq: convert remaining xway NAND devices to new image build code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-20 10:13:50 +02:00
Felix Fietkau
f12e964733 lantiq: convert AVM xrx200 devices to new image build code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-20 10:13:50 +02:00
Felix Fietkau
bdfed2a2c3 lantiq: convert simple xrx200 devices to new image build code
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-20 10:13:50 +02:00
Felix Fietkau
22c0206044 lantiq: add image build template for NAND devices
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-20 10:13:50 +02:00
Felix Fietkau
8058e4778b lantiq: simplify image building code
Specifying the device profile in PROFILES is unnecessary, and for all
devices the DEVICE_PROFILE variable matched the device name.
Get rid of this useless variable and set DEVICE_DTS to $(1)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-20 10:13:50 +02:00
Felix Fietkau
cc88df1a38 lantiq: fix building NAND images in default config
Remove remaining references to $(PROFILE)

Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-20 10:13:50 +02:00
Felix Fietkau
ceee47ba64 lantiq: disable jffs2 support on xrx200
Signed-off-by: Felix Fietkau <nbd@nbd.name>
2016-07-20 10:13:50 +02:00