ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / rt2880_buffalo_wli-tx4-ag300n.dts
1 #include "rt2880.dtsi"
2
3 #include <dt-bindings/gpio/gpio.h>
4 #include <dt-bindings/input/input.h>
5 #include <dt-bindings/leds/common.h>
6
7 / {
8 #address-cells = <1>;
9 #size-cells = <1>;
10 compatible = "buffalo,wli-tx4-ag300n", "ralink,rt2880-soc";
11 model = "Buffalo WLI-TX4-AG300N";
12
13 aliases {
14 led-boot = &led_power;
15 led-failsafe = &led_power;
16 led-running = &led_power;
17 led-upgrade = &led_power;
18 };
19
20 flash@1f000000 {
21 compatible = "cfi-flash";
22 reg = <0x1f000000 0x800000>;
23 bank-width = <2>;
24 device-width = <2>;
25
26 partitions {
27 compatible = "fixed-partitions";
28 #address-cells = <1>;
29 #size-cells = <1>;
30
31 partition@0 {
32 label = "uboot";
33 reg = <0x0 0x30000>;
34 read-only;
35 };
36
37 partition@30000 {
38 label = "uboot-env";
39 reg = <0x30000 0x10000>;
40 read-only;
41 };
42
43 factory: partition@40000 {
44 label = "factory";
45 reg = <0x40000 0x10000>;
46 read-only;
47
48 nvmem-layout {
49 compatible = "fixed-layout";
50 #address-cells = <1>;
51 #size-cells = <1>;
52
53 eeprom_factory_0: eeprom@0 {
54 reg = <0x0 0x200>;
55 };
56
57 macaddr_factory_4: macaddr@4 {
58 reg = <0x4 0x6>;
59 };
60 };
61 };
62
63 partition@50000 {
64 compatible = "denx,uimage";
65 label = "firmware";
66 reg = <0x50000 0x3b0000>;
67 };
68 };
69 };
70
71 keys {
72 compatible = "gpio-keys-polled";
73 poll-interval = <100>;
74
75 wps {
76 label = "wps";
77 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
78 linux,code = <KEY_WPS_BUTTON>;
79 };
80
81 bandwidth {
82 label = "bandwidth";
83 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
84 linux,code = <KEY_RESTART>;
85 };
86
87 reset {
88 label = "reset";
89 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
90 linux,code = <KEY_RESTART>;
91 };
92 };
93
94 leds {
95 compatible = "gpio-leds";
96
97 diag {
98 label = "red:diag";
99 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
100 };
101
102 led_power: power {
103 function = LED_FUNCTION_POWER;
104 color = <LED_COLOR_ID_BLUE>;
105 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
106 };
107
108 security {
109 label = "blue:security";
110 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
111 };
112 };
113 };
114
115 &ethernet {
116 status = "okay";
117 nvmem-cells = <&macaddr_factory_4>;
118 nvmem-cell-names = "mac-address";
119
120 port@0 {
121 mediatek,fixed-link = <100 1 1 1>;
122 };
123
124 mdio-bus {
125 status = "okay";
126
127 phy0: ethernet-phy@0 {
128 phy-mode = "mii";
129 reg = <0>;
130 };
131 };
132 };
133
134 &wmac {
135 nvmem-cells = <&eeprom_factory_0>;
136 nvmem-cell-names = "eeprom";
137 };