ramips: convert MT7915 EEPROM to NVMEM format
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_belkin_rt1800.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 = "belkin,rt1800", "mediatek,mt7621-soc";
11 model = "Belkin RT1800";
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 = "white:power";
51 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
52 default-state = "on";
53 };
54
55 led-wan2 {
56 color = <LED_COLOR_ID_AMBER>;
57 function = LED_FUNCTION_WAN;
58 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
59 };
60
61 led-wan {
62 color = <LED_COLOR_ID_WHITE>;
63 function = LED_FUNCTION_WAN;
64 gpios = <&switch0 0 GPIO_ACTIVE_LOW>;
65 };
66 };
67 };
68
69 &nand {
70 status = "okay";
71
72 partitions {
73 compatible = "fixed-partitions";
74 #address-cells = <1>;
75 #size-cells = <1>;
76
77 partition@0 {
78 label = "Boot";
79 reg = <0x0 0x80000>;
80 read-only;
81 };
82
83 partition@80000 {
84 label = "Config";
85 reg = <0x80000 0x80000>;
86 };
87
88 factory: partition@100000 {
89 compatible = "nvmem-cells";
90 label = "Factory";
91 reg = <0x100000 0x80000>;
92 #address-cells = <1>;
93 #size-cells = <1>;
94 read-only;
95
96 eeprom_factory_0: eeprom@0 {
97 reg = <0x0 0xe00>;
98 };
99 };
100
101 partition@180000 {
102 label = "firmware";
103 reg = <0x180000 0x3000000>;
104
105 compatible = "fixed-partitions";
106 #address-cells = <1>;
107 #size-cells = <1>;
108
109 partition@0 {
110 label = "kernel";
111 reg = <0x0 0x400000>;
112 };
113
114 partition@400000 {
115 label = "ubi";
116 reg = <0x400000 0x2c00000>;
117 };
118 };
119
120 partition@3180000 {
121 label = "alt_firmware";
122 reg = <0x3180000 0x3000000>;
123 read-only;
124 };
125
126 partition@6180000 {
127 label = "cbtinfo";
128 reg = <0x6180000 0x80000>;
129 read-only;
130 };
131 /* seems to be the end here. Can't read past 0x6200000 */
132 };
133 };
134
135 &pcie {
136 status = "okay";
137 };
138
139 &pcie1 {
140 wifi@0,0 {
141 compatible = "mediatek,mt76";
142 reg = <0x0000 0 0 0 0>;
143 nvmem-cells = <&eeprom_factory_0>;
144 nvmem-cell-names = "eeprom";
145 };
146 };
147
148 &state_default {
149 gpio {
150 groups = "i2c", "uart3", "jtag", "wdt";
151 function = "gpio";
152 };
153 };
154
155 &gmac1 {
156 status = "okay";
157 label = "wan";
158 phy-handle = <&ethphy0>;
159 };
160
161 &mdio {
162 ethphy0: ethernet-phy@0 {
163 reg = <0>;
164 };
165 };
166
167 &switch0 {
168 gpio-controller;
169 #gpio-cells = <2>;
170
171 ports {
172 port@1 {
173 status = "okay";
174 label = "lan4";
175 };
176
177 port@2 {
178 status = "okay";
179 label = "lan3";
180 };
181
182 port@3 {
183 status = "okay";
184 label = "lan2";
185 };
186
187 port@4 {
188 status = "okay";
189 label = "lan1";
190 };
191 };
192 };