ramips: add Xiaomi Mi Router 4A Gigabit explicitly
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7621_xiaomi_mi-router-4a-3g-v2.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_status_yellow;
11 led-failsafe = &led_status_yellow;
12 led-running = &led_status_blue;
13 led-upgrade = &led_status_yellow;
14 label-mac-device = &wan;
15 };
16
17 chosen {
18 bootargs = "console=ttyS0,115200n8";
19 };
20
21 leds {
22 compatible = "gpio-leds";
23
24 led_status_blue: status_blue {
25 label = "blue:status";
26 gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
27 };
28
29 led_status_yellow: status_yellow {
30 label = "yellow:status";
31 gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
32 };
33 };
34
35 keys {
36 compatible = "gpio-keys";
37
38 reset {
39 label = "reset";
40 gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43 };
44 };
45
46 &spi0 {
47 status = "okay";
48
49 flash@0 {
50 compatible = "jedec,spi-nor";
51 reg = <0>;
52 spi-max-frequency = <80000000>;
53
54 partitions {
55 compatible = "fixed-partitions";
56 #address-cells = <1>;
57 #size-cells = <1>;
58
59 partition@0 {
60 label = "u-boot";
61 reg = <0x0 0x30000>;
62 read-only;
63 };
64
65 partition@30000 {
66 label = "u-boot-env";
67 reg = <0x30000 0x10000>;
68 read-only;
69 };
70
71 partition@40000 {
72 label = "Bdata";
73 reg = <0x40000 0x10000>;
74 read-only;
75 };
76
77 factory: partition@50000 {
78 label = "factory";
79 reg = <0x50000 0x10000>;
80 read-only;
81 };
82
83 partition@60000 {
84 label = "crash";
85 reg = <0x60000 0x10000>;
86 read-only;
87 };
88
89 partition@70000 {
90 label = "cfg_bak";
91 reg = <0x70000 0x10000>;
92 read-only;
93 };
94
95 partition@80000 {
96 label = "overlay";
97 reg = <0x80000 0x100000>;
98 read-only;
99 };
100
101 firmware: partition@180000 {
102 compatible = "denx,uimage";
103 label = "firmware";
104 reg = <0x180000 0xe80000>;
105 };
106 };
107 };
108 };
109
110 &pcie {
111 status = "okay";
112 };
113
114 &pcie0 {
115 wifi@0,0 {
116 compatible = "pci14c3,7662";
117 reg = <0x0000 0 0 0 0>;
118 mediatek,mtd-eeprom = <&factory 0x8000>;
119 ieee80211-freq-limit = <5000000 6000000>;
120 };
121 };
122
123 &pcie1 {
124 wifi@0,0 {
125 compatible = "pci14c3,7603";
126 reg = <0x0000 0 0 0 0>;
127 mediatek,mtd-eeprom = <&factory 0x0000>;
128 ieee80211-freq-limit = <2400000 2500000>;
129 };
130 };
131
132 &gmac0 {
133 mtd-mac-address = <&factory 0xe000>;
134 };
135
136 &switch0 {
137 ports {
138 port@2 {
139 status = "okay";
140 label = "lan2";
141 };
142
143 port@3 {
144 status = "okay";
145 label = "lan1";
146 };
147
148 wan: port@4 {
149 status = "okay";
150 label = "wan";
151 mtd-mac-address = <&factory 0xe006>;
152 };
153 };
154 };
155
156 &state_default {
157 gpio {
158 groups = "jtag", "uart2", "uart3", "wdt";
159 function = "gpio";
160 };
161 };