ramips: mt7620a: convert to nvmem-layout
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7628an_buffalo_wcr-1166ds.dts
1 #include "mt7628an.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "buffalo,wcr-1166ds", "mediatek,mt7628an-soc";
8 model = "Buffalo WCR-1166DS";
9
10 aliases {
11 led-boot = &led_power;
12 led-failsafe = &led_power;
13 led-running = &led_power;
14 led-upgrade = &led_power;
15 };
16
17 keys {
18 compatible = "gpio-keys";
19
20 aoss {
21 label = "aoss";
22 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_WPS_BUTTON>;
24 };
25
26 ap {
27 label = "ap";
28 gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
29 linux,code = <BTN_0>;
30 linux,input-type = <EV_SW>;
31 };
32
33 reset {
34 label = "reset";
35 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_RESTART>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 router_o {
44 label = "orange:router";
45 gpios = <&gpio 37 GPIO_ACTIVE_LOW>;
46 };
47
48 router_g {
49 label = "green:router";
50 gpios = <&gpio 38 GPIO_ACTIVE_LOW>;
51 };
52
53 internet_o {
54 label = "orange:internet";
55 gpios = <&gpio 39 GPIO_ACTIVE_LOW>;
56 };
57
58 internet_g {
59 label = "green:internet";
60 gpios = <&gpio 40 GPIO_ACTIVE_LOW>;
61 };
62
63 wireless_o {
64 label = "orange:wireless";
65 gpios = <&gpio 41 GPIO_ACTIVE_LOW>;
66 };
67
68 wireless_g {
69 label = "green:wireless";
70 gpios = <&gpio 42 GPIO_ACTIVE_LOW>;
71 };
72
73 diag {
74 label = "orange:diag";
75 gpios = <&gpio 43 GPIO_ACTIVE_LOW>;
76 };
77
78 led_power: power {
79 label = "green:power";
80 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
81 };
82 };
83 };
84
85 &ehci {
86 status = "disabled";
87 };
88
89 &esw {
90 mediatek,portmap = <0x2f>;
91 mediatek,portdisable = <0x27>;
92 };
93
94 &ohci {
95 status = "disabled";
96 };
97
98 &pcie {
99 status = "okay";
100 };
101
102 &pcie0 {
103 mt76@0,0 {
104 reg = <0x0000 0 0 0 0>;
105 nvmem-cells = <&eeprom_factory_8000>;
106 nvmem-cell-names = "eeprom";
107 ieee80211-freq-limit = <5000000 6000000>;
108 };
109 };
110
111 &state_default {
112 gpio {
113 groups = "uart1", "wled_an", "p0led_an", "p1led_an", "p2led_an", "p3led_an", "p4led_an", "wdt", "refclk", "gpio", "i2s";
114 function = "gpio";
115 };
116 };
117
118 &spi0 {
119 status = "okay";
120
121 flash@0 {
122 compatible = "jedec,spi-nor";
123 reg = <0>;
124 spi-max-frequency = <40000000>;
125
126 partitions {
127 compatible = "fixed-partitions";
128 #address-cells = <1>;
129 #size-cells = <1>;
130
131 partition@0 {
132 label = "u-boot";
133 reg = <0x0 0x30000>;
134 read-only;
135 };
136
137 partition@30000 {
138 label = "u-boot-env";
139 reg = <0x30000 0x10000>;
140 read-only;
141 };
142
143 factory: partition@40000 {
144 label = "factory";
145 reg = <0x40000 0x10000>;
146 read-only;
147
148 nvmem-layout {
149 compatible = "fixed-layout";
150 #address-cells = <1>;
151 #size-cells = <1>;
152
153 eeprom_factory_0: eeprom@0 {
154 reg = <0x0 0x400>;
155 };
156
157 eeprom_factory_8000: eeprom@8000 {
158 reg = <0x8000 0x200>;
159 };
160 };
161 };
162
163 partition@50000 {
164 compatible = "brcm,trx";
165 brcm,trx-magic = <0x746f435c>;
166 label = "firmware";
167 reg = <0x50000 0x7c0000>;
168 };
169
170 partition@810000 {
171 label = "firmware2";
172 reg = <0x810000 0x7c0000>;
173 };
174
175 partition@fd0000 {
176 label = "glbcfg";
177 reg = <0xfd0000 0x10000>;
178 read-only;
179 };
180
181 partition@fe0000 {
182 label = "board_data";
183 reg = <0xfe0000 0x10000>;
184 read-only;
185 };
186 };
187 };
188 };
189
190 &wmac {
191 status = "okay";
192
193 nvmem-cells = <&eeprom_factory_0>;
194 nvmem-cell-names = "eeprom";
195 };