ramips: clean up useless dts partition labels
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_ampedwireless_ally.dtsi
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 #include <dt-bindings/leds/common.h>
8
9 / {
10 aliases {
11 led-boot = &led_status_amber;
12 led-failsafe = &led_status_amber;
13 led-running = &led_status_green;
14 led-upgrade = &led_status_red;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 led_switch {
21 label = "led_switch";
22 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
23 linux,code = <KEY_LIGHTS_TOGGLE>;
24 linux,input-type = <EV_SW>;
25 };
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32
33 wps {
34 label = "wps";
35 gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
36 linux,code = <KEY_WPS_BUTTON>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led_status_green: status_green {
44 function = LED_FUNCTION_STATUS;
45 color = <LED_COLOR_ID_GREEN>;
46 gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
47 };
48
49 led_status_red: status_red {
50 function = LED_FUNCTION_STATUS;
51 color = <LED_COLOR_ID_RED>;
52 gpios = <&gpio 12 GPIO_ACTIVE_HIGH>;
53 };
54
55 led_status_amber: status_amber {
56 function = LED_FUNCTION_STATUS;
57 color = <LED_COLOR_ID_AMBER>;
58 gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
59 };
60 };
61 };
62
63 &pcie {
64 status = "okay";
65 };
66
67 &pcie0 {
68 wifi@0,0 {
69 compatible = "pci14c3,7615";
70 reg = <0x0000 0 0 0 0>;
71 nvmem-cells = <&eeprom_factory_0>;
72 nvmem-cell-names = "eeprom";
73 ieee80211-freq-limit = <2400000 2500000>;
74 };
75 };
76
77 &pcie1 {
78 wifi@0,0 {
79 compatible = "pci14c3,7615";
80 reg = <0x0000 0 0 0 0>;
81 nvmem-cells = <&eeprom_factory_8000>;
82 nvmem-cell-names = "eeprom";
83 ieee80211-freq-limit = <5000000 6000000>;
84 };
85 };
86
87 &state_default {
88 gpio {
89 groups = "uart2", "uart3", "jtag", "wdt";
90 function = "gpio";
91 };
92 };
93
94 &nand {
95 status = "okay";
96
97 partitions {
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "u-boot";
104 reg = <0x0 0x80000>;
105 read-only;
106 };
107
108 partition@80000 {
109 label = "u-boot-env";
110 reg = <0x80000 0x80000>;
111 };
112
113 partition@100000 {
114 label = "factory";
115 reg = <0x100000 0x40000>;
116 read-only;
117
118 nvmem-layout {
119 compatible = "fixed-layout";
120 #address-cells = <1>;
121 #size-cells = <1>;
122
123 eeprom_factory_0: eeprom@0 {
124 reg = <0x0 0x4da8>;
125 };
126
127 eeprom_factory_8000: eeprom@8000 {
128 reg = <0x8000 0x4da8>;
129 };
130 };
131 };
132
133 /*
134 * uboot expects to find kernels at 0x140000 & 0x2140000,
135 * referred to as Uimage & Uimage1 in factory FW, respectively.
136 * U-boot variable 'bootImage' controls which is booted;
137 * 0 for the first, 1 for the 2nd.
138 * There's a 3rd partition, Uimage2 (0x4140000), which
139 * I expected to be a recovery image, but is actually blank.
140 *
141 * A kernel is considered suitable for handing control over
142 * if its linux magic number exists & uImage CRC are correct.
143 * If either of those conditions fail, 'bootImage' value
144 * is toggled in uboot env & a restart performed in the hope that the
145 * alternate kernel is okay.
146 *
147 * Note uboot's tftp flash install writes the transferred
148 * image to the active kernel partition.
149 */
150
151 partition@140000 {
152 label = "kernel";
153 reg = <0x140000 0x400000>;
154 };
155
156 partition@540000 {
157 label = "ubi";
158 reg = <0x540000 0x1c00000>;
159 };
160
161 partition@2140000 {
162 label = "oem";
163 reg = <0x2140000 0x2000000>;
164 };
165
166 partition@4140000 {
167 label = "backup";
168 reg = <0x4140000 0x2000000>;
169 };
170
171 partition@6140000 {
172 label = "chime";
173 reg = <0x6140000 0xa00000>;
174 };
175
176 partition@6b40000 {
177 label = "data";
178 reg = <0x6b40000 0xa00000>;
179 };
180
181 partition@7540000 {
182 label = "reserved";
183 reg = <0x7540000 0x840000>;
184 read-only;
185 };
186
187 partition@7d80000 {
188 label = "nvram";
189 reg = <0x7d80000 0x100000>;
190 read-only;
191 };
192
193 partition@7e80000 {
194 label = "hwconfig";
195 reg = <0x7e80000 0x100000>;
196 read-only;
197 };
198 };
199 };