ramips: rename mtd partition of ipTIME NAND devices
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_elecom_wrc-1167fs.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "mt7628an.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 compatible = "elecom,wrc-1167fs", "mediatek,mt7628an-soc";
11 model = "ELECOM WRC-1167FS";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 leds {
21 compatible = "gpio-leds";
22
23 led_power: power {
24 function = LED_FUNCTION_POWER;
25 color = <LED_COLOR_ID_GREEN>;
26 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
27 };
28
29 wlan5g {
30 label = "green:wlan5g";
31 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
32 linux,default-trigger = "phy1tpt";
33 };
34
35 wps {
36 function = LED_FUNCTION_WPS;
37 color = <LED_COLOR_ID_RED>;
38 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
39 };
40
41 internet {
42 label = "green:internet";
43 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
44 };
45
46 lan {
47 function = LED_FUNCTION_LAN;
48 color = <LED_COLOR_ID_GREEN>;
49 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
50 };
51
52 wlan2g {
53 label = "green:wlan2g";
54 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
55 linux,default-trigger = "phy0tpt";
56 };
57 };
58
59 keys {
60 compatible = "gpio-keys";
61
62 ap {
63 label = "ap";
64 gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
65 linux,code = <BTN_0>;
66 linux,input-type = <EV_SW>;
67 };
68
69 reset {
70 label = "reset";
71 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
72 linux,code = <KEY_RESTART>;
73 };
74
75 wps {
76 label = "wps";
77 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
78 linux,code = <KEY_WPS_BUTTON>;
79 };
80 };
81 };
82
83 &spi0 {
84 status = "okay";
85
86 flash@0 {
87 compatible = "jedec,spi-nor";
88 reg = <0>;
89 spi-max-frequency = <40000000>;
90
91 partitions {
92 compatible = "fixed-partitions";
93 #address-cells = <1>;
94 #size-cells = <1>;
95
96 partition@0 {
97 label = "u-boot";
98 reg = <0x0 0x30000>;
99 read-only;
100 };
101
102 partition@30000 {
103 label = "u-boot-env";
104 reg = <0x30000 0x10000>;
105 read-only;
106 };
107
108 partition@40000 {
109 label = "factory";
110 reg = <0x40000 0x10000>;
111 read-only;
112
113 nvmem-layout {
114 compatible = "fixed-layout";
115 #address-cells = <1>;
116 #size-cells = <1>;
117
118 eeprom_factory_0: eeprom@0 {
119 reg = <0x0 0x400>;
120 };
121
122 eeprom_factory_8000: eeprom@8000 {
123 reg = <0x8000 0x200>;
124 };
125
126 macaddr_factory_28: macaddr@28 {
127 reg = <0x28 0x6>;
128 };
129 };
130 };
131
132 partition@50000 {
133 compatible = "denx,uimage";
134 label = "firmware";
135 reg = <0x50000 0x730000>;
136 };
137
138 partition@780000 {
139 label = "storage";
140 reg = <0x780000 0x80000>;
141 read-only;
142 };
143 };
144 };
145 };
146
147 &ehci {
148 status = "disabled";
149 };
150
151 &esw {
152 mediatek,portmap = <0x2f>;
153 mediatek,portdisable = <0x27>;
154 };
155
156 &ethernet {
157 nvmem-cells = <&macaddr_factory_28>;
158 nvmem-cell-names = "mac-address";
159 };
160
161 &ohci {
162 status = "disabled";
163 };
164
165 &pcie {
166 status = "okay";
167 };
168
169 &pcie0 {
170 wifi@0,0 {
171 compatible = "mediatek,mt76";
172 reg = <0x0000 0 0 0 0>;
173 nvmem-cells = <&eeprom_factory_8000>;
174 nvmem-cell-names = "eeprom";
175 ieee80211-freq-limit = <5000000 6000000>;
176 };
177 };
178
179 &state_default {
180 gpio {
181 groups = "wled_an", "p3led_an", "p4led_an", "wdt", "refclk", "i2c", "i2s";
182 function = "gpio";
183 };
184 };
185
186 &wmac {
187 status = "okay";
188
189 nvmem-cells = <&eeprom_factory_0>;
190 nvmem-cell-names = "eeprom";
191 };