ramips: convert MT7610 and MT7612 EEPROM to NVMEM format for MT7621
[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 label = "Factory";
90 reg = <0x100000 0x80000>;
91 read-only;
92 };
93
94 partition@180000 {
95 label = "firmware";
96 reg = <0x180000 0x3000000>;
97
98 compatible = "fixed-partitions";
99 #address-cells = <1>;
100 #size-cells = <1>;
101
102 partition@0 {
103 label = "kernel";
104 reg = <0x0 0x400000>;
105 };
106
107 partition@400000 {
108 label = "ubi";
109 reg = <0x400000 0x2c00000>;
110 };
111 };
112
113 partition@3180000 {
114 label = "alt_firmware";
115 reg = <0x3180000 0x3000000>;
116 read-only;
117 };
118
119 partition@6180000 {
120 label = "cbtinfo";
121 reg = <0x6180000 0x80000>;
122 read-only;
123 };
124 /* seems to be the end here. Can't read past 0x6200000 */
125 };
126 };
127
128 &pcie {
129 status = "okay";
130 };
131
132 &pcie1 {
133 wifi@0,0 {
134 compatible = "mediatek,mt76";
135 reg = <0x0000 0 0 0 0>;
136 mediatek,mtd-eeprom = <&factory 0x0000>;
137 };
138 };
139
140 &state_default {
141 gpio {
142 groups = "i2c", "uart3", "jtag", "wdt";
143 function = "gpio";
144 };
145 };
146
147 &gmac1 {
148 status = "okay";
149 label = "wan";
150 phy-handle = <&ethphy0>;
151 };
152
153 &mdio {
154 ethphy0: ethernet-phy@0 {
155 reg = <0>;
156 };
157 };
158
159 &switch0 {
160 gpio-controller;
161 #gpio-cells = <2>;
162
163 ports {
164 port@1 {
165 status = "okay";
166 label = "lan4";
167 };
168
169 port@2 {
170 status = "okay";
171 label = "lan3";
172 };
173
174 port@3 {
175 status = "okay";
176 label = "lan2";
177 };
178
179 port@4 {
180 status = "okay";
181 label = "lan1";
182 };
183 };
184 };