ramips: mt7621: convert to nvmem-layout
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_linksys_e7350.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 #include <dt-bindings/leds/common.h>
8
9 / {
10 compatible = "linksys,e7350", "mediatek,mt7621-soc";
11 model = "Linksys E7350";
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 chosen {
21 bootargs = "console=ttyS0,115200";
22 };
23
24 keys {
25 compatible = "gpio-keys";
26
27 reset {
28 label = "reset";
29 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
30 linux,code = <KEY_RESTART>;
31 };
32
33 wps {
34 label = "wps";
35 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
36 linux,code = <KEY_WPS_BUTTON>;
37 };
38 };
39
40 leds {
41 compatible = "gpio-leds";
42
43 led-wps {
44 color = <LED_COLOR_ID_AMBER>;
45 function = LED_FUNCTION_WPS;
46 gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
47 };
48
49 led_power: led-power {
50 label = "blue:power";
51 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
52 default-state = "on";
53 };
54
55 led-wan {
56 color = <LED_COLOR_ID_AMBER>;
57 function = LED_FUNCTION_WAN;
58 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
59 };
60 };
61 };
62
63 &nand {
64 status = "okay";
65
66 partitions {
67 compatible = "fixed-partitions";
68 #address-cells = <1>;
69 #size-cells = <1>;
70
71 partition@0 {
72 label = "Boot";
73 reg = <0x0 0x80000>;
74 read-only;
75 };
76
77 partition@80000 {
78 label = "Config";
79 reg = <0x80000 0x80000>;
80 };
81
82 factory: partition@100000 {
83 label = "Factory";
84 reg = <0x100000 0x80000>;
85 read-only;
86
87 nvmem-layout {
88 compatible = "fixed-layout";
89 #address-cells = <1>;
90 #size-cells = <1>;
91
92 eeprom_factory_0: eeprom@0 {
93 reg = <0x0 0xe00>;
94 };
95 };
96 };
97
98 partition@180000 {
99 label = "firmware";
100 reg = <0x180000 0x3000000>;
101
102 compatible = "fixed-partitions";
103 #address-cells = <1>;
104 #size-cells = <1>;
105
106 partition@0 {
107 label = "kernel";
108 reg = <0x0 0x400000>;
109 };
110
111 partition@400000 {
112 label = "ubi";
113 reg = <0x400000 0x2c00000>;
114 };
115 };
116
117 partition@3180000 {
118 label = "alt_firmware";
119 reg = <0x3180000 0x3000000>;
120 read-only;
121 };
122
123 partition@6180000 {
124 label = "cbtinfo";
125 reg = <0x6180000 0x80000>;
126 read-only;
127 };
128 /* seems to be the end here. Can't read past 0x6200000 */
129 };
130 };
131
132 &pcie {
133 status = "okay";
134 };
135
136 &pcie1 {
137 wifi@0,0 {
138 compatible = "mediatek,mt76";
139 reg = <0x0000 0 0 0 0>;
140 nvmem-cells = <&eeprom_factory_0>;
141 nvmem-cell-names = "eeprom";
142 };
143 };
144
145 &state_default {
146 gpio {
147 groups = "i2c", "uart3", "jtag", "wdt";
148 function = "gpio";
149 };
150 };
151
152 &gmac1 {
153 status = "okay";
154 label = "wan";
155 phy-handle = <&ethphy0>;
156 };
157
158 &mdio {
159 ethphy0: ethernet-phy@0 {
160 reg = <0>;
161 };
162 };
163
164 &switch0 {
165 ports {
166 port@1 {
167 status = "okay";
168 label = "lan4";
169 };
170
171 port@2 {
172 status = "okay";
173 label = "lan3";
174 };
175
176 port@3 {
177 status = "okay";
178 label = "lan2";
179 };
180
181 port@4 {
182 status = "okay";
183 label = "lan1";
184 };
185 };
186 };