ath79: add support for TP-Link WDR3500 v1
[openwrt/openwrt.git] / target / linux / ath79 / dts / ar9344_zbtlink_zbt-wd323.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 "ar9344.dtsi"
8
9 / {
10 model = "ZBT WD323";
11 compatible = "zbtlink,zbt-wd323", "qca,ar9344";
12
13 keys {
14 compatible = "gpio-keys";
15
16 reset {
17 label = "reset";
18 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
19 linux,code = <KEY_RESTART>;
20 };
21 };
22
23 i2c {
24 compatible = "i2c-gpio";
25 #address-cells = <1>;
26 #size-cells = <0>;
27
28 pinctrl-names = "default";
29 pinctrl-0 = <&enable_gpio15 &enable_gpio19>;
30
31 sda-gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
32 scl-gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
33
34 /* can be removed on 4.19 */
35 gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
36 <&gpio 15 GPIO_ACTIVE_LOW>;
37
38 pcf8563: pcf8563@51 {
39 compatible = "nxp,pcf8563";
40 reg = <0x51>;
41 #clock-cells = <0>;
42 };
43 };
44
45 leds {
46 compatible = "gpio-leds";
47
48 pinctrl-names = "default";
49 pinctrl-0 = <&enable_gpio20_gpio22>;
50
51 wifi {
52 label = "zbt-wd323:green:wifi";
53 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
54 linux,default-trigger = "phy0tpt";
55 };
56
57 lan1 {
58 label = "zbt-wd323:orange:lan1";
59 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
60 };
61
62 lan2 {
63 label = "zbt-wd323:orange:lan2";
64 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
65 };
66
67 };
68 };
69
70 &wdt {
71 status = "okay";
72
73 pinctrl-names = "default";
74 pinctrl-0 = <&enable_gpio21>;
75 };
76
77 &uart {
78 status = "okay";
79 };
80
81 &gpio {
82 status = "okay";
83
84 pinctrl-names = "default";
85 pinctrl-0 = <&jtag_disable_pins>;
86 };
87
88 &usb {
89 status = "okay";
90 };
91
92 &usb_phy {
93 status = "okay";
94 };
95
96 &eth0 {
97 status = "okay";
98 phy-handle = <&swphy4>;
99 mtd-mac-address = <&art 0x0>;
100 };
101
102 &eth1 {
103 status = "okay";
104 mtd-mac-address = <&art 0x6>;
105 };
106
107 &spi {
108 num-chipselects = <1>;
109 status = "okay";
110
111 flash@0 {
112 compatible = "jedec,spi-nor";
113 spi-max-frequency = <22000000>;
114 reg = <0>;
115
116 partitions {
117 compatible = "fixed-partitions";
118 #address-cells = <1>;
119 #size-cells = <1>;
120
121 uboot@0 {
122 reg = <0x0 0x40000>;
123 read-only;
124 };
125
126 uboot-env@40000 {
127 reg = <0x40000 0x10000>;
128 read-only;
129 };
130
131 firmware@50000 {
132 compatible = "denx,uimage";
133 reg = <0x50000 0xfa0000>;
134 };
135
136 art: art@ff0000 {
137 reg = <0xff0000 0x10000>;
138 read-only;
139 };
140 };
141 };
142 };
143
144 &wmac {
145 status = "okay";
146 mtd-cal-data = <&art 0x1000>;
147 mtd-mac-address = <&art 0x1002>;
148 };
149
150 &pinmux {
151 enable_gpio15: pinmux_enable_gpio15 {
152 pinctrl-single,bits = <0xc 0x0 0xff000000>;
153 };
154
155 enable_gpio19: pinmux_enable_gpio19 {
156 pinctrl-single,bits = <0x10 0x0 0xff000000>;
157 };
158
159 enable_gpio20_gpio22: pinmux_enable_gpio20_gpio22 {
160 pinctrl-single,bits = <0x14 0x0 0xff00ff>;
161 };
162
163 enable_gpio21: pinmux_enable_gpio21 {
164 pinctrl-single,bits = <0x14 0x0 0xff00>;
165 };
166 };