ramips: add support for indicating the boot state using multiple leds
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / DAP-1350.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,dap-1350", "ralink,rt3052-soc";
10 model = "D-Link DAP-1350";
11
12 aliases {
13 led-boot = &led_power_blue;
14 led-failsafe = &led_power_blue;
15 led-running = &led_power_blue;
16 led-upgrade = &led_power_blue;
17 };
18
19 chosen {
20 bootargs = "console=ttyS0,115200";
21 };
22
23 cfi@1f000000 {
24 compatible = "cfi-flash";
25 reg = <0x1f000000 0x800000>;
26 bank-width = <2>;
27 device-width = <2>;
28
29 partitions {
30 compatible = "fixed-partitions";
31 #address-cells = <1>;
32 #size-cells = <1>;
33
34 partition@0 {
35 label = "u-boot";
36 reg = <0x0 0x30000>;
37 read-only;
38 };
39
40 devdata: partition@30000 {
41 label = "devdata";
42 reg = <0x30000 0x10000>;
43 read-only;
44 };
45
46 partition@40000 {
47 label = "devconf";
48 reg = <0x40000 0x30000>;
49 read-only;
50 };
51
52 partition@70000 {
53 label = "devlang";
54 reg = <0x70000 0x40000>;
55 read-only;
56 };
57
58 partition@b0000 {
59 label = "firmware";
60 reg = <0xb0000 0x750000>;
61 };
62 };
63 };
64
65 gpio-leds {
66 compatible = "gpio-leds";
67
68 led_power_blue: power {
69 label = "dap-1350:blue:power";
70 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
71 };
72
73 power2 {
74 label = "dap-1350:red:power";
75 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
76 };
77
78 wps {
79 label = "dap-1350:blue:wps";
80 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
81 };
82 };
83
84 gpio-keys-polled {
85 compatible = "gpio-keys-polled";
86 poll-interval = <20>;
87
88 reset {
89 label = "reset";
90 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
91 linux,code = <KEY_RESTART>;
92 };
93
94 wps {
95 label = "wps";
96 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
97 linux,code = <KEY_WPS_BUTTON>;
98 };
99
100 rt {
101 label = "rt";
102 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
103 linux,code = <BTN_0>;
104 };
105
106 ap {
107 label = "ap";
108 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
109 linux,code = <BTN_1>;
110 };
111 };
112 };
113
114 &pinctrl {
115 state_default: pinctrl0 {
116 gpio {
117 ralink,group = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
118 ralink,function = "gpio";
119 };
120 };
121 };
122
123 &ethernet {
124 mtd-mac-address = <&devdata 0x2e>;
125 };
126
127 &esw {
128 mediatek,portmap = <0x2f>;
129 };
130
131 &wmac {
132 ralink,mtd-eeprom = <&devdata 0>;
133 };
134
135 &otg {
136 status = "okay";
137 };