ramips: Use dts alias based status led
[openwrt/staging/dedeckeh.git] / target / linux / ramips / dts / DIR-620-D1.dts
1 /dts-v1/;
2
3 #include "rt3352.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dir-620-d1", "ralink,rt3352-soc";
10 model = "D-Link DIR-620 D1";
11
12 aliases {
13 led-status = &led_status;
14 };
15
16 gpio-leds {
17 compatible = "gpio-leds";
18
19 led_status: status {
20 label = "dir-620-d1:green:status";
21 gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
22 };
23
24 wifi {
25 label = "dir-620-d1:green:wifi";
26 gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
27 };
28 };
29
30 gpio-keys-polled {
31 compatible = "gpio-keys-polled";
32 #address-cells = <1>;
33 #size-cells = <0>;
34 poll-interval = <20>;
35
36 reset_wps {
37 label = "reset_wps";
38 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
39 linux,code = <KEY_RESTART>;
40 };
41 };
42 };
43
44 &spi0 {
45 status = "okay";
46
47 m25p80@0 {
48 #address-cells = <1>;
49 #size-cells = <1>;
50 compatible = "jedec,spi-nor";
51 reg = <0>;
52 spi-max-frequency = <10000000>;
53
54 partition@0 {
55 label = "u-boot";
56 reg = <0x0 0x30000>;
57 read-only;
58 };
59
60 partition@30000 {
61 label = "u-boot-env";
62 reg = <0x30000 0x10000>;
63 read-only;
64 };
65
66 factory: partition@40000 {
67 label = "factory";
68 reg = <0x40000 0x10000>;
69 read-only;
70 };
71
72 partition@50000 {
73 label = "firmware";
74 reg = <0x50000 0x7b0000>;
75 };
76 };
77 };
78
79 &pinctrl {
80 state_default: pinctrl0 {
81 gpio {
82 ralink,group = "i2c", "jtag", "uartf";
83 ralink,function = "gpio";
84 };
85 };
86 };
87
88 &ethernet {
89 mtd-mac-address = <&factory 0x4>;
90 pinctrl-names = "default";
91 pinctrl-0 = <&rgmii_pins &mdio_pins>;
92 };
93
94 &esw {
95 mediatek,portmap = <0x2f>;
96 };
97
98 &wmac {
99 ralink,mtd-eeprom = <&factory 0>;
100 };
101
102 &ehci {
103 status = "okay";
104 };
105
106 &ohci {
107 status = "okay";
108 };