Commit Graph

231 Commits (fbd4214bb0727268aa535af5b600d38939ec8dbc)

Author SHA1 Message Date
Mathias Kresin 259fc1e778 lantiq: show xdsl line init status on shared dsl/internet led
On boards which don't have a distinct internet and dsl led, use the
shared LED to indicate the xdsl line state and any traffic that is
send/received via the netdev. This traffic doesn't necessarily need to
be internet traffic.

Rename the shared LED of existing configs to "dsl", to match the new
defaults. The configuration of the to be renamed LED is identical with
the new defaults.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Martin Schiller 03776d813c lantiq: restore netdev trigger of dsl led on line up
Allows to use a single LED for line init status indication and to show
any rx/tx activity on a synchronized dsl line.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Tino Reichardt 712ebe95f8 lantiq: add Allnet ALL0333CJ support
This patch adds support for the Allnet ADSL2+ Modem ALL0333CJ.

Specifications:
- SoC: Amazon-SE
- RAM: 16MB
- Storage: 4MB NOR FLash
- LEDs: Power, Ethernet, DSL (Sync)
- Buttons: 1x Reset Button (not currently supported, will be done)
- 1x Ethernet-Port: 1x RJ45 10/100BaseTX
- 1x WAN-Port: AnnexB & J, G.992.1(ADSL), G.992.3(ADSL2), G.992.5(ADSL2+)

Installation:
- can be done via telnet+tftp or serial console
- default passwords:
  - via telnet (root:admin)
  - via webinterface http://172.16.1.254:8235/ (admin:coolwhite)

Installation via telnet / tftp:
host: # your own host must have an tftpd daemon, then do this:
host: ifconfig eth0:172 172.16.1.1 up
host: # telnet to allnet modem, root:admin
host: telnet 172.16.1.254
modem: # kill this daemon, it spams your console
modem: killall dsl_cpe_control
modem: # change to some place in ram:
modem: cd /ramdisk/tftp_upload
modem: # load lede-lantiq-ase-ALL0333CJ-squashfs-sysupgrade.bin alias uImage
modem: tftp -g -r uImage 172.16.1.1
modem: # load these extra tools from your tftpd via:
modem: # source: https://github.com/mcmilk/uboot-utils/releases/download/0.1/mips32.tar.gz
modem: tftp -g -r flashwrite 172.16.1.1
modem: tftp -g -r fw_setenv 172.16.1.1
modem: tftp -g -r fw.conf 172.16.1.1
modem: ln -s fw_setenv fw_printenv
modem: chmod +x *
modem: ./fw_setenv disable_recovery y
modem: ./fw_setenv kernel_addr 0xb0010000
modem: ./flashwrite /dev/mtd/1 uImage 0

Installation via serial line at uboot:
uboot: # erase everything exept bootloader
uboot: protect on b0000000 +10000; protect on b03f0000 +10000
uboot: erase all
uboot: # get new firmware via tftp:
uboot: tftpboot 0x80100000 uImage; setenv kernel_addr 0xb0010000
uboot: # copy to flash:
uboot: cp.b 0x80100000 $(kernel_addr) $(filesize)
uboot: # disable proprietary image checking:
uboot: setenv disable_recovery=y; saveenv
uboot: # reboot with LEDE ;)
uboot: reset

Ethernet works as expected, DSL syncronization does not work properly
currently, I am working on this issue.

Signed-off-by: Tino Reichardt <milky-lede@mcmilk.de>
7 years ago
Helge Mader 63a20c95fd lantiq: modified lantiq_dsl.sh status output of latency
Signed-off-by: Helge Mader <ma@dev.tdt.de>
7 years ago
Helge Mader 666dd85b36 lantiq: fix lantiq_dsl.sh status and lucistat output
Signed-off-by: Helge Mader <ma@dev.tdt.de>
7 years ago
Mathias Kresin 822ee54544 treewide: fix device tree path in scripts
The device tree is at /proc/device-tree/ without a base subdir.

