[PATCH 1/1] ipq806x: Add support for Linksys E8350-v1
Signed-off-by: Todor Colov --- .../ipq806x/base-files/etc/board.d/01_leds| 3 + .../ipq806x/base-files/etc/board.d/02_network | 1 + .../base-files/lib/upgrade/platform.sh| 3 +- .../arm/boot/dts/qcom-ipq8064-e8350-v1.dts| 246 ++ target/linux/ipq806x/image/Makefile | 29 +++ .../0069-arm-boot-add-dts-files.patch | 3 +- 6 files changed, 283 insertions(+), 2 deletions(-) create mode 100644 target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds b/target/linux/ipq806x/base-files/etc/board.d/01_leds index f8b6c32358..802fb41d74 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds @@ -19,6 +19,9 @@ compex,wpq864) ucidef_set_led_usbport "usb" "USB" "wpq864:green:usb" "usb1-port1" "usb2-port1" ucidef_set_led_usbport "pcie-usb" "PCIe USB" "wpq864:green:usb-pcie" "usb3-port1" ;; +linksys,e8350-v1) +ucidef_set_led_wlan "wlan" "WLAN" "${boardname}:green:wifi" "phy0tpt" +;; nec,wg2600hp) ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy1tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy0tpt" diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index 529a8d9f39..5e26fa2a8b 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -14,6 +14,7 @@ board=$(board_name) case "$board" in buffalo,wxr-2533dhp |\ compex,wpq864 |\ +linksys,e8350-v1 |\ netgear,d7800 |\ netgear,r7500 |\ netgear,r7500v2 |\ diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 560e64af3a..4f4fb12ef0 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -1,7 +1,7 @@ PART_NAME=firmware REQUIRE_IMAGE_METADATA=1 -RAMFS_COPY_BIN='fw_printenv fw_setenv' +RAMFS_COPY_BIN='fw_printenv fw_setenv fwtool' RAMFS_COPY_DATA='/etc/fw_env.config /var/lock/fw_printenv.lock' platform_check_image() { @@ -16,6 +16,7 @@ platform_do_upgrade() { nand_do_upgrade "$1" ;; compex,wpq864|\ + linksys,e8350-v1|\ netgear,d7800 |\ netgear,r7500 |\ netgear,r7500v2 |\ diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts new file mode 100644 index 00..5b8cdd205d --- /dev/null +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts @@ -0,0 +1,246 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include "qcom-ipq8064-v2.0.dtsi" + +#include +#include + +/ { + model = "Linksys EA8350 V1 WiFi Router"; + compatible = "linksys,e8350-v1", "qcom,ipq8064"; + + memory@0 { + reg = <0x4200 0x1e00>; + device_type = "memory"; + }; + + aliases { + serial0 = _serial; + + led-boot = _power; + led-failsafe = _power; + led-running = _power; + led-upgrade = _power; + }; + + keys { + compatible = "gpio-keys"; + pinctrl-0 = <_pins>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <_pinmux 68 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <_pinmux 65 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wifi { + label = "wifi"; + gpios = <_pinmux 67 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + }; + + nand-controller@1ac0 { + compatible = "qcom,ipq806x-nand"; + reg = <0x1ac0 0x800>; + clocks = < EBI2_CLK>, + < EBI2_AON_CLK>; + clock-names = "core", "aon"; + dmas = <_dma 3>; + dma-names = "rxtx"; + qcom,cmd-crci = <15>; + qcom,data-crci = <3>; + + nand@0 { + reg = <0>; + + nand-ecc-strength = <4>; + nand-bus-width = <8>; + + partitions { + compatible = "fixed-partitions"; + + partition@0 { + label = "ubi"; + reg = <0 0x400>; + }; +
[PATCH 1/1] ipq806x: add support for Linksys e8350 v1
Device specifications: Device specifications: * SoC: Qualcomm dual-core IPQ8064 @ 1.4 GHz * RAM: 512MiB * Flash: 4MiB SPI-NOR + 128 Nand * Wireless 2.4GHz (SoC): b/g/n, Qualcomm QCA9880 * Wireless 5Ghz (QCA9886): a/n/ac, Quantenna QSR1000 * Ethernet (QCA8337): 1× 1GbE WAN + 4 x 1GbE LAN * 1 x USB3.0 + 1 x USB2.0 * 1 eSata up to 3.0 Gbps Flashing instructions: * Upgrade with factory image via web interface Debricking: * Get the original firmware: https://downloads.linksys.com/downloads/firmware/FW_E8350_1.0.03.003_20180929.bin 1. power off the device and disconnect the WAN port. (Only LAN port to be connected) 2. press & hold the “Reset” button 3. power on the deiece & wait for 10 seconds with pressed “Reset” button - the Router will open Firmware Recovery “http” server on IP: 192.168.1.1 4. set IP on your PC from 192.168.1.0/24 network ( Router is on IP 192.168.1.1 ) 5. open in browser URL: http://192.168.1.1/index.shtml MAC addresses: MAC address (as on device label) is stored in u-boot env WLAN uses address incremented by 1. Signed-off-by: Todor Colov --- .../ipq806x/base-files/etc/board.d/01_leds| 3 + .../ipq806x/base-files/etc/board.d/02_network | 1 + .../base-files/lib/upgrade/platform.sh| 5 + .../arm/boot/dts/qcom-ipq8064-e8350-v1.dts| 246 ++ target/linux/ipq806x/image/Makefile | 29 +++ .../0069-arm-boot-add-dts-files.patch | 3 +- 6 files changed, 286 insertions(+), 1 deletion(-) create mode 100644 target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts diff --git a/target/linux/ipq806x/base-files/etc/board.d/01_leds b/target/linux/ipq806x/base-files/etc/board.d/01_leds index f8b6c32358..802fb41d74 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/01_leds +++ b/target/linux/ipq806x/base-files/etc/board.d/01_leds @@ -19,6 +19,9 @@ compex,wpq864) ucidef_set_led_usbport "usb" "USB" "wpq864:green:usb" "usb1-port1" "usb2-port1" ucidef_set_led_usbport "pcie-usb" "PCIe USB" "wpq864:green:usb-pcie" "usb3-port1" ;; +linksys,e8350-v1) +ucidef_set_led_wlan "wlan" "WLAN" "${boardname}:green:wifi" "phy0tpt" +;; nec,wg2600hp) ucidef_set_led_wlan "wlan2g" "WLAN2G" "${boardname}:green:wlan2g" "phy1tpt" ucidef_set_led_wlan "wlan5g" "WLAN5G" "${boardname}:green:wlan5g" "phy0tpt" diff --git a/target/linux/ipq806x/base-files/etc/board.d/02_network b/target/linux/ipq806x/base-files/etc/board.d/02_network index 529a8d9f39..5e26fa2a8b 100755 --- a/target/linux/ipq806x/base-files/etc/board.d/02_network +++ b/target/linux/ipq806x/base-files/etc/board.d/02_network @@ -14,6 +14,7 @@ board=$(board_name) case "$board" in buffalo,wxr-2533dhp |\ compex,wpq864 |\ +linksys,e8350-v1 |\ netgear,d7800 |\ netgear,r7500 |\ netgear,r7500v2 |\ diff --git a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh index 560e64af3a..34b9da47af 100644 --- a/target/linux/ipq806x/base-files/lib/upgrade/platform.sh +++ b/target/linux/ipq806x/base-files/lib/upgrade/platform.sh @@ -27,6 +27,11 @@ platform_do_upgrade() { zyxel,nbg6817) zyxel_do_upgrade "$1" ;; + linksys,e8350-v1) + # KERNEL_IN_UBI first remove metadata trailer from the UBI volume + /tmp/fwtool -q -t -i /dev/null "$1" + nand_do_upgrade "$1" + ;; linksys,ea7500-v1 |\ linksys,ea8500) platform_do_upgrade_linksys "$1" diff --git a/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts new file mode 100644 index 00..5b8cdd205d --- /dev/null +++ b/target/linux/ipq806x/files-5.4/arch/arm/boot/dts/qcom-ipq8064-e8350-v1.dts @@ -0,0 +1,246 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +#include "qcom-ipq8064-v2.0.dtsi" + +#include +#include + +/ { + model = "Linksys EA8350 V1 WiFi Router"; + compatible = "linksys,e8350-v1", "qcom,ipq8064"; + + memory@0 { + reg = <0x4200 0x1e00>; + device_type = "memory"; + }; + + aliases { + serial0 = _serial; + + led-boot = _power; + led-failsafe = _power; + led-running = _power; + led-upgrade = _power; + }; + + keys { + compatible = "gpio-keys"; + pinctrl-0 = <_pins>; + pinctrl-names = "default"; + + reset { + label = "reset"; + gpios = <_pinmux 68 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wps { + label = "wps"; + gpios = <_pinmux 65 GPIO_ACTIVE_LOW>; + linux,code = ; + }; + + wifi { +