From 6492ea7d9e4f2a392e8576b5fdaa76815d3c6350 Mon Sep 17 00:00:00 2001 From: Piotr Dymacz Date: Fri, 18 Sep 2020 18:55:23 +0200 Subject: ath79: add support for ALFA Network N2Q ALFA Network N2Q is an outdoor N300 AP/CPE based on Qualcomm/Atheros QCA9531 v2. This model is a successor of the old N2 which was based on Atheros AR7240. FCC ID: 2AB8795311. Specifications: - Qualcomm/Atheros QCA9531 v2 - 650/400/200 MHz (CPU/DDR/AHB) - 128 MB of RAM (DDR2) - 16 MB of flash (SPI NOR) - 2T2R 2.4 GHz Wi-Fi with ext. PA (Skyworks SE2623L) and LNA - 2x 10/100 Mbps Ethernet with passive PoE input in one port (24 V) - PoE pass through in second port (controlled by GPIO) - support for optional 802.3af/at PoE module - 1x mini PCIe slot (PCIe bus, extra 4.2 V for high power cards) - 2x IPEX/U.FL connectors on PCB - 1x USB 2.0 mini Type-B (power controlled by GPIO) - 8x LED (7 of them are driven by GPIO) - 1x button (reset) - external h/w watchdog (EM6324QYSP5B, enabled by default) - UART (4-pin, 2.54 mm pitch) header on PCB - LEDs (2x 5-pin, 2.54 mm pitch) header on PCB Flash instruction: You can use sysupgrade image directly in vendor firmware which is based on LEDE/OpenWrt. Alternatively, you can use web recovery mode in U-Boot: 1. Configure PC with static IP 192.168.1.2/24. 2. Connect PC with one of RJ45 ports, press the reset button, power up device, wait for first blink of all LEDs (indicates network setup), then keep button for 3 following blinks and release it. 3. Open 192.168.1.1 address in your browser and upload sysupgrade image. Signed-off-by: Piotr Dymacz --- .../linux/ath79/dts/qca9531_alfa-network_r36a.dtsi | 126 +++++++++++++++++++++ 1 file changed, 126 insertions(+) create mode 100644 target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi (limited to 'target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi') diff --git a/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi new file mode 100644 index 0000000000..697b20e999 --- /dev/null +++ b/target/linux/ath79/dts/qca9531_alfa-network_r36a.dtsi @@ -0,0 +1,126 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT + +#include "qca953x.dtsi" + +#include +#include + +/ { + aliases { + label-mac-device = &wmac; + }; + + gpio_export: gpio-export { + compatible = "gpio-export"; + #size-cells = <0>; + + watchdog-enable { + gpio-export,name = "watchdog-enable"; + gpio-export,output = <1>; + gpios = <&gpio 1 GPIO_ACTIVE_HIGH>; + }; + }; + + keys: keys { + compatible = "gpio-keys"; + + reset { + label = "reset"; + linux,code = ; + gpios = <&gpio 2 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + watchdog { + compatible = "linux,wdt-gpio"; + gpios = <&gpio 0 GPIO_ACTIVE_HIGH>; + hw_algo = "toggle"; + hw_margin_ms = <25000>; + always-running; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&swphy4>; +}; + +&pinmux { + enable_gpio4: pinmux_enable_gpio4 { + pinctrl-single,bits = <0x04 0x0 0xff>; + }; + + enable_gpio16: pinmux_enable_gpio16 { + pinctrl-single,bits = <0x10 0x0 0xff>; + }; +}; + +&spi { + status = "okay"; + + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <50000000>; + m25p,fast-read; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + partition@0 { + label = "u-boot"; + reg = <0x000000 0x060000>; + read-only; + }; + + partition@60000 { + label = "u-boot-env"; + reg = <0x060000 0x010000>; + }; + + art: partition@70000 { + label = "art"; + reg = <0x070000 0x010000>; + read-only; + }; + + partition@80000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x080000 0xf80000>; + }; + }; + }; +}; + +&uart { + status = "okay"; +}; + +&usb0 { + status = "okay"; + + #address-cells = <1>; + #size-cells = <0>; + + hub_port0: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy { + status = "okay"; +}; + +&wmac { + status = "okay"; + + mtd-cal-data = <&art 0x1000>; +}; -- cgit v1.2.3