treewide: fix some cosmetic glitches in dts files
[oweals/openwrt.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-status = &led_internet;
14         };
15
16         gpio-keys-polled {
17                 compatible = "gpio-keys-polled";
18                 poll-interval = <20>;
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         gpio-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                 };
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                                 label = "firmware";
107                                 reg = <0x10000 0xfe0000>;
108                         };
109
110                         config: partition@ff0000 {
111                                 label = "config";
112                                 reg = <0xff0000 0x10000>;
113                                 read-only;
114                         };
115                 };
116         };
117 };
118
119 &ehci {
120         status = "okay";
121 };
122
123 &ohci {
124         status = "okay";
125 };
126
127 &pinctrl {
128         state_default: pinctrl0 {
129                 default {
130                         ralink,group = "ephy", "uartf", "spi refclk", "wled";
131                         ralink,function = "gpio";
132                 };
133         };
134 };
135
136 &pcie {
137         status = "okay";
138 };
139
140 &pcie0 {
141         wifi@0,0 {
142                 reg = <0x0000 0 0 0 0>;
143                 ieee80211-freq-limit = <5000000 6000000>;
144                 mtd-mac-address = <&config 0xe4a8>;
145                 mtd-mac-address-increment = <(2)>;
146
147                 led {
148                         led-sources = <2>;
149                         led-active-low;
150                 };
151         };
152 };
153
154 &ethernet {
155         status = "okay";
156         pinctrl-names = "default";
157         pinctrl-0 = <&rgmii1_pins &mdio_pins>;
158
159         port@4 {
160                 status = "okay";
161                 phy-handle = <&phy4>;
162                 phy-mode = "rgmii";
163         };
164
165         mdio-bus {
166                 status = "okay";
167
168                 phy4: ethernet-phy@4 {
169                         reg = <4>;
170                         phy-mode = "rgmii";
171                 };
172         };
173 };
174
175 &gsw {
176         mediatek,port4 = "gmac";
177 };