ramips: add support for Belkin RT1800
[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_power: led-power {
44 label = "white:power";
45 gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
46 default-state = "on";
47 };
48
49 led-wan {
50 color = <LED_COLOR_ID_WHITE>;
51 function = LED_FUNCTION_WAN;
52 gpios = <&switch0 0 GPIO_ACTIVE_LOW>;
53 };
54 };
55 };
56
57 &nand {
58 status = "okay";
59
60 partitions {
61 compatible = "fixed-partitions";
62 #address-cells = <1>;
63 #size-cells = <1>;
64
65 partition@0 {
66 label = "Boot";
67 reg = <0x0 0x80000>;
68 read-only;
69 };
70
71 partition@80000 {
72 label = "Config";
73 reg = <0x80000 0x80000>;
74 };
75
76 factory: partition@100000 {
77 label = "Factory";
78 reg = <0x100000 0x80000>;
79 read-only;
80 };
81
82 partition@180000 {
83 label = "firmware";
84 reg = <0x180000 0x3000000>;
85
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "kernel";
92 reg = <0x0 0x400000>;
93 };
94
95 partition@400000 {
96 label = "ubi";
97 reg = <0x400000 0x2c00000>;
98 };
99 };
100
101 partition@3180000 {
102 label = "alt_firmware";
103 reg = <0x3180000 0x3000000>;
104 read-only;
105 };
106
107 partition@6180000 {
108 label = "cbtinfo";
109 reg = <0x6180000 0x80000>;
110 read-only;
111 };
112 /* seems to be the end here. Can't read past 0x6200000 */
113 };
114 };
115
116 &pcie {
117 status = "okay";
118 };
119
120 &pcie1 {
121 wifi@0,0 {
122 compatible = "mediatek,mt76";
123 reg = <0x0000 0 0 0 0>;
124 mediatek,mtd-eeprom = <&factory 0x0000>;
125 };
126 };
127
128 &gmac1 {
129 status = "okay";
130 label = "wan";
131 phy-handle = <&ethphy0>;
132 };
133
134 &mdio {
135 ethphy0: ethernet-phy@0 {
136 reg = <0>;
137 };
138 };
139
140 &switch0 {
141 gpio-controller;
142 #gpio-cells = <2>;
143
144 ports {
145 port@1 {
146 status = "okay";
147 label = "lan4";
148 };
149
150 port@2 {
151 status = "okay";
152 label = "lan3";
153 };
154
155 port@3 {
156 status = "okay";
157 label = "lan2";
158 };
159
160 port@4 {
161 status = "okay";
162 label = "lan1";
163 };
164 };
165 };