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