From 8e384ba8307742b54b2be326697a5dc2dec6880b Mon Sep 17 00:00:00 2001 From: Pramod Pancha Date: Fri, 5 Jul 2019 13:45:19 -0400 Subject: ath79: add support for Trendnet TEW-823DRU MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Trendnet TEW-823DRU is a dual-band AC1750 router. The router is based on Qualcomm/Atheros QCA9558 + QCA9880. Specification: 720 MHz CPU 256 MB of RAM 16 MB of FLASH 3T3R 2.4 GHz 3T3R 5 GHz 5x 10/100/1000 Mbps Ethernet Firmware can be flashed from the web interface. Tested on 3 routers with no issues. Signed-off-by: Pramod Pancha [whitespace fixes] Signed-off-by: Petr Štetiar --- .../ath79/dts/qca9558_trendnet_tew-823dru.dts | 216 +++++++++++++++++++++ 1 file changed, 216 insertions(+) create mode 100644 target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts (limited to 'target/linux/ath79/dts') diff --git a/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts b/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts new file mode 100644 index 0000000000..ca9847fab9 --- /dev/null +++ b/target/linux/ath79/dts/qca9558_trendnet_tew-823dru.dts @@ -0,0 +1,216 @@ +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT +/dts-v1/; + +#include +#include + +#include "qca9557.dtsi" + +/ { + compatible = "trendnet,tew-823dru", "qca,qca9558"; + model = "TRENDNET TEW-823DRU"; + + chosen { + bootargs = "console=ttyS0,115200n8"; + }; + + aliases { + led-boot = &system; + led-failsafe = &system; + led-running = &system; + led-upgrade = &system; + }; + + leds { + compatible = "gpio-leds"; + + power_orange { + label = "trendnet:orange:power"; + gpios = <&gpio 14 GPIO_ACTIVE_LOW>; + }; + + system: power_green { + label = "trendnet:green:power"; + gpios = <&gpio 19 GPIO_ACTIVE_LOW>; + }; + + planet_green { + label = "trendnet:green:planet"; + gpios = <&gpio 22 GPIO_ACTIVE_LOW>; + }; + + planet_orange { + label = "trendnet:orange:planet"; + gpios = <&gpio 23 GPIO_ACTIVE_LOW>; + }; + }; + + keys { + compatible = "gpio-keys"; + + reset { + label = "Reset button"; + linux,code = ; + gpios = <&gpio 17 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + + wps { + label = "WPS button"; + linux,code = ; + gpios = <&gpio 16 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + +}; + +&pcie0 { + status = "okay"; +}; + +&pcie1 { + status = "okay"; +}; + +&uart { + status = "okay"; +}; + +&gpio { + status = "okay"; +}; + +&usb_phy0 { + status = "okay"; +}; + +&usb0 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hub_port0: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&usb_phy1 { + status = "okay"; +}; + +&usb1 { + #address-cells = <1>; + #size-cells = <0>; + status = "okay"; + + hub_port1: port@1 { + reg = <1>; + #trigger-source-cells = <0>; + }; +}; + +&spi { + status = "okay"; + num-cs = <1>; + + flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <25000000>; + + partitions { + compatible = "fixed-partitions"; + #address-cells = <1>; + #size-cells = <1>; + + uboot: partition@0 { + label = "u-boot"; + reg = <0x000000 0x030000>; + read-only; + }; + + partition@30000 { + label = "nvram"; + reg = <0x030000 0x010000>; + read-only; + }; + + partition@40000 { + compatible = "denx,uimage"; + label = "firmware"; + reg = <0x040000 0xef0000>; + }; + + partition@f30000 { + label = "lang"; + reg = <0xf30000 0x030000>; + read-only; + }; + + partition@f60000 { + label = "my-dlink"; + reg = <0xf60000 0x080000>; + read-only; + }; + + mac: partition@fe0000 { + label = "mac"; + reg = <0xfe0000 0x010000>; + read-only; + }; + + art: partition@ff0000 { + label = "art"; + reg = <0xff0000 0x010000>; + read-only; + }; + + }; + }; +}; + +&mdio0 { + status = "okay"; + + phy0: ethernet-phy@0 { + reg = <0>; + qca,ar8327-initvals = < + 0x04 0x00080080 /* PORT0 PAD MODE CTRL */ + 0x0c 0x07600000 /* PORT6 PAD MODE CTRL */ + 0x10 0x81000080 /* POWER_ON_STRIP */ + 0x7c 0x0000007e /* PORT0_STATUS */ + 0x94 0x0000007e /* PORT6 STATUS */ + >; + }; +}; + +ð0 { + status = "okay"; + + phy-handle = <&phy0>; + pll-data = <0x56000000 0x00000101 0x00001616>; + + gmac-config { + device = <&gmac>; + rgmii-enabled = <1>; + }; +}; + +ð1 { + status = "okay"; + + pll-data = <0x03000101 0x00000101 0x00001616>; + + fixed-link { + speed = <1000>; + full-duplex; + }; +}; + + +&wmac { + status = "okay"; + mtd-cal-data = <&art 0x1000>; +}; -- cgit v1.2.3