Skip to content
Snippets Groups Projects
  1. Aug 16, 2018
    • Mathias Kresin's avatar
      lantiq: add support for upgrade led · c9e9a787
      Mathias Kresin authored
      
      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: default avatarMathias Kresin <dev@kresin.me>
      c9e9a787
  2. Aug 04, 2018
  3. Jul 18, 2018
    • Johann Neuhauser's avatar
      lantiq: add support for FritzBox 7312 · 02d53e6a
      Johann Neuhauser authored
      
      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: default avatarJohann Neuhauser <johann@it-neuhauser.de>
      02d53e6a
    • Johann Neuhauser's avatar
      lantiq: etop: pass devicetree node to phy driver · f2f78021
      Johann Neuhauser authored
      
      Use of_mdiobus_register() to pass the ethernet phy node to the phy
      drivers. This is needed for the at8030 phy driver which needs to know
      the GPIO which is connected to the ar8030 reset pin.
      
      This driver expects a child in gsw/etop node named "mdio-bus", which has
      the ethernet phys defined:
      
      &gsw {
      	phy-mode = "rmii";
      	phy-handle = <&phy0>;
      	mtd-mac-address = <&ath9k_cal 0xa91>;
      	mtd-mac-address-increment = <(-2)>;
      
      	mdio-bus {
      		#address-cells = <1>;
      		#size-cells = <0>;
      		reg = <0>;
      
      		phy0: ethernet-phy@0 {
      			reg = <0>;
      			reset-gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
      		};
      	};
      };
      
      Fallback to mdiobus_register() if no mdio-bus child node exists. This
      way we don't need to touch all xway dts files, for which we don't know
      the actual address on the mdio bus.
      
      Signed-off-by: default avatarJohann Neuhauser <johann@it-neuhauser.de>
      f2f78021
  4. Jul 12, 2018
    • Mathias Kresin's avatar
      kernel: only optimized for size if small_flash · cf7154db
      Mathias Kresin authored
      
      Add a new config option to allow to select the default compile
      optimization level for the kernel.
      
      Select the optimization for size by default if the small_flash feature is
      set. Otherwise "Optimize for performance" is set.
      
      Add the small_flash feature flag to all (sub)targets which had the
      optimization for size in their default kernel config.
      
      Remove CC_OPTIMIZE_FOR_* symbols from all kernel configs to apply the new
      setting.
      
      Exceptions to the above are:
      
        - lantiq, where the optimization for size is only required for the
          xway_legacy subtarget but was set for the whole target
        - mediatek, ramips/mt7620 & ramips/mt76x8 where boards should have
          plenty of space and an optimization for size doesn't make much sense
        - rb532, which has 128MByte flash
      
      Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
      cf7154db
  5. Jul 03, 2018
    • Michael Kuron's avatar
      lantiq: enlarge AVM Fritz!Box 3370 flash · d0b89e48
      Michael Kuron authored
      
      Increase the available flash memory size in AVM Fritz!Box 3370 by
      incorporating the unused extra partitions located after the ubi partition.
      
      Note that users upgrading from a previous OpenWRT version need to
      re-install from the boot loader to pick up the new partition layout.
      
      Available flash space for rootfs+overlay increases from 48MB to 124MB.
      
      Reverting to the OEM firmware is still possible (via the recovery utility
      provided by AVM) as the OEM firmware appears to reformat the config and
      nand-filesystem partitions upon first boot if necessary. The
      reserved-kernel and reserved-filesystem partitions are overwritten by the
      OEM firmware when installing an update, so their contents do not matter.
      
      Boot loader and device-specific information (MAC addresses, calibration
      data, etc.) are not located in NAND flash and remain unharmed by this
      changed.
      
      Tested with OEM firmware 06.54 on device with HWRevision 5 and Micron
      flash chip.
      
      Signed-off-by: default avatarMichael Kuron <m.kuron@gmx.de>
      d0b89e48
    • Mathias Kresin's avatar
      lantiq: backport stp-xway get callback implementation · f72605f7
      Mathias Kresin authored
      
      To keep the status of a LED connected to the stp during boot, the get
      callback is required. If the callback is missing and the LED default
      state is set to keep in the devicetree, the gpio led driver errors out
      during load.
      
      Fixes: FS#1620
      
      Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
      f72605f7
  6. Jun 28, 2018
  7. Jun 21, 2018
  8. Jun 18, 2018
    • Kevin Darbyshire-Bryant's avatar
      lantiq: atm: fix ifx_atm driver integration · 0276e1f7
      Kevin Darbyshire-Bryant authored
      
      When upstream kernel introduced commit c55fa3cccbc2c672e7f118be8f7484e53a8e9e77
      we incorrectly updated our hack integration patch that updates atm/common.c
      
      +++ b/net/atm/common.c
      @@ -62,10 +62,16 @@ static void vcc_remove_socket(struct soc
              write_unlock_irq(&vcc_sklist_lock);
       }
      
      +struct sk_buff* (*ifx_atm_alloc_tx)(struct atm_vcc *, unsigned int) = NULL;
      +EXPORT_SYMBOL(ifx_atm_alloc_tx);
      +
       static bool vcc_tx_ready(struct atm_vcc *vcc, unsigned int size)
       {
              struct sock *sk = sk_atm(vcc);
      
      +       if (ifx_atm_alloc_tx != NULL)
      +               return ifx_atm_alloc_tx(vcc, size)
      
      The correct solution is to drop our ifx_atm_alloc_tx replacement hack
      entirely and let the kernel do its thing.
      
      In reality neither pppoatm or BR2684 interfaces actually hit this code,
      so the incorrect integration would only be noticed with direct socket
      calls which we are unaware of a use-case.
      
      This is not the solution to pppoatm vc-mux failing to work which started
      the whole investigation, but let's fix it up anyway.
      
      With sincerest thanks to David Woodhouse <dwmw2@infradead.org> &
      Mathias Kresin <dev@kresin.me>.
      
      Tested-on: lantiq, BT HomeHub 5a
      
      Signed-off-by: default avatarKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
      0276e1f7
  9. Jun 15, 2018
  10. Jun 05, 2018
    • Stijn Tintel's avatar
      kernel: bump 4.14 to 4.14.48 · e52f3e9b
      Stijn Tintel authored
      
      Remove upstreamed patches:
      generic/pending/101-clocksource-mips-gic-timer-fix-clocksource-counter-w.patch
      generic/pending/103-MIPS-c-r4k-fix-data-corruption-related-to-cache-coherence.patch
      generic/pending/182-net-qmi_wwan-add-BroadMobi-BM806U-2020-2033.patch
      lantiq/0025-MIPS-lantiq-gphy-Remove-reboot-remove-reset-asserts.patch
      Update patches that no longer apply:
      generic/pending/811-pci_disable_usb_common_quirks.patch
      ath79/0009-MIPS-ath79-add-lots-of-missing-registers.patch
      
      Fixes CVE-2018-6412.
      
      Compile-tested: octeon, x86/64.
      Runtime-tested: octeon, x86/64.
      
      Signed-off-by: default avatarStijn Tintel <stijn@linux-ipv6.be>
      e52f3e9b
  11. May 22, 2018
  12. May 17, 2018
    • Mathias Kresin's avatar
      lantiq: kernel 4.14: use vbus-supply devicetree property · d8b47521
      Mathias Kresin authored
      
      It isn't a phy supply, as the phy is still up if the GPIO is low. It
      rather is the supply for the vbus. A correct setting/definition will be
      relevant as soon as USB peripheral mode is supported.
      
      Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
      d8b47521
    • Mathias Kresin's avatar
      lantiq: complete AVM FRITZ!Box 3370 support · 0b62fe5e
      Mathias Kresin authored
      
      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: default avatarAndrea Merello <andrea.merello@gmail.com>
      Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
      0b62fe5e
    • Mathias Kresin's avatar
      lantiq: switch to kernel 4.14 · d7b74833
      Mathias Kresin authored
      
      Use kernel 4.14 by default.
      
      Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
      d7b74833
  13. May 07, 2018
    • Mathias Kresin's avatar
      lantiq: kernel 4.14: Remove reboot/remove reset asserts · ef19747b
      Mathias Kresin authored
      
      Backport patch accepted upstream which removes the reset asserts of the
      xrx200 gphy driver on reboot/remove.
      
      While doing a global software reset, these bits are not cleared and let
      some bootloader fail to initialise the GPHYs. The bootloader don't expect
      these bits to be set, as they aren't during power on.
      
      The asserts were a workaround for a wrong syscon-reboot mask. With a mask
      set which includes the GPHY resets of the first reset register, the
      resets of the second reset register arn't required any more.
      
      Signed-off-by: default avatarMathias Kresin <dev@kresin.me>
      ef19747b
  14. Apr 26, 2018
  15. Apr 20, 2018
  16. Apr 04, 2018
  17. Apr 03, 2018
  18. Mar 23, 2018
  19. Mar 18, 2018
  20. Mar 14, 2018
  21. Mar 06, 2018
  22. Mar 03, 2018
  23. Feb 26, 2018
  24. Feb 24, 2018
  25. Feb 20, 2018
Loading