ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3052_jcg_jhr-n926r.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 = "jcg,jhr-n926r", "ralink,rt3052-soc";
9 model = "JCG JHR-N926R";
10
11 aliases {
12 led-boot = &led_system;
13 led-failsafe = &led_system;
14 led-running = &led_system;
15 led-upgrade = &led_system;
16 };
17
18 flash@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 = "u-boot";
31 reg = <0x0 0x30000>;
32 read-only;
33 };
34
35 partition@30000 {
36 label = "u-boot-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 nvmem-layout {
47 compatible = "fixed-layout";
48 #address-cells = <1>;
49 #size-cells = <1>;
50
51 eeprom_factory_0: eeprom@0 {
52 reg = <0x0 0x200>;
53 };
54
55 macaddr_factory_2e: macaddr@2e {
56 reg = <0x2e 0x6>;
57 };
58 };
59 };
60
61 partition@50000 {
62 compatible = "denx,uimage";
63 label = "firmware";
64 reg = <0x50000 0x3b0000>;
65 };
66 };
67 };
68
69 leds {
70 compatible = "gpio-leds";
71
72 wlan1 {
73 function = LED_FUNCTION_WLAN;
74 color = <LED_COLOR_ID_RED>;
75 gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
76 };
77
78 wlan2 {
79 function = LED_FUNCTION_WLAN;
80 color = <LED_COLOR_ID_YELLOW>;
81 gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
82 };
83
84 wlan3 {
85 function = LED_FUNCTION_WLAN;
86 color = <LED_COLOR_ID_GREEN>;
87 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
88 };
89
90 led_system: system {
91 label = "blue:system";
92 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
93 };
94 };
95
96 gpio_export {
97 compatible = "gpio-export";
98 #size-cells = <0>;
99
100 display_data {
101 gpio-export,name = "display_data";
102 gpio-export,output = <1>;
103 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
104 };
105
106 display_clock {
107 gpio-export,name = "display_clock";
108 gpio-export,output = <1>;
109 gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
110 };
111
112 display_blank {
113 gpio-export,name = "display_blank";
114 gpio-export,output = <1>;
115 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
116 };
117 };
118
119 keys {
120 compatible = "gpio-keys-polled";
121 poll-interval = <20>;
122
123 reset_wps {
124 label = "reset_wps";
125 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
126 linux,code = <KEY_RESTART>;
127 };
128
129 wlan {
130 label = "wlan";
131 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
132 linux,code = <BTN_0>;
133 };
134 };
135 };
136
137 &state_default {
138 gpio {
139 groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
140 function = "gpio";
141 };
142 };
143
144 &ethernet {
145 nvmem-cells = <&macaddr_factory_2e>;
146 nvmem-cell-names = "mac-address";
147 };
148
149 &esw {
150 mediatek,portmap = <0x3e>;
151 };
152
153 &wmac {
154 nvmem-cells = <&eeprom_factory_0>;
155 nvmem-cell-names = "eeprom";
156 };