Commit Graph

27 Commits (03c93679b4f38c7dc04ee45d0d2102cce49f5d35)

Author SHA1 Message Date
Manuel Kock 03c93679b4 lantiq: remove redundant WiFi LED on FRITZ!Box 7320
The led wireless trigger is already set correctly to phy0tpt through the
alias in the device tree.

Signed-off-by: Manuel Kock <github.web@manu.li>
[rephrased commit title]
Signed-off-by: David Bauer <mail@david-bauer.net>
(cherry picked from commit 509894cffb)
4 years ago
Mathias Kresin 0b62fe5ed8 lantiq: complete AVM FRITZ!Box 3370 support
Rename the image and use a compatible string which indicates that only
hardware revision 2 and higher is supported.

It allows to use the wireless LED, as HWRev 1 uses GPIO#39 for the
wireless LED and starting with HWRev 2 GPIO#35 is used for the wireless
LED and GPIO#39 for IFX_GPIO_MODULE_EXTPHY_MDIO.

The HWREV can be checked by connecting to the fritzbox right after power
on via ftp:

  ftp> quote GETENV HWSubRevision

Within the same HW revision 5 of the Fritz!Box 3370 different NAND flash
chips are used. Usually it isn't a big deal but depending on the used
NAND flash chip, the ECC calculation is done different (and incompatible
of course).

Boards with a Micron MT29F1G08ABADA NAND flash chip are using the NAND
chip to calculate the ECC (on-die). Boards with a Hynix HY27UF081G2M NAND
flash chip are doing the ECC calculation in software.

Supporting both with a single DTS isn't possible. It might be possible
to add a patch selecting the ECC mode dynamicaly based on the found NAND
flash chip. But such a patch has no chance to get accepted upstream and
most likely need to be touched with every kernel update.

Instead two images are created. One for Micron NAND flash chip and one
for Hynix NAND flash chip. So far no pattern is known to identify the
used flash chip without opening the box.

Add the power off GPIO. At least EVA version 2186 sets/keeps the GPIO as
input, which will cause a reboot 30sec after power on. For boards with
EVA version 2186 the installation is tricky as it has to be finished
within the 30sec time frame.

The EVA version can be checked by connecting to the fritzbox right after
power on via ftp:

  ftp> quote GETENV urlader-version

The ath9k eeprom/caldata is at a different and offset and stored in
reverse order (from the last byte to the beginning) on the flash.
Reverse the bits to bring the data into the format expected by the
ath9k driver.

Since the ath9k eeprom is stored in reverse order on flash, we can not
use the mac address from the on flash eeprom. Get the MAC address from
the tffs instead.

Within the same HW revision 5 of the Fritz!Box 3370 both version of the
vr9 SoC are used. During preparation of kernel 4.14 support, all
devicetree source files were changed to load the vr9 v1.1 and vr9 v1.2
gphy firmware, which fixed the embedded phys for boards using the
version 1.2 of the vr9 SoC.

While at it, add a trigger to make use of the LAN LED. Setup the
build-in switch and add a hint for LuCI two show the ports in order
matching the labels on the case

Add support for the second USB port and provide the volatage GPIOs. Use
GPIO#21 as PCIe reset pin. The lan led is connected to GPIO#38.

Name the rootfs partition ubi and remove the mtd/rootfs related kernel
bootargs to use the OpenWrt autoprobing based on the partition name.

Enable sysupgrade support to allow an upgrade from a running system.
Since sysupgrade wasn't supported till now, drop image build code which
was added to allow a sysupgrade from earlier OpenWrt versions.

Build images that allow an (initial) installation via EVA bootloader.

To install OpenWrt via Eva bootloader, within the first seconds after
power on a ftp connection need to be established to the FRITZ!Box at
192.168.178.1 and the the following ftp commands need to be run:

  ftp> quote USER adam2
  ftp> quote PASS adam2
  ftp> binary
  ftp> debug
  ftp> passive
  ftp> quote SETENV linux_fs_start 0
  ftp> quote MEDIA FLSH
  ftp> put /path/to/openwrt-lantiq-xrx200-FRITZ3370-eva-kernel.bin mtd1
  ftp> put /path/to/openwrt-lantiq-xrx200-FRITZ3370-eva-filesystem.bin mtd0

