ramips: mt7621: convert to nvmem-layout
[openwrt/staging/stintel.git] / target / linux / ramips / dts / mt7621_linksys_e5600.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 = "linksys,e5600", "mediatek,mt7621-soc";
10 model = "Linksys E5600";
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 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 keys {
24 compatible = "gpio-keys";
25
26 reset {
27 label = "reset";
28 gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 };
31
32 wps {
33 label = "wps";
34 gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
35 linux,code = <KEY_WPS_BUTTON>;
36 };
37 };
38
39 leds {
40 compatible = "gpio-leds";
41
42 wps {
43 label = "amber:wps";
44 gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
45 };
46
47 led_power: power {
48 label = "blue:power";
49 gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
50 default-state = "on";
51 };
52
53 wan_amber {
54 label = "amber:wan";
55 gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
56 };
57
58 wan_blue {
59 label = "blue:wan";
60 gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
61 };
62 };
63 };
64
65 &nand {
66 status = "okay";
67
68 partitions {
69 compatible = "fixed-partitions";
70 #address-cells = <1>;
71 #size-cells = <1>;
72
73 partition@0 {
74 label = "boot";
75 reg = <0x0 0x80000>;
76 read-only;
77 };
78
79 partition@80000 {
80 label = "u_env";
81 reg = <0x80000 0x40000>;
82 read-only;
83 };
84
85 factory: partition@c0000 {
86 label = "factory";
87 reg = <0xc0000 0x40000>;
88 read-only;
89
90 nvmem-layout {
91 compatible = "fixed-layout";
92 #address-cells = <1>;
93 #size-cells = <1>;
94
95 eeprom_factory_0: eeprom@0 {
96 reg = <0x0 0x400>;
97 };
98
99 eeprom_factory_8000: eeprom@8000 {
100 reg = <0x8000 0x4da8>;
101 };
102 };
103 };
104
105 partition@100000 {
106 label = "s_env";
107 reg = <0x100000 0x40000>;
108 };
109
110 partition@140000 {
111 label = "devinfo";
112 reg = <0x140000 0x40000>;
113 read-only;
114 };
115
116 partition@180000 {
117 label = "kernel";
118 reg = <0x180000 0x400000>;
119 };
120
121 partition@580000 {
122 label = "ubi";
123 reg = <0x580000 0x1a00000>;
124 };
125
126 partition@1f80000 {
127 label = "alt_firmware";
128 reg = <0x1f80000 0x1e00000>;
129 };
130
131 partition@3d80000 {
132 label = "gdata";
133 reg = <0x3d80000 0x4200000>;
134 };
135 };
136 };
137
138 &state_default {
139 gpio {
140 groups = "uart2", "uart3", "jtag";
141 function = "gpio";
142 };
143 };
144
145 &pcie {
146 status = "okay";
147 };
148
149 &pcie0 {
150 mt76@0,0 {
151 compatible = "mediatek,mt76";
152 reg = <0x0000 0 0 0 0>;
153 nvmem-cells = <&eeprom_factory_0>;
154 nvmem-cell-names = "eeprom";
155 };
156 };
157
158 &pcie1 {
159 mt76@0,0 {
160 compatible = "mediatek,mt76";
161 reg = <0x0000 0 0 0 0>;
162 nvmem-cells = <&eeprom_factory_8000>;
163 nvmem-cell-names = "eeprom";
164 };
165 };
166
167 &gmac1 {
168 status = "okay";
169 label = "wan";
170 phy-handle = <&ethphy4>;
171 };
172
173 &mdio {
174 ethphy4: ethernet-phy@4 {
175 reg = <4>;
176 };
177 };
178
179 &switch0 {
180 ports {
181 port@0 {
182 status = "okay";
183 label = "lan1";
184 };
185
186 port@1 {
187 status = "okay";
188 label = "lan2";
189 };
190
191 port@2 {
192 status = "okay";
193 label = "lan3";
194 };
195
196 port@3 {
197 status = "okay";
198 label = "lan4";
199 };
200 };
201 };
202
203 &xhci {
204 status = "disabled";
205 };