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