ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9344_openmesh_om5p-an.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "openmesh,om5p-an", "qca,ar9344";
11 model = "OpenMesh OM5P-AN";
12
13 chosen {
14 /delete-property/ bootargs;
15 };
16
17 aliases {
18 led-boot = &led_power_blue;
19 led-failsafe = &led_power_blue;
20 led-running = &led_power_blue;
21 led-upgrade = &led_power_blue;
22 label-mac-device = &eth0;
23 };
24
25 keys {
26 compatible = "gpio-keys";
27
28 reset {
29 label = "reset";
30 linux,code = <KEY_RESTART>;
31 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 pinctrl-names = "default";
39 pinctrl-0 = <&led_lan_wan_blue_pin>;
40
41 led_power_blue: power_blue {
42 function = LED_FUNCTION_POWER;
43 color = <LED_COLOR_ID_BLUE>;
44 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
45 default-state = "on";
46 };
47
48 wan_blue {
49 function = LED_FUNCTION_WAN;
50 color = <LED_COLOR_ID_BLUE>;
51 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
52 };
53
54 lan_blue {
55 function = LED_FUNCTION_LAN;
56 color = <LED_COLOR_ID_BLUE>;
57 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
58 };
59
60 wifi_green {
61 label = "green:wifi";
62 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
63 linux,default-trigger = "phy0tpt";
64 };
65
66 wifi_yellow {
67 label = "yellow:wifi";
68 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
69 };
70
71 wifi_red {
72 label = "red:wifi";
73 gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
74 };
75 };
76
77 i2c {
78 compatible = "i2c-gpio";
79 gpios = <&gpio 21 GPIO_ACTIVE_HIGH /* sda */
80 &gpio 20 GPIO_ACTIVE_HIGH /* scl */
81 >;
82 #address-cells = <1>;
83 #size-cells = <0>;
84
85 i2c-gpio,scl-open-drain;
86 i2c-gpio,sda-open-drain;
87
88 tmp423a@4c {
89 compatible = "ti,tmp423";
90 reg = <0x4c>;
91 };
92 };
93
94 watchdog {
95 compatible = "linux,wdt-gpio";
96 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
97 hw_algo = "toggle";
98 /* hw_margin_ms is actually 300s but driver limits it to 60s */
99 hw_margin_ms = <60000>;
100 always-running;
101 };
102 };
103
104 &ref {
105 clock-frequency = <40000000>;
106 };
107
108 &pinmux {
109 led_lan_wan_blue_pin: pinmux_lan_wan_blue_pin {
110 pinctrl-single,bits = <0xc 0x0 0xffff0000>;
111 };
112 };
113
114 &spi {
115 status = "okay";
116
117 flash@0 {
118 compatible = "jedec,spi-nor";
119 reg = <0>;
120 spi-max-frequency = <40000000>;
121
122 /* partitions are passed via bootloader */
123 partitions {
124 compatible = "fixed-partitions";
125 #address-cells = <1>;
126 #size-cells = <1>;
127
128 partition@0 {
129 label = "u-boot";
130 reg = <0x000000 0x040000>;
131 read-only;
132 };
133
134 partition@40000 {
135 label = "u-boot-env";
136 reg = <0x040000 0x010000>;
137 };
138
139 partition@50000 {
140 label = "custom";
141 reg = <0x050000 0x060000>;
142 read-only;
143 };
144
145 partition@b0000 {
146 label = "inactive";
147 reg = <0x0b0000 0x7a0000>;
148 };
149
150 partition@850000 {
151 label = "inactive2";
152 reg = <0x850000 0x7a0000>;
153 };
154
155 partition@ff0000 {
156 label = "ART";
157 reg = <0xff0000 0x010000>;
158 read-only;
159
160 nvmem-layout {
161 compatible = "fixed-layout";
162 #address-cells = <1>;
163 #size-cells = <1>;
164
165 macaddr_art_0: macaddr@0 {
166 compatible = "mac-base";
167 reg = <0x0 0x6>;
168 #nvmem-cell-cells = <1>;
169 };
170
171 calibration_art_1000: calibration@1000 {
172 reg = <0x1000 0x440>;
173 };
174
175 calibration_art_5000: calibration@5000 {
176 reg = <0x5000 0x440>;
177 };
178 };
179 };
180 };
181 };
182 };
183
184 &mdio0 {
185 status = "okay";
186
187 phy7: ethernet-phy@7 {
188 reg = <7>;
189 eee-broken-100tx;
190 eee-broken-1000t;
191 };
192 };
193
194 &eth0 {
195 status = "okay";
196
197 pll-data = <0x02000000 0x00000101 0x00001313>;
198
199 nvmem-cells = <&macaddr_art_0 0>;
200 nvmem-cell-names = "mac-address";
201
202 phy-mode = "rgmii-id";
203 phy-handle = <&phy7>;
204
205 gmac-config {
206 device = <&gmac>;
207 rgmii-gmac0 = <1>;
208 rxd-delay = <2>;
209 rxdv-delay = <2>;
210 switch-phy-swap = <1>;
211 };
212 };
213
214 &eth1 {
215 status = "okay";
216
217 nvmem-cells = <&macaddr_art_0 1>;
218 nvmem-cell-names = "mac-address";
219 };
220
221 &wmac {
222 status = "okay";
223
224 nvmem-cells = <&macaddr_art_0 2>, <&calibration_art_1000>;
225 nvmem-cell-names = "mac-address", "calibration";
226 };
227
228 &pcie {
229 status = "okay";
230
231 wifi@0,0 {
232 compatible = "pci168c,0030";
233 reg = <0x0000 0 0 0 0>;
234 nvmem-cells = <&macaddr_art_0 16>, <&calibration_art_5000>;
235 nvmem-cell-names = "mac-address", "calibration";
236 };
237 };