ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3052_mofinetwork_mofi3500-3gn.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 = "mofinetwork,mofi3500-3gn", "ralink,rt3052-soc";
9 model = "MoFi Network MOFI3500-3GN";
10
11 aliases {
12 led-boot = &led_status;
13 led-failsafe = &led_status;
14 led-running = &led_status;
15 led-upgrade = &led_status;
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 };
56
57 partition@50000 {
58 compatible = "denx,uimage";
59 label = "firmware";
60 reg = <0x50000 0x7b0000>;
61 };
62 };
63 };
64
65 leds {
66 compatible = "gpio-leds";
67
68 usb {
69 function = LED_FUNCTION_USB;
70 color = <LED_COLOR_ID_GREEN>;
71 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
72 trigger-sources = <&otg_port1>;
73 linux,default-trigger = "usbport";
74 };
75
76 3g {
77 label = "green:3g";
78 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
79 };
80
81 led_status: status {
82 function = LED_FUNCTION_STATUS;
83 color = <LED_COLOR_ID_GREEN>;
84 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
85 };
86
87 wps {
88 function = LED_FUNCTION_WPS;
89 color = <LED_COLOR_ID_GREEN>;
90 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
91 };
92 };
93
94 keys {
95 compatible = "gpio-keys-polled";
96 poll-interval = <20>;
97
98 reset {
99 label = "reset";
100 gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
101 linux,code = <KEY_RESTART>;
102 };
103
104 connect {
105 label = "connect";
106 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
107 linux,code = <KEY_CONNECT>;
108 };
109
110 wps {
111 label = "wps";
112 gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
113 linux,code = <KEY_WPS_BUTTON>;
114 };
115 };
116 };
117
118 &state_default {
119 gpio {
120 groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
121 function = "gpio";
122 };
123 };
124
125 &esw {
126 mediatek,portmap = <0x2f>;
127 };
128
129 &wmac {
130 nvmem-cells = <&eeprom_factory_0>;
131 nvmem-cell-names = "eeprom";
132 };
133
134 &otg {
135 status = "okay";
136 };