openwrt/target/linux/generic/hack-6.1
Thomas Kupper 4d79a65d60 ipq807x: add support for Netgear RAX120v2
Netgear Nighthawk RAX120v2 AX WIFI router with 5 1G and 1 5G ports.

The majority of the code is based on @jewwest's PR #11830.

Specifications:
    * CPU: Qualcomm IPQ8074 Quad core Cortex-A53 2.2GHz
    * RAM: 1024MB of DDR3 (Nanya NT5CC256M16EP-EK × 2)
    * Flash: SPI-NAND 512 MiB (Winbond W29N04GZBIBA)
    * Ethernet: 4x 10/100/1000 Mbps LAN,
                1x 10/100/1000 Mbps WAN (Qualcomm QCA8075),
                1x 10/100/1000/2500/5000 Mbps LAN/WAN (Aquantia AQR111B0 PHY)
    * Wi-Fi:
        * 2.4 GHz: Qualcomm QCN5024 4x4
        * 2x 5 GHz: Qualcomm QCN5054 4x4
    * USB: 2x USB 3.0
    * LEDs: Power, 2.4GHz & 5GHz Radio, WPS, WAN, USB1 & USB2, 5G LAN
    * Keys: LEDs On/Off, Power, Reset, RFKILL, WPS
    * UART: Marked J9003 VCC TX RX GND, beginning from "1". 3.3v, 115200n8
    * Power: 19 VDC, 3.1 A

Installation:
    * Flashing OpenWrt is done in two steps:
        a) Flash *-squashfs-web-ui-factory.img from stock UI (thanks to @wangyu-).
           This writes an initramfs based OpenWrt image onto the RAX120v2
        b) From OpenWrt flash the *-squashfs-sysupgrade.bin using LuCI or the commandline

    * U-Boot allows booting an initramfs image via TFTP:
    - Set ip of your PC to 192.168.1.100
        - At the serial console interrupt boot at "Hit any key to stop autoboot:"
        - In u-boot run `tftpsrv`
        - On your PC send the OpenWrt initramfs image:

          tftp 192.168.1.1 -m binary -c put openwrt-ipq807x-generic-netgear_rax120v2-initramfs-uImage.itb

Make 5G Aquantia phy work:
    For the 5G port labeled 'lan5' to work a firmware is needed. This can be loaded in
    u-boot by writing the firmware to the correct mtd partition.

    The firmware file found in the Netgear stock firmware under /lib/firmware/ named
    'AQR-G3_v4.3.C-AQR_DNI_DR-EQ35AX8-R-prov1_ID23888_VER1311.cld' is needed and has to
    be converted to a MBN file.

    The `mkheader.py` script used here can be found in the Netgear V1.2.8.40 GPL source,
    under 'git_home/u-boot.git/tools/mkheader.py'

    Convert the CLD file to MBN using:
    $ python2 mkheader.py 0x44000000 0x13 <*.cld file> aqr_4.3.C.mbn

    This MBN file can then be flashed to the MTD partition to be used by u-boot.

    The necessary files can also be found in
        https://github.com/boretom/openwrt-fork/tree/rax120v2/aquantia-firmware

    * Write MBN file to MTD partition to be loaded automatically by u-boot:

      U-boot automatically tries to load the firmware from nand at address 0x7e00000 which
      corresponds to `/dev/mtd25` in OpenWrt.

        - find ETHPHYFW partition while running OpenWrt (expected: /dev/mtd25)

          $ fgrep -i 'ethphyfw' /proc/mtd
          mtd25: 00080000 00020000 "ethphyfw

        - copy mbn file to /tmp/ folder of the router

          $ scp aqr-v4.3.C.mbn 192.168.1.1:/tmp/

        - write mbn file to ethphyfw partition

          $ mtd write /tmp/aqr_v4.3.C.mbn /dev/mtd25

Revert to stock firmware:
    * Flash the stock firmware to the bootloader using TFTP/NMRP.

References to RAX120v2 GPL source:
    https://www.downloads.netgear.com/files/GPL/RAX120-V1.2.8.40_gpl_src.zip

