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