ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9344_openmesh_om5p.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", "qca,ar9344";
11 model = "OpenMesh OM5P";
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 = &eth1;
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 watchdog {
78 compatible = "linux,wdt-gpio";
79 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
80 hw_algo = "toggle";
81 /* hw_margin_ms is actually 300s but driver limits it to 60s */
82 hw_margin_ms = <60000>;
83 always-running;
84 };
85 };
86
87 &ref {
88 clock-frequency = <40000000>;
89 };
90
91 &pinmux {
92 led_lan_wan_blue_pin: pinmux_lan_wan_blue_pin {
93 pinctrl-single,bits = <0xc 0x0 0xffff0000>;
94 };
95 };
96
97 &spi {
98 status = "okay";
99
100 flash@0 {
101 compatible = "jedec,spi-nor";
102 reg = <0>;
103 spi-max-frequency = <40000000>;
104
105 /* partitions are passed via bootloader */
106 partitions {
107 compatible = "fixed-partitions";
108 #address-cells = <1>;
109 #size-cells = <1>;
110
111 partition@0 {
112 label = "u-boot";
113 reg = <0x000000 0x040000>;
114 read-only;
115 };
116
117 partition@40000 {
118 label = "u-boot-env";
119 reg = <0x040000 0x010000>;
120 };
121
122 partition@50000 {
123 label = "custom";
124 reg = <0x050000 0x060000>;
125 read-only;
126 };
127
128 partition@b0000 {
129 label = "inactive";
130 reg = <0x0b0000 0x7a0000>;
131 };
132
133 partition@850000 {
134 label = "inactive2";
135 reg = <0x850000 0x7a0000>;
136 };
137
138 art: partition@ff0000 {
139 label = "ART";
140 reg = <0xff0000 0x010000>;
141 read-only;
142
143 nvmem-layout {
144 compatible = "fixed-layout";
145 #address-cells = <1>;
146 #size-cells = <1>;
147
148 macaddr_art_0: macaddr@0 {
149 reg = <0x0 0x6>;
150 };
151
152 macaddr_art_6: macaddr@6 {
153 reg = <0x6 0x6>;
154 };
155 };
156 };
157 };
158 };
159 };
160
161 &eth0 {
162 status = "okay";
163
164 phy-handle = <&swphy4>;
165
166 nvmem-cells = <&macaddr_art_6>;
167 nvmem-cell-names = "mac-address";
168 };
169
170 &eth1 {
171 status = "okay";
172
173 nvmem-cells = <&macaddr_art_0>;
174 nvmem-cell-names = "mac-address";
175 };
176
177 &wmac {
178 status = "okay";
179
180 mtd-cal-data = <&art 0x1000>;
181 };