ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9341_pisen_wmb001n.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9341.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/mtd/partitions/uimage.h>
8
9 / {
10 model = "PISEN WMB001N";
11 compatible = "pisen,wmb001n", "qca,ar9341";
12
13 aliases {
14 led-boot = &led_wifi;
15 led-failsafe = &led_wifi;
16 led-running = &led_wifi;
17 led-upgrade = &led_wifi;
18 };
19
20 i2c {
21 compatible = "i2c-gpio";
22 pinctrl-names = "default";
23 pinctrl-0 = <&pmx_i2c_gpio &pmx_i2s_spdif>;
24
25 sda-gpios = <&gpio 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
26 scl-gpios = <&gpio 20 GPIO_ACTIVE_HIGH>;
27 /*
28 * Pull-up resistor for scl is missing on this board.
29 * Following settings trick i2c-gpio to use output mode
30 * instead of open-drain for scl.
31 */
32 i2c-gpio,scl-output-only;
33 i2c-gpio,scl-open-drain;
34 };
35
36 keys {
37 compatible = "gpio-keys";
38
39 reset {
40 label = "reset";
41 linux,code = <KEY_RESTART>;
42 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
43 debounce-interval = <60>;
44 };
45
46 vol_down {
47 label = "volume down";
48 linux,code = <KEY_VOLUMEDOWN>;
49 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
50 debounce-interval = <60>;
51 };
52
53 vol_up {
54 label = "volume up";
55 linux,code = <KEY_VOLUMEUP>;
56 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
57 debounce-interval = <60>;
58 };
59 };
60
61 leds {
62 compatible = "gpio-leds";
63 pinctrl-names = "default";
64 pinctrl-0 = <&jtag_disable_pins>;
65
66 volume1 {
67 label = "blue:volume1";
68 gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
69 };
70
71 volume2 {
72 label = "blue:volume2";
73 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
74 };
75
76 volume3 {
77 label = "blue:volume3";
78 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
79 };
80
81 volume4 {
82 label = "blue:volume4";
83 gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
84 };
85
86 volume5 {
87 label = "blue:volume5";
88 gpios = <&gpio 4 GPIO_ACTIVE_HIGH>;
89 };
90
91 led_wifi: wifi {
92 label = "blue:wifi";
93 gpios = <&gpio 22 GPIO_ACTIVE_HIGH>;
94 };
95 };
96
97 virtual_flash {
98 compatible = "mtd-concat";
99 devices = <&fwconcat0 &fwconcat1>;
100
101 partitions {
102 compatible = "fixed-partitions";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 partition@0 {
107 reg = <0x0 0x0>;
108 label = "firmware";
109 compatible = "openwrt,uimage", "denx,uimage";
110 openwrt,ih-magic = <IH_MAGIC_OKLI>;
111 };
112 };
113 };
114 };
115
116 &pinmux {
117 pmx_i2c_gpio: pinmux_i2c_gpio {
118 pinctrl-single,bits = <0x10 0x0 0xff>,
119 <0x14 0x0 0xff>;
120 };
121
122 pmx_i2s_spdif: pinmux_i2s_spdif {
123 pinctrl-single,bits = <0x8 0x0e000000 0xff000000>,
124 <0xc 0x0f0c0d 0xffffff>,
125 <0x14 0x1900 0xff00>;
126 };
127 };
128
129 &ref {
130 clock-frequency = <25000000>;
131 };
132
133 &spi {
134 status = "okay";
135
136 flash@0 {
137 compatible = "jedec,spi-nor";
138 reg = <0>;
139 spi-max-frequency = <25000000>;
140
141 partitions {
142 compatible = "fixed-partitions";
143 #address-cells = <1>;
144 #size-cells = <1>;
145
146 uboot: partition@0 {
147 label = "u-boot";
148 reg = <0x0 0x10000>;
149 read-only;
150 };
151
152 partition@10000 {
153 label = "u-boot-env";
154 reg = <0x10000 0x10000>;
155 read-only;
156 };
157
158 fwconcat0: partition@20000 {
159 label = "fwconcat0";
160 reg = <0x20000 0xdc0000>;
161 };
162
163 partition@de0000 {
164 label = "loader";
165 reg = <0xde0000 0x10000>;
166 };
167
168 fwconcat1: partition@df0000 {
169 label = "fwconcat1";
170 reg = <0xdf0000 0x1f0000>;
171 };
172
173 partition@fe0000 {
174 label = "mib0";
175 reg = <0xfe0000 0x10000>;
176 read-only;
177 };
178
179 art: partition@ff0000 {
180 label = "art";
181 reg = <0xff0000 0x10000>;
182 read-only;
183
184 nvmem-layout {
185 compatible = "fixed-layout";
186 #address-cells = <1>;
187 #size-cells = <1>;
188
189 macaddr_art_0: macaddr@0 {
190 reg = <0x0 0x6>;
191 };
192 };
193 };
194 };
195 };
196 };
197
198 &eth0 {
199 status = "okay";
200 phy-handle = <&swphy4>;
201 nvmem-cells = <&macaddr_art_0>;
202 nvmem-cell-names = "mac-address";
203 };
204
205 &eth1 {
206 compatible = "syscon", "simple-mfd";
207 status = "okay";
208
209 gmac-config {
210 device = <&gmac>;
211 switch-phy-swap = <0>;
212 };
213 };
214
215 &usb {
216 status = "okay";
217 };
218
219 &usb_phy {
220 status = "okay";
221 };
222
223 &wmac {
224 status = "okay";
225 mtd-cal-data = <&art 0x1000>;
226 };