Fixes: da472e5b30 ("treewide: access device tree from userspace via /proc/")

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin da472e5b30 treewide: access device tree from userspace via /proc/
Access the device tree via /proc/device-tree/ is the documented way to
access the properties. Everything else might not work in future.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 92a12c434c lantiq: fix avm fritz box mac addresses
It has been shown that the Fritz boxes have the correct mac address set
in the wireless calibration data/eeeprom. Use this mac address as base
for the ethernet and xdsl interface increment/decrement the address to
match the values stored in the tffs.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Kevin Darbyshire-Bryant e1d433b293 lantiq: improve DGN3500 LED definitions
Add red:internet led on gpio 30 previously claimed as missing.
Wifi led was claimed as blue however there are no blue leds on the
board at all.  Actually there are two wifi leds, green & amber so add
definitions for those.  Make the newly discovered green wifi led gpio
14 the default.

There is no amber power led on this board. The mention of the amber
power led in the manual means power red and power green at the same
time.

Signed-off-by: Kevin Darbyshire-Bryant <kevin@darbyshire-bryant.me.uk>
[removed unnecessary aliases, add migration script]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Felix Fietkau fd93f81fd8 lantiq: remove lantiq_board_model, it is unused
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau 7e798dab56 lantiq: remove lantiq_board_name, use the generic function instead
Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Felix Fietkau aa95d6cd20 lantiq: move lantiq_board_detect() to 03_preinit_board.sh
It is only used there

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Oswald Buddenhagen 6a82f4006c lantiq: Shortcut non-pppoa interfaces in dsl_notify
No need to query 'up' and 'auto' when they are not going to be used.

Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
7 years ago
Mathias Kresin 73eb5c74a1 lantiq: use the P2812HNUF* wan port as wan
The port is labeled as wan and was only used as lan port because of the
"tx ring full" issues fixed with 8f02f7c.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin cd8b20931e lantiq: xrx200: use vlan for ethernet wan port
Using the lantiq,wan device tree property for one interface node and
the lantiq,switch device tree property for another interface node at
the same time was never intended/isn't supported at the moment.

The property is meant to be used in two phy operation mode where one
phy is assigned to an interface without lantiq,* device tree property
and the other phy is assigned to an interface with the lantiq,wan
device property to have two netdevs.

If both properties are used at the same time, the lantiq,wan interface
is shown as independent netdev but not able to operate independent. The
port needs to be managed via swconfig. These dependency is not obvious
and fooled already a lot of users.

Add a default WAN vlan for xrx200 devices having an ethernet WAN port
and remove the lantiq,wan device tree property. Leave it up to the user
to set the ethernet WAN port as default WAN interface or to use this
port as additional LAN port.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Alex Maclean 6254a2028c lantiq: add support for the Alpha ASL56026
The ASL56026 is a VDSL2 router with dual 100mbit ethernet,
also known as the ECI B-FOCuS V-2FUb/I.

CPU: Lantiq XRX268 v1.1 at 333MHz
Modem: Lantiq VRX208
RAM: 32MiB DDR2 at 167MHz
Flash: 8MiB NOR, Spansion S29GL064N90TF04

UART is at JP1:
Pin 1 TX
Pin 2 GND
Pin 3 +3.3V
Pin 4 NC
Pin 5 RX

Boot selection pins are exposed via several resistor jumpers:
boot_sel0 is at J15, on the rear of the board. Default is high.
boot_sel1 is at J3, next to the flash - it is also the flash CE# pin. Default is low.
boot_sel2 is at J12, directly below the SoC. Default is low.
boot_sel3 is at J16, on the rear of the board. Default is low.

The boot_sel pins should never be shorted, the jumper must be moved or
a lower value resistor used to change the pull (existing resistors are 4k7, 1k should work)

To install with the stock bootloader you must break the built in image selection process
which uses at least the following vars: f_upgrade_addr, f_upgrade2_addr, loadaddr, kernel_addr, activeregion, committedregion
This is done by setting loadaddr and both f_upgrade_addr vars to the same address:

	VR9 # setenv loadaddr 0xB0040000
	VR9 # setenv f_upgrade_addr 0xB0040000
	VR9 # setenv f_upgrade2_addr 0xB0040000
	VR9 # saveenv

