aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/base-files/etc/hotplug.d
Commit message (Collapse)AuthorAgeFilesLines
* lantiq: split up dsl_notify.sh into separate notification handlersMartin Schiller2017-08-062-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* lantiq: fix avm fritz box mac addressesMathias Kresin2017-05-051-6/+1
| | | | | | | | | 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: remove lantiq_board_name, use the generic function insteadFelix Fietkau2017-03-222-4/+2
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* lantiq: fix patching the wifi mac address on BTHOMEHUBV3AMartin Blumenstingl2017-02-131-1/+1
| | | | | | | | | | | | | | | | | | | 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: a20616863d32d9 ("lantiq: use ath9k device tree bindings binding/owl-loader") Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
* lantiq: simplify ath9k eeprom extraction scriptMathias Kresin2016-12-081-11/+16
| | | | | | | | | | | 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>
* lantiq: fix ath9k EEPROM data swapping for some devicesMartin Blumenstingl2016-12-081-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: a20616863d3 ("lantiq: use ath9k device tree bindings binding/owl-loader") Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
* lantiq: use BT HomeHub 5 Type A OEM partition layoutMathias Kresin2016-11-292-19/+20
| | | | | | | | | | | | | | | | | | | | 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>
* lantiq: use ath9k device tree bindings binding/owl-loaderMartin Blumenstingl2016-11-291-0/+140
| | | | | | | | | | | | | | | | | 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>
* lantiq: use the device tree bindings from rt2x00 driverMathias Kresin2016-11-091-60/+0
| | | | | | | | | | | | | 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>
* lantiq: do not "local" variables outside of a functionMartin Blumenstingl2016-09-242-5/+5
| | | | | | | | | Older busybox versions allowed using the local keyword outside of functions, whereas 1.25.0 (which was introduced in 06fa1c46fc32) 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>
* lantiq: add support for ARV7506PW11 (Alice/O2 IAD 4421)Oswald Buddenhagen2016-06-221-1/+1
| | | | | | | | | | | | | | | | | | 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>
* lantiq: Add support for the BT Home Hub 5AJohn Crispin2015-07-071-0/+51
| | | | | | | | | | | | | | | 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
* lantiq: Add support for Arcadyan VGV7510KW22 (known as o2 Box 6431)John Crispin2015-06-051-0/+11
| | | | SVN-Revision: 45897
* lantiq - vgv7519: load rt5362 eeprom from bootloader param patitionJohn Crispin2014-10-061-1/+1
| | | | SVN-Revision: 42824
* lantiq: add support for /tmp/sysinfoJohn Crispin2014-07-021-1/+1
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 41472
* lantiq: do an endianness swap to the RT2860 eeprom for ARV752DPW(22)John Crispin2014-03-301-4/+13
| | | | | | | | | | | | | | | | | | | | ARV7510PW22, ARV752DPW and ARV752DPW22 have the RT2860 eeprom stored in flash as big-endian, but the driver needs it in little-endian format. We have to swab it before handing it over. This requires my earlier patch for busybox. Funnily enough, ARV752DPW works also with the incorrect eeprom, but undoubtedly unoptimally. I have a hunch that also the final remaining Lantiq board would require this swabbing, but I'm not sure, so I just swab it in the three boards that I know about. v2: * Swab also on ARV7510PW22 based on feedback from Alvaro Rojas * Fix the offset with bs=2 Signed-off-by: Matti Laakso <malaakso at elisanet.fi> SVN-Revision: 40328
* lantiq: add support for Arcadyan ARV7519PWJohn Crispin2014-03-301-1/+1
| | | | | | | | | | | This patch adds almost full support for this board. - WiFi is still not working - USB will not power up. According to some reports, it may be a passive port Signed-off-by: Antonios Vamporakis <ant@area128.com> SVN-Revision: 40319
* lantiq: Add support for Astoria ARV7510PW22John Crispin2014-01-151-1/+1
| | | | | | | | This board is pretty similar to ARV752DPW22. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> SVN-Revision: 39303
* lantiq: remove old hotplug handlerJohn Crispin2013-11-111-53/+0
| | | | | | Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 38727
* lantiq: several a803 related fixesJohn Crispin2013-08-051-1/+1
| | | | | | | | based on work from Matti Laasko that he posted in the wiki Signed-off-by: John Crispin <blogic@openwrt.or SVN-Revision: 37704
* lantiq: update ralink wlan firmware hotplug script for new eeprom sizeFelix Fietkau2013-07-151-1/+1
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 37334
* improve button handlingJohn Crispin2012-12-211-11/+39
| | | | SVN-Revision: 34823
* Do not use deprecated path to functions.sh (/etc/functions.sh -> ↵Mirko Vogt2012-12-191-1/+1
| | | | | | /lib/functions.sh) SVN-Revision: 34793
* minor basefiles fixesJohn Crispin2012-12-191-1/+1
| | | | SVN-Revision: 34790
* cleanup basefilesJohn Crispin2012-12-152-3/+5
| | | | SVN-Revision: 34698
* Adding wifi eeprom extract for ARV752DPW - Easybox 802John Crispin2012-04-231-1/+1
| | | | | | Signed-off-by: Christian Rustmeier <rustmeier a.t. gmail dotty com> SVN-Revision: 31443
* lantiq: add /lib/lantiq.sh and make hotplug handlers use itJohn Crispin2011-11-121-1/+3
| | | | SVN-Revision: 29003
* lantiq: adds hotplug handler for loading rt2x00 firmwareJohn Crispin2011-11-121-0/+39
| | | | SVN-Revision: 29000
* lantiq: adds hotplug handler for handling buttons and makes w303v work with itJohn Crispin2011-11-121-0/+22
SVN-Revision: 28999