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