58780a04170418f00c65c795cc3d7910452b0270
[openwrt/staging/chunkeey.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 /* can be removed on 4.19 */
34 gpios = <&gpio 19 GPIO_ACTIVE_LOW>,
35 <&gpio 15 GPIO_ACTIVE_LOW>;
36
37 pcf8563: pcf8563@51 {
38 compatible = "nxp,pcf8563";
39 reg = <0x51>;
40 #clock-cells = <0>;
41 };
42 };
43
44 leds {
45 compatible = "gpio-leds";
46
47 pinctrl-names = "default";
48 pinctrl-0 = <&enable_gpio20_gpio22>;
49
50 wifi {
51 label = "zbt-wd323:green:wifi";
52 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
53 linux,default-trigger = "phy0tpt";
54 };
55
56 lan1 {
57 label = "zbt-wd323:orange:lan1";
58 gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
59 };
60
61 lan2 {
62 label = "zbt-wd323:orange:lan2";
63 gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
64 };
65 };
66 };
67
68 &wdt {
69 status = "okay";
70
71 pinctrl-names = "default";
72 pinctrl-0 = <&enable_gpio21>;
73 };
74
75 &uart {
76 status = "okay";
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 mtd-mac-address = <&art 0x0>;
96 };
97
98 &eth1 {
99 status = "okay";
100 mtd-mac-address = <&art 0x6>;
101 };
102
103 &spi {
104 num-chipselects = <1>;
105 status = "okay";
106
107 flash@0 {
108 compatible = "jedec,spi-nor";
109 spi-max-frequency = <22000000>;
110 reg = <0>;
111
112 partitions {
113 compatible = "fixed-partitions";
114 #address-cells = <1>;
115 #size-cells = <1>;
116
117 uboot@0 {
118 reg = <0x0 0x40000>;
119 read-only;
120 };
121
122 uboot-env@40000 {
123 reg = <0x40000 0x10000>;
124 read-only;
125 };
126
127 firmware@50000 {
128 compatible = "denx,uimage";
129 reg = <0x50000 0xfa0000>;
130 };
131
132 art: art@ff0000 {
133 reg = <0xff0000 0x10000>;
134 read-only;
135 };
136 };
137 };
138 };
139
140 &wmac {
141 status = "okay";
142 mtd-cal-data = <&art 0x1000>;
143 };
144
145 &pinmux {
146 enable_gpio15: pinmux_enable_gpio15 {
147 pinctrl-single,bits = <0xc 0x0 0xff000000>;
148 };
149
150 enable_gpio19: pinmux_enable_gpio19 {
151 pinctrl-single,bits = <0x10 0x0 0xff000000>;
152 };
153
154 enable_gpio20_gpio22: pinmux_enable_gpio20_gpio22 {
155 pinctrl-single,bits = <0x14 0x0 0xff00ff>;
156 };
157
158 enable_gpio21: pinmux_enable_gpio21 {
159 pinctrl-single,bits = <0x14 0x0 0xff00>;
160 };
161 };