ramips: express diag led handling via devicetree
[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-status = &led_status;
14 };
15
16 gpio-keys-polled {
17 compatible = "gpio-keys-polled";
18 poll-interval = <20>;
19
20 wps {
21 label = "wps";
22 gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
23 linux,code = <KEY_WPS_BUTTON>;
24 };
25
26 reset {
27 label = "reset";
28 gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
29 linux,code = <KEY_RESTART>;
30 };
31 };
32
33 gpio-leds {
34 compatible = "gpio-leds";
35
36 led_status: status {
37 label = "dwr-116-a1:green:status";
38 gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
39 };
40
41 wifi {
42 label = "dwr-116-a1:green:wifi";
43 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
44 };
45 };
46 };
47
48 &gpio1 {
49 status = "okay";
50 };
51
52 &gpio3 {
53 status = "okay";
54 };
55
56 &spi0 {
57 status = "okay";
58
59 m25p80@0 {
60 compatible = "jedec,spi-nor";
61 reg = <0>;
62 spi-max-frequency = <50000000>;
63
64 partitions {
65 compatible = "fixed-partitions";
66 #address-cells = <1>;
67 #size-cells = <1>;
68
69 partition@0 {
70 label = "jboot";
71 reg = <0x0 0x10000>;
72 read-only;
73 };
74
75 partition@10000 {
76 label = "firmware";
77 reg = <0x10000 0x7e0000>;
78 };
79
80 config: partition@7f0000 {
81 label = "config";
82 reg = <0x7f0000 0x10000>;
83 read-only;
84 };
85 };
86 };
87 };
88
89 &ehci {
90 status = "okay";
91 };
92
93 &ohci {
94 status = "okay";
95 };
96
97 &pinctrl {
98 state_default: pinctrl0 {
99 default {
100 ralink,group = "i2c", "wled";
101 ralink,function = "gpio";
102 };
103 };
104 };
105
106 &ethernet {
107 mediatek,portmap = "llllw";
108 pinctrl-names = "default";
109 pinctrl-0 = <&ephy_pins>;
110 };