ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / DWR-512-B.dts
1 /dts-v1/;
2
3 #include "rt5350.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dwr-512-b", "ralink,rt5350-soc";
10 model = "D-Link DWR-512 B";
11
12 aliases {
13 led-status = &led_status;
14 };
15
16 gpio-keys-polled {
17 compatible = "gpio-keys-polled";
18 #address-cells = <1>;
19 #size-cells = <0>;
20 poll-interval = <20>;
21
22 wps {
23 label = "wps";
24 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
25 linux,code = <KEY_WPS_BUTTON>;
26 };
27
28 reset {
29 label = "reset";
30 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
31 linux,code = <KEY_RESTART>;
32 };
33 };
34
35 gpio-leds {
36 compatible = "gpio-leds";
37
38 sms {
39 label = "dwr-512-b:green:sms";
40 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
41 };
42 led_status: status {
43 label = "dwr-512-b:green:status";
44 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
45 };
46 2g {
47 label = "dwr-512-b:green:2g";
48 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
49 };
50 3g {
51 label = "dwr-512-b:green:3g";
52 gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
53 };
54 sstrengthr {
55 label = "dwr-512-b:red:sigstrength";
56 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
57 };
58 sstrengthg {
59 label = "dwr-512-b:green:sigstrength";
60 gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
61 };
62 };
63
64 gpio-export {
65 compatible = "gpio-export";
66 #size-cells = <0>;
67
68 slic_int {
69 gpio-export,name = "slic_int";
70 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
71 };
72 modem3g_enable {
73 gpio-export,name = "modem3g_enable";
74 gpio-export,output = <1>;
75 gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
76 };
77 };
78 };
79
80 &spi0 {
81 status = "okay";
82
83 mx25l6405d@0 {
84 #address-cells = <1>;
85 #size-cells = <1>;
86 compatible = "jedec,spi-nor";
87 reg = <0>;
88 spi-max-frequency = <30000000>;
89 m25p,fast-read;
90
91 partition@0 {
92 label = "jboot";
93 reg = <0x0 0x10000>;
94 read-only;
95 };
96
97 partition@10000 {
98 label = "firmware";
99 reg = <0x10000 0x7e0000>;
100 };
101
102 config: partition@7f0000 {
103 label = "config";
104 reg = <0x7f0000 0x10000>;
105 };
106 };
107 };
108
109 &spi1 {
110 status = "okay";
111
112 spidev@1 {
113 #address-cells = <1>;
114 #size-cells = <1>;
115 compatible = "siliconlabs,si3210";
116
117 reg = <0>;
118 spi-max-frequency = <1000000>;
119 };
120 };
121
122 &pinctrl {
123 state_default: pinctrl0 {
124 gpio {
125 ralink,group = "i2c", "jtag", "uartf";
126 ralink,function = "gpio";
127 };
128 };
129 };
130
131 &esw {
132 mediatek,portmap = <0x2f>;
133 };
134
135 &ethernet {
136 mtd-mac-address = <&config 0xe07e>;
137 };
138
139 &wmac {
140 ralink,mtd-eeprom = <&config 0xe08a>;
141 ralink,led-polarity = <1>;
142 mtd-mac-address = <&config 0xe07e>;
143 };