ramips: Add support for Xiaomi Mi Router(Black,R2100)
[openwrt/openwrt.git] / target / linux / ramips / dts / mt7621_xiaomi_router-ac2100.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
10 chosen {
11 bootargs = "console=ttyS0,115200n8";
12 };
13
14 keys {
15 compatible = "gpio-keys";
16
17 reset {
18 label = "reset";
19 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
20 linux,code = <KEY_RESTART>;
21 };
22 };
23 };
24
25 &nand {
26 status = "okay";
27
28 partitions {
29 compatible = "fixed-partitions";
30 #address-cells = <1>;
31 #size-cells = <1>;
32
33 partition@0 {
34 label = "Bootloader";
35 reg = <0x0 0x80000>;
36 read-only;
37 };
38
39 partition@80000 {
40 label = "Config";
41 reg = <0x80000 0x40000>;
42 };
43
44 partition@c0000 {
45 label = "Bdata";
46 reg = <0xc0000 0x40000>;
47 read-only;
48 };
49
50 factory: partition@100000 {
51 label = "factory";
52 reg = <0x100000 0x40000>;
53 read-only;
54 };
55
56 partition@140000 {
57 label = "crash";
58 reg = <0x140000 0x40000>;
59 };
60
61 partition@180000 {
62 label = "crash_syslog";
63 reg = <0x180000 0x40000>;
64 };
65
66 partition@1c0000 {
67 label = "reserved0";
68 reg = <0x1c0000 0x40000>;
69 read-only;
70 };
71
72 /* We keep stock xiaomi firmware (kernel0) here */
73 partition@200000 {
74 label = "kernel_stock";
75 reg = <0x200000 0x400000>;
76 };
77
78 partition@600000 {
79 label = "kernel";
80 reg = <0x600000 0x400000>;
81 };
82
83 partition@a00000 {
84 label = "ubi";
85 reg = <0xa00000 0x7580000>;
86 };
87 };
88 };
89
90 &pcie {
91 status = "okay";
92 };
93
94 &pcie0 {
95 wifi@0,0 {
96 compatible = "mediatek,mt76";
97 reg = <0x0000 0 0 0 0>;
98 mediatek,mtd-eeprom = <&factory 0x8000>;
99 ieee80211-freq-limit = <5000000 6000000>;
100 };
101 };
102
103 &pcie1 {
104 wifi@0,0 {
105 compatible = "mediatek,mt76";
106 reg = <0x0000 0 0 0 0>;
107 mediatek,mtd-eeprom = <&factory 0x0000>;
108 ieee80211-freq-limit = <2400000 2500000>;
109 };
110 };
111
112 &gmac0 {
113 mtd-mac-address = <&factory 0xe000>;
114 };
115
116 &switch0 {
117 ports {
118 port@0 {
119 status = "okay";
120 label = "wan";
121 mtd-mac-address = <&factory 0xe006>;
122 };
123
124 port@2 {
125 status = "okay";
126 label = "lan1";
127 };
128
129 port@3 {
130 status = "okay";
131 label = "lan2";
132 };
133
134 port@4 {
135 status = "okay";
136 label = "lan3";
137 };
138 };
139 };
140
141 &state_default {
142 gpio {
143 groups = "uart2", "uart3", "wdt";
144 function = "gpio";
145 };
146 };