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