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