Signed-off-by: Andrea Merello <andrea.merello@gmail.com>
Signed-off-by: Mathias Kresin <dev@kresin.me>
6 years ago
Mathias Kresin 63d7f7fc92 lantiq: use the compatible string as board name
Use the first compatible string as board name in userspace. Add the new
board name as well as the former used board name to the image metadata
to keep compatibilty with already deployed installations.

Don't add the former used boardname for boards which exists only in
master or evaluation boards.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Christian Lamparter da6fdce365 base-files: unify get_dt_led helper function
Lantiq and IPQ806X (which includes IPQ40XX) both define the
same custom function {ipq806x|lantiq}_get_dt_led.

This patch moves the function into the base-file package at
lib/functions/leds.sh to make it more accessible for other
targets as well.

Cc: Mathias Kresin <dev@kresin.me>
Cc: John Crispin <john@phrozen.org>
Cc: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Christian Lamparter <chunkeey@gmail.com>
7 years ago
Mathias Kresin b02b7004f8 lantiq: xway: rename nas0/ptm0 to dsl0
This change makes it possible to configure the wan/dsl ppp interface
settings independantly from the used TC-Layer (ATM/PTM).

By using dsl0 as interface name as for the xrx200 we can get rid of a
few conditionals which were introduced because of the different default
TC-Layer in xway and xrx200.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Mathias Kresin a02a866519 lantiq: ARV752DPW22: set correct wireless led trigger
The ARV752DPW22 has a ralink based wireless and can not use the ath9k
only phy0tpt trigger.

Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Martin Schiller 2dc9c8206b lantiq: xrx200: rename nas0/ptm0 to dsl0
This change makes it possible to configure the wan/dsl ppp interface
settings independantly from the used TC-Layer (ATM/PTM).

Now you can move a device from an ADSL/ATM port to an VDSL/PTM port
without any configuration changes for example.

Signed-off-by: Martin Schiller <ms@dev.tdt.de>
[use the dsl0 interface name for the default netdev trigger in 01_led,
add ip dependency]
Signed-off-by: Mathias Kresin <dev@kresin.me>
7 years ago
Thomas Nixon 50e3659703 lantiq: add Netgear DM200 support
Netgear DM200 is an inexpensive VDSL modem:

    CPU: VRX220 MIPS 34Kc 5.6 @ 500Mhz
    RAM: 64MiB
    Flash: 8MiB
    Ethernet: 1x100M
    DSL: VDSL2+, ADSL2+
    reset button, 3x bi-color LEDs

Serial port is 115200 baud, on the 4 pin header; pins from the bottom to
top are GND, RX, TX.

To upgrade from the vendor firmware, upload factory.img

The DM200 bootloader supports flashing over TFTP; hold the reset button
while powering on the device, and wait for the power light to start
flashing green before releasing. The device is now listening on
192.168.0.1/24, and can be sent a factory.img or a netgear image with a
TFTP put.

Once the image is loaded, it will be written to the flash, and the
device will reboot; this will take a few minutes.

Thanks to Edward O'Callaghan and Baptiste Jonglez, who implemented their
own ports for this device and provided valuable feedback.

Signed-off-by: Thomas Nixon <tom@tomn.co.uk>
7 years ago
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
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
Felix Fietkau 7e798dab56 lantiq: remove lantiq_board_name, use the generic function instead
Signed-off-by: Felix Fietkau <nbd@nbd.name>
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 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 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
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 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
Felix Fietkau 2d48f93ff4 lantiq: add Buffalo WBMR-300HPD support
Signed-off-by: Felix Fietkau <nbd@nbd.name>
8 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
8 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
8 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
8 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
8 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
8 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 5ebc5de49d lantiq: switch from uci-defaults to board.d
Signed-off-by: Jo-Philipp Wich <jow@openwrt.org>

SVN-Revision: 47755
9 years ago