Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Device Tree file for D-Link DIR-685 Xtreme N Storage Router
0003  */
0004 
0005 /dts-v1/;
0006 
0007 #include "gemini.dtsi"
0008 #include <dt-bindings/input/input.h>
0009 
0010 / {
0011         model = "D-Link DIR-685 Xtreme N Storage Router";
0012         compatible = "dlink,dir-685", "cortina,gemini";
0013         #address-cells = <1>;
0014         #size-cells = <1>;
0015 
0016         memory@0 {
0017                 /* 128 MB SDRAM in 2 x Hynix HY5DU121622DTP-D43 */
0018                 device_type = "memory";
0019                 reg = <0x00000000 0x8000000>;
0020         };
0021 
0022         chosen {
0023                 bootargs = "console=ttyS0,19200n8 root=/dev/sda1 rw rootwait consoleblank=300";
0024                 stdout-path = "uart0:19200n8";
0025         };
0026 
0027         gpio_keys {
0028                 compatible = "gpio-keys";
0029 
0030                 button-esc {
0031                         debounce-interval = <100>;
0032                         wakeup-source;
0033                         linux,code = <KEY_ESC>;
0034                         label = "reset";
0035                         /* Collides with LPC_LAD[0], UART DCD, SSP 97RST */
0036                         gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
0037                 };
0038                 button-eject {
0039                         debounce-interval = <100>;
0040                         wakeup-source;
0041                         linux,code = <KEY_EJECTCD>;
0042                         label = "unmount";
0043                         /* Collides with LPC LFRAME, UART RTS, SSP TXD */
0044                         gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
0045                 };
0046         };
0047 
0048         vdisp: regulator {
0049                 compatible = "regulator-fixed";
0050                 regulator-name = "display-power";
0051                 regulator-min-microvolt = <3600000>;
0052                 regulator-max-microvolt = <3600000>;
0053                 /* Collides with LCD E */
0054                 gpio = <&gpio0 16 GPIO_ACTIVE_HIGH>;
0055                 enable-active-high;
0056         };
0057 
0058         spi {
0059                 compatible = "spi-gpio";
0060                 #address-cells = <1>;
0061                 #size-cells = <0>;
0062 
0063                 /* Collides with IDE pins, that's cool (we do not use them) */
0064                 sck-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
0065                 miso-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
0066                 mosi-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
0067                 cs-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
0068                 num-chipselects = <1>;
0069 
0070                 panel: display@0 {
0071                         compatible = "dlink,dir-685-panel", "ilitek,ili9322";
0072                         reg = <0>;
0073                         /* 50 ns min period = 20 MHz */
0074                         spi-max-frequency = <20000000>;
0075                         vcc-supply = <&vdisp>;
0076                         iovcc-supply = <&vdisp>;
0077                         vci-supply = <&vdisp>;
0078 
0079                         port {
0080                                 panel_in: endpoint {
0081                                         remote-endpoint = <&display_out>;
0082                                 };
0083                         };
0084                 };
0085         };
0086 
0087         leds {
0088                 compatible = "gpio-leds";
0089                 led-wps {
0090                         label = "dir685:blue:WPS";
0091                         /* Collides with ICE */
0092                         gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
0093                         default-state = "on";
0094                         linux,default-trigger = "heartbeat";
0095                 };
0096                 /*
0097                  * These two LEDs are on the side of the device.
0098                  * For electrical reasons, both LEDs cannot be active
0099                  * at the same time so only blue or orange can be on at
0100                  * one time. Enabling both makes the LED go dark.
0101                  * The LEDs both sit inside the unmount button and the
0102                  * label on the case says "unmount".
0103                  */
0104                 led-blue-hd {
0105                         label = "dir685:blue:HD";
0106                         /* Collides with LPC_SERIRQ, UART DTR, SSP FSC pins */
0107                         gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
0108                         default-state = "off";
0109                         linux,default-trigger = "disk-read";
0110                 };
0111                 led-orange-hd {
0112                         label = "dir685:orange:HD";
0113                         /* Collides with LPC_LAD[2], UART DSR, SSP ECLK pins */
0114                         gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
0115                         default-state = "off";
0116                         linux,default-trigger = "disk-write";
0117                 };
0118         };
0119 
0120         /*
0121          * This is a Sunon Maglev GM0502PFV2-8 cooling fan @10000 RPM.
0122          * sensor. It is turned on when the temperature exceeds 46 degrees
0123          * and turned off when the temperatures goes below 41 degrees
0124          * (celsius).
0125          */
0126         fan0: gpio-fan {
0127                 compatible = "gpio-fan";
0128                 /* Collides with IDE */
0129                 gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
0130                 gpio-fan,speed-map = <0 0>, <10000 1>;
0131                 #cooling-cells = <2>;
0132         };
0133 
0134         thermal-zones {
0135                 chassis-thermal {
0136                         /* Poll every 20 seconds */
0137                         polling-delay = <20000>;
0138                         /* Poll every 2nd second when cooling */
0139                         polling-delay-passive = <2000>;
0140                         /*  Use the thermal sensor in the hard drive */
0141                         thermal-sensors = <&drive0>;
0142 
0143                         /* Tripping points from the fan.script in the rootfs */
0144                         trips {
0145                                 alert: chassis-alert {
0146                                         /* At 43 degrees turn on the fan */
0147                                         temperature = <43000>;
0148                                         hysteresis = <3000>;
0149                                         type = "active";
0150                                 };
0151                                 crit: chassis-crit {
0152                                         /* Just shut down at 60 degrees */
0153                                         temperature = <60000>;
0154                                         hysteresis = <2000>;
0155                                         type = "critical";
0156                                 };
0157                         };
0158 
0159                         cooling-maps {
0160                                 map0 {
0161                                         trip = <&alert>;
0162                                         cooling-device = <&fan0 1 1>;
0163                                 };
0164                         };
0165                 };
0166         };
0167 
0168         /*
0169          * The touchpad input is connected to a GPIO bit-banged
0170          * I2C bus.
0171          */
0172         i2c {
0173                 compatible = "i2c-gpio";
0174                 /* Collides with ICE */
0175                 sda-gpios = <&gpio0 5 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0176                 scl-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
0177                 #address-cells = <1>;
0178                 #size-cells = <0>;
0179 
0180                 touchkeys@26 {
0181                         compatible = "dlink,dir685-touchkeys";
0182                         reg = <0x26>;
0183                         interrupt-parent = <&gpio0>;
0184                         /* Collides with NAND flash */
0185                         interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
0186                 };
0187         };
0188 
0189         /* This is a RealTek RTL8366RB switch and PHY using SMI over GPIO */
0190         switch {
0191                 compatible = "realtek,rtl8366rb";
0192                 /* 22 = MDIO (has input reads), 21 = MDC (clock, output only) */
0193                 mdc-gpios = <&gpio0 21 GPIO_ACTIVE_HIGH>;
0194                 mdio-gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
0195                 reset-gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
0196                 realtek,disable-leds;
0197 
0198                 switch_intc: interrupt-controller {
0199                         /* GPIO 15 provides the interrupt */
0200                         interrupt-parent = <&gpio0>;
0201                         interrupts = <15 IRQ_TYPE_LEVEL_LOW>;
0202                         interrupt-controller;
0203                         #address-cells = <0>;
0204                         #interrupt-cells = <1>;
0205                 };
0206 
0207                 ports {
0208                         #address-cells = <1>;
0209                         #size-cells = <0>;
0210 
0211                         port@0 {
0212                                 reg = <0>;
0213                                 label = "lan0";
0214                                 phy-handle = <&phy0>;
0215                         };
0216                         port@1 {
0217                                 reg = <1>;
0218                                 label = "lan1";
0219                                 phy-handle = <&phy1>;
0220                         };
0221                         port@2 {
0222                                 reg = <2>;
0223                                 label = "lan2";
0224                                 phy-handle = <&phy2>;
0225                         };
0226                         port@3 {
0227                                 reg = <3>;
0228                                 label = "lan3";
0229                                 phy-handle = <&phy3>;
0230                         };
0231                         port@4 {
0232                                 reg = <4>;
0233                                 label = "wan";
0234                                 phy-handle = <&phy4>;
0235                         };
0236                         rtl8366rb_cpu_port: port@5 {
0237                                 reg = <5>;
0238                                 label = "cpu";
0239                                 ethernet = <&gmac0>;
0240                                 phy-mode = "rgmii";
0241                                 fixed-link {
0242                                         speed = <1000>;
0243                                         full-duplex;
0244                                         pause;
0245                                 };
0246                         };
0247 
0248                 };
0249 
0250                 mdio {
0251                         compatible = "realtek,smi-mdio";
0252                         #address-cells = <1>;
0253                         #size-cells = <0>;
0254 
0255                         phy0: phy@0 {
0256                                 reg = <0>;
0257                                 interrupt-parent = <&switch_intc>;
0258                                 interrupts = <0>;
0259                         };
0260                         phy1: phy@1 {
0261                                 reg = <1>;
0262                                 interrupt-parent = <&switch_intc>;
0263                                 interrupts = <1>;
0264                         };
0265                         phy2: phy@2 {
0266                                 reg = <2>;
0267                                 interrupt-parent = <&switch_intc>;
0268                                 interrupts = <2>;
0269                         };
0270                         phy3: phy@3 {
0271                                 reg = <3>;
0272                                 interrupt-parent = <&switch_intc>;
0273                                 interrupts = <3>;
0274                         };
0275                         phy4: phy@4 {
0276                                 reg = <4>;
0277                                 interrupt-parent = <&switch_intc>;
0278                                 interrupts = <12>;
0279                         };
0280                 };
0281         };
0282 
0283         soc {
0284                 flash@30000000 {
0285                         /*
0286                          * Flash access collides with the Chip Enable signal for
0287                          * the display panel, that reuse the parallel flash Chip
0288                          * Select 1 (CS1). We switch the pin control state so we
0289                          * enable these pins for flash access only when we need
0290                          * then, and when disabled they can be used for GPIO which
0291                          * is what the display panel needs.
0292                          */
0293                         status = "okay";
0294                         pinctrl-names = "enabled", "disabled";
0295                         pinctrl-0 = <&pflash_default_pins>;
0296                         pinctrl-1 = <&pflash_disabled_pins>;
0297 
0298                         /* 32MB of flash */
0299                         reg = <0x30000000 0x02000000>;
0300 
0301                         partitions {
0302                                 compatible = "fixed-partitions";
0303                                 #address-cells = <1>;
0304                                 #size-cells = <1>;
0305 
0306                                 /*
0307                                  * This "RedBoot" is the Storlink derivative.
0308                                  */
0309                                 partition@0 {
0310                                         label = "RedBoot";
0311                                         reg = <0x00000000 0x00040000>;
0312                                         read-only;
0313                                 };
0314                                 /*
0315                                  * This firmware image contains the kernel catenated
0316                                  * with the squashfs root filesystem. For some reason
0317                                  * this is called "upgrade" on the vendor system.
0318                                  */
0319                                 partition@40000 {
0320                                         label = "upgrade";
0321                                         reg = <0x00040000 0x01f40000>;
0322                                         read-only;
0323                                 };
0324                                 /* RGDB, Residental Gateway Database? */
0325                                 partition@1f80000 {
0326                                         label = "rgdb";
0327                                         reg = <0x01f80000 0x00040000>;
0328                                         read-only;
0329                                 };
0330                                 /*
0331                                  * This partition contains MAC addresses for WAN,
0332                                  * WLAN and LAN, and the country code (for wireless
0333                                  * I guess).
0334                                  */
0335                                 partition@1fc0000 {
0336                                         label = "nvram";
0337                                         reg = <0x01fc0000 0x00020000>;
0338                                         read-only;
0339                                 };
0340                                 partition@1fe0000 {
0341                                         label = "LangPack";
0342                                         reg = <0x01fe0000 0x00020000>;
0343                                         read-only;
0344                                 };
0345                         };
0346                 };
0347 
0348                 syscon: syscon@40000000 {
0349                         pinctrl {
0350                                 /*
0351                                  * gpio0bgrp cover line 5, 6 used by TK I2C
0352                                  * gpio0bgrp cover line 7 used by WPS LED
0353                                  * gpio0cgrp cover line 8, 13 used by keys
0354                                  *           and 11, 12 used by the HD LEDs
0355                                  *           and line 14, 15 used by RTL8366
0356                                  *           RESET and phy ready
0357                                  * gpio0egrp cover line 16 used by VDISP
0358                                  * gpio0fgrp cover line 17 used by TK IRQ
0359                                  * gpio0ggrp cover line 20 used by panel CS
0360                                  * gpio0hgrp cover line 21,22 used by RTL8366RB MDIO
0361                                  */
0362                                 gpio0_default_pins: pinctrl-gpio0 {
0363                                         mux {
0364                                                 function = "gpio0";
0365                                                 groups = "gpio0bgrp",
0366                                                 "gpio0cgrp",
0367                                                 "gpio0egrp",
0368                                                 "gpio0fgrp",
0369                                                 "gpio0hgrp";
0370                                         };
0371                                 };
0372                                 /*
0373                                  * gpio1bgrp cover line 5,8,7 used by panel SPI
0374                                  * also line 6 used by the fan
0375                                  *
0376                                  */
0377                                 gpio1_default_pins: pinctrl-gpio1 {
0378                                         mux {
0379                                                 function = "gpio1";
0380                                                 groups = "gpio1bgrp";
0381                                         };
0382                                 };
0383                                 /*
0384                                  * These GPIO groups will be mapped in over some
0385                                  * of the flash pins when the flash is not in
0386                                  * active use.
0387                                  */
0388                                 pflash_disabled_pins: pinctrl-pflash-disabled {
0389                                         mux {
0390                                                 function = "gpio0";
0391                                                 groups = "gpio0ggrp", "gpio0igrp", "gpio0jgrp",
0392                                                          "gpio0kgrp";
0393                                         };
0394                                 };
0395                                 pinctrl-gmii {
0396                                         mux {
0397                                                 function = "gmii";
0398                                                 groups = "gmii_gmac0_grp";
0399                                         };
0400                                         conf0 {
0401                                                 pins = "V8 GMAC0 RXDV", "T10 GMAC1 RXDV",
0402                                                      "Y7 GMAC0 RXC", "Y11 GMAC1 RXC",
0403                                                      "T8 GMAC0 TXEN", "W11 GMAC1 TXEN",
0404                                                      "U8 GMAC0 TXC", "V11 GMAC1 TXC",
0405                                                      "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
0406                                                      "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
0407                                                      "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
0408                                                      "V7 GMAC0 TXD2", "U7 GMAC0 TXD3",
0409                                                      "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1",
0410                                                      "T11 GMAC1 RXD2", "W12 GMAC1 RXD3",
0411                                                      "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1",
0412                                                      "W10 GMAC1 TXD2", "T9 GMAC1 TXD3";
0413                                                 skew-delay = <7>;
0414                                         };
0415                                         /* Set up drive strength on GMAC0 to 16 mA */
0416                                         conf1 {
0417                                                 groups = "gmii_gmac0_grp";
0418                                                 drive-strength = <16>;
0419                                         };
0420                                 };
0421                         };
0422                 };
0423 
0424                 sata: sata@46000000 {
0425                         cortina,gemini-ata-muxmode = <0>;
0426                         cortina,gemini-enable-sata-bridge;
0427                         status = "okay";
0428                 };
0429 
0430                 gpio0: gpio@4d000000 {
0431                         pinctrl-names = "default";
0432                         pinctrl-0 = <&gpio0_default_pins>;
0433                 };
0434 
0435                 gpio1: gpio@4e000000 {
0436                         pinctrl-names = "default";
0437                         pinctrl-0 = <&gpio1_default_pins>;
0438                 };
0439 
0440                 pci@50000000 {
0441                         status = "okay";
0442                 };
0443 
0444                 ethernet@60000000 {
0445                         status = "okay";
0446 
0447                         ethernet-port@0 {
0448                                 phy-mode = "rgmii";
0449                                 fixed-link {
0450                                         speed = <1000>;
0451                                         full-duplex;
0452                                         pause;
0453                                 };
0454                         };
0455                         ethernet-port@1 {
0456                                 /* Not used in this platform */
0457                         };
0458                 };
0459 
0460                 ide@63000000 {
0461                         status = "okay";
0462 
0463                         /*
0464                          * This drive may have a temperature sensor with a
0465                          * thermal zone we can use for thermal control of the
0466                          * chassis temperature using the fan.
0467                          */
0468                         drive0: ide-port@0 {
0469                                 reg = <0>;
0470                                 #thermal-sensor-cells = <0>;
0471                         };
0472                 };
0473 
0474                 display-controller@6a000000 {
0475                         status = "okay";
0476 
0477                         port {
0478                                 display_out: endpoint {
0479                                         remote-endpoint = <&panel_in>;
0480                                 };
0481                         };
0482                 };
0483 
0484                 usb@68000000 {
0485                         status = "okay";
0486                 };
0487 
0488                 usb@69000000 {
0489                         status = "okay";
0490                 };
0491         };
0492 };