ramips: specify "firmware" partition format
[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-boot = &led_internet;
14                 led-failsafe = &led_internet;
15         };
16
17         gpio-keys-polled {
18                 compatible = "gpio-keys-polled";
19                 poll-interval = <20>;
20
21                 wps {
22                         label = "wps";
23                         gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
24                         linux,code = <KEY_WPS_BUTTON>;
25                 };
26
27                 reset {
28                         label = "reset";
29                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
30                         linux,code = <KEY_RESTART>;
31                 };
32         };
33
34         gpio-leds {
35                 compatible = "gpio-leds";
36
37                 wan {
38                         label = "dwr-118-a2:green:wan";
39                         gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
40                 };
41
42                 led_internet: internet {
43                         label = "dwr-118-a2:green:internet";
44                         gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
45                 };
46
47                 lan {
48                         label = "dwr-118-a2:green:lan";
49                         gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
50                 };
51
52                 wlan2g {
53                         label = "dwr-118-a2:green:wlan2g";
54                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
55                 };
56
57                 usb {
58                         label = "dwr-118-a2:green:usb";
59                         gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
60                         trigger-sources = <&ohci_port1>, <&ehci_port1>;
61                         linux,default-trigger = "usbport";
62                 };
63         };
64
65         gpio_export {
66                 compatible = "gpio-export";
67                 #size-cells = <0>;
68
69                 usb {
70                         gpio-export,name = "usb";
71                         gpio-export,output = <1>;
72                         gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
73                 };
74         };
75 };
76
77 &gpio1 {
78         status = "okay";
79 };
80
81 &gpio2 {
82         status = "okay";
83 };
84
85 &gpio3 {
86         status = "okay";
87 };
88
89 &spi0 {
90         status = "okay";
91
92         flash@0 {
93                 compatible = "jedec,spi-nor";
94                 reg = <0>;
95                 spi-max-frequency = <50000000>;
96
97                 partitions {
98                         compatible = "fixed-partitions";
99                         #address-cells = <1>;
100                         #size-cells = <1>;
101
102                         partition@0 {
103                                 label = "jboot";
104                                 reg = <0x0 0x10000>;
105                                 read-only;
106                         };
107
108                         partition@10000 {
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         pinctrl-names = "default";
160         pinctrl-0 = <&rgmii1_pins &mdio_pins>;
161
162         port@4 {
163                 status = "okay";
164                 phy-handle = <&phy4>;
165                 phy-mode = "rgmii";
166         };
167
168         mdio-bus {
169                 status = "okay";
170
171                 phy4: ethernet-phy@4 {
172                         reg = <4>;
173                         phy-mode = "rgmii";
174                 };
175         };
176 };
177
178 &gsw {
179         mediatek,port4 = "gmac";
180 };