e91e80e69bb10bb33172dcef59e5e7bdab05aa85
[openwrt/staging/lynxis.git] / target / linux / ramips / dts / DWR-118-A2.dts
1 /dts-v1/;
2
3 #include "mt7620a.dtsi"
4
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7
8 / {
9 compatible = "dlink,dwr-118-a2", "ralink,mt7620a-soc";
10 model = "D-Link DWR-118 A2";
11
12 aliases {
13 led-boot = &led_internet;
14 led-failsafe = &led_internet;
15 led-running = &led_internet;
16 led-upgrade = &led_internet;
17 };
18
19 gpio-keys-polled {
20 compatible = "gpio-keys-polled";
21 poll-interval = <20>;
22
23 wps {
24 label = "wps";
25 gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
26 linux,code = <KEY_WPS_BUTTON>;
27 };
28
29 reset {
30 label = "reset";
31 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
32 linux,code = <KEY_RESTART>;
33 };
34 };
35
36 gpio-leds {
37 compatible = "gpio-leds";
38
39 wan {
40 label = "dwr-118-a2:green:wan";
41 gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
42 };
43
44 led_internet: internet {
45 label = "dwr-118-a2:green:internet";
46 gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
47 };
48
49 lan {
50 label = "dwr-118-a2:green:lan";
51 gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
52 };
53
54 wlan2g {
55 label = "dwr-118-a2:green:wlan2g";
56 gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
57 };
58
59 usb {
60 label = "dwr-118-a2:green:usb";
61 gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
62 trigger-sources = <&ohci_port1>, <&ehci_port1>;
63 linux,default-trigger = "usbport";
64 };
65 };
66
67 gpio_export {
68 compatible = "gpio-export";
69 #size-cells = <0>;
70
71 usb {
72 gpio-export,name = "usb";
73 gpio-export,output = <1>;
74 gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
75 };
76 };
77 };
78
79 &gpio1 {
80 status = "okay";
81 };
82
83 &gpio2 {
84 status = "okay";
85 };
86
87 &gpio3 {
88 status = "okay";
89 };
90
91 &spi0 {
92 status = "okay";
93
94 flash@0 {
95 compatible = "jedec,spi-nor";
96 reg = <0>;
97 spi-max-frequency = <50000000>;
98
99 partitions {
100 compatible = "fixed-partitions";
101 #address-cells = <1>;
102 #size-cells = <1>;
103
104 partition@0 {
105 label = "jboot";
106 reg = <0x0 0x10000>;
107 read-only;
108 };
109
110 partition@10000 {
111 label = "firmware";
112 reg = <0x10000 0xfe0000>;
113 };
114
115 config: partition@ff0000 {
116 label = "config";
117 reg = <0xff0000 0x10000>;
118 read-only;
119 };
120 };
121 };
122 };
123
124 &ehci {
125 status = "okay";
126 };
127
128 &ohci {
129 status = "okay";
130 };
131
132 &pinctrl {
133 state_default: pinctrl0 {
134 default {
135 ralink,group = "ephy", "uartf", "spi refclk", "wled";
136 ralink,function = "gpio";
137 };
138 };
139 };
140
141 &pcie {
142 status = "okay";
143 };
144
145 &pcie0 {
146 wifi@0,0 {
147 reg = <0x0000 0 0 0 0>;
148 ieee80211-freq-limit = <5000000 6000000>;
149 mtd-mac-address = <&config 0xe4a8>;
150 mtd-mac-address-increment = <(2)>;
151
152 led {
153 led-sources = <2>;
154 led-active-low;
155 };
156 };
157 };
158
159 &ethernet {
160 status = "okay";
161 pinctrl-names = "default";
162 pinctrl-0 = <&rgmii1_pins &mdio_pins>;
163
164 port@4 {
165 status = "okay";
166 phy-handle = <&phy4>;
167 phy-mode = "rgmii";
168 };
169
170 mdio-bus {
171 status = "okay";
172
173 phy4: ethernet-phy@4 {
174 reg = <4>;
175 phy-mode = "rgmii";
176 };
177 };
178 };
179
180 &gsw {
181 mediatek,port4 = "gmac";
182 };