ramips: mt7621: update dts/defconfig for DSA
[openwrt/staging/chunkeey.git] / target / linux / ramips / dts / mt7621_iodata_wn-xx-xr.dtsi
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 aliases {
10 led-boot = &led_power;
11 led-failsafe = &led_power;
12 led-running = &led_power;
13 led-upgrade = &led_power;
14 label-mac-device = &wan;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,57600";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 wps {
25 label = "iodata:green:wps";
26 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
27 };
28
29 led_power: power {
30 label = "iodata:green:power";
31 gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys";
37
38 reset {
39 label = "reset";
40 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43
44 repeater {
45 label = "repeater";
46 gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
47 linux,code = <BTN_0>;
48 linux,input-type = <EV_SW>;
49 };
50
51 wps {
52 label = "wps";
53 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_WPS_BUTTON>;
55 };
56 };
57 };
58
59 &nand {
60 status = "okay";
61
62 partitions: partitions {
63 compatible = "fixed-partitions";
64 #address-cells = <1>;
65 #size-cells = <1>;
66
67 partition@0 {
68 label = "u-boot";
69 reg = <0x0 0x0100000>;
70 read-only;
71 };
72
73 partition@100000 {
74 label = "u-boot-env";
75 reg = <0x0100000 0x0100000>;
76 read-only;
77 };
78
79 factory: partition@200000 {
80 label = "factory";
81 reg = <0x0200000 0x0100000>;
82 };
83
84 partition@300000 {
85 label = "SecondBoot";
86 reg = <0x0300000 0x0100000>;
87 read-only;
88 };
89
90 partition@400000 {
91 label = "kernel";
92 reg = <0x0400000 0x0400000>;
93 };
94
95 partition@800000 {
96 label = "ubi";
97 reg = <0x0800000 0x2e00000>;
98 };
99
100 partition@3600000 {
101 label = "Config";
102 reg = <0x3600000 0x0100000>;
103 read-only;
104 };
105
106 partition@3700000 {
107 label = "firmware_2";
108 reg = <0x3700000 0x3200000>;
109 };
110
111 partition@6900000 {
112 label = "Config_2";
113 reg = <0x6900000 0x0100000>;
114 read-only;
115 };
116
117 partition@6a00000 {
118 label = "persist";
119 reg = <0x6a00000 0x0100000>;
120 };
121 };
122 };
123
124 &gmac0 {
125 mtd-mac-address = <&factory 0xe000>;
126 };
127
128 &switch0 {
129 ports {
130 wan: port@0 {
131 status = "okay";
132 label = "wan";
133 mtd-mac-address = <&factory 0xe006>;
134 };
135
136 port@1 {
137 status = "okay";
138 label = "lan4";
139 };
140
141 port@2 {
142 status = "okay";
143 label = "lan3";
144 };
145
146 port@3 {
147 status = "okay";
148 label = "lan2";
149 };
150
151 port@4 {
152 status = "okay";
153 label = "lan1";
154 };
155 };
156 };
157
158 &pcie {
159 status = "okay";
160 };
161
162 &state_default {
163 gpio {
164 groups = "uart2", "uart3", "wdt";
165 function = "gpio";
166 };
167 };
168
169 &xhci {
170 status = "disabled";
171 };