ramips/mt7621: Name DTS files based on scheme
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / XIAOMI-MIR4A-100M.dts
1 //SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /dts-v1/;
3
4 #include "mt7628an.dtsi"
5
6 #include <dt-bindings/gpio/gpio.h>
7 #include <dt-bindings/input/input.h>
8
9 / {
10 compatible = "xiaomi,mir4a-100m", "mediatek,mt7628an-soc";
11 model = "Xiaomi Mi Router 4A (100M Edition)";
12
13 chosen {
14 bootargs = "console=ttyS0,115200";
15 };
16
17 memory@0 {
18 device_type = "memory";
19 reg = <0x0 0x4000000>;
20 };
21
22 aliases {
23 led-boot = &power_yellow;
24 led-failsafe = &power_yellow;
25 led-running = &power_blue;
26 led-upgrade = &power_yellow;
27 };
28
29 leds {
30 compatible = "gpio-leds";
31
32 power_blue: power_blue {
33 label = "mir4a-100m:blue:power";
34 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
35 };
36
37 power_yellow: power_yellow {
38 label = "mir4a-100m:yellow:power";
39 gpios = <&gpio1 12 GPIO_ACTIVE_LOW>;
40 };
41 };
42
43 keys {
44 compatible = "gpio-keys-polled";
45 poll-interval = <20>;
46
47 reset {
48 label = "reset";
49 gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
50 linux,code = <KEY_RESTART>;
51 };
52 };
53 };
54
55 &spi0 {
56 status = "okay";
57
58 flash@0 {
59 compatible = "jedec,spi-nor";
60 reg = <0>;
61 spi-max-frequency = <10000000>;
62
63 partitions {
64 compatible = "fixed-partitions";
65 #address-cells = <1>;
66 #size-cells = <1>;
67
68 partition@0 {
69 label = "bootloader";
70 reg = <0x0 0x20000>;
71 read-only;
72 };
73
74 partition@20000 {
75 label = "config";
76 reg = <0x20000 0x10000>;
77 read-only;
78 };
79
80 factory: partition@30000 {
81 label = "factory";
82 reg = <0x30000 0x10000>;
83 read-only;
84 };
85
86 partition@40000 {
87 label = "crash";
88 reg = <0x40000 0x10000>;
89 read-only;
90 };
91
92 partition@50000 {
93 label = "cfg_bak";
94 reg = <0x50000 0x10000>;
95 read-only;
96 };
97
98 partition@60000 {
99 label = "overlay";
100 reg = <0x60000 0x100000>;
101 read-only;
102 };
103
104 partition@160000 {
105 label = "firmware";
106 reg = <0x160000 0xea0000>;
107 compatible = "denx,uimage";
108 };
109 };
110 };
111 };
112
113 &pcie {
114 status = "okay";
115 };
116
117 &pcie0 {
118 wifi@0,0 {
119 compatible = "mediatek,mt76";
120 reg = <0x0000 0 0 0 0>;
121 mediatek,mtd-eeprom = <&factory 0x8000>;
122 ieee80211-freq-limit = <5000000 6000000>;
123 };
124 };
125
126 &pinctrl {
127 state_default: pinctrl0 {
128 gpio {
129 ralink,group = "gpio", "wdt", "wled_an";
130 ralink,function = "gpio";
131 };
132 };
133 };
134
135 &ethernet {
136 mtd-mac-address = <&factory 0x4>;
137 mtd-mac-address-increment = <(-1)>;
138 };
139
140 &esw {
141 mediatek,portmap = <0x2f>;
142 mediatek,portdisable = <0x2a>;
143 };
144
145 &wmac {
146 status = "okay";
147 };