Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Device Tree file for ITian Square One SQ201 NAS
0004  */
0005 
0006 /dts-v1/;
0007 
0008 #include "gemini.dtsi"
0009 #include <dt-bindings/input/input.h>
0010 
0011 / {
0012         model = "ITian Square One SQ201";
0013         compatible = "itian,sq201", "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,115200n8 root=/dev/mtdblock2 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 = "factory reset";
0035                         /* Conflict with NAND flash */
0036                         gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
0037                 };
0038         };
0039 
0040         leds {
0041                 compatible = "gpio-leds";
0042                 led-green-info {
0043                         label = "sq201:green:info";
0044                         gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
0045                         default-state = "on";
0046                         linux,default-trigger = "heartbeat";
0047                 };
0048                 led-green-usb {
0049                         label = "sq201:green:usb";
0050                         gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>;
0051                         default-state = "off";
0052                         linux,default-trigger = "usb-host";
0053                 };
0054         };
0055 
0056         mdio0: mdio {
0057                 compatible = "virtual,mdio-gpio";
0058                 /* Uses MDC and MDIO */
0059                 gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */
0060                         <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */
0061                 #address-cells = <1>;
0062                 #size-cells = <0>;
0063 
0064                 /* This is a Marvell 88E1111 ethernet transciever */
0065                 phy0: ethernet-phy@1 {
0066                         reg = <1>;
0067                 };
0068         };
0069 
0070         spi {
0071                 compatible = "spi-gpio";
0072                 #address-cells = <1>;
0073                 #size-cells = <0>;
0074                 /* Check pin collisions */
0075                 sck-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>;
0076                 miso-gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>;
0077                 mosi-gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>;
0078                 cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>;
0079                 num-chipselects = <1>;
0080 
0081                 switch@0 {
0082                         compatible = "vitesse,vsc7395";
0083                         reg = <0>;
0084                         /* Specified for 2.5 MHz or below */
0085                         spi-max-frequency = <2500000>;
0086                         gpio-controller;
0087                         #gpio-cells = <2>;
0088 
0089                         ports {
0090                                 #address-cells = <1>;
0091                                 #size-cells = <0>;
0092 
0093                                 port@0 {
0094                                         reg = <0>;
0095                                         label = "lan1";
0096                                 };
0097                                 port@1 {
0098                                         reg = <1>;
0099                                         label = "lan2";
0100                                 };
0101                                 port@2 {
0102                                         reg = <2>;
0103                                         label = "lan3";
0104                                 };
0105                                 port@3 {
0106                                         reg = <3>;
0107                                         label = "lan4";
0108                                 };
0109                                 vsc: port@6 {
0110                                         reg = <6>;
0111                                         label = "cpu";
0112                                         ethernet = <&gmac1>;
0113                                         phy-mode = "rgmii";
0114                                         fixed-link {
0115                                                 speed = <1000>;
0116                                                 full-duplex;
0117                                                 pause;
0118                                         };
0119                                 };
0120                         };
0121                 };
0122         };
0123 
0124 
0125         soc {
0126                 flash@30000000 {
0127                         status = "okay";
0128                         pinctrl-names = "enabled", "disabled";
0129                         pinctrl-0 = <&pflash_default_pins>;
0130                         pinctrl-1 = <&pflash_disabled_pins>;
0131                         /* 16MB of flash */
0132                         reg = <0x30000000 0x01000000>;
0133 
0134                         partitions {
0135                                 compatible = "redboot-fis";
0136                                 /* Eraseblock at 0xfe0000 */
0137                                 fis-index-block = <0x1fc>;
0138                         };
0139                 };
0140 
0141                 syscon: syscon@40000000 {
0142                         pinctrl {
0143                                 /*
0144                                  * gpio0fgrp cover line 18 used by reset button
0145                                  * gpio0ggrp cover line 20 used by info LED
0146                                  * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY
0147                                  * gpio0kgrp cover line 31 used by USB LED
0148                                  */
0149                                 gpio0_default_pins: pinctrl-gpio0 {
0150                                         mux {
0151                                                 function = "gpio0";
0152                                                 groups = "gpio0fgrp",
0153                                                 "gpio0hgrp";
0154                                         };
0155                                 };
0156                                 /*
0157                                  * gpio0dgrp cover lines used by the SPI
0158                                  * to the Vitesse G5x chip.
0159                                  */
0160                                 gpio1_default_pins: pinctrl-gpio1 {
0161                                         mux {
0162                                                 function = "gpio1";
0163                                                 groups = "gpio1dgrp";
0164                                         };
0165                                 };
0166                                 /*
0167                                  * These GPIO groups will be mapped in over some
0168                                  * of the flash pins when the flash is not in
0169                                  * active use.
0170                                  */
0171                                 pflash_disabled_pins: pinctrl-pflash-disabled {
0172                                         mux {
0173                                                 function = "gpio0";
0174                                                 groups = "gpio0ggrp", "gpio0igrp", "gpio0jgrp",
0175                                                          "gpio0kgrp";
0176                                         };
0177                                 };
0178                                 pinctrl-gmii {
0179                                         mux {
0180                                                 function = "gmii";
0181                                                 groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
0182                                         };
0183                                         /* Settings come from memory dump in PLATO */
0184                                         conf0 {
0185                                                 pins = "V8 GMAC0 RXDV";
0186                                                 skew-delay = <0>;
0187                                         };
0188                                         conf1 {
0189                                                 pins = "Y7 GMAC0 RXC";
0190                                                 skew-delay = <15>;
0191                                         };
0192                                         conf2 {
0193                                                 pins = "T8 GMAC0 TXEN";
0194                                                 skew-delay = <7>;
0195                                         };
0196                                         conf3 {
0197                                                 pins = "U8 GMAC0 TXC";
0198                                                 skew-delay = <10>;
0199                                         };
0200                                         conf4 {
0201                                                 pins = "T10 GMAC1 RXDV";
0202                                                 skew-delay = <7>;
0203                                         };
0204                                         conf5 {
0205                                                 pins = "Y11 GMAC1 RXC";
0206                                                 skew-delay = <8>;
0207                                         };
0208                                         conf6 {
0209                                                 pins = "W11 GMAC1 TXEN";
0210                                                 skew-delay = <7>;
0211                                         };
0212                                         conf7 {
0213                                                 pins = "V11 GMAC1 TXC";
0214                                                 skew-delay = <5>;
0215                                         };
0216                                         conf8 {
0217                                                 /* The data lines all have default skew */
0218                                                 pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1",
0219                                                        "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3",
0220                                                        "T7 GMAC0 TXD0", "U6 GMAC0 TXD1",
0221                                                        "V7 GMAC0 TXD2", "U7 GMAC0 TXD3",
0222                                                        "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1",
0223                                                        "T11 GMAC1 RXD2", "W12 GMAC1 RXD3",
0224                                                        "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1",
0225                                                        "W10 GMAC1 TXD2", "T9 GMAC1 TXD3";
0226                                                 skew-delay = <7>;
0227                                         };
0228                                         /* Set up drive strength on GMAC0 and GMAC1 to 16 mA */
0229                                         conf9 {
0230                                                 groups = "gmii_gmac0_grp", "gmii_gmac1_grp";
0231                                                 drive-strength = <16>;
0232                                         };
0233                                 };
0234                         };
0235                 };
0236 
0237                 sata: sata@46000000 {
0238                         cortina,gemini-ata-muxmode = <0>;
0239                         cortina,gemini-enable-sata-bridge;
0240                         status = "okay";
0241                 };
0242 
0243                 gpio0: gpio@4d000000 {
0244                         pinctrl-names = "default";
0245                         pinctrl-0 = <&gpio0_default_pins>;
0246                 };
0247 
0248                 gpio1: gpio@4e000000 {
0249                         pinctrl-names = "default";
0250                         pinctrl-0 = <&gpio1_default_pins>;
0251                 };
0252 
0253                 pci@50000000 {
0254                         status = "okay";
0255                 };
0256 
0257                 ethernet@60000000 {
0258                         status = "okay";
0259 
0260                         ethernet-port@0 {
0261                                 phy-mode = "rgmii";
0262                                 phy-handle = <&phy0>;
0263                         };
0264                         ethernet-port@1 {
0265                                 phy-mode = "rgmii";
0266                                 fixed-link {
0267                                         speed = <1000>;
0268                                         full-duplex;
0269                                         pause;
0270                                 };
0271                         };
0272                 };
0273 
0274                 ide@63000000 {
0275                         status = "okay";
0276                 };
0277 
0278                 usb@68000000 {
0279                         status = "okay";
0280                 };
0281 
0282                 usb@69000000 {
0283                         status = "okay";
0284                 };
0285         };
0286 };