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