ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / PBR-D1.dts
1 /dts-v1/;
2
3 #include "mt7628an.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "d-team,pbr-d1", "mediatek,mt7628an-soc";
10 model = "PBR-D1";
11
12 aliases {
13 led-status = &led_power;
14 };
15
16 chosen {
17 bootargs = "console=ttyS0,115200";
18 };
19
20 aliases {
21 serial0 = &uart2;
22 };
23
24 memory@0 {
25 device_type = "memory";
26 reg = <0x0 0x8000000>;
27 };
28
29 gpio-leds {
30 compatible = "gpio-leds";
31
32 usb {
33 label = "pbr-d1:orange:usb";
34 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
35 default-state = "off";
36 };
37
38 led_power: power {
39 label = "pbr-d1:orange:power";
40 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
41 default-state = "on";
42 };
43 };
44
45 gpio-keys-polled {
46 compatible = "gpio-keys-polled";
47 #address-cells = <1>;
48 #size-cells = <0>;
49 poll-interval = <20>;
50
51 reset {
52 label = "reset";
53 gpios = <&gpio1 38 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART>;
55 };
56 };
57
58 wgpio: gpio-wifi {
59 compatible = "mediatek,gpio-wifi";
60 #address-cells = <1>;
61 #size-cells = <0>;
62 gpio-controller;
63 #gpio-cells = <2>;
64 };
65 };
66
67 &pinctrl {
68 state_default: pinctrl0 {
69 gpio {
70 ralink,group = "gpio";
71 ralink,function = "gpio";
72 };
73
74 i2c {
75 ralink,group = "i2c";
76 ralink,function = "gpio";
77 };
78
79 i2s {
80 ralink,group = "i2s";
81 ralink,function = "gpio";
82 };
83
84 spis {
85 ralink,group = "spis";
86 ralink,function = "gpio";
87 };
88
89 wdt {
90 ralink,group = "wdt";
91 ralink,function = "gpio";
92 };
93 };
94 };
95
96 &spi0 {
97 status = "okay";
98
99 pinctrl-names = "default";
100 pinctrl-0 = <&spi_pins>, <&spi_cs1_pins>;
101
102 m25p80@0 {
103 #address-cells = <1>;
104 #size-cells = <1>;
105 compatible = "jedec,spi-nor";
106 reg = <0>;
107 spi-max-frequency = <40000000>;
108 m25p,chunked-io = <31>;
109
110 partition@0 {
111 label = "u-boot";
112 reg = <0x0 0x30000>;
113 read-only;
114 };
115
116 partition@30000 {
117 label = "u-boot-env";
118 reg = <0x30000 0x10000>;
119 };
120
121 factory: partition@40000 {
122 label = "factory";
123 reg = <0x40000 0x10000>;
124 read-only;
125 };
126
127 partition@50000 {
128 label = "firmware";
129 reg = <0x50000 0x0fb0000>;
130 };
131 };
132
133 spidev@1 {
134 #address-cells = <1>;
135 #size-cells = <1>;
136 compatible = "linux,spidev";
137 reg = <1>;
138 spi-max-frequency = <40000000>;
139 };
140 };
141
142 &i2c {
143 status = "okay";
144 };
145
146 &uart1 {
147 status = "okay";
148 };
149
150 &uart2 {
151 status = "okay";
152 };
153
154 &pwm {
155 status = "okay";
156 };
157
158 &ethernet {
159 mtd-mac-address = <&factory 0x28>;
160 };
161
162 &sdhci {
163 status = "okay";
164 mediatek,cd-high;
165 };