ramips: Use dts alias based status led
[openwrt/staging/mkresin.git] / target / linux / ramips / dts / DCS-930.dts
1 /dts-v1/;
2
3 #include "rt3050.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dcs-930", "ralink,rt3050-soc";
10 model = "D-Link DCS-930";
11
12 aliases {
13 led-status = &led_status;
14 };
15
16 cfi@1f000000 {
17 compatible = "cfi-flash";
18 reg = <0x1f000000 0x400000>;
19 bank-width = <2>;
20 device-width = <2>;
21 #address-cells = <1>;
22 #size-cells = <1>;
23
24 partition@0 {
25 label = "u-boot";
26 reg = <0x0 0x30000>;
27 read-only;
28 };
29
30 partition@30000 {
31 label = "u-boot-env";
32 reg = <0x30000 0x10000>;
33 read-only;
34 };
35
36 factory: partition@40000 {
37 label = "factory";
38 reg = <0x40000 0x10000>;
39 read-only;
40 };
41
42 partition@50000 {
43 label = "kernel";
44 reg = <0x50000 0x150000>;
45 };
46
47 partition@150000 {
48 label = "rootfs";
49 reg = <0x150000 0x2b0000>;
50 };
51
52 partition {
53 label = "firmware";
54 reg = <0x50000 0x3b0000>;
55 };
56 };
57
58 gpio-leds {
59 compatible = "gpio-leds";
60
61 wifi {
62 label = "dcs-930:red:alert";
63 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
64 };
65
66 led_status: status {
67 label = "dcs-930:green:status";
68 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
69 };
70
71 wps {
72 label = "dcs-930:blue:wps";
73 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
74 };
75 };
76
77 gpio-keys-polled {
78 compatible = "gpio-keys-polled";
79 #address-cells = <1>;
80 #size-cells = <0>;
81 poll-interval = <20>;
82
83 wps {
84 label = "wps";
85 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
86 linux,code = <BTN_1>;
87 };
88
89 reset {
90 label = "reset";
91 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
92 linux,code = <KEY_RESTART>;
93 };
94 };
95 };
96
97 &pinctrl {
98 state_default: pinctrl0 {
99 gpio {
100 ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
101 ralink,function = "gpio";
102 };
103 };
104 };
105
106 &ethernet {
107 mtd-mac-address = <&factory 0x4>;
108 };
109
110 &esw {
111 mediatek,portmap = <0x2f>;
112 };
113
114 &wmac {
115 ralink,mtd-eeprom = <&factory 0>;
116 };
117
118 &otg {
119 status = "okay";
120 };