ramips: convert to new LED color/function format where possible
[openwrt/staging/wigyori.git] / target / linux / ramips / dts / rt3050_edimax_3g-6200nl.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 #include <dt-bindings/mtd/partitions/uimage.h>
7
8 / {
9 compatible = "edimax,3g-6200nl", "ralink,rt3050-soc";
10 model = "Edimax 3g-6200nl";
11
12 aliases {
13 led-boot = &led_internet;
14 led-failsafe = &led_internet;
15 led-running = &led_internet;
16 led-upgrade = &led_internet;
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 partition@30000 {
37 label = "u-boot-env";
38 reg = <0x30000 0x10000>;
39 read-only;
40 };
41
42 factory: partition@40000 {
43 label = "factory";
44 reg = <0x40000 0x10000>;
45 read-only;
46
47 nvmem-layout {
48 compatible = "fixed-layout";
49 #address-cells = <1>;
50 #size-cells = <1>;
51
52 eeprom_factory_0: eeprom@0 {
53 reg = <0x0 0x200>;
54 };
55
56 macaddr_factory_4: macaddr@4 {
57 reg = <0x4 0x6>;
58 };
59 };
60 };
61
62 partition@3e0000 {
63 label = "cimage";
64 reg = <0x3e0000 0x20000>;
65 read-only;
66 };
67
68 partition@50000 {
69 compatible = "openwrt,uimage", "denx,uimage";
70 openwrt,offset = <FW_EDIMAX_OFFSET>;
71 openwrt,partition-magic = <FW_MAGIC_EDIMAX>;
72 label = "firmware";
73 reg = <0x50000 0x390000>;
74 };
75 };
76 };
77
78 leds {
79 compatible = "gpio-leds";
80
81 led_internet: internet {
82 label = "green:internet";
83 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
84 };
85
86 wlan {
87 function = LED_FUNCTION_WLAN;
88 color = <LED_COLOR_ID_GREEN>;
89 gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
90 };
91 };
92
93 keys {
94 compatible = "gpio-keys-polled";
95 poll-interval = <20>;
96
97 reset {
98 label = "reset";
99 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
100 linux,code = <KEY_RESTART>;
101 };
102 };
103 };
104
105 &state_default {
106 gpio {
107 groups = "spi", "i2c", "jtag", "rgmii", "mdio", "uartf";
108 function = "gpio";
109 };
110 };
111
112 &ethernet {
113 nvmem-cells = <&macaddr_factory_4>;
114 nvmem-cell-names = "mac-address";
115 };
116
117 &esw {
118 mediatek,portdisable = <0x37>;
119 };
120
121 &wmac {
122 nvmem-cells = <&eeprom_factory_0>;
123 nvmem-cell-names = "eeprom";
124 };
125
126 &otg {
127 status = "okay";
128 };