aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files
Commit message (Collapse)AuthorAgeFilesLines
* fritz-tools: add support for IPQ40xx platformDavid Bauer2019-03-131-2/+2
| | | | | | | | AVM devices based on Qualcomm IPQ40xx do not store sector health information in the OOB area. Make this check optional to support this platform. Signed-off-by: David Bauer <mail@david-bauer.net>
* lantiq: add support for AVM FRITZ!Box 7362 SLDanijel Tudek2019-03-103-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware: - SoC: Lantiq VRX288 - RAM: Winbond W971GG6JB 1 Gb (128 MiB) - Flash: - SPI: 8 Mb (1 MiB) for bootloader and tffs - NAND: 1 Gb (128 MiB) for OS - xDSL: Lantiq VRX208 - WLAN: Atheros AR9381 - DECT: Dialog Semiconductors SC14441 Everything except FXS/DECT works (no drivers for AVM's FXS implementation with SC14441). Installation via FTP: 1. Use scripts/flashing/eva_ramboot.py to send initramfs-kernel.bin to the device when powering on. Standard AVM procedures with finding the correct IP address and the right moment to open FTP apply here (approx. 4 seconds on 7362SL). IMPORTANT: set lzma compression in ramdisk options, bootloader stalls when receiving uncompressed images. 2. Transfer sysupgrade.bin image with scp to /tmp directory and run sysupgrade 3. First boot might take a bit longer if linux_fs_start was set to 1, in that case the device will reboot twice, first time it will fail to load second kernel (overwritten by ubifs), set linux_fs_start to 0 and reboot. OpenWrt uses the entire NAND flash. Kernel uses 4 MiB and rootfs uses the rest of 124 MiB, overwriting everything related to FRITZ!OS - both OS images, config and answering machine/media server data. To return to FRITZ!OS, use AVM's recovery image. Signed-off-by: Danijel Tudek <danijel.tudek@gmail.com>
* lantiq: add support for AVM FRITZ!Box 7412Andy Binder2019-03-103-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hardware: SoC: Lantiq VRX 220 CPU Cores: 2x MIPS 34Kc at 500 MHz RAM: 128 MiB 250 MHz Storage: 128 MiB NAND flash Ethernet: built-in Fast Ethernet switch, only port 2 is used Wireless: Atheros AR9287-BL1A b/g/n with 2 pcb antennas Modem: built-in A/VDSL2 modem DECT: Dialog SC14441 LEDs: 1 two-color, 4 one-color Buttons: 2 FXS: 1 port via TAE or RJ12 connector Everything except FXS/DECT works (no drivers for AVM's FXS implementation with SC14441). Installation: Use the eva_ramboot.py script to load an initramfs image on the device. Run it a few seconds after turning the device on. $ scripts/flashing eva_ramboot 192.168.178.1 bin/targets/lantiq/xrx200/openwrt-lantiq-xrx200-avm_fritz7412-initramfs-kernel.bin If it fails to find the device try the ip address 169.254.120.1. (Firmware updates or the recovery tool apparently change it.) IMPORTANT: set lzma compression in ramdisk options, bootloader stalls when receiving uncompressed images. The device will load it in ram and boot it. You can reach it under the openwrt default ip address 192.168.1.1. Check if the key linux_fs_start is not set to 1 in tffs: $ fritz_tffs_nand -d /dev/mtd1 -n linux_fs_start If it is set to 1, the bootloader will select the wrong set of partitions. Restart the box and install an FritzOS upgrade or do a recovery. Afterwards start again at step 1. Run sysupgrade to persistently install OpenWRT. Signed-off-by: Valentin Spreckels <Valentin.Spreckels@Informatik.Uni-Oldenburg.de> Signed-off-by: Andy Binder <AndyBinder@gmx.de>
* lantiq/led_dsl: Fix netdev led triggerMartin Schiller2019-01-271-1/+3
| | | | | | | | | | | In the upstream netdev led trigger the one mode file was replaced by 3 files named rx, tx and link. Fix the netdev trigger configuration code to use the modified API. This fix is based on 201058b35ce ("base-files: Fix netdev led trigger") Fixes: aa3b6a08c56 ("kernel: Replace ledtrig-netdev with upstream backport") Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* lantiq: add integer latency stat for lantiq-dslAndre Heider2018-12-161-0/+8
| | | | | | | The current stats always have a 'ms' suffix, and they're used by luci. Introduce dsl.latency_[down|up] values, exported in µs without suffix. Signed-off-by: Andre Heider <a.heider@gmail.com>
* apm821xx, ath79, ipq40xx, ipq806x, lantiq, ramips: base-files: Use generic ↵Petr Štetiar2018-12-061-46/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | diag.sh I wanted to add status LEDs support to my imx6 based board and have found out, that I could use diag.sh script found in ramips platform, which seems to be also shared in a few other platforms: 4801276bc2078c5bcf03003c831e3b0a target/linux/ramips/base-files/etc/diag.sh 4801276bc2078c5bcf03003c831e3b0a target/linux/ipq40xx/base-files/etc/diag.sh 4801276bc2078c5bcf03003c831e3b0a target/linux/ath79/base-files/etc/diag.sh And @chunkeey suggested to me, that I can also add lantiq, ipq806x and apm821xx to the list of platforms which could share this generic diag.sh. I've extended the base diag.sh in a way, that if it detects any of the DTS LED aliases, then it would use the generic DTS set_led_state code. The code in platform's diag.sh has moved to base-files package in this commit: base-files: diag.sh: Make it more generic towards DTS so it could be reused Signed-off-by: Petr Štetiar <ynezz@true.cz> Tested-by: Christian Lamparter <chunkeey@gmail.com> (apm821xx and ipq40xx)
* lantiq: enable FXS ports on VR200vKevin Schmidt2018-11-261-1/+1
| | | | | | | Disables SMP support. Add VR200 target to keep SMP on FXS-less device variant. Signed-off-by: Kevin Schmidt <kevin.patrick.schmidt@googlemail.com>
* lantiq/basefiles: use shutdown instead of stop when the system goes downMartin Schiller2018-11-251-1/+1
| | | | | | I can't see any reason why we shouldn't use shutdown for lantiq as well. Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* lantiq: add support for upgrade ledMathias Kresin2018-08-161-0/+9
| | | | | | | | | | Indicate a (sys)upgrade via leds as well. It brings the lantiq diag.sh script en par with the other implementations using devicetree aliases to define multiple leds for boot status indication. By default, use the boot finished led to indicate an upgrade for now. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: add support for FritzBox 7312Johann Neuhauser2018-07-182-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FritzBox 7312 is also known as 1&1 WLAN-MODEM. The device is almost the same as FB7330, but only one ETH-Port and no USB. Hardware SoC: Lantiq Xway ARX188 PSB 50812 EL RAM: 64MB DDR1 (Zentel A4S12D40FTP-G5) Ethernet: Atheros 8030 Wireless: Atheros AR9227 b/g/n 2x2 DSL: Lantiq ADSL2+ DECT: Dialog SC14441 Buttons: WiFi, DECT LEDs: Power/DSL, Fon, DECT, WLAN, Info LEDs Power: GPIO#44 (active low) Internet: GPIO#47 (active low) DECT: GPIO#38 (active low) WLAN: GPIO#37 (active low) Info: GPIO#35 (active low) The Fon LED is labeled as internet in avm gpl sources. Buttons WLAN: GPIO#1 (active low) DECT: GPIO#2 (active low) Phy GPIO#03: 25 MHz GPIO#34: Reset (active low) GPIO#39: Int GPIO#42: MII MDIO GPIO#43: MII MDC PCIe GPIO#21: reset (active low) Installation: 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 MEDIA FLSH ftp> put /path/to/openwrt-lantiq-xway-avm_fritz7312-squashfs-sysupgrade.bin mtd1 ftp> quote REBOOT Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
* lantiq: fix arcadyan vg3503j switch port indexingMathias Kresin2018-06-211-1/+1
| | | | | | | Both version of the vg3503j have the LAN1 labelled port connected to switch port 4 and the LAN2 labelled port connected to switch port 2. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: complete AVM FRITZ!Box 3370 supportMathias Kresin2018-05-174-5/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* treewide: move nand_do_upgrade call to platform_do_upgradeMathias Kresin2018-02-161-3/+4
| | | | | | | | | | Calling nand_do_upgrade() from platform_pre_upgrade() was deprecated with 30f61a34b4cf ("base-files: always use staged sysupgrade"). Update the platform upgrade code to use platform_do_upgrade() for NAND images as well. Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: remove obsolete sysupgrade watchdog killMathias Kresin2018-02-161-9/+0
| | | | | | | | | The watchdog kill command was meant for busybox watchdog. Busybox watchdog was replaced by the procd watchdog mid 2013 with commit df7ce9301a25 ("busybox: disable the watchdog utility by default"), which makes the kill command obsolete since quite some time. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: create ATM/PTM interfaces with dsl as netdev nameMathias Kresin2018-01-102-1/+13
| | | | | | | | | | | | | | | | | | | | | Renaming an atm etherbride using 'ip link' (via hotplug) is racy since the original netdev might disappear before br2684ctl has finished appling it's setting: local2.notice br2684ctl[1667]: Interface "nas0" created sucessfully local2.notice br2684ctl[1667]: Communicating over ATM 0.8.35, encapsulation: LLC kern.info kernel: dsl0: renamed from nas0 kern.err kernel: br2684:br2684_regvcc: tried to attach to non-existent device local2.err br2684ctl[1667]: Could not configure interface:No such device or address By passing the final used netdev name to br2684ctl_wrap another race condition workaround will be enabled again. Change the lantiq ptm driver to create a netdev with the name dsl as well. Albeit the rename via 'ip link' works fine so far, using a different approach for ptm then atm could be confusing. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: remove DSL_ChipSetHWVersion from status informationMartin Schiller2017-12-231-4/+2
| | | | | | | | | | | | The value DSL_ChipSetHWVersion is fetched from the dsl frontend via the dsl_control service, but not really provided by the dsl frontend firmware and for now always "UNKNOWN". The lantiq support told us that this information wouldn't be provided in the foreseeable future, so let's remove this useless "UNKNOWN" information. Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* lantiq: use the generic board detectMathias Kresin2017-12-161-19/+0
| | | | | | | Drop the target specific detection function in favour of the generic one provided by base-files. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: remove the former board name from device tree modelMathias Kresin2017-12-161-1/+1
| | | | | | | Remove the former used board name from the device model property and use the model name as it is. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: use the compatible string as board nameMathias Kresin2017-12-167-67/+71
| | | | | | | | | | | 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>
* base-files: unify get_dt_led helper functionChristian Lamparter2017-12-143-23/+10
| | | | | | | | | | | | | | 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>
* lantiq: add missing macaddr retrieval for Netgear DGN3500Daniel Gimpelevich2017-11-081-0/+2
| | | | | | | The MAC addresses were not being set for LAN and WAN. This will now use the same MAC mechanism as the rest of the target. Signed-off-by: Daniel Gimpelevich <daniel@gimpelevich.san-francisco.ca.us>
* lantiq: xway: rename nas0/ptm0 to dsl0Mathias Kresin2017-10-253-9/+2
| | | | | | | | | | | 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>
* lantiq: match default adsl annex and firmwareMathias Kresin2017-10-251-2/+31
| | | | | | | | | | Set a default Annex matching the the annex of the selected adsl firmware. Set Annex B for xrx200 board which are known to have an ADSL hybrid for Annex B. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: add missing default lan interfaceMathias Kresin2017-10-251-0/+2
| | | | | | | | | With removing the boards from the the default case to fix the xDSL WAN MAC-Address, the setting for the default LAN interface wasn't added. Fixes: 92a12c434ca3 ("lantiq: fix avm fritz box mac addresses") Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: ARV752DPW22: set correct wireless led triggerMathias Kresin2017-10-181-0/+3
| | | | | | | The ARV752DPW22 has a ralink based wireless and can not use the ath9k only phy0tpt trigger. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: xrx200: rename nas0/ptm0 to dsl0Martin Schiller2017-10-153-2/+59
| | | | | | | | | | | | | 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>
* lantiq: board.d: use auto xfer_mode as defaultMartin Schiller2017-08-061-1/+3
| | | | | | | If xfer_mode is set to auto the vdsl_cpe_control daemon assumes that ATM should be used for ADSL and PTM for VDSL. Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* lantiq: split up dsl_notify.sh into separate notification handlersMartin Schiller2017-08-063-68/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it possible to simply add additional notification handlers by putting new scripts in the /etc/hotplug.d/dsl directory. the following Environment Variables are used: (values marked with an * are only available when bonding support is compiled in) DSL_NOTIFICATION_TYPE with one of these values: - DSL_STATUS - DSL_INTERFACE_STATUS - DSL_DATARATE_STATUS_US - DSL_DATARATE_STATUS_DS DSL_LINE_NUMBER=<0|1> * If DSL_NOTIFICATION_TYPE == DSL_STATUS, these variables are set: - DSL_XTU_STATUS=<ADSL|VDSL> - DSL_TC_LAYER_STATUS=<ATM|EFM> - DSL_EFM_TC_CONFIG_US=<NORMAL|PRE_EMPTION> - DSL_EFM_TC_CONFIG_DS=<NORMAL> If DSL_NOTIFICATION_TYPE == DSL_INTERFACE_STATUS, these variables are set: - DSL_INTERFACE_STATUS=<DOWN|READY|HANDSHAKE|TRAINING|UP> - DSL_BONDING_STATUS=<INACTIVE|ACTIVE> * If DSL_NOTIFICATION_TYPE == DSL_DATARATE_STATUS_US, these variables are set: - DSL_DATARATE_US_BC0=<Upstream data rate in bit/s for Channel 0> - DSL_DATARATE_US_BC1=<Upstream data rate in bit/s for Channel 1> * If DSL_NOTIFICATION_TYPE == DSL_DATARATE_STATUS_DS, these variables are set: - DSL_DATARATE_DS_BC0=<Downstream data rate in bit/s for Channel 0> - DSL_DATARATE_DS_BC1=<Downstream data rate in bit/s for Channel 1> * Signed-off-by: Martin Schiller <ms@dev.tdt.de>
* treewide: populate boardname and model earlierMathias Kresin2017-07-151-0/+0
| | | | | | | | | | | | | For targets using the generic board detection and board specific settings in diag.sh, the board name is still unset at the time the set_state() provided by diag.sh is called by 10_indicate_preinit. Change the execution order to ensure the boardname is populated before required the first time. Do the target specific board detection as early as possible, directly followed by the generic one to allow a seamless switch to the generic function for populating /tmp/sysinfo/. Signed-off-by: Mathias Kresin <dev@kresin.me>
* lantiq: add Netgear DM200 supportThomas Nixon2017-07-072-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* lantiq: show xdsl line init status on shared dsl/internet ledMathias Kresin2017-06-172-8/+35
| | | | | | | | | | | | | 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>
* lantiq: restore netdev trigger of dsl led on line upMartin Schiller2017-06-171-1/+14
| | | | | | | | 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>
* lantiq: add Allnet ALL0333CJ supportTino Reichardt2017-06-032-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* lantiq: modified lantiq_dsl.sh status output of latencyHelge Mader2017-06-021-1/+1
| | | | Signed-off-by: Helge Mader <ma@dev.tdt.de>
* lantiq: fix lantiq_dsl.sh status and lucistat outputHelge Mader2017-06-021-12/+12
| | | | Signed-off-by: Helge Mader <ma@dev.tdt.de>
* treewide: fix device tree path in scriptsMathias Kresin2017-05-261-1/+1
| | | | | | | | The device tree is at /proc/device-tree/ without a base subdir. Fixes: da472e5b30f6 ("treewide: access device tree from userspace via /proc/") Signed-off-by: Mathias Kresin <dev@kresin.me>
* treewide: access device tree from userspace via /proc/Mathias Kresin2017-05-261-1/+1
| | | | | | | 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>
* lantiq: fix avm fritz box mac addressesMathias Kresin2017-05-052-6/+10
| | | | | | | | | 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>
* lantiq: improve DGN3500 LED definitionsKevin Darbyshire-Bryant2017-04-211-0/+54
| | | | | | | | | | | | | | | | 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>
* lantiq: remove lantiq_board_model, it is unusedFelix Fietkau2017-03-221-9/+0
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* lantiq: remove lantiq_board_name, use the generic function insteadFelix Fietkau2017-03-226-18/+5
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* lantiq: move lantiq_board_detect() to 03_preinit_board.shFelix Fietkau2017-03-222-10/+10
| | | | | | It is only used there Signed-off-by: Felix Fietkau <nbd@nbd.name>
* lantiq: Shortcut non-pppoa interfaces in dsl_notifyOswald Buddenhagen2017-03-171-6/+8
| | | | | | No need to query 'up' and 'auto' when they are not going to be used. Signed-off-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
* lantiq: use the P2812HNUF* wan port as wanMathias Kresin2017-03-111-1/+1
| | | | | | | 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>
* lantiq: xrx200: use vlan for ethernet wan portMathias Kresin2017-03-111-3/+3
| | | | | | | | | | | | | | | | | | | | | | | 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>
* lantiq: add support for the Alpha ASL56026Alex Maclean2017-03-081-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* lantiq: fix warning if ltq_atm modules are missingMathias Kresin2017-02-181-2/+1
| | | | | | | | | 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>
* lantiq: set the internet led interface according to wan interfaceMathias Kresin2017-02-181-0/+1
| | | | | | | | 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>
* lantiq: introduce lantiq_is_vdsl_systemMathias Kresin2017-02-182-1/+5
| | | | | | | 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>
* lantiq: fix ARV7519RW22 switch port indexingMathias Kresin2017-02-181-1/+1
| | | | | | Fixes FS#454. Signed-off-by: Mathias Kresin <dev@kresin.me>