1f126890aSEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0 2f126890aSEmmanuel Vadot/* 3f126890aSEmmanuel Vadot * Device Tree file for ITian Square One SQ201 NAS 4f126890aSEmmanuel Vadot */ 5f126890aSEmmanuel Vadot 6f126890aSEmmanuel Vadot/dts-v1/; 7f126890aSEmmanuel Vadot 8f126890aSEmmanuel Vadot#include "gemini.dtsi" 9f126890aSEmmanuel Vadot#include <dt-bindings/input/input.h> 10f126890aSEmmanuel Vadot 11f126890aSEmmanuel Vadot/ { 12f126890aSEmmanuel Vadot model = "ITian Square One SQ201"; 13f126890aSEmmanuel Vadot compatible = "itian,sq201", "cortina,gemini"; 14f126890aSEmmanuel Vadot #address-cells = <1>; 15f126890aSEmmanuel Vadot #size-cells = <1>; 16f126890aSEmmanuel Vadot 17f126890aSEmmanuel Vadot memory@0 { /* 128 MB */ 18f126890aSEmmanuel Vadot device_type = "memory"; 19f126890aSEmmanuel Vadot reg = <0x00000000 0x8000000>; 20f126890aSEmmanuel Vadot }; 21f126890aSEmmanuel Vadot 22f126890aSEmmanuel Vadot chosen { 23f126890aSEmmanuel Vadot bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait"; 24f126890aSEmmanuel Vadot stdout-path = &uart0; 25f126890aSEmmanuel Vadot }; 26f126890aSEmmanuel Vadot 27f126890aSEmmanuel Vadot gpio_keys { 28f126890aSEmmanuel Vadot compatible = "gpio-keys"; 29f126890aSEmmanuel Vadot 30f126890aSEmmanuel Vadot button-setup { 31f126890aSEmmanuel Vadot debounce-interval = <100>; 32f126890aSEmmanuel Vadot wakeup-source; 33*01950c46SEmmanuel Vadot linux,code = <KEY_RESTART>; 34f126890aSEmmanuel Vadot label = "factory reset"; 35f126890aSEmmanuel Vadot /* Conflict with NAND flash */ 36f126890aSEmmanuel Vadot gpios = <&gpio0 18 GPIO_ACTIVE_LOW>; 37f126890aSEmmanuel Vadot }; 38f126890aSEmmanuel Vadot }; 39f126890aSEmmanuel Vadot 40f126890aSEmmanuel Vadot leds { 41f126890aSEmmanuel Vadot compatible = "gpio-leds"; 42f126890aSEmmanuel Vadot led-green-info { 43f126890aSEmmanuel Vadot label = "sq201:green:info"; 44f126890aSEmmanuel Vadot gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>; 45f126890aSEmmanuel Vadot default-state = "on"; 46f126890aSEmmanuel Vadot linux,default-trigger = "heartbeat"; 47f126890aSEmmanuel Vadot }; 48f126890aSEmmanuel Vadot led-green-usb { 49f126890aSEmmanuel Vadot label = "sq201:green:usb"; 50f126890aSEmmanuel Vadot gpios = <&gpio0 31 GPIO_ACTIVE_HIGH>; 51f126890aSEmmanuel Vadot default-state = "off"; 52f126890aSEmmanuel Vadot linux,default-trigger = "usb-host"; 53f126890aSEmmanuel Vadot }; 54f126890aSEmmanuel Vadot }; 55f126890aSEmmanuel Vadot 56f126890aSEmmanuel Vadot mdio0: mdio { 57f126890aSEmmanuel Vadot compatible = "virtual,mdio-gpio"; 58f126890aSEmmanuel Vadot /* Uses MDC and MDIO */ 59f126890aSEmmanuel Vadot gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>, /* MDC */ 60f126890aSEmmanuel Vadot <&gpio0 21 GPIO_ACTIVE_HIGH>; /* MDIO */ 61f126890aSEmmanuel Vadot #address-cells = <1>; 62f126890aSEmmanuel Vadot #size-cells = <0>; 63f126890aSEmmanuel Vadot 64f126890aSEmmanuel Vadot /* This is a Marvell 88E1111 ethernet transciever */ 65f126890aSEmmanuel Vadot phy0: ethernet-phy@1 { 66f126890aSEmmanuel Vadot reg = <1>; 67f126890aSEmmanuel Vadot }; 68f126890aSEmmanuel Vadot }; 69f126890aSEmmanuel Vadot 70f126890aSEmmanuel Vadot spi { 71f126890aSEmmanuel Vadot compatible = "spi-gpio"; 72f126890aSEmmanuel Vadot #address-cells = <1>; 73f126890aSEmmanuel Vadot #size-cells = <0>; 74f126890aSEmmanuel Vadot /* Check pin collisions */ 75f126890aSEmmanuel Vadot sck-gpios = <&gpio1 28 GPIO_ACTIVE_HIGH>; 76f126890aSEmmanuel Vadot miso-gpios = <&gpio1 30 GPIO_ACTIVE_HIGH>; 77f126890aSEmmanuel Vadot mosi-gpios = <&gpio1 29 GPIO_ACTIVE_HIGH>; 78f126890aSEmmanuel Vadot cs-gpios = <&gpio1 31 GPIO_ACTIVE_HIGH>; 79f126890aSEmmanuel Vadot num-chipselects = <1>; 80f126890aSEmmanuel Vadot 81*01950c46SEmmanuel Vadot ethernet-switch@0 { 82f126890aSEmmanuel Vadot compatible = "vitesse,vsc7395"; 83f126890aSEmmanuel Vadot reg = <0>; 84f126890aSEmmanuel Vadot /* Specified for 2.5 MHz or below */ 85f126890aSEmmanuel Vadot spi-max-frequency = <2500000>; 86f126890aSEmmanuel Vadot gpio-controller; 87f126890aSEmmanuel Vadot #gpio-cells = <2>; 88f126890aSEmmanuel Vadot 89*01950c46SEmmanuel Vadot ethernet-ports { 90f126890aSEmmanuel Vadot #address-cells = <1>; 91f126890aSEmmanuel Vadot #size-cells = <0>; 92f126890aSEmmanuel Vadot 93*01950c46SEmmanuel Vadot ethernet-port@0 { 94f126890aSEmmanuel Vadot reg = <0>; 95f126890aSEmmanuel Vadot label = "lan1"; 96f126890aSEmmanuel Vadot }; 97*01950c46SEmmanuel Vadot ethernet-port@1 { 98f126890aSEmmanuel Vadot reg = <1>; 99f126890aSEmmanuel Vadot label = "lan2"; 100f126890aSEmmanuel Vadot }; 101*01950c46SEmmanuel Vadot ethernet-port@2 { 102f126890aSEmmanuel Vadot reg = <2>; 103f126890aSEmmanuel Vadot label = "lan3"; 104f126890aSEmmanuel Vadot }; 105*01950c46SEmmanuel Vadot ethernet-port@3 { 106f126890aSEmmanuel Vadot reg = <3>; 107f126890aSEmmanuel Vadot label = "lan4"; 108f126890aSEmmanuel Vadot }; 109*01950c46SEmmanuel Vadot vsc: ethernet-port@6 { 110f126890aSEmmanuel Vadot reg = <6>; 111f126890aSEmmanuel Vadot label = "cpu"; 112f126890aSEmmanuel Vadot ethernet = <&gmac1>; 113f126890aSEmmanuel Vadot phy-mode = "rgmii"; 114f126890aSEmmanuel Vadot fixed-link { 115f126890aSEmmanuel Vadot speed = <1000>; 116f126890aSEmmanuel Vadot full-duplex; 117f126890aSEmmanuel Vadot pause; 118f126890aSEmmanuel Vadot }; 119f126890aSEmmanuel Vadot }; 120f126890aSEmmanuel Vadot }; 121f126890aSEmmanuel Vadot }; 122f126890aSEmmanuel Vadot }; 123f126890aSEmmanuel Vadot 124f126890aSEmmanuel Vadot 125f126890aSEmmanuel Vadot soc { 126f126890aSEmmanuel Vadot flash@30000000 { 127f126890aSEmmanuel Vadot status = "okay"; 128f126890aSEmmanuel Vadot pinctrl-names = "enabled", "disabled"; 129f126890aSEmmanuel Vadot pinctrl-0 = <&pflash_default_pins>; 130f126890aSEmmanuel Vadot pinctrl-1 = <&pflash_disabled_pins>; 131f126890aSEmmanuel Vadot /* 16MB of flash */ 132f126890aSEmmanuel Vadot reg = <0x30000000 0x01000000>; 133f126890aSEmmanuel Vadot 134f126890aSEmmanuel Vadot partitions { 135f126890aSEmmanuel Vadot compatible = "redboot-fis"; 136f126890aSEmmanuel Vadot /* Eraseblock at 0xfe0000 */ 137f126890aSEmmanuel Vadot fis-index-block = <0x1fc>; 138f126890aSEmmanuel Vadot }; 139f126890aSEmmanuel Vadot }; 140f126890aSEmmanuel Vadot 141f126890aSEmmanuel Vadot syscon: syscon@40000000 { 142f126890aSEmmanuel Vadot pinctrl { 143f126890aSEmmanuel Vadot /* 144f126890aSEmmanuel Vadot * gpio0fgrp cover line 18 used by reset button 145f126890aSEmmanuel Vadot * gpio0ggrp cover line 20 used by info LED 146f126890aSEmmanuel Vadot * gpio0hgrp cover line 21, 22 used by MDIO for Marvell PHY 147f126890aSEmmanuel Vadot * gpio0kgrp cover line 31 used by USB LED 148f126890aSEmmanuel Vadot */ 149f126890aSEmmanuel Vadot gpio0_default_pins: pinctrl-gpio0 { 150f126890aSEmmanuel Vadot mux { 151f126890aSEmmanuel Vadot function = "gpio0"; 152f126890aSEmmanuel Vadot groups = "gpio0fgrp", 153f126890aSEmmanuel Vadot "gpio0hgrp"; 154f126890aSEmmanuel Vadot }; 155f126890aSEmmanuel Vadot }; 156f126890aSEmmanuel Vadot /* 157f126890aSEmmanuel Vadot * gpio0dgrp cover lines used by the SPI 158f126890aSEmmanuel Vadot * to the Vitesse G5x chip. 159f126890aSEmmanuel Vadot */ 160f126890aSEmmanuel Vadot gpio1_default_pins: pinctrl-gpio1 { 161f126890aSEmmanuel Vadot mux { 162f126890aSEmmanuel Vadot function = "gpio1"; 163f126890aSEmmanuel Vadot groups = "gpio1dgrp"; 164f126890aSEmmanuel Vadot }; 165f126890aSEmmanuel Vadot }; 166f126890aSEmmanuel Vadot /* 167f126890aSEmmanuel Vadot * These GPIO groups will be mapped in over some 168f126890aSEmmanuel Vadot * of the flash pins when the flash is not in 169f126890aSEmmanuel Vadot * active use. 170f126890aSEmmanuel Vadot */ 171f126890aSEmmanuel Vadot pflash_disabled_pins: pinctrl-pflash-disabled { 172f126890aSEmmanuel Vadot mux { 173f126890aSEmmanuel Vadot function = "gpio0"; 174f126890aSEmmanuel Vadot groups = "gpio0ggrp", "gpio0igrp", "gpio0jgrp", 175f126890aSEmmanuel Vadot "gpio0kgrp"; 176f126890aSEmmanuel Vadot }; 177f126890aSEmmanuel Vadot }; 178f126890aSEmmanuel Vadot pinctrl-gmii { 179f126890aSEmmanuel Vadot mux { 180f126890aSEmmanuel Vadot function = "gmii"; 181f126890aSEmmanuel Vadot groups = "gmii_gmac0_grp", "gmii_gmac1_grp"; 182f126890aSEmmanuel Vadot }; 183f126890aSEmmanuel Vadot /* Settings come from memory dump in PLATO */ 184f126890aSEmmanuel Vadot conf0 { 185f126890aSEmmanuel Vadot pins = "V8 GMAC0 RXDV"; 186f126890aSEmmanuel Vadot skew-delay = <0>; 187f126890aSEmmanuel Vadot }; 188f126890aSEmmanuel Vadot conf1 { 189f126890aSEmmanuel Vadot pins = "Y7 GMAC0 RXC"; 190f126890aSEmmanuel Vadot skew-delay = <15>; 191f126890aSEmmanuel Vadot }; 192f126890aSEmmanuel Vadot conf2 { 193f126890aSEmmanuel Vadot pins = "T8 GMAC0 TXEN"; 194f126890aSEmmanuel Vadot skew-delay = <7>; 195f126890aSEmmanuel Vadot }; 196f126890aSEmmanuel Vadot conf3 { 197f126890aSEmmanuel Vadot pins = "U8 GMAC0 TXC"; 198f126890aSEmmanuel Vadot skew-delay = <10>; 199f126890aSEmmanuel Vadot }; 200f126890aSEmmanuel Vadot conf4 { 201f126890aSEmmanuel Vadot pins = "T10 GMAC1 RXDV"; 202f126890aSEmmanuel Vadot skew-delay = <7>; 203f126890aSEmmanuel Vadot }; 204f126890aSEmmanuel Vadot conf5 { 205f126890aSEmmanuel Vadot pins = "Y11 GMAC1 RXC"; 206f126890aSEmmanuel Vadot skew-delay = <8>; 207f126890aSEmmanuel Vadot }; 208f126890aSEmmanuel Vadot conf6 { 209f126890aSEmmanuel Vadot pins = "W11 GMAC1 TXEN"; 210f126890aSEmmanuel Vadot skew-delay = <7>; 211f126890aSEmmanuel Vadot }; 212f126890aSEmmanuel Vadot conf7 { 213f126890aSEmmanuel Vadot pins = "V11 GMAC1 TXC"; 214f126890aSEmmanuel Vadot skew-delay = <5>; 215f126890aSEmmanuel Vadot }; 216f126890aSEmmanuel Vadot conf8 { 217f126890aSEmmanuel Vadot /* The data lines all have default skew */ 218f126890aSEmmanuel Vadot pins = "W8 GMAC0 RXD0", "V9 GMAC0 RXD1", 219f126890aSEmmanuel Vadot "Y8 GMAC0 RXD2", "U9 GMAC0 RXD3", 220f126890aSEmmanuel Vadot "T7 GMAC0 TXD0", "U6 GMAC0 TXD1", 221f126890aSEmmanuel Vadot "V7 GMAC0 TXD2", "U7 GMAC0 TXD3", 222f126890aSEmmanuel Vadot "Y12 GMAC1 RXD0", "V12 GMAC1 RXD1", 223f126890aSEmmanuel Vadot "T11 GMAC1 RXD2", "W12 GMAC1 RXD3", 224f126890aSEmmanuel Vadot "U10 GMAC1 TXD0", "Y10 GMAC1 TXD1", 225f126890aSEmmanuel Vadot "W10 GMAC1 TXD2", "T9 GMAC1 TXD3"; 226f126890aSEmmanuel Vadot skew-delay = <7>; 227f126890aSEmmanuel Vadot }; 228f126890aSEmmanuel Vadot /* Set up drive strength on GMAC0 and GMAC1 to 16 mA */ 229f126890aSEmmanuel Vadot conf9 { 230f126890aSEmmanuel Vadot groups = "gmii_gmac0_grp", "gmii_gmac1_grp"; 231f126890aSEmmanuel Vadot drive-strength = <16>; 232f126890aSEmmanuel Vadot }; 233f126890aSEmmanuel Vadot }; 234f126890aSEmmanuel Vadot }; 235f126890aSEmmanuel Vadot }; 236f126890aSEmmanuel Vadot 237f126890aSEmmanuel Vadot sata: sata@46000000 { 238f126890aSEmmanuel Vadot cortina,gemini-ata-muxmode = <0>; 239f126890aSEmmanuel Vadot cortina,gemini-enable-sata-bridge; 240f126890aSEmmanuel Vadot status = "okay"; 241f126890aSEmmanuel Vadot }; 242f126890aSEmmanuel Vadot 243f126890aSEmmanuel Vadot gpio0: gpio@4d000000 { 244f126890aSEmmanuel Vadot pinctrl-names = "default"; 245f126890aSEmmanuel Vadot pinctrl-0 = <&gpio0_default_pins>; 246f126890aSEmmanuel Vadot }; 247f126890aSEmmanuel Vadot 248f126890aSEmmanuel Vadot gpio1: gpio@4e000000 { 249f126890aSEmmanuel Vadot pinctrl-names = "default"; 250f126890aSEmmanuel Vadot pinctrl-0 = <&gpio1_default_pins>; 251f126890aSEmmanuel Vadot }; 252f126890aSEmmanuel Vadot 253f126890aSEmmanuel Vadot pci@50000000 { 254f126890aSEmmanuel Vadot status = "okay"; 255f126890aSEmmanuel Vadot }; 256f126890aSEmmanuel Vadot 257f126890aSEmmanuel Vadot ethernet@60000000 { 258f126890aSEmmanuel Vadot status = "okay"; 259f126890aSEmmanuel Vadot 260f126890aSEmmanuel Vadot ethernet-port@0 { 261f126890aSEmmanuel Vadot phy-mode = "rgmii"; 262f126890aSEmmanuel Vadot phy-handle = <&phy0>; 263f126890aSEmmanuel Vadot }; 264f126890aSEmmanuel Vadot ethernet-port@1 { 265f126890aSEmmanuel Vadot phy-mode = "rgmii"; 266f126890aSEmmanuel Vadot fixed-link { 267f126890aSEmmanuel Vadot speed = <1000>; 268f126890aSEmmanuel Vadot full-duplex; 269f126890aSEmmanuel Vadot pause; 270f126890aSEmmanuel Vadot }; 271f126890aSEmmanuel Vadot }; 272f126890aSEmmanuel Vadot }; 273f126890aSEmmanuel Vadot 274f126890aSEmmanuel Vadot ide@63000000 { 275f126890aSEmmanuel Vadot status = "okay"; 276f126890aSEmmanuel Vadot }; 277f126890aSEmmanuel Vadot 278f126890aSEmmanuel Vadot usb@68000000 { 279f126890aSEmmanuel Vadot status = "okay"; 280f126890aSEmmanuel Vadot }; 281f126890aSEmmanuel Vadot 282f126890aSEmmanuel Vadot usb@69000000 { 283f126890aSEmmanuel Vadot status = "okay"; 284f126890aSEmmanuel Vadot }; 285f126890aSEmmanuel Vadot }; 286f126890aSEmmanuel Vadot}; 287