ramips: fix power LED DTB for wt3020
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / PBR-M1.dts
1 /dts-v1/;
2
3 #include "mt7621.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "d-team,pbr-m1", "mediatek,mt7621-soc";
10 model = "PBR-M1";
11
12 aliases {
13 led-status = &led_sys;
14 };
15
16 memory@0 {
17 device_type = "memory";
18 reg = <0x0 0x10000000>;
19 };
20
21 chosen {
22 bootargs = "console=ttyS0,115200";
23 };
24
25 palmbus: palmbus@1E000000 {
26 i2c: i2c@900 {
27 status = "okay";
28
29 pcf8563: rtc@51 {
30 status = "okay";
31 compatible = "nxp,pcf8563";
32 reg = <0x51>;
33 };
34 };
35 };
36
37 gpio-leds {
38 compatible = "gpio-leds";
39
40 power {
41 label = "pbr-m1:blue:power";
42 gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
43 default-state = "on";
44 };
45
46 led_sys: sys {
47 label = "pbr-m1:blue:sys";
48 gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
49 };
50
51 internet {
52 label = "pbr-m1:blue:internet";
53 gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
54 };
55
56 wlan2g {
57 label = "pbr-m1:blue:wlan2g";
58 gpios = <&gpio1 1 GPIO_ACTIVE_LOW>;
59 };
60
61 wlan5g {
62 label = "pbr-m1:blue:wlan5g";
63 gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
64 };
65 };
66
67 gpio-keys-polled {
68 compatible = "gpio-keys-polled";
69 poll-interval = <20>;
70
71 reset {
72 label = "reset";
73 gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
74 linux,code = <KEY_RESTART>;
75 };
76 };
77
78 gpio_export {
79 compatible = "gpio-export";
80 #size-cells = <0>;
81
82 power_usb2 {
83 gpio-export,name = "power_usb2";
84 gpio-export,output = <1>;
85 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
86 };
87
88 power_usb3 {
89 gpio-export,name = "power_usb3";
90 gpio-export,output = <1>;
91 gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
92 };
93
94 power_sata {
95 gpio-export,name = "power_sata";
96 gpio-export,output = <1>;
97 gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
98 };
99 };
100
101 beeper: beeper {
102 compatible = "gpio-beeper";
103 gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
104 };
105 };
106
107 &sdhci {
108 status = "okay";
109 };
110
111 &spi0 {
112 status = "okay";
113
114 m25p80@0 {
115 compatible = "jedec,spi-nor";
116 reg = <0>;
117 spi-max-frequency = <10000000>;
118 m25p,chunked-io = <32>;
119
120 partitions {
121 compatible = "fixed-partitions";
122 #address-cells = <1>;
123 #size-cells = <1>;
124
125 partition@0 {
126 label = "u-boot";
127 reg = <0x0 0x30000>;
128 read-only;
129 };
130
131 partition@30000 {
132 label = "u-boot-env";
133 reg = <0x30000 0x10000>;
134 read-only;
135 };
136
137 factory: partition@40000 {
138 label = "factory";
139 reg = <0x40000 0x10000>;
140 read-only;
141 };
142
143 partition@50000 {
144 label = "firmware";
145 reg = <0x50000 0xfb0000>;
146 };
147 };
148 };
149 };
150
151 &pcie {
152 status = "okay";
153 };
154
155 &pcie0 {
156 mt76@0,0 {
157 reg = <0x0000 0 0 0 0>;
158 mediatek,mtd-eeprom = <&factory 0x8000>;
159 ieee80211-freq-limit = <5000000 6000000>;
160 };
161 };
162
163 &pcie1 {
164 mt76@0,0 {
165 reg = <0x0000 0 0 0 0>;
166 mediatek,mtd-eeprom = <&factory 0x0000>;
167 };
168 };
169
170 &ethernet {
171 mtd-mac-address = <&factory 0xe000>;
172 };
173
174 &pinctrl {
175 state_default: pinctrl0 {
176 gpio {
177 ralink,group = "wdt", "rgmii2", "jtag", "mdio";
178 ralink,function = "gpio";
179 };
180 };
181 };