ath79: add support for TP-Link WDR3500 v1
[openwrt/openwrt.git] / target / linux / ath79 / dts / qca9558_tplink_tl-wr941n-v7-cn.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6
7 #include "qca9557.dtsi"
8
9 / {
10 compatible = "tplink,tl-wr941n-v7-cn", "qca,qca9558";
11 model = "TP-Link TL-WR941N v7 (CN)";
12
13 chosen {
14 bootargs = "console=ttyS0,115200n8";
15 };
16
17 aliases {
18 led-boot = &led_system;
19 led-failsafe = &led_system;
20 led-running = &led_system;
21 led-upgrade = &led_system;
22 };
23
24 leds {
25 compatible = "gpio-leds";
26
27 led_system: system {
28 label = "tp-link:green:system";
29 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
30 default-state = "on";
31 };
32
33 wlan {
34 label = "tp-link:green:wlan";
35 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
36 linux,default-trigger = "phy0tpt";
37 };
38
39 qss {
40 label = "tp-link:green:qss";
41 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
42 };
43 };
44
45 keys {
46 compatible = "gpio-keys";
47
48 reset {
49 label = "reset";
50 linux,code = <KEY_RESTART>;
51 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
52 debounce-interval = <60>;
53 };
54
55 wps {
56 label = "qss";
57 linux,code = <KEY_WPS_BUTTON>;
58 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
59 debounce-interval = <60>;
60 };
61 };
62 };
63
64 &uart {
65 status = "okay";
66 };
67
68 &spi {
69 status = "okay";
70 num-cs = <1>;
71
72 flash@0 {
73 compatible = "jedec,spi-nor";
74 reg = <0>;
75 spi-max-frequency = <25000000>;
76
77 partitions {
78 compatible = "fixed-partitions";
79 #address-cells = <1>;
80 #size-cells = <1>;
81
82 uboot: partition@0 {
83 label = "u-boot";
84 reg = <0x000000 0x020000>;
85 read-only;
86 };
87
88 partition@20000 {
89 compatible = "tplink,firmware";
90 label = "firmware";
91 reg = <0x020000 0x3d0000>;
92 };
93
94 art: partition@7f0000 {
95 label = "art";
96 reg = <0x3f0000 0x010000>;
97 read-only;
98 };
99 };
100 };
101 };
102
103 &mdio0 {
104 status = "okay";
105
106 switch0@1f {
107 compatible = "qca,ar8236";
108 reg = <0x1f>;
109 };
110 };
111
112 &eth0 {
113 status = "okay";
114 phy-mode = "mii";
115 mtd-mac-address = <&uboot 0x1fc00>;
116 fixed-link {
117 speed = <100>;
118 full-duplex;
119 };
120 };
121
122 &wmac {
123 status = "okay";
124 mtd-cal-data = <&art 0x1000>;
125 mtd-mac-address = <&uboot 0x1fc00>;
126 };