ramips: clean up useless dts partition labels
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_ubnt_unifi-flexhd.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 = "ubnt,unifi-flexhd", "mediatek,mt7621-soc";
10 model = "Ubiquiti UniFi FlexHD";
11
12 aliases {
13 label-mac-device = &gmac0;
14 led-boot = &led_blue;
15 led-failsafe = &led_blue;
16 led-running = &led_blue;
17 led-upgrade = &led_blue;
18 };
19
20 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32 };
33 };
34
35 &spi0 {
36 status = "okay";
37
38 flash@0 {
39 compatible = "jedec,spi-nor";
40 reg = <0>;
41 spi-max-frequency = <50000000>;
42
43 partitions {
44 compatible = "fixed-partitions";
45 #address-cells = <1>;
46 #size-cells = <1>;
47
48 partition@0 {
49 label = "u-boot";
50 reg = <0x0 0x60000>;
51 read-only;
52 };
53
54 partition@60000 {
55 label = "u-boot-env";
56 reg = <0x60000 0x10000>;
57 read-only;
58 };
59
60 partition@70000 {
61 label = "factory";
62 reg = <0x70000 0x10000>;
63 read-only;
64
65 nvmem-layout {
66 compatible = "fixed-layout";
67 #address-cells = <1>;
68 #size-cells = <1>;
69
70 eeprom_factory_0: eeprom@0 {
71 reg = <0x0 0x400>;
72 };
73
74 eeprom_factory_8000: eeprom@8000 {
75 reg = <0x8000 0x4da8>;
76 };
77 };
78 };
79
80 partition@80000 {
81 label = "eeprom";
82 reg = <0x80000 0x10000>;
83 read-only;
84
85 nvmem-layout {
86 compatible = "fixed-layout";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 macaddr_eeprom_0: macaddr@0 {
91 compatible = "mac-base";
92 reg = <0x0 0x6>;
93 #nvmem-cell-cells = <1>;
94 };
95 };
96 };
97
98 partition@90000 {
99 label = "bs";
100 reg = <0x90000 0x10000>;
101 };
102
103 partition@a0000 {
104 label = "cfg";
105 reg = <0xa0000 0x100000>;
106 read-only;
107 };
108
109 partition@1a0000 {
110 compatible = "denx,fit";
111 label = "firmware";
112 reg = <0x1a0000 0xf30000>;
113 };
114
115 partition@10d0000 {
116 label = "kernel1";
117 reg = <0x10d0000 0xf30000>;
118 read-only;
119 };
120 };
121 };
122 };
123
124 &gmac0 {
125 nvmem-cells = <&macaddr_eeprom_0 0>;
126 nvmem-cell-names = "mac-address";
127 };
128
129 &switch0 {
130 ports {
131 port@0 {
132 status = "okay";
133 label = "lan";
134 };
135 };
136 };
137
138 &pcie {
139 status = "okay";
140 };
141
142 &pcie0 {
143 wifi@0,0 {
144 reg = <0x0 0 0 0 0>;
145 // On newer devices there is a MediaTek MAC in the above
146 // device EEPROM, so override it with a calculated one.
147 nvmem-cells = <&eeprom_factory_0>, <&macaddr_eeprom_0 1>;
148 nvmem-cell-names = "eeprom", "mac-address";
149 };
150 };
151
152 &pcie1 {
153 wifi@0,0 {
154 reg = <0x0 0 0 0 0>;
155 // On newer devices there is a MediaTek MAC in the above
156 // device EEPROM, so override it with a calculated one.
157 nvmem-cells = <&eeprom_factory_8000>, <&macaddr_eeprom_0 2>;
158 nvmem-cell-names = "eeprom", "mac-address";
159 };
160 };
161
162 &i2c {
163 status = "okay";
164 clock-frequency = <400000>;
165
166 led-controller@30 {
167 compatible = "ubnt,ledbar";
168 reg = <0x30>;
169
170 enable-gpio = <&gpio 44 GPIO_ACTIVE_HIGH>;
171 reset-gpio = <&gpio 41 GPIO_ACTIVE_LOW>;
172 led-count = <8>;
173
174 red {
175 label = "red";
176 };
177
178 green {
179 label = "green";
180 };
181
182 led_blue: blue {
183 label = "blue";
184 };
185 };
186 };
187
188 &state_default {
189 gpio {
190 groups = "uart2";
191 function = "gpio";
192 };
193 };