ramips: fix power LED DTB for wt3020
[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 cfi@1f000000 {
19 compatible = "cfi-flash";
20 reg = <0x1f000000 0x800000>;
21 bank-width = <2>;
22 device-width = <2>;
23
24 partitions {
25 compatible = "fixed-partitions";
26 #address-cells = <1>;
27 #size-cells = <1>;
28
29 partition@0 {
30 label = "uboot";
31 reg = <0x0 0x30000>;
32 read-only;
33 };
34
35 partition@30000 {
36 label = "uboot-env";
37 reg = <0x30000 0x10000>;
38 read-only;
39 };
40
41 factory: partition@40000 {
42 label = "factory";
43 reg = <0x40000 0x10000>;
44 read-only;
45 };
46
47 partition@50000 {
48 label = "firmware";
49 reg = <0x50000 0x3b0000>;
50 };
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 poll-interval = <100>;
63
64 wps {
65 label = "wps";
66 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
67 linux,code = <KEY_WPS_BUTTON>;
68 };
69
70 router {
71 label = "router_switch";
72 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
73 linux,code = <BTN_0>;
74 };
75
76 reset {
77 label = "reset";
78 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
79 linux,code = <KEY_RESTART>;
80 };
81 };
82
83 gpio-leds {
84 compatible = "gpio-leds";
85
86 led_router: router {
87 label = "wzr-agl300nh:green:router";
88 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
89 };
90
91 diag {
92 label = "wzr-agl300nh:red:diag";
93 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
94 };
95
96 security_g {
97 label = "wzr-agl300nh:orange:security_g";
98 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
99 };
100
101 security_n {
102 label = "wzr-agl300nh:orange:security_n";
103 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
104 };
105 };
106 };
107
108 &gpio0 {
109 status = "okay";
110 };
111
112 &pinctrl {
113 state_default: pinctrl0 {
114 gpio {
115 ralink,group = "i2c", "uartlite", "mdio";
116 ralink,function = "gpio";
117 };
118 };
119 };
120
121 &ethernet {
122 status = "okay";
123 mtd-mac-address = <&factory 0x4>;
124
125 port@0 {
126 mediatek,fixed-link = <1000 1 1 1>;
127 };
128
129 mdio-bus {
130 status = "okay";
131
132 phy0: ethernet-phy@0 {
133 phy-mode = "mii";
134 reg = <0>;
135 };
136 };
137 };
138
139 &pci {
140 status = "okay";
141 };
142
143 &wmac {
144 ralink,mtd-eeprom = <&factory 0>;
145 };