ramips: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ramips / dts / rt3352_dlink_dir-620-d1.dts
1 #include "rt3352.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 = "dlink,dir-620-d1", "ralink,rt3352-soc";
9 model = "D-Link DIR-620 D1";
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 wifi {
28 label = "green:wifi";
29 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
30 };
31 };
32
33 keys {
34 compatible = "gpio-keys-polled";
35 poll-interval = <20>;
36
37 reset_wps {
38 label = "reset_wps";
39 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
40 linux,code = <KEY_RESTART>;
41 };
42 };
43 };
44
45 &spi0 {
46 status = "okay";
47
48 flash@0 {
49 compatible = "jedec,spi-nor";
50 reg = <0>;
51 spi-max-frequency = <10000000>;
52
53 partitions {
54 compatible = "fixed-partitions";
55 #address-cells = <1>;
56 #size-cells = <1>;
57
58 partition@0 {
59 label = "u-boot";
60 reg = <0x0 0x30000>;
61 read-only;
62 };
63
64 partition@30000 {
65 label = "u-boot-env";
66 reg = <0x30000 0x10000>;
67 read-only;
68 };
69
70 factory: partition@40000 {
71 label = "factory";
72 reg = <0x40000 0x10000>;
73 read-only;
74
75 nvmem-layout {
76 compatible = "fixed-layout";
77 #address-cells = <1>;
78 #size-cells = <1>;
79
80 eeprom_factory_0: eeprom@0 {
81 reg = <0x0 0x200>;
82 };
83
84 macaddr_factory_4: macaddr@4 {
85 reg = <0x4 0x6>;
86 };
87 };
88 };
89
90 partition@50000 {
91 compatible = "denx,uimage";
92 label = "firmware";
93 reg = <0x50000 0x7b0000>;
94 };
95 };
96 };
97 };
98
99 &state_default {
100 gpio {
101 groups = "i2c", "jtag", "uartf";
102 function = "gpio";
103 };
104 };
105
106 &ethernet {
107 nvmem-cells = <&macaddr_factory_4>;
108 nvmem-cell-names = "mac-address";
109 pinctrl-names = "default";
110 pinctrl-0 = <&rgmii_pins &mdio_pins>;
111 };
112
113 &esw {
114 mediatek,portmap = <0x2f>;
115 };
116
117 &wmac {
118 nvmem-cells = <&eeprom_factory_0>;
119 nvmem-cell-names = "eeprom";
120 };
121
122 &ehci {
123 status = "okay";
124 };
125
126 &ohci {
127 status = "okay";
128 };