ramips: convert MT7915 EEPROM to NVMEM format
[openwrt/staging/nbd.git] / target / linux / ramips / dts / mt7621_netgear_eax12.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "netgear,eax12", "mediatek,mt7621-soc";
10 model = "Netgear EAX12";
11
12 aliases {
13 led-boot = &led_power_green;
14 led-failsafe = &led_power_red;
15 led-running = &led_power_green;
16 led-upgrade = &led_power_red;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 keys {
24 compatible = "gpio-keys";
25
26 reset {
27 label = "reset";
28 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 };
31
32 wps {
33 label = "wps";
34 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_WPS_BUTTON>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 led_power_green: power_green {
43 label = "green:power";
44 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
45 };
46
47 led_power_red: power_red {
48 label = "red:power";
49 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
50 };
51
52 client_green {
53 label = "green:client";
54 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
55 };
56
57 client_red {
58 label = "red:client";
59 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
60 };
61
62 router_green {
63 label = "green:router";
64 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
65 };
66
67 router_red {
68 label = "red:router";
69 gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
70 };
71
72 wps_green {
73 label = "green:wps";
74 gpios = <&gpio 17 GPIO_ACTIVE_HIGH>;
75 };
76
77 eth_green {
78 label = "green:eth";
79 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
80 };
81
82 eth_yellow {
83 label = "yellow:eth";
84 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
85 };
86 };
87 };
88
89 &nand {
90 status = "okay";
91
92 partitions {
93 compatible = "fixed-partitions";
94 #address-cells = <1>;
95 #size-cells = <1>;
96
97 partition@0 {
98 label = "Bootloader";
99 reg = <0x0 0x80000>;
100 read-only;
101 };
102
103 partition@80000 {
104 label = "Config";
105 reg = <0x80000 0x80000>;
106 read-only;
107 };
108
109 factory: partition@100000 {
110 compatible = "nvmem-cells";
111 label = "Factory";
112 reg = <0x100000 0x80000>;
113 #address-cells = <1>;
114 #size-cells = <1>;
115 read-only;
116
117 eeprom_factory_0: eeprom@0 {
118 reg = <0x0 0xe00>;
119 };
120 };
121
122 partition@180000 {
123 label = "firmware";
124 reg = <0x180000 0x3800000>;
125
126 compatible = "fixed-partitions";
127 #address-cells = <1>;
128 #size-cells = <1>;
129
130 partition@0 {
131 label = "kernel";
132 reg = <0x0 0x400000>;
133 };
134
135 partition@400000 {
136 label = "ubi";
137 reg = <0x400000 0x3400000>;
138 };
139 };
140
141 partition@2780000 {
142 label = "firmware_backup";
143 reg = <0x3980000 0x3800000>;
144 read-only;
145 };
146
147 partition@4d80000 {
148 label = "CFG";
149 reg = <0x7180000 0x200000>;
150 read-only;
151 };
152
153 partition@5580000 {
154 label = "RAE";
155 reg = <0x7380000 0x600000>;
156 read-only;
157 };
158
159 partition@5980000 {
160 label = "POT";
161 reg = <0x7980000 0x020000>;
162 read-only;
163 };
164
165 partition@6780000 {
166 label = "LOG";
167 reg = <0x79A0000 0x40000>;
168 read-only;
169 };
170 };
171 };
172
173 &pcie {
174 status = "okay";
175 };
176
177 &pcie1 {
178 wifi@0,0 {
179 compatible = "mediatek,mt76";
180 reg = <0x0000 0 0 0 0>;
181 nvmem-cells = <&eeprom_factory_0>;
182 nvmem-cell-names = "eeprom";
183 };
184 };
185
186 &switch0 {
187 ports {
188 port@0 {
189 status = "okay";
190 label = "lan";
191 };
192 };
193 };
194
195 &xhci {
196 status = "disabled";
197 };