]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blob - arch/arm/boot/dts/gemini-dlink-dir-685.dts
Merge tag 'mvebu-fixes-4.17-2' of git://git.infradead.org/linux-mvebu into fixes
[mirror_ubuntu-eoan-kernel.git] / arch / arm / boot / dts / gemini-dlink-dir-685.dts
1 /*
2 * Device Tree file for D-Link DIR-685 Xtreme N Storage Router
3 */
4
5 /dts-v1/;
6
7 #include "gemini.dtsi"
8 #include <dt-bindings/input/input.h>
9
10 / {
11 model = "D-Link DIR-685 Xtreme N Storage Router";
12 compatible = "dlink,dir-685", "cortina,gemini";
13 #address-cells = <1>;
14 #size-cells = <1>;
15
16 memory@0 {
17 /* 128 MB SDRAM in 2 x Hynix HY5DU121622DTP-D43 */
18 device_type = "memory";
19 reg = <0x00000000 0x8000000>;
20 };
21
22 chosen {
23 bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait";
24 stdout-path = "uart0:19200n8";
25 };
26
27 gpio_keys {
28 compatible = "gpio-keys";
29
30 button-esc {
31 debounce-interval = <50>;
32 wakeup-source;
33 linux,code = <KEY_ESC>;
34 label = "reset";
35 /* Collides with LPC_LAD[0], UART DCD, SSP 97RST */
36 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
37 };
38 button-eject {
39 debounce-interval = <50>;
40 wakeup-source;
41 linux,code = <KEY_EJECTCD>;
42 label = "unmount";
43 /* Collides with LPC LFRAME, UART RTS, SSP TXD */
44 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
45 };
46 };
47
48 vdisp: regulator {
49 compatible = "regulator-fixed";
50 regulator-name = "display-power";
51 regulator-min-microvolt = <3600000>;
52 regulator-max-microvolt = <3600000>;
53 /* Collides with LCD E */
54 gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
55 enable-active-high;
56 };
57
58 spi {
59 compatible = "spi-gpio";
60 #address-cells = <1>;
61 #size-cells = <0>;
62
63 /* Collides with IDE pins, that's cool (we do not use them) */
64 gpio-sck = <&gpio1 5 GPIO_ACTIVE_HIGH>;
65 gpio-miso = <&gpio1 8 GPIO_ACTIVE_HIGH>;
66 gpio-mosi = <&gpio1 7 GPIO_ACTIVE_HIGH>;
67 /* Collides with pflash CE1, not so cool */
68 cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
69 num-chipselects = <1>;
70
71 panel: display@0 {
72 compatible = "dlink,dir-685-panel", "ilitek,ili9322";
73 reg = <0>;
74 /* 50 ns min period = 20 MHz */
75 spi-max-frequency = <20000000>;
76 spi-cpol; /* Clock active low */
77 vcc-supply = <&vdisp>;
78 iovcc-supply = <&vdisp>;
79 vci-supply = <&vdisp>;
80
81 port {
82 panel_in: endpoint {
83 remote-endpoint = <&display_out>;
84 };
85 };
86 };
87 };
88
89 leds {
90 compatible = "gpio-leds";
91 led-wps {
92 label = "dir685:blue:WPS";
93 /* Collides with ICE */
94 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
95 default-state = "on";
96 linux,default-trigger = "heartbeat";
97 };
98 /*
99 * These two LEDs are on the side of the device.
100 * For electrical reasons, both LEDs cannot be active
101 * at the same time so only blue or orange can be on at
102 * one time. Enabling both makes the LED go dark.
103 * The LEDs both sit inside the unmount button and the
104 * label on the case says "unmount".
105 */
106 led-blue-hd {
107 label = "dir685:blue:HD";
108 /* Collides with LPC_SERIRQ, UART DTR, SSP FSC pins */
109 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
110 default-state = "off";
111 linux,default-trigger = "disk-read";
112 };
113 led-orange-hd {
114 label = "dir685:orange:HD";
115 /* Collides with LPC_LAD[2], UART DSR, SSP ECLK pins */
116 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
117 default-state = "off";
118 linux,default-trigger = "disk-write";
119 };
120 };
121
122 /*
123 * This is a Sunon Maglev GM0502PFV2-8 cooling fan @10000 RPM.
124 * Since the platform has no temperature sensor, this is controlled
125 * from userspace by using the hard disks S.M.A.R.T. temperature
126 * sensor. It is turned on when the temperature exceeds 46 degrees
127 * and turned off when the temperatures goes below 41 degrees
128 * (celsius).
129 */
130 gpio-fan {
131 compatible = "gpio-fan";
132 /* Collides with IDE */
133 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
134 gpio-fan,speed-map = <0 0>, <10000 1>;
135 #cooling-cells = <2>;
136 };
137
138 /*
139 * The touchpad input is connected to a GPIO bit-banged
140 * I2C bus.
141 */
142 gpio-i2c {
143 compatible = "i2c-gpio";
144 /* Collides with ICE */
145 sda-gpios = <&gpio0 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
146 scl-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
147 #address-cells = <1>;
148 #size-cells = <0>;
149
150 touchkeys@26 {
151 compatible = "dlink,dir685-touchkeys";
152 reg = <0x26>;
153 interrupt-parent = <&gpio0>;
154 /* Collides with NAND flash */
155 interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
156 };
157 };
158
159 soc {
160 flash@30000000 {
161 /*
162 * Flash access is by default disabled, because it
163 * collides with the Chip Enable signal for the display
164 * panel, that reuse the parallel flash Chip Select 1
165 * (CS1). Enabling flash makes graphics stop working.
166 *
167 * We might be able to hack around this by letting
168 * GPIO poke around in the flash controller registers.
169 */
170 /* status = "okay"; */
171 /* 32MB of flash */
172 reg = <0x30000000 0x02000000>;
173
174 /*
175 * This "RedBoot" is the Storlink derivative.
176 */
177 partition@0 {
178 label = "RedBoot";
179 reg = <0x00000000 0x00040000>;
180 read-only;
181 };
182 /*
183 * Between the boot loader and the rootfs is the kernel
184 * in a custom Storlink format flashed from the boot
185 * menu. The rootfs is in squashfs format.
186 */
187 partition@1800c0 {
188 label = "rootfs";
189 reg = <0x001800c0 0x01dbff40>;
190 read-only;
191 };
192 partition@1f40000 {
193 label = "upgrade";
194 reg = <0x01f40000 0x00040000>;
195 read-only;
196 };
197 partition@1f80000 {
198 label = "rgdb";
199 reg = <0x01f80000 0x00040000>;
200 read-only;
201 };
202 /*
203 * This partition contains MAC addresses for WAN,
204 * WLAN and LAN, and the country code (for wireless
205 * I guess).
206 */
207 partition@1fc0000 {
208 label = "nvram";
209 reg = <0x01fc0000 0x00020000>;
210 read-only;
211 };
212 partition@1fe0000 {
213 label = "LangPack";
214 reg = <0x01fe0000 0x00020000>;
215 read-only;
216 };
217 };
218
219 syscon: syscon@40000000 {
220 pinctrl {
221 /*
222 * gpio0bgrp cover line 5, 6 used by TK I2C
223 * gpio0bgrp cover line 7 used by WPS LED
224 * gpio0cgrp cover line 8, 13 used by keys
225 * and 11, 12 used by the HD LEDs
226 * gpio0egrp cover line 16 used by VDISP
227 * gpio0fgrp cover line 17 used by TK IRQ
228 * gpio0ggrp cover line 20 used by panel CS
229 * gpio0hgrp cover line 21,22 used by RTL8366RB
230 */
231 gpio0_default_pins: pinctrl-gpio0 {
232 mux {
233 function = "gpio0";
234 groups = "gpio0bgrp",
235 "gpio0cgrp",
236 "gpio0egrp",
237 "gpio0fgrp",
238 "gpio0ggrp",
239 "gpio0hgrp";
240 };
241 };
242 /*
243 * gpio1bgrp cover line 5,8,7 used by panel SPI
244 * also line 6 used by the fan
245 *
246 */
247 gpio1_default_pins: pinctrl-gpio1 {
248 mux {
249 function = "gpio1";
250 groups = "gpio1bgrp";
251 };
252 };
253 };
254 };
255
256 sata: sata@46000000 {
257 cortina,gemini-ata-muxmode = <0>;
258 cortina,gemini-enable-sata-bridge;
259 status = "okay";
260 };
261
262 gpio0: gpio@4d000000 {
263 pinctrl-names = "default";
264 pinctrl-0 = <&gpio0_default_pins>;
265 };
266
267 gpio1: gpio@4e000000 {
268 pinctrl-names = "default";
269 pinctrl-0 = <&gpio1_default_pins>;
270 };
271
272 pci@50000000 {
273 status = "okay";
274 interrupt-map-mask = <0xf800 0 0 7>;
275 interrupt-map =
276 <0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */
277 <0x4800 0 0 2 &pci_intc 1>,
278 <0x4800 0 0 3 &pci_intc 2>,
279 <0x4800 0 0 4 &pci_intc 3>,
280 <0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */
281 <0x5000 0 0 2 &pci_intc 2>,
282 <0x5000 0 0 3 &pci_intc 3>,
283 <0x5000 0 0 4 &pci_intc 0>,
284 <0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */
285 <0x5800 0 0 2 &pci_intc 3>,
286 <0x5800 0 0 3 &pci_intc 0>,
287 <0x5800 0 0 4 &pci_intc 1>,
288 <0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */
289 <0x6000 0 0 2 &pci_intc 0>,
290 <0x6000 0 0 3 &pci_intc 1>,
291 <0x6000 0 0 4 &pci_intc 2>;
292 };
293
294 ata@63000000 {
295 status = "okay";
296 };
297
298 display-controller@6a000000 {
299 status = "okay";
300
301 port@0 {
302 reg = <0>;
303 display_out: endpoint {
304 remote-endpoint = <&panel_in>;
305 };
306 };
307 };
308 };
309 };