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