Then flash the firmware image:

	VR9 # tftpboot 0x81000000 lede-lantiq-xrx200-ASL56026-squashfs-sysupgrade.bin
	VR9 # erase B0040000 +${filesize}
	VR9 # cp.b 0x81000000 0xB0040000 ${filesize}

Signed-off-by: Alex Maclean <monkeh@monkeh.net>
7 years ago
Mathias Kresin bececcce86 lantiq: fix warning if ltq_atm modules are missing
Fixes the following warning on first boot if the ltq_atm modules are
not included in the image:

  ls: /lib/modules/4.4.49/ltq_atm*: No such file or directory

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin e88b36f4be lantiq: set the internet led interface according to wan interface
Use the nas0 interface for the netdev trigger as default. Use the ptm0
interface for xRX200 boards to match the default wan interface set in
02_network.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin 044a4eafd5 lantiq: introduce lantiq_is_vdsl_system
Move the code to check if the current system is a system with vdsl
support to a dedicate function to make it reusable.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin cfd16ecc48 lantiq: fix ARV7519RW22 switch port indexing
Fixes FS#454.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Martin Blumenstingl 70395ae8cb lantiq: fix patching the wifi mac address on BTHOMEHUBV3A
The firmware hotplug script tries to read the mac address from a
partition with the name "uboot-env" which does not exist (instead it's
name is uboot_env). This broke calculation of the new checksum (after
patching the mac address) which resulted in ath9k refusing to use the
EEPROM data.

The original error reported by ath9k was:
PCI: Enabling device 0000:00:0e.0 (0000 -> 0002)
ath: phy0: Bad EEPROM checksum 0x2523
ath: phy0: Unable to initialize hardware; initialization status: -22
ath9k 0000:00:0e.0: Failed to initialize device

