ramips: convert MT7603 EEPROM to NVMEM format
[openwrt/openwrt.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 compatible = "nvmem-cells";
87 label = "factory";
88 reg = <0xc0000 0x40000>;
89 #address-cells = <1>;
90 #size-cells = <1>;
91 read-only;
92
93 eeprom_factory_0: eeprom@0 {
94 reg = <0x0 0x400>;
95 };
96 };
97
98 partition@100000 {
99 label = "s_env";
100 reg = <0x100000 0x40000>;
101 };
102
103 partition@140000 {
104 label = "devinfo";
105 reg = <0x140000 0x40000>;
106 read-only;
107 };
108
109 partition@180000 {
110 label = "kernel";
111 reg = <0x180000 0x400000>;
112 };
113
114 partition@580000 {
115 label = "ubi";
116 reg = <0x580000 0x1a00000>;
117 };
118
119 partition@1f80000 {
120 label = "alt_firmware";
121 reg = <0x1f80000 0x1e00000>;
122 };
123
124 partition@3d80000 {
125 label = "gdata";
126 reg = <0x3d80000 0x4200000>;
127 };
128 };
129 };
130
131 &state_default {
132 gpio {
133 groups = "uart2", "uart3", "jtag";
134 function = "gpio";
135 };
136 };
137
138 &pcie {
139 status = "okay";
140 };
141
142 &pcie0 {
143 mt76@0,0 {
144 compatible = "mediatek,mt76";
145 reg = <0x0000 0 0 0 0>;
146 nvmem-cells = <&eeprom_factory_0>;
147 nvmem-cell-names = "eeprom";
148 };
149 };
150
151 &pcie1 {
152 mt76@0,0 {
153 compatible = "mediatek,mt76";
154 reg = <0x0000 0 0 0 0>;
155 mediatek,mtd-eeprom = <&factory 0x8000>;
156 };
157 };
158
159 &gmac1 {
160 status = "okay";
161 label = "wan";
162 phy-handle = <&ethphy4>;
163 };
164
165 &mdio {
166 ethphy4: ethernet-phy@4 {
167 reg = <4>;
168 };
169 };
170
171 &switch0 {
172 ports {
173 port@0 {
174 status = "okay";
175 label = "lan1";
176 };
177
178 port@1 {
179 status = "okay";
180 label = "lan2";
181 };
182
183 port@2 {
184 status = "okay";
185 label = "lan3";
186 };
187
188 port@3 {
189 status = "okay";
190 label = "lan4";
191 };
192 };
193 };
194
195 &xhci {
196 status = "disabled";
197 };