Reviewed-by: Robert Marko <robimarko@gmail.com>
Signed-off-by: Thomas Kupper <thomas.kupper@gmail.com>
2023-08-19 17:12:46 +02:00
..
204-module_strip.patch kernel: bump 6.1 to 6.1.39 2023-07-25 00:24:21 +02:00
205-kconfig-abort-configuration-on-unset-symbol.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
210-darwin_scripts_include.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
211-darwin-uuid-typedef-clash.patch
212-tools_portability.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
214-spidev_h_portability.patch
220-arm-gc_sections.patch kernel: bump 6.1 to 6.1.44 2023-08-09 20:39:20 -04:00
221-module_exports.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
230-openwrt_lzma_options.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
250-netfilter_depends.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
251-kconfig.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
253-ksmbd-config.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
259-regmap_dynamic.patch kernel: bump 6.1 to 6.1.42 2023-07-30 18:53:00 +02:00
260-crypto_test_dependencies.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
261-lib-arc4-unhide.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
280-rfkill-stubs.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
300-MIPS-r4k_cache-use-more-efficient-cache-blast.patch
321-powerpc_crtsavres_prereq.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
402-mtd-blktrans-call-add-disks-after-mtd-device.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
410-block-fit-partition-parser.patch generic: 6.1: fix uImage.FIT partitions on mtdblock and ubiblock 2023-07-07 14:01:39 +02:00
420-mtd-support-OpenWrt-s-MTD_ROOTFS_ROOT_DEV.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
421-drivers-mtd-parsers-add-nvmem-support-to-cmdlinepart.patch
430-mtk-bmt-support.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
601-of_net-add-mac-address-ascii-support.patch
645-netfilter-connmark-introduce-set-dscpmark.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
650-netfilter-add-xt_FLOWOFFLOAD-target.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
651-wireless_mesh_header.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
660-fq_codel_defaults.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
661-kernel-ct-size-the-hashtable-more-adequately.patch kernel: bump 6.1 to 6.1.34 2023-06-16 19:42:56 +02:00
700-swconfig_switch_drivers.patch generic: 6.1: backport patch adding support for LED PHY 2023-08-19 12:51:08 +02:00
711-net-dsa-mv88e6xxx-disable-ATU-violation.patch kernel: bump 6.1 to 6.1.42 2023-07-30 18:53:00 +02:00
720-net-phy-add-aqr-phys.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
721-net-add-packet-mangeling.patch kernel: bump 6.1 to 6.1.34 2023-06-16 19:42:56 +02:00
722-net-phy-aquantia-enable-AQR112-and-AQR412.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
723-net-phy-aquantia-fix-system-side-protocol-mi.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
724-net-phy-aquantia-Add-AQR113-driver-support.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
725-net-phy-aquantia-add-PHY_IDs-for-AQR112-variants.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
726-net-phy-aquantia-enable-AQR111-and-AQR111B0.patch ipq807x: add support for Netgear RAX120v2 2023-08-19 17:12:46 +02:00
750-net-pcs-mtk-lynxi-workaround-2500BaseX-no-an.patch
760-net-usb-r8152-add-LED-configuration-from-OF.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
761-dt-bindings-net-add-RTL8152-binding-documentation.patch
765-mxl-gpy-control-LED-reg-from-DT.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
766-net-phy-mediatek-ge-add-LED-configuration-interface.patch
773-bgmac-add-srab-switch.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
780-usb-net-MeigLink_modem_support.patch kernel: bump 6.1 to 6.1.43 2023-08-09 20:39:20 -04:00
790-SFP-GE-T-ignore-TX_FAULT.patch kernel: bump 6.1 to 6.1.34 2023-06-16 19:42:56 +02:00
800-GPIO-add-named-gpio-exports.patch linux/named-gpio-export: add support for OPEN_DRAIN and OPEN_SOURCE flag 2023-08-15 16:07:04 +02:00
810-bcma-ssb-fallback-sprom.patch
901-debloat_sock_diag.patch kernel: bump 6.1 to 6.1.45 2023-08-12 12:10:36 +02:00
902-debloat_proc.patch kernel: bump 6.1 to 6.1.45 2023-08-12 12:10:36 +02:00
904-debloat_dma_buf.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
910-kobject_uevent.patch
911-kobject_add_broadcast_uevent.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00
920-device_tree_cmdline.patch generic: 6.1: refresh hack patches 2023-05-22 22:28:16 +02:00