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