ramips: mt7620: disable PCIe if nothing is attached
[openwrt/staging/chunkeey.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 compatible = "denx,uimage";
101 label = "firmware";
102 reg = <0x50000 0xf80000>;
103 };
104
105 partition@fd0000 {
106 label = "crash";
107 reg = <0xfd0000 0x10000>;
108 };
109
110 partition@fe0000 {
111 label = "reserved";
112 reg = <0xfe0000 0x10000>;
113 read-only;
114 };
115
116 partition@ff0000 {
117 label = "Bdata";
118 reg = <0xff0000 0x10000>;
119 };
120 };
121 };
122 };
123
124 &ehci {
125 status = "okay";
126 };
127
128 &ohci {
129 status = "okay";
130 };
131
132 &ethernet {
133 pinctrl-names = "default";
134 pinctrl-0 = <&ephy_pins>;
135 mtd-mac-address = <&factory 0x28>;
136 mediatek,portmap = "llllw";
137 };
138
139 &wmac {
140 ralink,mtd-eeprom = <&factory 0>;
141 pinctrl-names = "default";
142 pinctrl-0 = <&pa_pins>;
143 };
144
145 &pcie {
146 status = "okay";
147 };
148
149 &pcie0 {
150 mt76@0,0 {
151 reg = <0x0000 0 0 0 0>;
152 mediatek,mtd-eeprom = <&factory 0x8000>;
153 ieee80211-freq-limit = <5000000 6000000>;
154 };
155 };
156
157 &pinctrl {
158 state_default: pinctrl0 {
159 gpio {
160 ralink,group = "i2c", "rgmii1";
161 ralink,function = "gpio";
162 };
163 };
164 };