Skip to content
Snippets Groups Projects
  1. Dec 02, 2021
  2. Dec 01, 2021
  3. Nov 30, 2021
  4. Nov 29, 2021
  5. Nov 28, 2021
    • Sander Vanheule's avatar
      realtek: netgear-gigabit: Add gpio-restart node · 22f85d63
      Sander Vanheule authored
      
      The Netgear GS110TPP v1 switch cannot reliably perform cold reboots
      using the system's internal reset controller.
      
      On this device, and the other supported Netgear switches, internal GPIO
      line 13 is connected to the system's hard reset logic. Expose this GPIO
      on all systems to ensure restarts work properly.
      
      Cc: Raylynn Knight <rayknight@me.com>
      Cc: Michael Mohr <akihana@gmail.com>
      Cc: Stijn Segers <foss@volatilesystems.org>
      Cc: Stijn Tintel <stijn@linux-ipv6.be>
      Signed-off-by: default avatarSander Vanheule <sander@svanheule.net>
      Tested-by: default avatarBjørn Mork <bjorn@mork.no>
      22f85d63
    • Sander Vanheule's avatar
      realtek: Enable gpio-restart driver · 3f4d6da4
      Sander Vanheule authored
      
      Add the gpio-restart driver to the realtek build. This way devices,
      which cannot reliably perform resets using the SoC's internal reset
      logic, can use a GPIO line to drive the SoC's hard reset input.
      
      Signed-off-by: default avatarSander Vanheule <sander@svanheule.net>
      3f4d6da4
    • Sander Vanheule's avatar
      realtek: add missing GPIO irq properties · fa711397
      Sander Vanheule authored
      
      The internal GPIO controller on RTL838x is also an IRQ controller, which
      requires the 'interrupt-controller' and '#interrupts-cells' properties
      to be present in the device tree.
      
      Reported-by: default avatarINAGAKI Hiroshi <musashino.open@gmail.com>
      Signed-off-by: default avatarSander Vanheule <sander@svanheule.net>
      fa711397
    • Bjørn Mork's avatar
      realtek: use full range of assigned MAC addresses · d1464afe
      Bjørn Mork authored
      
      Some devices are assigned globally unique MAC addresses for all
      ports. These are stored by U-Boot in the second U-Boot enviroment
      ("sysinfo") as a range of start and end address.
      
      Use the full range if provided.
      
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      d1464afe
    • Bjørn Mork's avatar
      realtek: revert to "standard" management configuration · 9e7149f7
      Bjørn Mork authored
      
      The default management interface should be easy to find for users
      doing "blind" installations without console access.  There are
      already multiple examples in the forum of advanced early adopters
      having problems locating the management interface after installing
      OpenWrt.
      
      Requiring tagged VLAN configration to access the initial management
      interface creates unnecessary hassle at best. Errors on the other
      end are close to impossible to debug without console access, even
      for advanced users.  Less advanced users might have problems with
      the concept of VLAN tagging.
      
      Limiting management access to a single arbitrary port among up to
      52 possible LAN ports makes this even more difficult, for no
      reason at all. Users might have reasons to use a different port
      for management.  And they might even have difficulties using the
      OpenWrt selected one. The port might be the wrong type for their
      management link (e.g copper instead of fibre).  Or they might
      depend on PoE power from a device which they can't reconfigure.
      
      User expectations will be based on
      - OpenWrt defaults for other devices
      - stock firmware default for the device in question
      - common default behaviour of similar devices
      
      All 3 cases point to a static IP address accessible on the native
      VLAN of any LAN port.  A switch does not have any WAN port.  All
      ports are LAN ports.
      
      This changes the default network configuration in line with these
      expectations.
      
      Cc: John Crispin <john@phrozen.org>
      Signed-off-by: default avatarBjørn Mork <bjorn@mork.no>
      Acked-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      9e7149f7
    • Hauke Mehrtens's avatar
      uboot-omap: Remove omap3_overo configuration · 889043a1
      Hauke Mehrtens authored
      
      The configs/omap3_overo_defconfig file was removed from upstream U-Boot
      in commit ed3294d6d1f9 ("arm: Remove overo board"). Remove it in OpenWrt
      too. If someone needs this please add it also to upstream U-Boot.
      
      This fixes the compile of the omap target.
      
      Fixes: ffb807ec ("omap: update u-boot to 2021.07")
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      889043a1
    • Daniel Golle's avatar
      image: fix CONFIG_EXTERNAL_CPIO handling · 0a4f5d06
      Daniel Golle authored
      
      CONFIG_EXTERNAL_CPIO is a string variable, hence testing for 'y'
      doesn't make much sense here.
      
      Fixes: 330bd380 ("image: allow building FIT and uImage with ramdisk")
      Reported-by: default avatarHuangbin Zhan <zhanhb88@gmail.com>
      Signed-off-by: default avatarDaniel Golle <daniel@makrotopia.org>
      0a4f5d06
    • Hauke Mehrtens's avatar
      kernel: Add extra kernel configuration options for omap · 2f6c847e
      Hauke Mehrtens authored
      
      This fixes the build on omap.
      
      Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
      2f6c847e
    • Felix Matouschek's avatar
      ipq40xx: Add support for Teltonika RUTX10 · 1cc3b95e
      Felix Matouschek authored
      This patch adds support for the Teltonika RUTX10.
      This device is an industrial DIN-rail router with 4 ethernet ports,
      2.4G/5G dualband WiFi, Bluetooth, a USB 2.0 port and two GPIOs.
      
      The RUTX series devices are very similiar so common parts of the DTS
      are kept in a DTSI file. They are based on the QCA AP-DK01.1-C1 dev
      board.
      
      See https://teltonika-networks.com/product/rutx10 for more info.
      
      Hardware:
        SoC:                 Qualcomm IPQ4018
        RAM:                 256MB DDR3
        SPI Flash 1:         XTX XT25F128B (16MB, NOR)
        SPI Flash 2:         XTX XT26G02AWS (256MB, NAND)
        Ethernet:            Built-in IPQ4018 (SoC, QCA8075), 4x 10/100/1000 ports
        WiFi 1:              Qualcomm QCA4019 IEEE 802.11b/g/n
        Wifi 2:              Qualcomm QCA4019 IEEE 802.11a/n/ac
        USB Hub:             Genesys Logic GL852GT
        Bluetooth:           Qualcomm CSR8510 (A10U)
        LED/GPIO controller: STM32F030 with custom firmware
        Buttons:             Reset button
        Leds:                Power (green, cannot be controlled)
                             WiFi 2.4G activity (green)
                             WiFi 5G activity (green)
      
      MACs Details verified with the stock firmware:
         eth0:             Partition 0:CONFIG Offset: 0x0
         eth1:             = eth0 + 1
         radio0 (2.4 GHz): = eth0 + 2
         radio1 (5.0 GHz): = eth0 + 3
      Label MAC address is from eth0.
      
      The LED/GPIO controller needs a separate kernel driver to function.
      The driver was extracted from the Teltonika GPL sources and can be
      found at following feed: https://github.com/0xFelix/teltonika-rutx-openwrt
      
      USB detection of the bluetooth interface is sometimes a bit flaky. When
      not detected power cycle the device. When the bluetooth interface was
      detected properly it can be used with bluez / bluetoothctl.
      
      Flash instructions via stock web interface (sysupgrade based):
        1. Set PC to fixed ip address 192.168.1.100
        2. Push reset button and power on the device
        3. Open u-boot HTTP recovery at http://192.168.1.1
        4. Upload latest stock firmware and wait until the device is rebooted
        5. Open stock web interface at http://192.168.1.1
        6. Set some password so the web interface is happy
        7. Go to firmware upgrade settings
        8. Choose
           openwrt-ipq40xx-generic-teltonika_rutx10-squashfs-nand-factory.ubi
        9. Set 'Keep settings' to off
        10. Click update, when warned that it is not a signed image proceed
      
      Return to stock firmware:
        1. Set PC to fixed ip address 192.168.1.100
        2. Push reset button and power on the device
        3. Open u-boot HTTP recovery at http://192.168.1.1
      
      
        4. Upload latest stock firmware and wait until the device is rebooted
      
      Note: The DTS expects OpenWrt to be running from the second rootfs
      partition. u-boot on these devices hot-patches the DTS so running from the
      first rootfs partition should also be possible. If you want to be save follow
      the instructions above. u-boot HTTP recovery restores the device so that when
      flashing OpenWrt from stock firmware it is flashed to the second rootfs
      partition and the DTS matches.
      
      Signed-off-by: default avatarFelix Matouschek <felix@matouschek.org>
      1cc3b95e
    • Matthew Hagan's avatar
      ipq806x: add support for Cisco Meraki MR42/MR52 · 67f52012
      Matthew Hagan authored
      The MR42 and MR52 are two similar IPQ806x based devices from the Cisco
      Meraki "Cryptid" series.
      
        MR42 main features:
        -  IPQ8068 1.4GHz
        -  512MB RAM
        -  128MB NAND
        -  2x QCA9992 (2.4 & 5GHz)
        -  1x QCA9889 (2.4 & 5GHz)
        -  1x AR8033 PHY
        -  PoE/AC power
      
        MR52 main features:
        -  IPQ8068 1.4GHz
        -  512MB RAM
        -  128MB NAND
        -  2x QCA9994 (2.4 & 5GHz)
        -  1x QCA9889 (2.4 & 5GHz)
        -  2x AR8033 PHYs
        -  PoE/AC power
      
      (MR42 Only) Installation via diagnostic mode:
      
      If you can successfully complete step 1 then you can continue to install
      via this method without having to open the device. Otherwise please use
      the standard UART method. Please note that when booting via TFTP, some
      Ethernet devices, in particular those on laptops, will not connect in
      time, resulting in TFTP boot not succeeding. In this instance it is
      advised to connect via a switch.
      
        1. Hold down reset at power on and keep holding, after around 10 seconds
           if the orange LED changes behaviour to begin flashing, proceed to
           release reset, then press reset two times. Ensure that the LED has
           turned blue. Note that flashing will occur on some devices, but it
           will not be possible to change the LED colour using the reset button.
           In this case it will still be possible to continue with this install
           method.
      
        2. Set your IP to 192.168.1.250. Set up a TFTP server serving
           mr42_u-boot.mbn and
           openwrt-ipq806x-generic-meraki_mr42-initramfs-fit-uImage.itb, obtained
           from [1].
      
        3. Use telnet and connect to 192.168.1.1. Run the following commands to
           install u-boot. Note that all these commands are critical, an error
           will likely render the device unusable.
      
           Option 3.1:
             If you are sure you have set up the TFTP server correctly you can
             run this script on the device. This will download and flash the
             u-boot image immediately:
      
             `/etc/update_uboot.sh 192.168.1.250 mr42_u-boot.mbn`
      
             Once completed successfully, power off the device.
      
           Option 3.2:
             If you are unsure the TFTP server is correctly set up you can
             obtain the image and flash manually:
      
             3.2.1. `cd /tmp`
             3.2.2. `tftp-hpa 192.168.1.250 -m binary -c get mr42_u-boot.mbn`
             3.2.3. Confirm file has downloaded correctly by comparing the
                    md5sum:
      
                  `md5sum mr42_u-boot.mbn`
      
             3.2.4. The following are the required commands to write the image.
      
                  `echo 1 > /sys/devices/platform/msm_nand/boot_layout
                   mtd erase /dev/mtd1
                   nandwrite -pam /dev/mtd1 mr42_u-boot.mbn
                   echo 0 > /sys/devices/platform/msm_nand/boot_layout`
      
                Important: You must observe the output of the `nandwrite`
                command. Look for the following to verify writing is occurring:
      
                  `Writing data to block 0 at offset 0x0
                   Writing data to block 1 at offset 0x20000
                   Writing data to block 2 at offset 0x40000`
      
                If you do not see this then do not power off the device. Check
                your previous commands and that mr42_u-boot.mbn was downloaded
                correctly. Once you are sure the image has been written you
                can proceed to power off the device.
      
        4. Hold the reset button and power on the device. This will immediately
           begin downloading the appropriate initramfs image and boot into it.
      
           Note: If the device does not download the initramfs, this is likely
           due to the interface not being brought up in time. Changing Ethernet
           source to a router or switch will likely resolve this. You can also
           try manually setting the link speed to 10Mb/s Half-Duplex.
      
        5. Once a solid white LED is displayed on the device, continue to the
           UART installation method, step 6.
      
      Standard installation via UART - MR42 & MR52
      
        1. Disassemble the device and connect a UART header. The header pinout
           is as follows:
      
             1 - 3.3v
             2 - TXD
             3 - RXD
             4 - GND
      
           Important: You should only connect TXD, RXD and GND. Connecting
           3.3v may damage the device.
      
        2. Set your IP to 192.168.1.250. Set up a TFTP server serving
           openwrt-ipq806x-generic-meraki_(mr42|mr52)-initramfs-fit-uImage.itb.
           Separately obtain the respective sysupgrade image.
      
        3. Run the following commands, preferably from a Linux host. The
           mentioned files, including ubootwrite.py and u-boot images, can be
           obtained from [1].
      
             `python ubootwrite.py --write=(mr42|mr52)_u-boot.bin`
      
           The default for "--serial" option is /dev/ttyUSB0.
      
        4. Power on the device. The ubootwrite script will upload the image to
           the device and launch it. The second stage u-boot will in turn load
           the initramfs image by TFTP, provided the TFTP server is running
           correctly. This process will take about 13 minutes. Once a solid
           white LED is displayed, the image has successfully finished
           loading. Note: If the image does not load via TFTP, try again with
           the Ethernet link to 10Mb/s Half-Duplex.
      
        5. (MR42 only) Do not connect over the network. Instead connect over
           the UART using minicom or similar tool. To replace u-boot with
           the network enabled version, please run the following commands.
           Note that in the provided initramfs images, the u-boot.mbn file
           is located in /root:
      
           If you have not used the provided initramfs, you must ensure you
           are using an image with "boot_layout" ECC configuration enabled in
           the Kernel. This will be version 5.10 or higher. If you do not do
           this correctly the device will be bricked.
      
             `insmod mtd-rw i_want_a_brick=1
              mtd erase /dev/mtd8
              nandwrite -pam /dev/mtd8 /root/mr42_u-boot.mbn`
      
           After running nandwrite, ensure you observe the following output:
      
             `Writing data to block 0 at offset 0x0
              Writing data to block 1 at offset 0x20000
              Writing data to block 2 at offset 0x40000`
      
        6. (Optional) If you have no further use for the Meraki OS, you can
           remove all other UBI volumes on ubi0 (mtd11), including diagnostic1,
           part.old, storage and part.safe. You must not remove the ubi1 ART
           partition (mtd12).
      
             `for i in diagnostic1 part.old storage part.safe ; do
              ubirmvol /dev/ubi0 -N $i
              done`
      
        7. Proceed to flash the sysupgrade image via luci, or else download or
           scp the image to /tmp and use the sysupgrade command.
      
      [1] The mentioned images and ubootwrite.py script can be found in this repo:
          https://github.com/clayface/openwrt-cryptid
      
      [2] The modified u-boot sources for the MR42 and MR52 are available:
          https://github.com/clayface/U-boot-MR52-20200629
      
      
      
      Signed-off-by: default avatarMatthew Hagan <mnhagan88@gmail.com>
      67f52012
    • Matthew Hagan's avatar
      ipq806x: add gsbi2_i2c label · 6e5b8c63
      Matthew Hagan authored
      
      gsbi2_i2c is used by the Meraki MR42 so we need to expose a label here.
      
      Signed-off-by: default avatarMatthew Hagan <mnhagan88@gmail.com>
      6e5b8c63
    • Matthew Hagan's avatar
      ipq806x: backport GMAC_AHB_RESET deassert patches · 771691ec
      Matthew Hagan authored
      
      Add backports of the following patches:
      "net: stmmac: explicitly deassert GMAC_AHB_RESET" and
      "ARM: dts: qcom: add ahb reset to ipq806x-gmac"
      Required for Meraki MR42/MR52.
      
      Signed-off-by: default avatarMatthew Hagan <mnhagan88@gmail.com>
      771691ec
    • Matthew Hagan's avatar
      ipq806x: add GSBI nodes to ipq8064-dtsi-addidions · cef420e8
      Matthew Hagan authored
      
      Rather than having separate patches for each GSBI node added, this patch
      consolidates the existing GSBI1 patch into
      083-ipq8064-dtsi-additions.patch. In addition, GSBI6 and GSBI7 I2C nodes,
      required for the MR42 and MR52 respectively, are added.
      
      Signed-off-by: default avatarMatthew Hagan <mnhagan88@gmail.com>
      cef420e8
    • Matthew Hagan's avatar
      kernel: add back kmod-leds-tlc591xx · 529eac53
      Matthew Hagan authored
      
      Add back support for the TLC591xx series LEDs which are used in the
      ipq806x-based Meraki Cryptid series devices.
      
      This module previously existed for the mvebu platform but was removed
      at commit f849c2c8 due to being enabled
      in that platform's kernel config.
      
      Signed-off-by: default avatarMatthew Hagan <mnhagan88@gmail.com>
      529eac53
Loading