b9eb0e91a9b6ad2cc1e0cb446ae28e955f8fc96c
[openwrt/staging/mans0n.git] / target / linux / ath79 / dts / qca9558_openmesh_om5p-ac-v2.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qca955x.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-ac-v2", "qca,qca9558";
11 model = "OpenMesh OM5P-AC v2";
12
13 chosen {
14 /delete-property/ bootargs;
15 };
16
17 aliases {
18 serial0 = &uart;
19 led-boot = &led_power_blue;
20 led-failsafe = &led_power_blue;
21 led-running = &led_power_blue;
22 led-upgrade = &led_power_blue;
23 label-mac-device = &eth0;
24 };
25
26 leds {
27 compatible = "gpio-leds";
28
29 wifi_green {
30 label = "green:wifi";
31 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
32 linux,default-trigger = "phy0tpt";
33 };
34
35 led_power_blue: power_blue {
36 function = LED_FUNCTION_POWER;
37 color = <LED_COLOR_ID_BLUE>;
38 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
39 default-state = "on";
40 };
41
42 wifi_yellow {
43 label = "yellow:wifi";
44 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
45 };
46
47 wifi_red {
48 label = "red:wifi";
49 gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
50 };
51 };
52
53 keys {
54 compatible = "gpio-keys";
55
56 reset {
57 label = "reset";
58 linux,code = <KEY_RESTART>;
59 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
60 };
61 };
62
63 i2c {
64 compatible = "i2c-gpio";
65 gpios = <&gpio 19 GPIO_ACTIVE_HIGH /* sda */
66 &gpio 18 GPIO_ACTIVE_HIGH /* scl */
67 >;
68 #address-cells = <1>;
69 #size-cells = <0>;
70
71 i2c-gpio,scl-open-drain;
72 i2c-gpio,sda-open-drain;
73
74 tmp423a@4e {
75 compatible = "ti,tmp423";
76 reg = <0x4e>;
77 };
78 };
79
80 watchdog {
81 compatible = "linux,wdt-gpio";
82 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
83 hw_algo = "toggle";
84 /* hw_margin_ms is actually 300s but driver limits it to 60s */
85 hw_margin_ms = <60000>;
86 always-running;
87 };
88
89 gpio-export {
90 compatible = "gpio-export";
91 #size-cells = <0>;
92
93 gpio_pa_dcdc {
94 gpio-export,name = "om5pac:pa_dcdc";
95 gpio-export,output = <1>;
96 gpios = <&gpio 2 GPIO_ACTIVE_HIGH>;
97 };
98 gpio_pa_high {
99 gpio-export,name = "om5pac:pa_high";
100 gpio-export,output = <1>;
101 gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
102 };
103 };
104 };
105
106 &pinmux {
107 pinmux_pa_dcdc_pins {
108 pinctrl-single,bits = <0x0 0x0 0xff0000>;
109 };
110
111 pinmux_pa_high_pins {
112 pinctrl-single,bits = <0x10 0x0 0xff>;
113 };
114 };
115
116 &pcie0 {
117 status = "okay";
118
119 wifi@0,0 {
120 compatible = "qcom,ath10k";
121 reg = <0x0000 0 0 0 0>;
122 nvmem-cells = <&cal_art_5000>, <&macaddr_art_0 16>;
123 nvmem-cell-names = "calibration", "mac-address";
124 };
125 };
126
127 &spi {
128 status = "okay";
129
130 flash@0 {
131 compatible = "jedec,spi-nor";
132 reg = <0>;
133 spi-max-frequency = <25000000>;
134
135 /* partitions are passed via bootloader */
136 partitions {
137 compatible = "fixed-partitions";
138 #address-cells = <1>;
139 #size-cells = <1>;
140
141 partition@0 {
142 label = "u-boot";
143 reg = <0x000000 0x040000>;
144 read-only;
145 };
146
147 partition@40000 {
148 label = "u-boot-env";
149 reg = <0x040000 0x010000>;
150 };
151
152 partition@50000 {
153 label = "custom";
154 reg = <0x050000 0x060000>;
155 read-only;
156 };
157
158 partition@b0000 {
159 label = "inactive";
160 reg = <0x0b0000 0x7a0000>;
161 };
162
163 partition@850000 {
164 label = "inactive2";
165 reg = <0x850000 0x7a0000>;
166 };
167
168 art: partition@ff0000 {
169 label = "ART";
170 reg = <0xff0000 0x010000>;
171 read-only;
172
173 nvmem-layout {
174 compatible = "fixed-layout";
175 #address-cells = <1>;
176 #size-cells = <1>;
177
178 macaddr_art_0: macaddr@0 {
179 compatible = "mac-base";
180 reg = <0x0 0x6>;
181 #nvmem-cell-cells = <1>;
182 };
183
184 macaddr_art_6: macaddr@6 {
185 reg = <0x6 0x6>;
186 };
187
188 cal_art_5000: calibration@5000 {
189 reg = <0x5000 0x844>;
190 };
191 };
192 };
193 };
194 };
195 };
196
197 &mdio0 {
198 status = "okay";
199
200 phy4: ethernet-phy@4 {
201 reg = <4>;
202 eee-broken-100tx;
203 eee-broken-1000t;
204 };
205 };
206
207 &mdio1 {
208 status = "okay";
209
210 phy1: ethernet-phy@1 {
211 reg = <1>;
212 eee-broken-100tx;
213 eee-broken-1000t;
214 at803x-override-sgmii-link-check;
215 };
216 };
217
218 &eth0 {
219 status = "okay";
220
221 pll-data = <0x82000101 0x80000101 0x80001313>;
222
223 nvmem-cells = <&macaddr_art_0 0>;
224 nvmem-cell-names = "mac-address";
225
226 phy-mode = "rgmii-id";
227 phy-handle = <&phy4>;
228
229 gmac-config {
230 device = <&gmac>;
231 rgmii-enabled = <1>;
232 rxd-delay = <2>;
233 rxdv-delay = <2>;
234 txd-delay = <0>;
235 txen-delay = <0>;
236 };
237 };
238
239 &eth1 {
240 status = "okay";
241
242 pll-data = <0x03000101 0x80000101 0x80001313>;
243
244 nvmem-cells = <&macaddr_art_6>;
245 nvmem-cell-names = "mac-address";
246
247 qca955x-sgmii-fixup;
248
249 phy-handle = <&phy1>;
250 };
251
252 &wmac {
253 status = "okay";
254
255 mtd-cal-data = <&art 0x1000>;
256 nvmem-cells = <&macaddr_art_0 2>;
257 nvmem-cell-names = "mac-address";
258 };