ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3050_dlink_dir-615-d.dts
1 #include "rt3050.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 compatible = "dlink,dir-615-d", "ralink,rt3050-soc";
9 model = "D-Link DIR-615 D";
10
11 aliases {
12 led-boot = &led_status_green;
13 led-failsafe = &led_status_green;
14 led-running = &led_status_green;
15 led-upgrade = &led_status_green;
16 label-mac-device = &wmac;
17 };
18
19 flash@1f000000 {
20 compatible = "cfi-flash";
21 reg = <0x1f000000 0x800000>;
22 bank-width = <2>;
23 device-width = <2>;
24
25 partitions {
26 compatible = "fixed-partitions";
27 #address-cells = <1>;
28 #size-cells = <1>;
29
30 partition@0 {
31 label = "u-boot";
32 reg = <0x0 0x30000>;
33 read-only;
34 };
35
36 devdata: partition@30000 {
37 label = "devdata";
38 reg = <0x30000 0x10000>;
39 read-only;
40
41 nvmem-layout {
42 compatible = "fixed-layout";
43 #address-cells = <1>;
44 #size-cells = <1>;
45
46 eeprom_devdata_4000: eeprom@4000 {
47 reg = <0x4000 0x200>;
48 };
49 };
50 };
51
52 partition@40000 {
53 label = "devconf";
54 reg = <0x40000 0x10000>;
55 read-only;
56 };
57
58 partition@50000 {
59 compatible = "denx,uimage";
60 label = "firmware";
61 reg = <0x50000 0x3b0000>;
62 };
63 };
64 };
65
66 keys {
67 compatible = "gpio-keys-polled";
68 poll-interval = <20>;
69
70 reset {
71 label = "reset";
72 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
73 linux,code = <KEY_RESTART>;
74 };
75
76 wps {
77 label = "wps";
78 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
79 linux,code = <KEY_WPS_BUTTON>;
80 };
81 };
82
83 leds {
84 compatible = "gpio-leds";
85
86 status_amber {
87 function = LED_FUNCTION_STATUS;
88 color = <LED_COLOR_ID_AMBER>;
89 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
90 };
91
92 led_status_green: status_green {
93 function = LED_FUNCTION_STATUS;
94 color = <LED_COLOR_ID_GREEN>;
95 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
96 default-state = "on";
97 };
98
99 wan_amber {
100 function = LED_FUNCTION_WAN;
101 color = <LED_COLOR_ID_AMBER>;
102 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
103 };
104
105 wan_green {
106 function = LED_FUNCTION_WAN;
107 color = <LED_COLOR_ID_GREEN>;
108 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
109 };
110
111 wps {
112 function = LED_FUNCTION_WPS;
113 color = <LED_COLOR_ID_BLUE>;
114 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
115 };
116 };
117 };
118
119 &esw {
120 mediatek,portmap = <0x2f>;
121 };
122
123 &wmac {
124 nvmem-cells = <&eeprom_devdata_4000>;
125 nvmem-cell-names = "eeprom";
126 };
127
128 &state_default {
129 gpio {
130 groups = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
131 function = "gpio";
132 };
133 };