1*f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0 2*f126890aSEmmanuel Vadot/* 3*f126890aSEmmanuel Vadot * Device Tree file for D-Link DNS-313 1-Bay Network Storage Enclosure 4*f126890aSEmmanuel Vadot */ 5*f126890aSEmmanuel Vadot 6*f126890aSEmmanuel Vadot/dts-v1/; 7*f126890aSEmmanuel Vadot 8*f126890aSEmmanuel Vadot#include "gemini.dtsi" 9*f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h> 10*f126890aSEmmanuel Vadot#include <dt-bindings/thermal/thermal.h> 11*f126890aSEmmanuel Vadot 12*f126890aSEmmanuel Vadot/ { 13*f126890aSEmmanuel Vadot model = "D-Link DNS-313 1-Bay Network Storage Enclosure"; 14*f126890aSEmmanuel Vadot compatible = "dlink,dns-313", "cortina,gemini"; 15*f126890aSEmmanuel Vadot #address-cells = <1>; 16*f126890aSEmmanuel Vadot #size-cells = <1>; 17*f126890aSEmmanuel Vadot 18*f126890aSEmmanuel Vadot memory@0 { 19*f126890aSEmmanuel Vadot /* 64 MB SDRAM in a Nanya NT5DS32M16BS-6K package */ 20*f126890aSEmmanuel Vadot device_type = "memory"; 21*f126890aSEmmanuel Vadot reg = <0x00000000 0x4000000>; 22*f126890aSEmmanuel Vadot }; 23*f126890aSEmmanuel Vadot 24*f126890aSEmmanuel Vadot aliases { 25*f126890aSEmmanuel Vadot mdio-gpio0 = &mdio0; 26*f126890aSEmmanuel Vadot }; 27*f126890aSEmmanuel Vadot 28*f126890aSEmmanuel Vadot chosen { 29*f126890aSEmmanuel Vadot bootargs = "console=ttyS0,19200n8 root=/dev/sda4 rw rootwait"; 30*f126890aSEmmanuel Vadot stdout-path = "uart0:19200n8"; 31*f126890aSEmmanuel Vadot }; 32*f126890aSEmmanuel Vadot 33*f126890aSEmmanuel Vadot gpio_keys { 34*f126890aSEmmanuel Vadot compatible = "gpio-keys"; 35*f126890aSEmmanuel Vadot 36*f126890aSEmmanuel Vadot button-esc { 37*f126890aSEmmanuel Vadot debounce-interval = <100>; 38*f126890aSEmmanuel Vadot wakeup-source; 39*f126890aSEmmanuel Vadot linux,code = <KEY_ESC>; 40*f126890aSEmmanuel Vadot label = "reset"; 41*f126890aSEmmanuel Vadot gpios = <&gpio1 31 GPIO_ACTIVE_LOW>; 42*f126890aSEmmanuel Vadot }; 43*f126890aSEmmanuel Vadot }; 44*f126890aSEmmanuel Vadot 45*f126890aSEmmanuel Vadot leds { 46*f126890aSEmmanuel Vadot compatible = "gpio-leds"; 47*f126890aSEmmanuel Vadot led-power { 48*f126890aSEmmanuel Vadot label = "dns313:blue:power"; 49*f126890aSEmmanuel Vadot gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; 50*f126890aSEmmanuel Vadot default-state = "on"; 51*f126890aSEmmanuel Vadot linux,default-trigger = "heartbeat"; 52*f126890aSEmmanuel Vadot }; 53*f126890aSEmmanuel Vadot led-disk-blue { 54*f126890aSEmmanuel Vadot label = "dns313:blue:disk"; 55*f126890aSEmmanuel Vadot gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; 56*f126890aSEmmanuel Vadot default-state = "off"; 57*f126890aSEmmanuel Vadot }; 58*f126890aSEmmanuel Vadot led-disk-green { 59*f126890aSEmmanuel Vadot label = "dns313:green:disk"; 60*f126890aSEmmanuel Vadot gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>; 61*f126890aSEmmanuel Vadot default-state = "off"; 62*f126890aSEmmanuel Vadot linux,default-trigger = "disk-read"; 63*f126890aSEmmanuel Vadot }; 64*f126890aSEmmanuel Vadot led-disk-red { 65*f126890aSEmmanuel Vadot label = "dns313:red:disk"; 66*f126890aSEmmanuel Vadot gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; 67*f126890aSEmmanuel Vadot default-state = "off"; 68*f126890aSEmmanuel Vadot linux,default-trigger = "disk-write"; 69*f126890aSEmmanuel Vadot }; 70*f126890aSEmmanuel Vadot }; 71*f126890aSEmmanuel Vadot 72*f126890aSEmmanuel Vadot /* 73*f126890aSEmmanuel Vadot * This is a ADDA AD0405GB-G73 fan @3000 and 6000 RPM. 74*f126890aSEmmanuel Vadot */ 75*f126890aSEmmanuel Vadot fan0: gpio-fan { 76*f126890aSEmmanuel Vadot compatible = "gpio-fan"; 77*f126890aSEmmanuel Vadot gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>, 78*f126890aSEmmanuel Vadot <&gpio0 12 GPIO_ACTIVE_HIGH>; 79*f126890aSEmmanuel Vadot gpio-fan,speed-map = <0 0>, <3000 1>, <6000 2>; 80*f126890aSEmmanuel Vadot #cooling-cells = <2>; 81*f126890aSEmmanuel Vadot }; 82*f126890aSEmmanuel Vadot 83*f126890aSEmmanuel Vadot /* 84*f126890aSEmmanuel Vadot * This is the type B USB connector on the device, 85*f126890aSEmmanuel Vadot * a GPIO-controlled USB VBUS detect 86*f126890aSEmmanuel Vadot */ 87*f126890aSEmmanuel Vadot usb1_phy: phy { 88*f126890aSEmmanuel Vadot compatible = "gpio-usb-b-connector", "usb-b-connector"; 89*f126890aSEmmanuel Vadot #phy-cells = <0>; 90*f126890aSEmmanuel Vadot vbus-gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; 91*f126890aSEmmanuel Vadot }; 92*f126890aSEmmanuel Vadot 93*f126890aSEmmanuel Vadot /* Global Mixed-Mode Technology G751 mounted on GPIO I2C */ 94*f126890aSEmmanuel Vadot i2c { 95*f126890aSEmmanuel Vadot compatible = "i2c-gpio"; 96*f126890aSEmmanuel Vadot sda-gpios = <&gpio0 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 97*f126890aSEmmanuel Vadot scl-gpios = <&gpio0 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>; 98*f126890aSEmmanuel Vadot #address-cells = <1>; 99*f126890aSEmmanuel Vadot #size-cells = <0>; 100*f126890aSEmmanuel Vadot 101*f126890aSEmmanuel Vadot g751: temperature-sensor@48 { 102*f126890aSEmmanuel Vadot compatible = "gmt,g751"; 103*f126890aSEmmanuel Vadot reg = <0x48>; 104*f126890aSEmmanuel Vadot #thermal-sensor-cells = <0>; 105*f126890aSEmmanuel Vadot }; 106*f126890aSEmmanuel Vadot }; 107*f126890aSEmmanuel Vadot 108*f126890aSEmmanuel Vadot thermal-zones { 109*f126890aSEmmanuel Vadot chassis-thermal { 110*f126890aSEmmanuel Vadot /* Poll every 20 seconds */ 111*f126890aSEmmanuel Vadot polling-delay = <20000>; 112*f126890aSEmmanuel Vadot /* Poll every 2nd second when cooling */ 113*f126890aSEmmanuel Vadot polling-delay-passive = <2000>; 114*f126890aSEmmanuel Vadot 115*f126890aSEmmanuel Vadot thermal-sensors = <&g751>; 116*f126890aSEmmanuel Vadot 117*f126890aSEmmanuel Vadot /* Tripping points from the fan.script in the rootfs */ 118*f126890aSEmmanuel Vadot trips { 119*f126890aSEmmanuel Vadot chassis_alert0: chassis-alert0 { 120*f126890aSEmmanuel Vadot /* At 43 degrees turn on low speed */ 121*f126890aSEmmanuel Vadot temperature = <43000>; 122*f126890aSEmmanuel Vadot hysteresis = <3000>; 123*f126890aSEmmanuel Vadot type = "active"; 124*f126890aSEmmanuel Vadot }; 125*f126890aSEmmanuel Vadot chassis_alert1: chassis-alert1 { 126*f126890aSEmmanuel Vadot /* At 47 degrees turn on high speed */ 127*f126890aSEmmanuel Vadot temperature = <47000>; 128*f126890aSEmmanuel Vadot hysteresis = <3000>; 129*f126890aSEmmanuel Vadot type = "active"; 130*f126890aSEmmanuel Vadot }; 131*f126890aSEmmanuel Vadot chassis_crit: chassis-crit { 132*f126890aSEmmanuel Vadot /* Just shut down at 60 degrees */ 133*f126890aSEmmanuel Vadot temperature = <60000>; 134*f126890aSEmmanuel Vadot hysteresis = <2000>; 135*f126890aSEmmanuel Vadot type = "critical"; 136*f126890aSEmmanuel Vadot }; 137*f126890aSEmmanuel Vadot }; 138*f126890aSEmmanuel Vadot 139*f126890aSEmmanuel Vadot cooling-maps { 140*f126890aSEmmanuel Vadot map0 { 141*f126890aSEmmanuel Vadot trip = <&chassis_alert0>; 142*f126890aSEmmanuel Vadot cooling-device = <&fan0 1 1>; 143*f126890aSEmmanuel Vadot }; 144*f126890aSEmmanuel Vadot map1 { 145*f126890aSEmmanuel Vadot trip = <&chassis_alert1>; 146*f126890aSEmmanuel Vadot cooling-device = <&fan0 2 2>; 147*f126890aSEmmanuel Vadot }; 148*f126890aSEmmanuel Vadot }; 149*f126890aSEmmanuel Vadot }; 150*f126890aSEmmanuel Vadot }; 151*f126890aSEmmanuel Vadot 152*f126890aSEmmanuel Vadot mdio0: mdio { 153*f126890aSEmmanuel Vadot compatible = "virtual,mdio-gpio"; 154*f126890aSEmmanuel Vadot /* Uses MDC and MDIO */ 155*f126890aSEmmanuel Vadot gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */ 156*f126890aSEmmanuel Vadot <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */ 157*f126890aSEmmanuel Vadot #address-cells = <1>; 158*f126890aSEmmanuel Vadot #size-cells = <0>; 159*f126890aSEmmanuel Vadot 160*f126890aSEmmanuel Vadot /* This is a Realtek RTL8211B Gigabit ethernet transceiver */ 161*f126890aSEmmanuel Vadot phy0: ethernet-phy@1 { 162*f126890aSEmmanuel Vadot reg = <1>; 163*f126890aSEmmanuel Vadot device_type = "ethernet-phy"; 164*f126890aSEmmanuel Vadot }; 165*f126890aSEmmanuel Vadot }; 166*f126890aSEmmanuel Vadot 167*f126890aSEmmanuel Vadot soc { 168*f126890aSEmmanuel Vadot flash@30000000 { 169*f126890aSEmmanuel Vadot /* 170*f126890aSEmmanuel Vadot * This is a Eon EN29LV400AB 512 KiB flash with 171*f126890aSEmmanuel Vadot * three partitions. 172*f126890aSEmmanuel Vadot */ 173*f126890aSEmmanuel Vadot compatible = "cortina,gemini-flash", "jedec-flash"; 174*f126890aSEmmanuel Vadot status = "okay"; 175*f126890aSEmmanuel Vadot reg = <0x30000000 0x00080000>; 176*f126890aSEmmanuel Vadot #address-cells = <1>; 177*f126890aSEmmanuel Vadot #size-cells = <1>; 178*f126890aSEmmanuel Vadot 179*f126890aSEmmanuel Vadot /* 180*f126890aSEmmanuel Vadot * This "RedBoot" is the Storlink derivative. 181*f126890aSEmmanuel Vadot */ 182*f126890aSEmmanuel Vadot partition@0 { 183*f126890aSEmmanuel Vadot label = "RedBoot"; 184*f126890aSEmmanuel Vadot reg = <0x00000000 0x00040000>; 185*f126890aSEmmanuel Vadot read-only; 186*f126890aSEmmanuel Vadot }; 187*f126890aSEmmanuel Vadot partition@40000 { 188*f126890aSEmmanuel Vadot label = "MTD1"; 189*f126890aSEmmanuel Vadot reg = <0x00040000 0x00020000>; 190*f126890aSEmmanuel Vadot read-only; 191*f126890aSEmmanuel Vadot }; 192*f126890aSEmmanuel Vadot partition@60000 { 193*f126890aSEmmanuel Vadot label = "MTD2"; 194*f126890aSEmmanuel Vadot reg = <0x00060000 0x00020000>; 195*f126890aSEmmanuel Vadot read-only; 196*f126890aSEmmanuel Vadot }; 197*f126890aSEmmanuel Vadot }; 198*f126890aSEmmanuel Vadot 199*f126890aSEmmanuel Vadot syscon: syscon@40000000 { 200*f126890aSEmmanuel Vadot pinctrl { 201*f126890aSEmmanuel Vadot /* 202*f126890aSEmmanuel Vadot */ 203*f126890aSEmmanuel Vadot gpio0_default_pins: pinctrl-gpio0 { 204*f126890aSEmmanuel Vadot mux { 205*f126890aSEmmanuel Vadot function = "gpio0"; 206*f126890aSEmmanuel Vadot groups = 207*f126890aSEmmanuel Vadot /* Used by LEDs conflicts ICE */ 208*f126890aSEmmanuel Vadot "gpio0bgrp", 209*f126890aSEmmanuel Vadot /* Used by ? conflicts ICE */ 210*f126890aSEmmanuel Vadot "gpio0cgrp", 211*f126890aSEmmanuel Vadot /* 212*f126890aSEmmanuel Vadot * Used by fan & G751, conflicts LPC, 213*f126890aSEmmanuel Vadot * UART modem lines, SSP 214*f126890aSEmmanuel Vadot */ 215*f126890aSEmmanuel Vadot "gpio0egrp", 216*f126890aSEmmanuel Vadot /* Used by G751 */ 217*f126890aSEmmanuel Vadot "gpio0fgrp", 218*f126890aSEmmanuel Vadot /* Used by MDIO */ 219*f126890aSEmmanuel Vadot "gpio0igrp"; 220*f126890aSEmmanuel Vadot }; 221*f126890aSEmmanuel Vadot }; 222*f126890aSEmmanuel Vadot gpio1_default_pins: pinctrl-gpio1 { 223*f126890aSEmmanuel Vadot mux { 224*f126890aSEmmanuel Vadot function = "gpio1"; 225*f126890aSEmmanuel Vadot /* Used by "reset" button */ 226*f126890aSEmmanuel Vadot groups = "gpio1dgrp"; 227*f126890aSEmmanuel Vadot }; 228*f126890aSEmmanuel Vadot }; 229*f126890aSEmmanuel Vadot pinctrl-gmii { 230*f126890aSEmmanuel Vadot mux { 231*f126890aSEmmanuel Vadot function = "gmii"; 232*f126890aSEmmanuel Vadot groups = "gmii_gmac0_grp"; 233*f126890aSEmmanuel Vadot }; 234*f126890aSEmmanuel Vadot /* 235*f126890aSEmmanuel Vadot * In the vendor Linux tree, these values are set for the C3 236*f126890aSEmmanuel Vadot * version of the SL3512 ASIC with the comment "benson suggest" 237*f126890aSEmmanuel Vadot */ 238*f126890aSEmmanuel Vadot conf0 { 239*f126890aSEmmanuel Vadot pins = "R8 GMAC0 RXDV", "U11 GMAC1 RXDV"; 240*f126890aSEmmanuel Vadot skew-delay = <0>; 241*f126890aSEmmanuel Vadot }; 242*f126890aSEmmanuel Vadot conf1 { 243*f126890aSEmmanuel Vadot pins = "T8 GMAC0 RXC"; 244*f126890aSEmmanuel Vadot skew-delay = <10>; 245*f126890aSEmmanuel Vadot }; 246*f126890aSEmmanuel Vadot conf2 { 247*f126890aSEmmanuel Vadot pins = "T11 GMAC1 RXC"; 248*f126890aSEmmanuel Vadot skew-delay = <15>; 249*f126890aSEmmanuel Vadot }; 250*f126890aSEmmanuel Vadot conf3 { 251*f126890aSEmmanuel Vadot pins = "P8 GMAC0 TXEN", "V11 GMAC1 TXEN"; 252*f126890aSEmmanuel Vadot skew-delay = <7>; 253*f126890aSEmmanuel Vadot }; 254*f126890aSEmmanuel Vadot conf4 { 255*f126890aSEmmanuel Vadot pins = "V7 GMAC0 TXC", "P10 GMAC1 TXC"; 256*f126890aSEmmanuel Vadot skew-delay = <10>; 257*f126890aSEmmanuel Vadot }; 258*f126890aSEmmanuel Vadot conf5 { 259*f126890aSEmmanuel Vadot /* The data lines all have default skew */ 260*f126890aSEmmanuel Vadot pins = "U8 GMAC0 RXD0", "V8 GMAC0 RXD1", 261*f126890aSEmmanuel Vadot "P9 GMAC0 RXD2", "R9 GMAC0 RXD3", 262*f126890aSEmmanuel Vadot "R11 GMAC1 RXD0", "P11 GMAC1 RXD1", 263*f126890aSEmmanuel Vadot "V12 GMAC1 RXD2", "U12 GMAC1 RXD3", 264*f126890aSEmmanuel Vadot "R10 GMAC1 TXD0", "T10 GMAC1 TXD1", 265*f126890aSEmmanuel Vadot "U10 GMAC1 TXD2", "V10 GMAC1 TXD3"; 266*f126890aSEmmanuel Vadot skew-delay = <7>; 267*f126890aSEmmanuel Vadot }; 268*f126890aSEmmanuel Vadot conf6 { 269*f126890aSEmmanuel Vadot pins = "U7 GMAC0 TXD0", "T7 GMAC0 TXD1", 270*f126890aSEmmanuel Vadot "R7 GMAC0 TXD2", "P7 GMAC0 TXD3"; 271*f126890aSEmmanuel Vadot skew-delay = <5>; 272*f126890aSEmmanuel Vadot }; 273*f126890aSEmmanuel Vadot /* Set up drive strength on GMAC0 to 16 mA */ 274*f126890aSEmmanuel Vadot conf7 { 275*f126890aSEmmanuel Vadot groups = "gmii_gmac0_grp"; 276*f126890aSEmmanuel Vadot drive-strength = <16>; 277*f126890aSEmmanuel Vadot }; 278*f126890aSEmmanuel Vadot }; 279*f126890aSEmmanuel Vadot }; 280*f126890aSEmmanuel Vadot }; 281*f126890aSEmmanuel Vadot 282*f126890aSEmmanuel Vadot sata: sata@46000000 { 283*f126890aSEmmanuel Vadot /* The ROM uses this muxmode */ 284*f126890aSEmmanuel Vadot cortina,gemini-ata-muxmode = <0>; 285*f126890aSEmmanuel Vadot cortina,gemini-enable-sata-bridge; 286*f126890aSEmmanuel Vadot status = "okay"; 287*f126890aSEmmanuel Vadot }; 288*f126890aSEmmanuel Vadot 289*f126890aSEmmanuel Vadot gpio0: gpio@4d000000 { 290*f126890aSEmmanuel Vadot pinctrl-names = "default"; 291*f126890aSEmmanuel Vadot pinctrl-0 = <&gpio0_default_pins>; 292*f126890aSEmmanuel Vadot }; 293*f126890aSEmmanuel Vadot 294*f126890aSEmmanuel Vadot gpio1: gpio@4e000000 { 295*f126890aSEmmanuel Vadot pinctrl-names = "default"; 296*f126890aSEmmanuel Vadot pinctrl-0 = <&gpio1_default_pins>; 297*f126890aSEmmanuel Vadot }; 298*f126890aSEmmanuel Vadot 299*f126890aSEmmanuel Vadot ethernet@60000000 { 300*f126890aSEmmanuel Vadot status = "okay"; 301*f126890aSEmmanuel Vadot 302*f126890aSEmmanuel Vadot ethernet-port@0 { 303*f126890aSEmmanuel Vadot phy-mode = "rgmii"; 304*f126890aSEmmanuel Vadot phy-handle = <&phy0>; 305*f126890aSEmmanuel Vadot }; 306*f126890aSEmmanuel Vadot ethernet-port@1 { 307*f126890aSEmmanuel Vadot /* Not used in this platform */ 308*f126890aSEmmanuel Vadot }; 309*f126890aSEmmanuel Vadot }; 310*f126890aSEmmanuel Vadot 311*f126890aSEmmanuel Vadot ide@63000000 { 312*f126890aSEmmanuel Vadot status = "okay"; 313*f126890aSEmmanuel Vadot }; 314*f126890aSEmmanuel Vadot 315*f126890aSEmmanuel Vadot usb@69000000 { 316*f126890aSEmmanuel Vadot status = "okay"; 317*f126890aSEmmanuel Vadot dr_mode = "peripheral"; 318*f126890aSEmmanuel Vadot usb-phy = <&usb1_phy>; 319*f126890aSEmmanuel Vadot pinctrl-names = "default"; 320*f126890aSEmmanuel Vadot pinctrl-0 = <&usb_default_pins>; 321*f126890aSEmmanuel Vadot }; 322*f126890aSEmmanuel Vadot }; 323*f126890aSEmmanuel Vadot}; 324