ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar7240_openmesh_om2p-v1.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar7240.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,om2p-v1", "qca,ar7240";
11 model = "OpenMesh OM2P v1";
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 1 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 leds {
36 compatible = "gpio-leds";
37
38 pinctrl-names = "default";
39 pinctrl-0 = <&switch_led_disable_pins>;
40
41 led_power_blue: power_blue {
42 function = LED_FUNCTION_POWER;
43 color = <LED_COLOR_ID_BLUE>;
44 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
45 default-state = "on";
46 };
47
48 wifi_green {
49 label = "green:wifi";
50 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
51 linux,default-trigger = "phy0tpt";
52 };
53
54 wifi_red {
55 label = "red:wifi";
56 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
57 };
58
59 wifi_yellow {
60 label = "yellow:wifi";
61 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
62 };
63
64 lan_blue {
65 function = LED_FUNCTION_LAN;
66 color = <LED_COLOR_ID_BLUE>;
67 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
68 };
69
70 wan_blue {
71 function = LED_FUNCTION_WAN;
72 color = <LED_COLOR_ID_BLUE>;
73 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
74 };
75 };
76
77 watchdog {
78 compatible = "linux,wdt-gpio";
79 gpios = <&gpio 12 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 &spi {
88 status = "okay";
89
90 flash@0 {
91 compatible = "jedec,spi-nor";
92 reg = <0>;
93 spi-max-frequency = <40000000>;
94 linux,mtd-name = "ar7240-nor0";
95
96 /* partitions are passed via bootloader */
97 partitions {
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "u-boot";
104 reg = <0x000000 0x040000>;
105 read-only;
106 };
107
108 partition@40000 {
109 label = "u-boot-env";
110 reg = <0x040000 0x040000>;
111 };
112
113 partition@80000 {
114 label = "custom";
115 reg = <0x080000 0x140000>;
116 read-only;
117 };
118
119 partition@1c0000 {
120 label = "inactive";
121 reg = <0x1c0000 0x700000>;
122 };
123
124 partition@8c0000 {
125 label = "inactive2";
126 reg = <0x8c0000 0x700000>;
127 };
128
129 partition@fc0000 {
130 label = "ART";
131 reg = <0xfc0000 0x040000>;
132 read-only;
133
134 nvmem-layout {
135 compatible = "fixed-layout";
136 #address-cells = <1>;
137 #size-cells = <1>;
138
139 macaddr_art_0: macaddr@0 {
140 reg = <0x0 0x6>;
141 };
142
143 macaddr_art_6: macaddr@6 {
144 reg = <0x6 0x6>;
145 };
146
147 calibration_art_1000: calibration@1000 {
148 reg = <0x1000 0x440>;
149 };
150 };
151 };
152 };
153 };
154 };
155
156 &eth0 {
157 nvmem-cells = <&macaddr_art_0>;
158 nvmem-cell-names = "mac-address";
159 };
160
161 &eth1 {
162 status = "okay";
163
164 nvmem-cells = <&macaddr_art_6>;
165 nvmem-cell-names = "mac-address";
166 };
167
168 &pcie {
169 status = "okay";
170
171 wifi@0,0 {
172 compatible = "pci168c,002a";
173 reg = <0x0000 0 0 0 0>;
174 nvmem-cells = <&calibration_art_1000>;
175 nvmem-cell-names = "calibration";
176 #gpio-cells = <2>;
177 gpio-controller;
178 };
179 };