ramips: add support for indicating the boot state using multiple leds
[openwrt/openwrt.git] / target / linux / ramips / dts / DWR-116-A1.dts
1 /dts-v1/;
2
3 #include "mt7620n.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dwr-116-a1", "ralink,mt7620n-soc";
10 model = "D-Link DWR-116 A1/A2";
11
12 aliases {
13 led-boot = &led_status;
14 led-failsafe = &led_status;
15 led-running = &led_status;
16 led-upgrade = &led_status;
17 };
18
19 gpio-keys-polled {
20 compatible = "gpio-keys-polled";
21 poll-interval = <20>;
22
23 wps {
24 label = "wps";
25 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28
29 reset {
30 label = "reset";
31 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34 };
35
36 gpio-leds {
37 compatible = "gpio-leds";
38
39 led_status: status {
40 label = "dwr-116-a1:green:status";
41 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
42 };
43
44 wifi {
45 label = "dwr-116-a1:green:wifi";
46 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
47 };
48 };
49 };
50
51 &gpio1 {
52 status = "okay";
53 };
54
55 &gpio3 {
56 status = "okay";
57 };
58
59 &spi0 {
60 status = "okay";
61
62 m25p80@0 {
63 compatible = "jedec,spi-nor";
64 reg = <0>;
65 spi-max-frequency = <50000000>;
66
67 partitions {
68 compatible = "fixed-partitions";
69 #address-cells = <1>;
70 #size-cells = <1>;
71
72 partition@0 {
73 label = "jboot";
74 reg = <0x0 0x10000>;
75 read-only;
76 };
77
78 partition@10000 {
79 label = "firmware";
80 reg = <0x10000 0x7e0000>;
81 };
82
83 config: partition@7f0000 {
84 label = "config";
85 reg = <0x7f0000 0x10000>;
86 read-only;
87 };
88 };
89 };
90 };
91
92 &ehci {
93 status = "okay";
94 };
95
96 &ohci {
97 status = "okay";
98 };
99
100 &pinctrl {
101 state_default: pinctrl0 {
102 default {
103 ralink,group = "i2c", "wled";
104 ralink,function = "gpio";
105 };
106 };
107 };
108
109 &ethernet {
110 mediatek,portmap = "llllw";
111 pinctrl-names = "default";
112 pinctrl-0 = <&ephy_pins>;
113 };