ramips: Use dts alias based status led
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / WZR-AGL300NH.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 #address-cells = <1>;
10 #size-cells = <1>;
11 compatible = "buffalo,wzr-agl300nh", "ralink,rt2880-soc";
12 model = "Buffalo WZR-AGL300NH";
13
14 aliases {
15 led-status = &led_router;
16 };
17
18 pci@440000 {
19 status = "ok";
20 };
21
22 cfi@1f000000 {
23 compatible = "cfi-flash";
24 reg = <0x1f000000 0x800000>;
25 bank-width = <2>;
26 device-width = <2>;
27 #address-cells = <1>;
28 #size-cells = <1>;
29
30 partition@0 {
31 label = "uboot";
32 reg = <0x0 0x30000>;
33 read-only;
34 };
35
36 partition@30000 {
37 label = "uboot-env";
38 reg = <0x30000 0x10000>;
39 read-only;
40 };
41
42 factory: partition@40000 {
43 label = "factory";
44 reg = <0x40000 0x10000>;
45 read-only;
46 };
47
48 partition@50000 {
49 label = "firmware";
50 reg = <0x50000 0x3b0000>;
51 };
52 };
53
54 rtl8366s {
55 compatible = "realtek,rtl8366s";
56 gpio-sda = <&gpio0 1 GPIO_ACTIVE_HIGH>;
57 gpio-sck = <&gpio0 2 GPIO_ACTIVE_HIGH>;
58 };
59
60 gpio-keys-polled {
61 compatible = "gpio-keys-polled";
62 #address-cells = <1>;
63 #size-cells = <0>;
64 poll-interval = <100>;
65
66 wps {
67 label = "wps";
68 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
69 linux,code = <KEY_WPS_BUTTON>;
70 };
71
72 router {
73 label = "router_switch";
74 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
75 linux,code = <BTN_0>;
76 };
77
78 reset {
79 label = "reset";
80 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
81 linux,code = <KEY_RESTART>;
82 };
83 };
84
85 gpio-leds {
86 compatible = "gpio-leds";
87
88 led_router: router {
89 label = "wzr-agl300nh:green:router";
90 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
91 };
92
93 diag {
94 label = "wzr-agl300nh:red:diag";
95 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
96 };
97
98 security_g {
99 label = "wzr-agl300nh:orange:security_g";
100 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
101 };
102
103 security_n {
104 label = "wzr-agl300nh:orange:security_n";
105 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
106 };
107 };
108 };
109
110 &gpio0 {
111 status = "okay";
112 };
113
114 &pinctrl {
115 state_default: pinctrl0 {
116 gpio {
117 ralink,group = "i2c", "uartlite", "mdio";
118 ralink,function = "gpio";
119 };
120 };
121 };
122
123 &ethernet {
124 status = "okay";
125 mtd-mac-address = <&factory 0x4>;
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 0>;
143 };