Fixes: a20616863d ("lantiq: use ath9k device tree bindings
binding/owl-loader")

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
7 years ago
Mathias Kresin ee5a6c1041 lantiq: simplify ath9k eeprom extraction script
Add an extra function to patch the mac and fixup the checksum
afterwards. Calculate the checksum position automatically. The offset
to the mac address is the same for all checksum protected EEPROMs.

No EEPROM requires a byte swapped mac address. The mac byte swap code
was required due to an bug in the script that is now fixed.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Martin Blumenstingl afa3709266 lantiq: fix ath9k EEPROM data swapping for some devices
The EEPROM data in the flash of the ARV7518PW, ARV8539PW22,
BTHOMEHUBV2B and BTHOMEHUBV3A is stored byte-swapped (swab16), meaning
that for example the ath9k base_eep_header fields "version" (high and
low byte), "opCapFlags" and "eepMisc" are swapped (the latter ones are
just 1 byte wide, thus their position is swapped).

The old "ath,eep-endian" property enabled the corresponding swapping
logic in the ath9k driver (swab16 in ath9k_hw_nvram_swap_data, which is
based on the magic bytes in the EEPROM data which have nothing to do
with the calibration data - thus this logic should not be used
anymore).
Since we have switched to the upstream ath9k devicetree bindings there
is no binding anymore which enables swab16 in ath9k (as this logic is
not recommended anymore as explained above), leading to ath9k
initialization errors:
ath: phy0: Bad EEPROM VER 0x0001 or REV 0x00e0
(this shows that the version field is swapped, expected values are VER
0x000E and REV 0x0001)

Swapping the ath9k calibration data when extracting it from the flash
fixes the devices listed above (all other devices do not require
additional swapping, since the position of the fields is already as
expected by ath9k). This allows ath9k to read the version correctly
again, as well as the more important "eepmisc" field (which is used for
determining whether the data inside the EEPROM is Big or Little Endian
which is required to parse the EEPROM contents correctly).

Fixes: a20616863d ("lantiq: use ath9k device tree bindings
binding/owl-loader")

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
Felix Fietkau 16adf49620 lantiq: remove device specific sysupgrade image checks
Replaced by image metadata

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau be296745f8 lantiq: append metadata to images
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Felix Fietkau ecab500232 lantiq: fix port indexing for WBMR-300
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
Mathias Kresin dbb13a81b9 lantiq: board.d: apply alphabetical order to led file
Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
Mathias Kresin 64d72880bc lantiq: board.d: apply alphabetical order
Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
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>
8 years ago
Felix Fietkau eb28a0cde6 lantiq: fix WBMR-300HPD switch port assignment
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Mathias Kresin f080cfab72 lantiq: fix network in failsafe
So far the network in failsafe is setup only for one board. Use the
eth0 interface as lan interface for all boards for now.

If a board has its lan interface(s) on another eth, a special
handling based on the board name can be added.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
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>
8 years ago
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>
8 years ago
Mathias Kresin 551c9c8300 lantiq: diag - switch off the power led on failsafe
This patch is a follow up to commit 4cf3fd4 "add support for indicating
the boot state using three leds".

At the time of writing the patch, I wasn't aware that it's possible to
switch info failsafe after boot (factory reset).

Enabling the failsafe led without disabling the running led causes an
unexpected led colour on devices using a single multicolour led to
indicate the boot state.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Felix Fietkau a285f1895b Revert "lantiq: Use correct macaddr generating logic for the DGN3500"
This reverts commit 492964e741, which
makes no sense. /etc/board.d cannot be used for system init stuff.

Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
John Crispin 88019c6c77 lantiq: add ARV4525PW wifi led
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 d5143a49b7 lantiq: add AVM image mageic to sysupgrade script
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
John Crispin 027da34957 lantiq: add default lan setup to board.d script
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
Felix Fietkau 2d48f93ff4 lantiq: add Buffalo WBMR-300HPD support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 years ago
Daniel Gimpelevich 492964e741 lantiq: Use correct macaddr generating logic for the DGN3500
Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
8 years ago
Mathias Kresin 1e395608cc lantiq: VGV7519 - add vlan support
Add the lantiq,switch property to enable vlans and setup them up.

Signed-off-by: Mathias Kresin <dev@kresin.me>
8 years ago
Mohammed Berdai f778cdd9c9 lantiq: fix ARV4518PWR01 network
This patch fixes the missing Lan interface config in the file
/etc/config/network for ARV4518PWR01/A which results in eth0 and br-lan
being down and therefore no way to access the router unless via UART-TTL.

Signed-off-by: Mohammed Berdai <mohammed.berdai@gmail.com>
8 years ago
John Crispin dc92917409 image / basefiles: make console password configurable
Signed-off-by: Daniel Dickinson <openwrt@daniel.thecshore.com>
Signed-off-by: John Crispin <john@phrozen.org>
8 years ago
John Crispin 0a4f2b5920 lantiq: Fix typo in LED diag script.
Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>
Acked-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 49242
8 years ago
John Crispin 0039bc665c lantiq-dsl: add missing blank in dsl output
blank inserted before ACTATP

Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>

SVN-Revision: 49137
8 years ago
John Crispin c701c3ce77 lantiq-dsl: bugfix latency values swapped for lucistat
swapped wrong latency output

Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>

SVN-Revision: 49136
8 years ago
John Crispin 7beb53b1a5 lantiq-dsl: bugfix db negative sign after comma
If db is negative minus sign was shown after comma

Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>

SVN-Revision: 49135
8 years ago
Felix Fietkau dc3a7131a9 lantiq: print profile name in dsl lucistat
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>

SVN-Revision: 48949
8 years ago
Felix Fietkau 4ac99abeb3 lantiq: do not set default firmware file
We are now shipping a DSL firmware, do not set it by default to some
file name.

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

SVN-Revision: 48941
8 years ago
John Crispin 48f82b53d0 use "-gt" instead of ">" with [ in /lib/functions/lantiq_dsl.sh
Avoids inadvertent file creation when executing
`/etc/init.d/dsl_control status`.

Signed-off-by: Jonathan A. Kollasch <jakllsch@kollasch.net>

SVN-Revision: 48700
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 6cec31da3c lantiq: fix VDSL device detection with Linux 4.4
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48319
8 years ago
John Crispin 6f95d749d6 lantiq: match default xdsl mode and default wan interface
Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48047
9 years ago
John Crispin a9896bf106 lantiq: convert vendorid into human readable form
Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48046
9 years ago
John Crispin 436fdee272 lantiq: add the current profile to the stats output
Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48045
9 years ago
John Crispin 3cbfc74cde lantiq: use devicename:colour:function led naming scheme
The leds of the following boards are not renamed due to lack of
manuals/informations:

- ARV7519PW
- ARV7510PW22
- ARV4510PW

The leds of the ARV4518PWR01* boards are unchanged, since the leds doesn't
match the leds from the manual or pictures (e.g. there shouldn't be a wps led).

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48042
9 years ago
John Crispin 4cf3fd49fc lantiq: add support for indicating the boot state using three leds
The BTHOMEHUBV5A has a RGB power led, where every colour is perfect to
indicate the current boot state. This patch adds support for such cases.

The existing led sequences should be the same as before.

Boards which are using a led different from power (like TDW89x0) are
changed to switch of the led after boot

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48041
9 years ago
John Crispin ebc71a4d16 lantiq: use dsl led defined in DTS
dsl_control (dsl_notify.sh) is the only process which is aware of the
state of the atm/ptm interface. Use the dsl led exclusive for the dsl
line state.

On boards which don't have a distinct internet and a dsl led, let the
netdev status of the atm interface trigger the shared led.

Triggering the shared led according to the status of the ppp interface
isn't suitable, since the led would be switched of if the ppp
connection goes down, but the line is still in sync.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48040
9 years ago
John Crispin a3c3b2a9a8 lantiq: use power leds defined in DTS
Use the power leds defined in the dts file instead of hardcoded led names.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48039
9 years ago
John Crispin d7a5d66ea1 lantiq: use default leds defined in DTS
Remove all now double defined leds from the led board file. Use pppoe
as default for all broadband connections, since it's the default in
OpenWrt now.

Rename the the wifi leds to make sure, the not applicable default
values get overwritten.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48038
9 years ago
John Crispin b6b128f63d lantiq: BTHOMEHUBV2B - remove missing usb led workaround
The workaround shouldn't be in the default configuration.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 48032
9 years ago
John Crispin ab77d4bcb9 lantiq: Fix LED handling.
- Use common OpenWrt blink patterns instead of custom ones
- Add preinit_regular hook
- Handle the TDW89X0 that does not have a configurable power LED

Signed-off-by: Vittorio Gambaletta <openwrt@vittgam.net>

SVN-Revision: 47914
9 years ago
Jo-Philipp Wich 67e1c87012 all: drop old uci-defaults.sh
Replace former uci-defaults.sh implementation with the uci-defaults-new.sh one
and update all users accordingly.

Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47867
9 years ago
John Crispin 787120e3a3 lantiq: fix led setup after switch to uci-defaults-new.sh
The switch to uci-defaults-new.sh revealed a bug in the former used
uci-defaults.sh, which failed to add leds with colons in the led name.

This bug isn't any longer present in uci-defaults-new.sh and therefore
all via DT defined leds will be added to /etc/config/system with their initial
on/off state, regardless whether they are already added by the board specific
led mappings.

This results for a BTHOMEHUBV5A into the following led configuration:

- soc:blue:power is added as led_power with the initial state "switched on"
- soc:blue:power is added as led_soc_blue_power with the initial state "switched off"

With the final result of a switched off power led after boot.

The only led that needs to be added is the BTHOMEHUBV5A specific dimmed led.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 47850
9 years ago
Jo-Philipp Wich 9157360ac5 lantiq: fix logic error in dsl board.d code
Starting with r47755 the pppoe wan interface section isn't any longer added to
the network config on firstboot, using the default configuration. Since the
commit message does not mention such a change, I assume that this wasn't
intentionally.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 47793
9 years ago
Felix Fietkau ec1b121769 lantiq: add VDSL2 vectoring status information
Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 47785
9 years ago
Felix Fietkau e82404ce6c lantiq: get rid of the dsl_fw mtd partition
Now that we have redistributable vdsl/adsl firmware blobs in /lib/firmware,
we can drop the dsl_fw partition and extend the firmware partition.

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

SVN-Revision: 47783
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
Jo-Philipp Wich 5ebc5de49d lantiq: switch from uci-defaults to board.d
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47755
9 years ago
John Crispin e1d585d99f lantiq: Synchronize access to the DSL command pipe
Whenever two processes were executing different commands at the same
time then one of the commands sometimes got the response of the other
command.

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

SVN-Revision: 47213
9 years ago
John Crispin 2fc473cf3f lantiq: bugfix wrong non pre-emptive crc errors output
This patch fixes a wrong non pre-emptive crc errors output of
dsl_control.sh status.

Signed-off-by: Luca Debernardi <luca.debernardi@gmail.com>

SVN-Revision: 47172
9 years ago
John Crispin 2210e821e1 lantiq: bugfix luci lantiq_dsl status
Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
Signed-off-by: Helge Mader <hmader@tdt.de>
Reported-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47152
9 years ago
John Crispin a0543c2bdc lantiq: several ARV7519RW22 fixes
Fixes ARV7519RW22 flash register (only 1 flash).
Power LED is green, not red.
Rename message LEDs to internet.
Add LEDs configuration (lan, wan, power).
Enable switch VLANs.
Fix secondary USB.

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Signed-off-by: José Vázquez Fernández <ppvazquezfer@gmail.com>

SVN-Revision: 47132
9 years ago
John Crispin 161179f40b lantiq: Add target TP-Link TD-W8980
The device is similar to the TD-W8970, beside a different Atheros 2.4 GHz
wireless chip and the additional, PCI connected, WAVE300 5 GHz wireless.

Signed-off-by: Mathias Kresin <openwrt@kresin.me>

SVN-Revision: 47130
9 years ago
John Crispin cea7c66ef8 lantiq: bugfix uninitialized variables
Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
Reported-by: Sylwester Petela <sscapi@gmail.com>

SVN-Revision: 47127
9 years ago
Rafał Miłecki 90e1b84f15 lantiq: update list on NAND devices in platform_pre_upgrade
Meanwhile BTHOMEHUBV5A board was added.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46941
9 years ago
John Crispin 57c8708d64 lantiq: add platform_pre_upgrade for sysupgrade
As explained in recent sysupgrade/nand.sh commits, current NAND
sysupgrade is a bit misleading because of nand_do_platform_check
behavior. It leaves a special mark in /tmp/sysupgrade-nand-path
triggering some diffent code path in nand_upgrade_stage1.

The plan is to have the check function only check the image and nothing
else. Then platform code (platform_pre_upgrade) should trigger NAND
specific upgrade path. This is what this patch implements.

Please note that because of current nand_upgrade_stage1 implementation
this patch doesn't change any behaior yet. It only prepares lantiq
target for changing nand_do_platform_check (it will be possible after
preparing all other targets as well).

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>

SVN-Revision: 46939
9 years ago
John Crispin 06a180d027 lantiq: get more status information from xDSL
Signed-off-by: Florian Eckert <Eckert.Florian@googlemail.com>
Signed-off-by: Helge Mader <hmader@tdt.de>
Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Tested-by: Andre Heider <a.heider@gmail.com>

SVN-Revision: 46917
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 6bdd209f15 lantiq: Add support for the BT Home Hub 5A
u-boot support depends on the next "upstream" version ([0]) from
Daniel Schwierzeck.
Since the installation process is quite complicated a "how to" was
added to the wiki: [1]

[0] https://github.com/danielschwierzeck/u-boot-lantiq/tree/openwrt/v2014.01-next
[1] http://wiki.openwrt.org/toh/bt/homehub_v5a

V2: Use the correct PCI interrupt (fixes 2.4GHz wifi)
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

SVN-Revision: 46223
9 years ago
John Crispin ca1db6b5ce lantiq: Add support for Arcadyan VGV7510KW22 (known as o2 Box 6431)
SVN-Revision: 45897
9 years ago
John Crispin 1c0c1ebc6b lantiq: td-w8970: fix failsafe mode
Fix failsafe mode for TD-W8970, register interface for preinit.

Signed-off-by: Cezary Jackiewicz <cezary.jackiewicz@gmail.com>

SVN-Revision: 44353
9 years ago