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