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