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