ramips: add support for Xiaomi MiWiFi Mini devices
[openwrt/svn-archive/archive.git] / target / linux / ramips / dts / XIAOMI-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 = "w25q128";
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 ralink,port-map = "llllw";
91 };
92
93 wmac@10180000 {
94 ralink,mtd-eeprom = <&factory 0>;
95 };
96
97 pcie@10140000 {
98 status = "okay";
99
100 pcie0 {
101 mt76@0,0 {
102 reg = <0x0000 0 0 0 0>;
103 device_type = "pci";
104 mediatek,mtd-eeprom = <&factory 0x8000>;
105 };
106 };
107 };
108
109 pinctrl {
110 state_default: pinctrl0 {
111 gpio {
112 ralink,group = "i2c", "rgmii1";
113 ralink,function = "gpio";
114 };
115 };
116 };
117
118 gpio-leds {
119 compatible = "gpio-leds";
120
121 blue {
122 label = "xiaomi:blue:status";
123 gpios = <&gpio1 0 1>;
124 };
125
126 yellow {
127 label = "xiaomi:yellow:status";
128 gpios = <&gpio1 2 1>;
129 };
130
131 red {
132 label = "xiaomi:red:status";
133 gpios = <&gpio1 5 1>;
134 };
135 };
136
137 gpio-keys-polled {
138 compatible = "gpio-keys-polled";
139 #address-cells = <1>;
140 #size-cells = <0>;
141 poll-interval = <20>;
142 reset {
143 label = "reset";
144 gpios = <&gpio1 6 0>;
145 linux,code = <0x198>;
146 };
147 };
148 };