2 * Device Tree file for D-Link DIR-685 Xtreme N Storage Router
8 #include <dt-bindings/input/input.h>
11 model = "D-Link DIR-685 Xtreme N Storage Router";
12 compatible = "dlink,dir-685", "cortina,gemini";
17 /* 128 MB SDRAM in 2 x Hynix HY5DU121622DTP-D43 */
18 device_type = "memory";
19 reg = <0x00000000 0x8000000>;
23 bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait consoleblank=300";
24 stdout-path = "uart0:19200n8";
28 compatible = "gpio-keys";
31 debounce-interval = <100>;
33 linux,code = <KEY_ESC>;
35 /* Collides with LPC_LAD[0], UART DCD, SSP 97RST */
36 gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
39 debounce-interval = <100>;
41 linux,code = <KEY_EJECTCD>;
43 /* Collides with LPC LFRAME, UART RTS, SSP TXD */
44 gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
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>;
59 compatible = "spi-gpio";
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 cs-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
68 num-chipselects = <1>;
71 compatible = "dlink,dir-685-panel", "ilitek,ili9322";
73 /* 50 ns min period = 20 MHz */
74 spi-max-frequency = <20000000>;
75 vcc-supply = <&vdisp>;
76 iovcc-supply = <&vdisp>;
77 vci-supply = <&vdisp>;
81 remote-endpoint = <&display_out>;
88 compatible = "gpio-leds";
90 label = "dir685:blue:WPS";
91 /* Collides with ICE */
92 gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
94 linux,default-trigger = "heartbeat";
97 * These two LEDs are on the side of the device.
98 * For electrical reasons, both LEDs cannot be active
99 * at the same time so only blue or orange can be on at
100 * one time. Enabling both makes the LED go dark.
101 * The LEDs both sit inside the unmount button and the
102 * label on the case says "unmount".
105 label = "dir685:blue:HD";
106 /* Collides with LPC_SERIRQ, UART DTR, SSP FSC pins */
107 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
108 default-state = "off";
109 linux,default-trigger = "disk-read";
112 label = "dir685:orange:HD";
113 /* Collides with LPC_LAD[2], UART DSR, SSP ECLK pins */
114 gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
115 default-state = "off";
116 linux,default-trigger = "disk-write";
121 * This is a Sunon Maglev GM0502PFV2-8 cooling fan @10000 RPM.
122 * sensor. It is turned on when the temperature exceeds 46 degrees
123 * and turned off when the temperatures goes below 41 degrees
127 compatible = "gpio-fan";
128 /* Collides with IDE */
129 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
130 gpio-fan,speed-map = <0 0>, <10000 1>;
131 #cooling-cells = <2>;
136 /* Poll every 20 seconds */
137 polling-delay = <20000>;
138 /* Poll every 2nd second when cooling */
139 polling-delay-passive = <2000>;
140 /* Use the thermal sensor in the hard drive */
141 thermal-sensors = <&drive0>;
143 /* Tripping points from the fan.script in the rootfs */
145 alert: chassis-alert {
146 /* At 43 degrees turn on the fan */
147 temperature = <43000>;
152 /* Just shut down at 60 degrees */
153 temperature = <60000>;
162 cooling-device = <&fan0 1 1>;
169 * The touchpad input is connected to a GPIO bit-banged
173 compatible = "i2c-gpio";
174 /* Collides with ICE */
175 sda-gpios = <&gpio0 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
176 scl-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
177 #address-cells = <1>;
181 compatible = "dlink,dir685-touchkeys";
183 interrupt-parent = <&gpio0>;
184 /* Collides with NAND flash */
185 interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
189 /* This is a RealTek RTL8366RB switch and PHY using SMI over GPIO */
191 compatible = "realtek,rtl8366rb";
192 /* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
193 mdc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
194 mdio-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
195 reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
196 realtek,disable-leds;
198 switch_intc: interrupt-controller {
199 /* GPIO 15 provides the interrupt */
200 interrupt-parent = <&gpio0>;
201 interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
202 interrupt-controller;
203 #address-cells = <0>;
204 #interrupt-cells = <1>;
208 #address-cells = <1>;
214 phy-handle = <&phy0>;
219 phy-handle = <&phy1>;
224 phy-handle = <&phy2>;
229 phy-handle = <&phy3>;
234 phy-handle = <&phy4>;
236 rtl8366rb_cpu_port: port@5 {
251 compatible = "realtek,smi-mdio";
252 #address-cells = <1>;
257 interrupt-parent = <&switch_intc>;
262 interrupt-parent = <&switch_intc>;
267 interrupt-parent = <&switch_intc>;
272 interrupt-parent = <&switch_intc>;
277 interrupt-parent = <&switch_intc>;
286 * Flash access collides with the Chip Enable signal for
287 * the display panel, that reuse the parallel flash Chip
288 * Select 1 (CS1). We switch the pin control state so we
289 * enable these pins for flash access only when we need
290 * then, and when disabled they can be used for GPIO which
291 * is what the display panel needs.
294 pinctrl-names = "enabled", "disabled";
295 pinctrl-0 = <&pflash_default_pins>;
296 pinctrl-1 = <&pflash_disabled_pins>;
299 reg = <0x30000000 0x02000000>;
302 compatible = "fixed-partitions";
303 #address-cells = <1>;
307 * This "RedBoot" is the Storlink derivative.
311 reg = <0x00000000 0x00040000>;
315 * This firmware image contains the kernel catenated
316 * with the squashfs root filesystem. For some reason
317 * this is called "upgrade" on the vendor system.
321 reg = <0x00040000 0x01f40000>;
324 /* RGDB, Residental Gateway Database? */
327 reg = <0x01f80000 0x00040000>;
331 * This partition contains MAC addresses for WAN,
332 * WLAN and LAN, and the country code (for wireless
337 reg = <0x01fc0000 0x00020000>;
342 reg = <0x01fe0000 0x00020000>;
348 syscon: syscon@40000000 {
351 * gpio0bgrp cover line 5, 6 used by TK I2C
352 * gpio0bgrp cover line 7 used by WPS LED
353 * gpio0cgrp cover line 8, 13 used by keys
354 * and 11, 12 used by the HD LEDs
355 * and line 14, 15 used by RTL8366
356 * RESET and phy ready
357 * gpio0egrp cover line 16 used by VDISP
358 * gpio0fgrp cover line 17 used by TK IRQ
359 * gpio0ggrp cover line 20 used by panel CS
360 * gpio0hgrp cover line 21,22 used by RTL8366RB MDIO
362 gpio0_default_pins: pinctrl-gpio0 {
365 groups = "gpio0bgrp",
373 * gpio1bgrp cover line 5,8,7 used by panel SPI
374 * also line 6 used by the fan
377 gpio1_default_pins: pinctrl-gpio1 {
380 groups = "gpio1bgrp";
384 * These GPIO groups will be mapped in over some
385 * of the flash pins when the flash is not in
388 pflash_disabled_pins: pinctrl-pflash-disabled {
391 groups = "gpio0ggrp", "gpio0igrp", "gpio0jgrp",
398 groups = "gmii_gmac0_grp";
401 pins = "V8 GMAC0 RXDV", "T10 GMAC1 RXDV",
402 "Y7 GMAC0 RXC", "Y11 GMAC1 RXC",
403 "T8 GMAC0 TXEN", "W11 GMAC1 TXEN",
404 "U8 GMAC0 TXC", "V11 GMAC1 TXC",
405 "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
406 "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
407 "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
408 "V7 GMAC0 TXD2", "U7 GMAC0 TXD3",
409 "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1",
410 "T11 GMAC1 RXD2", "W12 GMAC1 RXD3",
411 "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1",
412 "W10 GMAC1 TXD2", "T9 GMAC1 TXD3";
415 /* Set up drive strength on GMAC0 to 16 mA */
417 groups = "gmii_gmac0_grp";
418 drive-strength = <16>;
424 sata: sata@46000000 {
425 cortina,gemini-ata-muxmode = <0>;
426 cortina,gemini-enable-sata-bridge;
430 gpio0: gpio@4d000000 {
431 pinctrl-names = "default";
432 pinctrl-0 = <&gpio0_default_pins>;
435 gpio1: gpio@4e000000 {
436 pinctrl-names = "default";
437 pinctrl-0 = <&gpio1_default_pins>;
442 interrupt-map-mask = <0xf800 0 0 7>;
444 <0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */
445 <0x4800 0 0 2 &pci_intc 1>,
446 <0x4800 0 0 3 &pci_intc 2>,
447 <0x4800 0 0 4 &pci_intc 3>,
448 <0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */
449 <0x5000 0 0 2 &pci_intc 2>,
450 <0x5000 0 0 3 &pci_intc 3>,
451 <0x5000 0 0 4 &pci_intc 0>,
452 <0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */
453 <0x5800 0 0 2 &pci_intc 3>,
454 <0x5800 0 0 3 &pci_intc 0>,
455 <0x5800 0 0 4 &pci_intc 1>,
456 <0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */
457 <0x6000 0 0 2 &pci_intc 0>,
458 <0x6000 0 0 3 &pci_intc 1>,
459 <0x6000 0 0 4 &pci_intc 2>;
474 /* Not used in this platform */
482 * This drive may have a temperature sensor with a
483 * thermal zone we can use for thermal control of the
484 * chassis temperature using the fan.
488 #thermal-sensor-cells = <0>;
492 display-controller@6a000000 {
497 display_out: endpoint {
498 remote-endpoint = <&panel_in>;