Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Device Tree file for the Gemini-based Raidsonic NAS IB-4220-B
0004  */
0005 
0006 /dts-v1/;
0007 
0008 #include "gemini.dtsi"
0009 #include <dt-bindings/input/input.h>
0010 
0011 / {
0012         model = "Raidsonic NAS IB-4220-B";
0013         compatible = "raidsonic,ib-4220-b", "cortina,gemini";
0014         #address-cells = <1>;
0015         #size-cells = <1>;
0016 
0017         memory@0 { /* 128 MB */
0018                 device_type = "memory";
0019                 reg = <0x00000000 0x8000000>;
0020         };
0021 
0022         chosen {
0023                 bootargs = "console=ttyS0,19200n8 root=/dev/mtdblock3 rw rootfstype=squashfs,jffs2 rootwait";
0024                 stdout-path = &uart0;
0025         };
0026 
0027         gpio_keys {
0028                 compatible = "gpio-keys";
0029 
0030                 button-setup {
0031                         debounce-interval = <100>;
0032                         wakeup-source;
0033                         linux,code = <KEY_SETUP>;
0034                         label = "Backup button";
0035                         /* Conflict with TVC */
0036                         gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
0037                 };
0038                 button-restart {
0039                         debounce-interval = <100>;
0040                         wakeup-source;
0041                         linux,code = <KEY_RESTART>;
0042                         label = "Softreset button";
0043                         /* Conflict with TVC */
0044                         gpios = <&gpio1 31 GPIO_ACTIVE_LOW>;
0045                 };
0046         };
0047 
0048         leds {
0049                 compatible = "gpio-leds";
0050                 led-orange-hdd {
0051                         label = "nas4220b:orange:hdd";
0052                         /* Conflict with TVC */
0053                         gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
0054                         default-state = "on";
0055                 };
0056                 led-green-os {
0057                         label = "nas4220b:green:os";
0058                         /* Conflict with TVC */
0059                         gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
0060                         default-state = "on";
0061                         linux,default-trigger = "heartbeat";
0062                 };
0063         };
0064 
0065         mdio0: mdio {
0066                 compatible = "virtual,mdio-gpio";
0067                 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
0068                         <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
0069                 #address-cells = <1>;
0070                 #size-cells = <0>;
0071 
0072                 phy0: ethernet-phy@1 {
0073                         reg = <1>;
0074                         device_type = "ethernet-phy";
0075                 };
0076         };
0077 
0078         soc {
0079                 flash@30000000 {
0080                         status = "okay";
0081                         /* 16MB of flash */
0082                         reg = <0x30000000 0x01000000>;
0083 
0084                         partitions {
0085                                 compatible = "redboot-fis";
0086                                 /* Eraseblock at 0xfe0000 */
0087                                 fis-index-block = <0x7f>;
0088                         };
0089                 };
0090 
0091                 syscon: syscon@40000000 {
0092                         pinctrl {
0093                                 /*
0094                                  * gpio1dgrp cover line 28-31 otherwise used
0095                                  * by TVC.
0096                                  */
0097                                 gpio1_default_pins: pinctrl-gpio1 {
0098                                         mux {
0099                                                 function = "gpio1";
0100                                                 groups = "gpio1dgrp";
0101                                         };
0102                                 };
0103                                 pinctrl-gmii {
0104                                         mux {
0105                                                 function = "gmii";
0106                                                 groups = "gmii_gmac0_grp";
0107                                         };
0108                                         /* Settings come from OpenWRT, pins on SL3516 */
0109                                         conf0 {
0110                                                 pins = "V8 GMAC0 RXDV", "T10 GMAC1 RXDV";
0111                                                 skew-delay = <0>;
0112                                         };
0113                                         conf1 {
0114                                                 pins = "Y7 GMAC0 RXC", "Y11 GMAC1 RXC";
0115                                                 skew-delay = <15>;
0116                                         };
0117                                         conf2 {
0118                                                 pins = "T8 GMAC0 TXEN", "W11 GMAC1 TXEN";
0119                                                 skew-delay = <7>;
0120                                         };
0121                                         conf3 {
0122                                                 pins = "U8 GMAC0 TXC";
0123                                                 skew-delay = <11>;
0124                                         };
0125                                         conf4 {
0126                                                 pins = "V11 GMAC1 TXC";
0127                                                 skew-delay = <10>;
0128                                         };
0129                                         conf5 {
0130                                                 /* The data lines all have default skew */
0131                                                 pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
0132                                                        "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
0133                                                        "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
0134                                                        "V7 GMAC0 TXD2", "U7 GMAC0 TXD3",
0135                                                        "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1",
0136                                                        "T11 GMAC1 RXD2", "W12 GMAC1 RXD3",
0137                                                        "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1",
0138                                                        "W10 GMAC1 TXD2", "T9 GMAC1 TXD3";
0139                                                 skew-delay = <7>;
0140                                         };
0141                                         /* Set up drive strength on GMAC0 to 16 mA */
0142                                         conf6 {
0143                                                 groups = "gmii_gmac0_grp";
0144                                                 drive-strength = <16>;
0145                                         };
0146                                 };
0147                         };
0148                 };
0149 
0150                 sata: sata@46000000 {
0151                         cortina,gemini-ata-muxmode = <0>;
0152                         cortina,gemini-enable-sata-bridge;
0153                         status = "okay";
0154                 };
0155 
0156                 gpio1: gpio@4e000000 {
0157                         pinctrl-names = "default";
0158                         pinctrl-0 = <&gpio1_default_pins>;
0159                 };
0160 
0161                 ethernet@60000000 {
0162                         status = "okay";
0163 
0164                         ethernet-port@0 {
0165                                 phy-mode = "rgmii";
0166                                 phy-handle = <&phy0>;
0167                         };
0168                         ethernet-port@1 {
0169                                 /* Not used in this platform */
0170                         };
0171                 };
0172 
0173                 ide@63000000 {
0174                         status = "okay";
0175                 };
0176 
0177                 ide@63400000 {
0178                         status = "okay";
0179                 };
0180 
0181                 usb@68000000 {
0182                         status = "okay";
0183                 };
0184 
0185                 usb@69000000 {
0186                         status = "okay";
0187                 };
0188         };
0189 };