Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Device Tree file for D-Link DNS-313 1-Bay Network Storage Enclosure
0004  */
0005 
0006 /dts-v1/;
0007 
0008 #include "gemini.dtsi"
0009 #include <dt-bindings/input/input.h>
0010 #include <dt-bindings/thermal/thermal.h>
0011 
0012 / {
0013         model = "D-Link DNS-313 1-Bay Network Storage Enclosure";
0014         compatible = "dlink,dns-313", "cortina,gemini";
0015         #address-cells = <1>;
0016         #size-cells = <1>;
0017 
0018         memory@0 {
0019                 /* 64 MB SDRAM in a Nanya NT5DS32M16BS-6K package */
0020                 device_type = "memory";
0021                 reg = <0x00000000 0x4000000>;
0022         };
0023 
0024         aliases {
0025                 mdio-gpio0 = &mdio0;
0026         };
0027 
0028         chosen {
0029                 bootargs = "console=ttyS0,19200n8 root=/dev/sda4 rw rootwait";
0030                 stdout-path = "uart0:19200n8";
0031         };
0032 
0033         gpio_keys {
0034                 compatible = "gpio-keys";
0035 
0036                 button-esc {
0037                         debounce-interval = <100>;
0038                         wakeup-source;
0039                         linux,code = <KEY_ESC>;
0040                         label = "reset";
0041                         gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
0042                 };
0043         };
0044 
0045         leds {
0046                 compatible = "gpio-leds";
0047                 led-power {
0048                         label = "dns313:blue:power";
0049                         gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
0050                         default-state = "on";
0051                         linux,default-trigger = "heartbeat";
0052                 };
0053                 led-disk-blue {
0054                         label = "dns313:blue:disk";
0055                         gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
0056                         default-state = "off";
0057                 };
0058                 led-disk-green {
0059                         label = "dns313:green:disk";
0060                         gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
0061                         default-state = "off";
0062                         linux,default-trigger = "disk-read";
0063                 };
0064                 led-disk-red {
0065                         label = "dns313:red:disk";
0066                         gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
0067                         default-state = "off";
0068                         linux,default-trigger = "disk-write";
0069                 };
0070         };
0071 
0072         /*
0073          * This is a ADDA AD0405GB-G73 fan @3000 and 6000 RPM.
0074          */
0075         fan0: gpio-fan {
0076                 compatible = "gpio-fan";
0077                 gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>,
0078                         <&gpio0 12 GPIO_ACTIVE_HIGH>;
0079                 gpio-fan,speed-map = <0 0>, <3000 1>, <6000 2>;
0080                 #cooling-cells = <2>;
0081         };
0082 
0083 
0084         /* Global Mixed-Mode Technology G751 mounted on GPIO I2C */
0085         i2c {
0086                 compatible = "i2c-gpio";
0087                 sda-gpios = <&gpio0 15 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0088                 scl-gpios = <&gpio0 16 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0089                 #address-cells = <1>;
0090                 #size-cells = <0>;
0091 
0092                 g751: temperature-sensor@48 {
0093                         compatible = "gmt,g751";
0094                         reg = <0x48>;
0095                         #thermal-sensor-cells = <0>;
0096                 };
0097         };
0098 
0099         thermal-zones {
0100                 chassis-thermal {
0101                         /* Poll every 20 seconds */
0102                         polling-delay = <20000>;
0103                         /* Poll every 2nd second when cooling */
0104                         polling-delay-passive = <2000>;
0105 
0106                         thermal-sensors = <&g751>;
0107 
0108                         /* Tripping points from the fan.script in the rootfs */
0109                         trips {
0110                                 chassis_alert0: chassis-alert0 {
0111                                         /* At 43 degrees turn on low speed */
0112                                         temperature = <43000>;
0113                                         hysteresis = <3000>;
0114                                         type = "active";
0115                                 };
0116                                 chassis_alert1: chassis-alert1 {
0117                                         /* At 47 degrees turn on high speed */
0118                                         temperature = <47000>;
0119                                         hysteresis = <3000>;
0120                                         type = "active";
0121                                 };
0122                                 chassis_crit: chassis-crit {
0123                                         /* Just shut down at 60 degrees */
0124                                         temperature = <60000>;
0125                                         hysteresis = <2000>;
0126                                         type = "critical";
0127                                 };
0128                         };
0129 
0130                         cooling-maps {
0131                                 map0 {
0132                                         trip = <&chassis_alert0>;
0133                                         cooling-device = <&fan0 1 1>;
0134                                 };
0135                                 map1 {
0136                                         trip = <&chassis_alert1>;
0137                                         cooling-device = <&fan0 2 2>;
0138                                 };
0139                         };
0140                 };
0141         };
0142 
0143         mdio0: mdio {
0144                 compatible = "virtual,mdio-gpio";
0145                 /* Uses MDC and MDIO */
0146                 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
0147                         <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
0148                 #address-cells = <1>;
0149                 #size-cells = <0>;
0150 
0151                 /* This is a Realtek RTL8211B Gigabit ethernet transceiver */
0152                 phy0: ethernet-phy@1 {
0153                         reg = <1>;
0154                         device_type = "ethernet-phy";
0155                 };
0156         };
0157 
0158         soc {
0159                 flash@30000000 {
0160                         /*
0161                          * This is a Eon EN29LV400AB 512 KiB flash with
0162                          * three partitions.
0163                          */
0164                         compatible = "cortina,gemini-flash", "jedec-flash";
0165                         status = "okay";
0166                         reg = <0x30000000 0x00080000>;
0167 
0168                         /*
0169                          * This "RedBoot" is the Storlink derivative.
0170                          */
0171                         partition@0 {
0172                                 label = "RedBoot";
0173                                 reg = <0x00000000 0x00040000>;
0174                                 read-only;
0175                         };
0176                         partition@40000 {
0177                                 label = "MTD1";
0178                                 reg = <0x00040000 0x00020000>;
0179                                 read-only;
0180                         };
0181                         partition@60000 {
0182                                 label = "MTD2";
0183                                 reg = <0x00060000 0x00020000>;
0184                                 read-only;
0185                         };
0186                 };
0187 
0188                 syscon: syscon@40000000 {
0189                         pinctrl {
0190                                 /*
0191                                  */
0192                                 gpio0_default_pins: pinctrl-gpio0 {
0193                                         mux {
0194                                                 function = "gpio0";
0195                                                 groups =
0196                                                 /* Used by LEDs conflicts ICE */
0197                                                 "gpio0bgrp",
0198                                                 /* Used by ? conflicts ICE */
0199                                                 "gpio0cgrp",
0200                                                 /*
0201                                                  * Used by fan & G751, conflicts LPC,
0202                                                  * UART modem lines, SSP
0203                                                  */
0204                                                 "gpio0egrp",
0205                                                 /* Used by G751 */
0206                                                 "gpio0fgrp",
0207                                                 /* Used by MDIO */
0208                                                 "gpio0igrp";
0209                                         };
0210                                 };
0211                                 gpio1_default_pins: pinctrl-gpio1 {
0212                                         mux {
0213                                                 function = "gpio1";
0214                                                 /* Used by "reset" button */
0215                                                 groups = "gpio1dgrp";
0216                                         };
0217                                 };
0218                                 pinctrl-gmii {
0219                                         mux {
0220                                                 function = "gmii";
0221                                                 groups = "gmii_gmac0_grp";
0222                                         };
0223                                         /*
0224                                          * In the vendor Linux tree, these values are set for the C3
0225                                          * version of the SL3512 ASIC with the comment "benson suggest"
0226                                          */
0227                                         conf0 {
0228                                                 pins = "R8 GMAC0 RXDV", "U11 GMAC1 RXDV";
0229                                                 skew-delay = <0>;
0230                                         };
0231                                         conf1 {
0232                                                 pins = "T8 GMAC0 RXC";
0233                                                 skew-delay = <10>;
0234                                         };
0235                                         conf2 {
0236                                                 pins = "T11 GMAC1 RXC";
0237                                                 skew-delay = <15>;
0238                                         };
0239                                         conf3 {
0240                                                 pins = "P8 GMAC0 TXEN", "V11 GMAC1 TXEN";
0241                                                 skew-delay = <7>;
0242                                         };
0243                                         conf4 {
0244                                                 pins = "V7 GMAC0 TXC", "P10 GMAC1 TXC";
0245                                                 skew-delay = <10>;
0246                                         };
0247                                         conf5 {
0248                                                 /* The data lines all have default skew */
0249                                                 pins = "U8 GMAC0 RXD0", "V8 GMAC0 RXD1",
0250                                                        "P9 GMAC0 RXD2", "R9 GMAC0 RXD3",
0251                                                        "R11 GMAC1 RXD0", "P11 GMAC1 RXD1",
0252                                                        "V12 GMAC1 RXD2", "U12 GMAC1 RXD3",
0253                                                        "R10 GMAC1 TXD0", "T10 GMAC1 TXD1",
0254                                                        "U10 GMAC1 TXD2", "V10 GMAC1 TXD3";
0255                                                 skew-delay = <7>;
0256                                         };
0257                                         conf6 {
0258                                                 pins = "U7 GMAC0 TXD0", "T7 GMAC0 TXD1",
0259                                                        "R7 GMAC0 TXD2", "P7 GMAC0 TXD3";
0260                                                 skew-delay = <5>;
0261                                         };
0262                                         /* Set up drive strength on GMAC0 to 16 mA */
0263                                         conf7 {
0264                                                 groups = "gmii_gmac0_grp";
0265                                                 drive-strength = <16>;
0266                                         };
0267                                 };
0268                         };
0269                 };
0270 
0271                 sata: sata@46000000 {
0272                         /* The ROM uses this muxmode */
0273                         cortina,gemini-ata-muxmode = <0>;
0274                         cortina,gemini-enable-sata-bridge;
0275                         status = "okay";
0276                 };
0277 
0278                 gpio0: gpio@4d000000 {
0279                         pinctrl-names = "default";
0280                         pinctrl-0 = <&gpio0_default_pins>;
0281                 };
0282 
0283                 gpio1: gpio@4e000000 {
0284                         pinctrl-names = "default";
0285                         pinctrl-0 = <&gpio1_default_pins>;
0286                 };
0287 
0288                 ethernet@60000000 {
0289                         status = "okay";
0290 
0291                         ethernet-port@0 {
0292                                 phy-mode = "rgmii";
0293                                 phy-handle = <&phy0>;
0294                         };
0295                         ethernet-port@1 {
0296                                 /* Not used in this platform */
0297                         };
0298                 };
0299 
0300                 ide@63000000 {
0301                         status = "okay";
0302                 };
0303         };
0304 };