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