ath79: update WA/XC devices UBNT_VERSION to 8.7.4
[openwrt/staging/wigyori.git] / target / linux / ath79 / dts / ar9330_openmesh_om2p.dtsi
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "ar9330.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 chosen {
11 /delete-property/ bootargs;
12 };
13
14 aliases {
15 led-boot = &led_power_blue;
16 led-failsafe = &led_power_blue;
17 led-running = &led_power_blue;
18 led-upgrade = &led_power_blue;
19 label-mac-device = &eth1;
20 };
21
22 keys {
23 compatible = "gpio-keys";
24
25 reset {
26 label = "reset";
27 linux,code = <KEY_RESTART>;
28 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
29 };
30 };
31
32 leds {
33 compatible = "gpio-leds";
34
35 pinctrl-names = "default";
36 pinctrl-0 = <&switch_led_disable_pins>;
37
38 wifi_yellow {
39 label = "yellow:wifi";
40 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
41 };
42
43 led_power_blue: power_blue {
44 function = LED_FUNCTION_POWER;
45 color = <LED_COLOR_ID_BLUE>;
46 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
47 default-state = "on";
48 };
49
50 lan_blue {
51 function = LED_FUNCTION_LAN;
52 color = <LED_COLOR_ID_BLUE>;
53 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
54 };
55
56 wifi_green {
57 label = "green:wifi";
58 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
59 linux,default-trigger = "phy0tpt";
60 };
61
62 wifi_red {
63 label = "red:wifi";
64 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
65 };
66
67 wan_blue {
68 function = LED_FUNCTION_WAN;
69 color = <LED_COLOR_ID_BLUE>;
70 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
71 };
72 };
73
74 watchdog {
75 compatible = "linux,wdt-gpio";
76 gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
77 hw_algo = "toggle";
78 /* hw_margin_ms is actually 300s but driver limits it to 60s */
79 hw_margin_ms = <60000>;
80 always-running;
81 };
82 };
83
84 &spi {
85 status = "okay";
86
87 flash@0 {
88 compatible = "jedec,spi-nor";
89 reg = <0>;
90 spi-max-frequency = <25000000>;
91
92 /* partitions are passed via bootloader */
93 partitions {
94 compatible = "fixed-partitions";
95 #address-cells = <1>;
96 #size-cells = <1>;
97
98 partition@0 {
99 label = "u-boot";
100 reg = <0x000000 0x040000>;
101 read-only;
102 };
103
104 partition@40000 {
105 label = "u-boot-env";
106 reg = <0x040000 0x040000>;
107 };
108
109 partition@80000 {
110 label = "custom";
111 reg = <0x080000 0x140000>;
112 read-only;
113 };
114
115 partition@1c0000 {
116 label = "inactive";
117 reg = <0x1c0000 0x700000>;
118 };
119
120 partition@8c0000 {
121 label = "inactive2";
122 reg = <0x8c0000 0x700000>;
123 };
124
125 art: partition@fc0000 {
126 label = "ART";
127 reg = <0xfc0000 0x040000>;
128 read-only;
129
130 nvmem-layout {
131 compatible = "fixed-layout";
132 #address-cells = <1>;
133 #size-cells = <1>;
134
135 macaddr_art_0: macaddr@0 {
136 reg = <0x0 0x6>;
137 };
138
139 macaddr_art_6: macaddr@6 {
140 reg = <0x6 0x6>;
141 };
142 };
143 };
144 };
145 };
146 };
147
148 &eth0 {
149 status = "okay";
150
151 nvmem-cells = <&macaddr_art_6>;
152 nvmem-cell-names = "mac-address";
153 };
154
155 &eth1 {
156 status = "okay";
157
158 nvmem-cells = <&macaddr_art_0>;
159 nvmem-cell-names = "mac-address";
160 };
161
162 &wmac {
163 status = "okay";
164
165 mtd-cal-data = <&art 0x1000>;
166 };