a8a7db80828f8d840fada784745e0e7584251926
[openwrt/staging/jow.git] / target / linux / ramips / dts / mt7620a_xiaomi_miwifi-mini.dts
1 #include "mt7620a.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5
6 / {
7 compatible = "xiaomi,miwifi-mini", "ralink,mt7620a-soc";
8 model = "Xiaomi MiWiFi Mini";
9
10 aliases {
11 led-boot = &led_yellow;
12 led-failsafe = &led_red;
13 led-running = &led_blue;
14 led-upgrade = &led_blue;
15 label-mac-device = &ethernet;
16 };
17
18 chosen {
19 bootargs = "console=ttyS0,115200";
20 };
21
22 leds {
23 compatible = "gpio-leds";
24
25 led_blue: blue {
26 label = "blue:status";
27 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
28 };
29
30 led_yellow: yellow {
31 label = "yellow:status";
32 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
33 };
34
35 led_red: red {
36 label = "red:status";
37 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
38 };
39
40 wan {
41 label = "green:wan";
42 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
43 };
44
45 lan1 {
46 label = "green:lan1";
47 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
48 };
49
50 lan2 {
51 label = "green:lan2";
52 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
53 };
54 };
55
56 keys {
57 compatible = "gpio-keys";
58
59 reset {
60 label = "reset";
61 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
62 linux,code = <KEY_RESTART>;
63 };
64 };
65 };
66
67 &gpio1 {
68 status = "okay";
69 };
70
71 &gpio2 {
72 status = "okay";
73 };
74
75 &spi0 {
76 status = "okay";
77
78 flash@0 {
79 compatible = "jedec,spi-nor";
80 reg = <0>;
81 spi-max-frequency = <70000000>;
82 m25p,fast-read;
83
84 partitions {
85 compatible = "fixed-partitions";
86 #address-cells = <1>;
87 #size-cells = <1>;
88
89 partition@0 {
90 label = "u-boot";
91 reg = <0x0 0x30000>;
92 read-only;
93 };
94
95 partition@30000 {
96 label = "u-boot-env";
97 reg = <0x30000 0x10000>;
98 };
99
100 factory: partition@40000 {
101 compatible = "nvmem-cells";
102 label = "factory";
103 reg = <0x40000 0x10000>;
104 #address-cells = <1>;
105 #size-cells = <1>;
106 read-only;
107
108 eeprom_factory_0: eeprom@0 {
109 reg = <0x0 0x200>;
110 };
111
112 eeprom_factory_8000: eeprom@8000 {
113 reg = <0x8000 0x200>;
114 };
115
116 macaddr_factory_28: macaddr@28 {
117 reg = <0x28 0x6>;
118 };
119 };
120
121 partition@50000 {
122 compatible = "denx,uimage";
123 label = "firmware";
124 reg = <0x50000 0xf80000>;
125 };
126
127 partition@fd0000 {
128 label = "crash";
129 reg = <0xfd0000 0x10000>;
130 };
131
132 partition@fe0000 {
133 label = "reserved";
134 reg = <0xfe0000 0x10000>;
135 read-only;
136 };
137
138 partition@ff0000 {
139 label = "Bdata";
140 reg = <0xff0000 0x10000>;
141 };
142 };
143 };
144 };
145
146 &ehci {
147 status = "okay";
148 };
149
150 &ohci {
151 status = "okay";
152 };
153
154 &ethernet {
155 nvmem-cells = <&macaddr_factory_28>;
156 nvmem-cell-names = "mac-address";
157
158 mediatek,portmap = "llllw";
159 };
160
161 &wmac {
162 pinctrl-names = "default", "pa_gpio";
163 pinctrl-0 = <&pa_pins>;
164 pinctrl-1 = <&pa_gpio_pins>;
165 nvmem-cells = <&eeprom_factory_0>;
166 nvmem-cell-names = "eeprom";
167 };
168
169 &pcie {
170 status = "okay";
171 };
172
173 &pcie0 {
174 mt76@0,0 {
175 reg = <0x0000 0 0 0 0>;
176 nvmem-cells = <&eeprom_factory_8000>;
177 nvmem-cell-names = "eeprom";
178 ieee80211-freq-limit = <5000000 6000000>;
179 };
180 };
181
182 &state_default {
183 gpio {
184 groups = "ephy", "i2c", "rgmii1";
185 function = "gpio";
186 };
187 };