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