ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3052_unbranded_wr512-3gn.dtsi
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 = "unbranded,wr512-3gn", "ralink,rt3052-soc";
9
10 aliases {
11 led-boot = &led_wps;
12 led-failsafe = &led_wps;
13 led-running = &led_wps;
14 led-upgrade = &led_wps;
15 };
16
17 leds {
18 compatible = "gpio-leds";
19
20 3g {
21 label = "green:3g";
22 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
23 };
24
25 gateway {
26 label = "green:gateway";
27 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
28 };
29
30 ap {
31 label = "green:ap";
32 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
33 };
34
35 led_wps: wps {
36 function = LED_FUNCTION_WPS;
37 color = <LED_COLOR_ID_GREEN>;
38 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
39 };
40
41 station {
42 label = "green:station";
43 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys-polled";
49 poll-interval = <20>;
50
51 reset_wps {
52 label = "reset_wps";
53 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART>;
55 };
56
57 mode {
58 label = "mode";
59 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
60 linux,code = <BTN_0>;
61 };
62 };
63 };
64
65 &state_default {
66 gpio {
67 groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
68 function = "gpio";
69 };
70 };
71
72 &esw {
73 mediatek,portmap = <0x2f>;
74 };
75
76 &wmac {
77 nvmem-cells = <&eeprom_factory_0>;
78 nvmem-cell-names = "eeprom";
79 };
80
81 &otg {
82 status = "okay";
83 };