mac80211: rt2x00: experimental improvements for MT7620 wifi
[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_blue;
12 led-failsafe = &led_blue;
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 default-state = "on";
29 };
30
31 yellow {
32 label = "yellow:status";
33 gpios = <&gpio1 2 GPIO_ACTIVE_LOW>;
34 };
35
36 red {
37 label = "red:status";
38 gpios = <&gpio1 5 GPIO_ACTIVE_LOW>;
39 };
40
41 wan {
42 label = "green:wan";
43 gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
44 };
45
46 lan1 {
47 label = "green:lan1";
48 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
49 };
50
51 lan2 {
52 label = "green:lan2";
53 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
54 };
55 };
56
57 keys {
58 compatible = "gpio-keys";
59
60 reset {
61 label = "reset";
62 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
63 linux,code = <KEY_RESTART>;
64 };
65 };
66 };
67
68 &gpio1 {
69 status = "okay";
70 };
71
72 &gpio2 {
73 status = "okay";
74 };
75
76 &spi0 {
77 status = "okay";
78
79 flash@0 {
80 compatible = "jedec,spi-nor";
81 reg = <0>;
82 spi-max-frequency = <70000000>;
83 m25p,fast-read;
84
85 partitions {
86 compatible = "fixed-partitions";
87 #address-cells = <1>;
88 #size-cells = <1>;
89
90 partition@0 {
91 label = "u-boot";
92 reg = <0x0 0x30000>;
93 read-only;
94 };
95
96 partition@30000 {
97 label = "u-boot-env";
98 reg = <0x30000 0x10000>;
99 };
100
101 factory: partition@40000 {
102 label = "factory";
103 reg = <0x40000 0x10000>;
104 read-only;
105 };
106
107 partition@50000 {
108 compatible = "denx,uimage";
109 label = "firmware";
110 reg = <0x50000 0xf80000>;
111 };
112
113 partition@fd0000 {
114 label = "crash";
115 reg = <0xfd0000 0x10000>;
116 };
117
118 partition@fe0000 {
119 label = "reserved";
120 reg = <0xfe0000 0x10000>;
121 read-only;
122 };
123
124 partition@ff0000 {
125 label = "Bdata";
126 reg = <0xff0000 0x10000>;
127 };
128 };
129 };
130 };
131
132 &ehci {
133 status = "okay";
134 };
135
136 &ohci {
137 status = "okay";
138 };
139
140 &ethernet {
141 nvmem-cells = <&macaddr_factory_28>;
142 nvmem-cell-names = "mac-address";
143
144 mediatek,portmap = "llllw";
145 };
146
147 &wmac {
148 ralink,mtd-eeprom = <&factory 0x0>;
149
150 pinctrl-names = "default", "pa_gpio";
151 pinctrl-0 = <&pa_pins>;
152 pinctrl-1 = <&pa_gpio_pins>;
153 };
154
155 &pcie {
156 status = "okay";
157 };
158
159 &pcie0 {
160 mt76@0,0 {
161 reg = <0x0000 0 0 0 0>;
162 mediatek,mtd-eeprom = <&factory 0x8000>;
163 ieee80211-freq-limit = <5000000 6000000>;
164 };
165 };
166
167 &state_default {
168 gpio {
169 groups = "ephy", "i2c", "rgmii1";
170 function = "gpio";
171 };
172 };
173
174 &factory {
175 compatible = "nvmem-cells";
176 #address-cells = <1>;
177 #size-cells = <1>;
178
179 macaddr_factory_28: macaddr@28 {
180 reg = <0x28 0x6>;
181 };
182 };