ramips: Use dts alias based status led
[openwrt/openwrt.git] / target / linux / ramips / dts / DAP-1522-A1.dts
1 /dts-v1/;
2
3 #include "rt2880.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dap-1522-a1", "ralink,rt2880-soc";
10 model = "D-Link DAP-1522 A1";
11
12 aliases {
13 led-status = &led_status;
14 };
15
16 cfi@bc400000 {
17 compatible = "cfi-flash";
18 reg = <0xbc400000 0x800000>;
19 bank-width = <2>;
20 device-width = <2>;
21 #address-cells = <1>;
22 #size-cells = <1>;
23
24 partition@0 {
25 label = "uboot";
26 reg = <0x0 0x30000>;
27 read-only;
28 };
29
30 factory: partition@30000 {
31 label = "factory";
32 reg = <0x30000 0x10000>;
33 read-only;
34 };
35
36 partition@40000 {
37 label = "firmware";
38 reg = <0x40000 0x3a0000>;
39 };
40 };
41
42 rtl8366s {
43 compatible = "realtek,rtl8366s";
44 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
45 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
46 };
47
48 gpio-keys-polled {
49 compatible = "gpio-keys-polled";
50 #address-cells = <1>;
51 #size-cells = <0>;
52 poll-interval = <100>;
53
54 reset {
55 label = "reset";
56 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_RESTART>;
58 };
59
60 wps {
61 label = "wps";
62 gpios = <&gpio2 16 GPIO_ACTIVE_LOW>;
63 linux,code = <KEY_WPS_BUTTON>;
64 };
65
66 ap {
67 label = "ap";
68 gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
69 linux,code = <BTN_0>;
70 linux,input-type = <EV_SW>;
71 };
72
73 bridge {
74 label = "bridge";
75 gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
76 linux,code = <BTN_1>;
77 linux,input-type = <EV_SW>;
78 };
79 };
80
81 gpio-leds {
82 compatible = "gpio-leds";
83
84 wps {
85 label = "dap-1522-a1:blue:wps";
86 gpios = <&gpio2 17 GPIO_ACTIVE_LOW>;
87 };
88
89 ap {
90 label = "dap-1522-a1:blue:ap";
91 gpios = <&gpio2 18 GPIO_ACTIVE_LOW>;
92 };
93
94 sta {
95 label = "dap-1522-a1:red:sta";
96 gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
97 };
98
99 led_status: status {
100 label = "dap-1522-a1:blue:status";
101 gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
102 };
103 };
104 };
105
106 &gpio0 {
107 status = "okay";
108 };
109
110 &gpio2 {
111 status = "okay";
112 };
113
114 &pinctrl {
115 state_default: pinctrl0 {
116 gpio {
117 ralink,group = "i2c", "uartlite", "pci";
118 ralink,function = "gpio";
119 };
120 };
121 };
122
123 &ethernet {
124 status = "okay";
125 mtd-mac-address = <&factory 0x2004>;
126
127 port@0 {
128 mediatek,fixed-link = <1000 1 1 1>;
129 };
130
131 mdio-bus {
132 status = "okay";
133
134 phy0: ethernet-phy@0 {
135 phy-mode = "mii";
136 reg = <0>;
137 };
138 };
139 };
140
141 &wmac {
142 ralink,mtd-eeprom = <&factory 0x2000>;
143 };