ramips: convert to new LED color/function format where possible
[openwrt/openwrt.git] / target / linux / ramips / dts / rt3052_omnima_miniembwifi.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 = "omnima,miniembwifi", "ralink,rt3052-soc";
9 model = "Omnima MiniEMBWiFi";
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 leds {
19 compatible = "gpio-leds";
20
21 led_status: status {
22 function = LED_FUNCTION_STATUS;
23 color = <LED_COLOR_ID_GREEN>;
24 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
25 };
26
27 wlan {
28 function = LED_FUNCTION_WLAN;
29 color = <LED_COLOR_ID_GREEN>;
30 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
31 };
32 };
33
34 keys {
35 compatible = "gpio-keys-polled";
36 poll-interval = <20>;
37
38 reset {
39 label = "reset";
40 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
41 linux,code = <KEY_RESTART>;
42 };
43 };
44
45 flash@1f000000 {
46 compatible = "cfi-flash";
47 reg = <0x1f000000 0x800000>;
48 bank-width = <2>;
49 device-width = <2>;
50
51 partitions {
52 compatible = "fixed-partitions";
53 #address-cells = <1>;
54 #size-cells = <1>;
55
56 partition@0 {
57 label = "u-boot";
58 reg = <0x0 0x30000>;
59 read-only;
60 };
61
62 partition@30000 {
63 label = "u-boot-env";
64 reg = <0x30000 0x10000>;
65 read-only;
66 };
67
68 factory: partition@40000 {
69 label = "factory";
70 reg = <0x40000 0x10000>;
71 read-only;
72
73 nvmem-layout {
74 compatible = "fixed-layout";
75 #address-cells = <1>;
76 #size-cells = <1>;
77
78 eeprom_factory_0: eeprom@0 {
79 reg = <0x0 0x200>;
80 };
81
82 macaddr_factory_28: macaddr@28 {
83 reg = <0x28 0x6>;
84 };
85 };
86 };
87
88 partition@50000 {
89 compatible = "denx,uimage";
90 label = "firmware";
91 reg = <0x50000 0x7b0000>;
92 };
93 };
94 };
95 };
96
97 &state_default {
98 gpio {
99 groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
100 function = "gpio";
101 };
102 };
103
104 &ethernet {
105 nvmem-cells = <&macaddr_factory_28>;
106 nvmem-cell-names = "mac-address";
107 };
108
109 &esw {
110 mediatek,portmap = <0x2f>;
111 };
112
113 &wmac {
114 nvmem-cells = <&eeprom_factory_0>;
115 nvmem-cell-names = "eeprom";
116 };
117
118 &otg {
119 status = "okay";
120 };