Linus Walleij | 22789ae | 2017-04-29 22:39:11 +0200 | [diff] [blame] | 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 { |
| 17 | /* 128 MB SDRAM in 2 x Hynix HY5DU121622DTP-D43 */ |
| 18 | device_type = "memory"; |
| 19 | reg = <0x00000000 0x8000000>; |
| 20 | }; |
| 21 | |
| 22 | chosen { |
| 23 | stdout-path = "uart0:115200n8"; |
| 24 | }; |
| 25 | |
| 26 | gpio_keys { |
| 27 | compatible = "gpio-keys"; |
| 28 | #address-cells = <1>; |
| 29 | #size-cells = <0>; |
| 30 | button-esc { |
| 31 | debounce_interval = <50>; |
| 32 | wakeup-source; |
| 33 | linux,code = <KEY_ESC>; |
| 34 | label = "reset"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 35 | /* Collides with LPC_LAD[0], UART DCD, SSP 97RST */ |
Linus Walleij | 22789ae | 2017-04-29 22:39:11 +0200 | [diff] [blame] | 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"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 43 | /* Collides with LPC LFRAME, UART RTS, SSP TXD */ |
Linus Walleij | 22789ae | 2017-04-29 22:39:11 +0200 | [diff] [blame] | 44 | gpios = <&gpio0 13 GPIO_ACTIVE_LOW>; |
| 45 | }; |
| 46 | }; |
| 47 | |
| 48 | leds { |
| 49 | compatible = "gpio-leds"; |
| 50 | led-wps { |
| 51 | label = "dir685:blue:WPS"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 52 | /* Collides with ICE */ |
Linus Walleij | 22789ae | 2017-04-29 22:39:11 +0200 | [diff] [blame] | 53 | gpios = <&gpio0 7 GPIO_ACTIVE_LOW>; |
| 54 | default-state = "on"; |
| 55 | linux,default-trigger = "heartbeat"; |
| 56 | }; |
| 57 | /* |
| 58 | * These two LEDs are on the side of the device. |
| 59 | * For electrical reasons, both LEDs cannot be active |
| 60 | * at the same time so only blue or orange can on at |
| 61 | * one time. Enabling both makes the LED go dark. |
| 62 | * The LEDs both sit inside the unmount button and the |
| 63 | * label on the case says "unmount". |
| 64 | */ |
| 65 | led-blue-hd { |
| 66 | label = "dir685:blue:HD"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 67 | /* Collides with LPC_SERIRQ, UART DTR, SSP FSC pins */ |
Linus Walleij | 22789ae | 2017-04-29 22:39:11 +0200 | [diff] [blame] | 68 | gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>; |
| 69 | default-state = "off"; |
| 70 | }; |
| 71 | led-orange-hd { |
| 72 | label = "dir685:orange:HD"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 73 | /* Collides with LPC_LAD[2], UART DSR, SSP ECLK pins */ |
Linus Walleij | 22789ae | 2017-04-29 22:39:11 +0200 | [diff] [blame] | 74 | gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; |
| 75 | default-state = "off"; |
| 76 | }; |
| 77 | }; |
| 78 | |
| 79 | /* |
| 80 | * This is a Sunon Maglev GM0502PFV2-8 cooling fan @10000 RPM. |
| 81 | * Since the platform has no temperature sensor, this is controlled |
| 82 | * from userspace by using the hard disks S.M.A.R.T. temperature |
| 83 | * sensor. It is turned on when the temperature exceeds 46 degrees |
| 84 | * and turned off when the temperatures goes below 41 degrees |
| 85 | * (celsius). |
| 86 | */ |
| 87 | gpio-fan { |
| 88 | compatible = "gpio-fan"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 89 | /* Collides with IDE */ |
Linus Walleij | 22789ae | 2017-04-29 22:39:11 +0200 | [diff] [blame] | 90 | gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>; |
| 91 | gpio-fan,speed-map = <0 0>, <10000 1>; |
| 92 | #cooling-cells = <2>; |
| 93 | }; |
| 94 | |
| 95 | /* |
| 96 | * The touchpad input is connected to a GPIO bit-banged |
| 97 | * I2C bus. |
| 98 | */ |
| 99 | gpio-i2c { |
| 100 | compatible = "i2c-gpio"; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 101 | /* Collides with ICE */ |
Linus Walleij | 8632a66 | 2017-09-10 20:02:33 +0200 | [diff] [blame] | 102 | sda-gpios = <&gpio0 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; |
| 103 | scl-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; |
Linus Walleij | 22789ae | 2017-04-29 22:39:11 +0200 | [diff] [blame] | 104 | #address-cells = <1>; |
| 105 | #size-cells = <0>; |
| 106 | |
| 107 | touchkeys@26 { |
| 108 | compatible = "dlink,dir685-touchkeys"; |
| 109 | reg = <0x26>; |
| 110 | interrupt-parent = <&gpio0>; |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 111 | /* Collides with NAND flash */ |
Linus Walleij | 22789ae | 2017-04-29 22:39:11 +0200 | [diff] [blame] | 112 | interrupts = <17 IRQ_TYPE_EDGE_FALLING>; |
| 113 | }; |
| 114 | }; |
| 115 | |
| 116 | soc { |
| 117 | flash@30000000 { |
| 118 | status = "okay"; |
| 119 | /* 32MB of flash */ |
| 120 | reg = <0x30000000 0x02000000>; |
| 121 | |
| 122 | /* |
| 123 | * This "RedBoot" is the Storlink derivative. |
| 124 | */ |
| 125 | partition@0 { |
| 126 | label = "RedBoot"; |
| 127 | reg = <0x00000000 0x00040000>; |
| 128 | read-only; |
| 129 | }; |
| 130 | /* |
| 131 | * Between the boot loader and the rootfs is the kernel |
| 132 | * in a custom Storlink format flashed from the boot |
| 133 | * menu. The rootfs is in squashfs format. |
| 134 | */ |
| 135 | partition@1800c0 { |
| 136 | label = "rootfs"; |
| 137 | reg = <0x001800c0 0x01dbff40>; |
| 138 | read-only; |
| 139 | }; |
| 140 | partition@1f40000 { |
| 141 | label = "upgrade"; |
| 142 | reg = <0x01f40000 0x00040000>; |
| 143 | read-only; |
| 144 | }; |
| 145 | partition@1f80000 { |
| 146 | label = "rgdb"; |
| 147 | reg = <0x01f80000 0x00040000>; |
| 148 | read-only; |
| 149 | }; |
| 150 | /* |
| 151 | * This partition contains MAC addresses for WAN, |
| 152 | * WLAN and LAN, and the country code (for wireless |
| 153 | * I guess). |
| 154 | */ |
| 155 | partition@1fc0000 { |
| 156 | label = "nvram"; |
| 157 | reg = <0x01fc0000 0x00020000>; |
| 158 | read-only; |
| 159 | }; |
| 160 | partition@1fe0000 { |
| 161 | label = "LangPack"; |
| 162 | reg = <0x01fe0000 0x00020000>; |
| 163 | read-only; |
| 164 | }; |
| 165 | }; |
| 166 | |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 167 | syscon: syscon@40000000 { |
| 168 | pinctrl { |
| 169 | /* |
| 170 | * gpio0bgrp cover line 5, 6 used by TK I2C |
| 171 | * gpio0bgrp cover line 7 used by WPS LED |
| 172 | * gpio0cgrp cover line 8, 13 used by keys |
| 173 | * and 11, 12 used by the HD LEDs |
| 174 | * gpio0egrp cover line 16 used by VDISP |
| 175 | * gpio0fgrp cover line 17 used by TK IRQ |
| 176 | * gpio0ggrp cover line 20 used by panel CS |
| 177 | * gpio0hgrp cover line 21,22 used by RTL8366RB |
| 178 | */ |
| 179 | gpio0_default_pins: pinctrl-gpio0 { |
| 180 | mux { |
| 181 | function = "gpio0"; |
| 182 | groups = "gpio0bgrp", |
| 183 | "gpio0cgrp", |
| 184 | "gpio0egrp", |
| 185 | "gpio0fgrp", |
| 186 | "gpio0ggrp", |
| 187 | "gpio0hgrp"; |
| 188 | }; |
| 189 | }; |
| 190 | /* |
| 191 | * gpio1bgrp cover line 5,8,7 used by panel SPI |
| 192 | * also line 6 used by the fan |
| 193 | * |
| 194 | */ |
| 195 | gpio1_default_pins: pinctrl-gpio1 { |
| 196 | mux { |
| 197 | function = "gpio1"; |
| 198 | groups = "gpio1bgrp"; |
| 199 | }; |
| 200 | }; |
| 201 | }; |
| 202 | }; |
| 203 | |
Linus Walleij | 22789ae | 2017-04-29 22:39:11 +0200 | [diff] [blame] | 204 | sata: sata@46000000 { |
| 205 | cortina,gemini-ata-muxmode = <0>; |
| 206 | cortina,gemini-enable-sata-bridge; |
| 207 | status = "okay"; |
| 208 | }; |
| 209 | |
Linus Walleij | f328c2e | 2017-07-05 16:59:33 +0200 | [diff] [blame] | 210 | gpio0: gpio@4d000000 { |
| 211 | pinctrl-names = "default"; |
| 212 | pinctrl-0 = <&gpio0_default_pins>; |
| 213 | }; |
| 214 | |
| 215 | gpio1: gpio@4e000000 { |
| 216 | pinctrl-names = "default"; |
| 217 | pinctrl-0 = <&gpio1_default_pins>; |
| 218 | }; |
| 219 | |
Linus Walleij | 22789ae | 2017-04-29 22:39:11 +0200 | [diff] [blame] | 220 | pci@50000000 { |
| 221 | status = "okay"; |
| 222 | interrupt-map-mask = <0xf800 0 0 7>; |
| 223 | interrupt-map = |
| 224 | <0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */ |
| 225 | <0x4800 0 0 2 &pci_intc 1>, |
| 226 | <0x4800 0 0 3 &pci_intc 2>, |
| 227 | <0x4800 0 0 4 &pci_intc 3>, |
| 228 | <0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */ |
| 229 | <0x5000 0 0 2 &pci_intc 2>, |
| 230 | <0x5000 0 0 3 &pci_intc 3>, |
| 231 | <0x5000 0 0 4 &pci_intc 0>, |
| 232 | <0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */ |
| 233 | <0x5800 0 0 2 &pci_intc 3>, |
| 234 | <0x5800 0 0 3 &pci_intc 0>, |
| 235 | <0x5800 0 0 4 &pci_intc 1>, |
| 236 | <0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */ |
| 237 | <0x6000 0 0 2 &pci_intc 0>, |
| 238 | <0x6000 0 0 3 &pci_intc 1>, |
| 239 | <0x6000 0 0 4 &pci_intc 2>; |
| 240 | }; |
| 241 | |
| 242 | ata@63000000 { |
| 243 | status = "okay"; |
| 244 | }; |
| 245 | }; |
| 246 | }; |