Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 2 | /* |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 3 | * Copyright (C) 2016 - 2021 Marvell International Ltd. |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #include "armada-8040.dtsi" /* include SoC device tree */ |
| 7 | |
| 8 | / { |
| 9 | model = "MACCHIATOBin-8040"; |
| 10 | compatible = "marvell,armada8040-mcbin", |
| 11 | "marvell,armada8040"; |
| 12 | |
| 13 | chosen { |
| 14 | stdout-path = "serial0:115200n8"; |
| 15 | }; |
| 16 | |
| 17 | aliases { |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 18 | i2c0 = &cp0_i2c0; |
| 19 | i2c1 = &cp0_i2c1; |
| 20 | spi0 = &cp1_spi1; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 21 | gpio0 = &ap_gpio0; |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 22 | gpio1 = &cp0_gpio0; |
| 23 | gpio2 = &cp0_gpio1; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 24 | }; |
| 25 | |
| 26 | memory@00000000 { |
| 27 | device_type = "memory"; |
| 28 | reg = <0x0 0x0 0x0 0x80000000>; |
| 29 | }; |
| 30 | |
| 31 | simple-bus { |
| 32 | compatible = "simple-bus"; |
| 33 | #address-cells = <1>; |
| 34 | #size-cells = <0>; |
| 35 | |
| 36 | reg_usb3h0_vbus: usb3-vbus0 { |
| 37 | compatible = "regulator-fixed"; |
| 38 | pinctrl-names = "default"; |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 39 | pinctrl-0 = <&cp0_xhci_vbus_pins>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 40 | regulator-name = "reg-usb3h0-vbus"; |
| 41 | regulator-min-microvolt = <5000000>; |
| 42 | regulator-max-microvolt = <5000000>; |
| 43 | startup-delay-us = <500000>; |
| 44 | enable-active-high; |
| 45 | regulator-always-on; |
| 46 | regulator-boot-on; |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 47 | gpio = <&cp0_gpio1 15 GPIO_ACTIVE_HIGH>; /* GPIO[47] */ |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 48 | }; |
| 49 | }; |
| 50 | }; |
| 51 | |
| 52 | /* Accessible over the mini-USB CON9 connector on the main board */ |
| 53 | &uart0 { |
| 54 | status = "okay"; |
| 55 | }; |
| 56 | |
| 57 | &ap_pinctl { |
| 58 | /* |
| 59 | * MPP Bus: |
| 60 | * eMMC [0-10] |
| 61 | * UART0 [11,19] |
| 62 | */ |
| 63 | /* 0 1 2 3 4 5 6 7 8 9 */ |
| 64 | pin-func = < 1 1 1 1 1 1 1 1 1 1 |
| 65 | 1 3 0 0 0 0 0 0 0 3 >; |
| 66 | }; |
| 67 | |
| 68 | /* on-board eMMC */ |
| 69 | &ap_sdhci0 { |
| 70 | pinctrl-names = "default"; |
| 71 | pinctrl-0 = <&ap_emmc_pins>; |
| 72 | bus-width= <8>; |
| 73 | status = "okay"; |
| 74 | }; |
| 75 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 76 | &cp0_pinctl { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 77 | /* |
| 78 | * MPP Bus: |
| 79 | * [0-31] = 0xff: Keep default CP0_shared_pins: |
| 80 | * [11] CLKOUT_MPP_11 (out) |
| 81 | * [23] LINK_RD_IN_CP2CP (in) |
| 82 | * [25] CLKOUT_MPP_25 (out) |
| 83 | * [29] AVS_FB_IN_CP2CP (in) |
| 84 | * [32,34] SMI |
| 85 | * [33] MSS power down |
| 86 | * [35-38] CP0 I2C1 and I2C0 |
| 87 | * [39] MSS CKE Enable |
| 88 | * [40,41] CP0 UART1 TX/RX |
| 89 | * [42,43] XSMI (controls two 10G phys) |
| 90 | * [47] USB VBUS EN |
| 91 | * [48] FAN PWM |
| 92 | * [49] 10G port 1 interrupt |
| 93 | * [50] 10G port 0 interrupt |
| 94 | * [51] 2.5G SFP TX fault |
| 95 | * [52] PCIe reset out |
| 96 | * [53] 2.5G SFP mode |
| 97 | * [54] 2.5G SFP LOS |
| 98 | * [55] Micro SD card detect |
| 99 | * [56-61] Micro SD |
Stefan Roese | db720b7 | 2017-04-24 18:45:21 +0300 | [diff] [blame] | 100 | * [62] CP1 SFI SFP FAULT |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 101 | */ |
| 102 | /* 0 1 2 3 4 5 6 7 8 9 */ |
| 103 | pin-func = < 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff |
| 104 | 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff |
| 105 | 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff |
| 106 | 0xff 0 7 0xa 7 2 2 2 2 0xa |
| 107 | 7 7 8 8 0 0 0 0 0 0 |
| 108 | 0 0 0 0 0 0 0xe 0xe 0xe 0xe |
| 109 | 0xe 0xe 0 >; |
| 110 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 111 | cp0_xhci_vbus_pins: cp0-xhci-vbus-pins { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 112 | marvell,pins = < 47 >; |
| 113 | marvell,function = <0>; |
| 114 | }; |
| 115 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 116 | cp0_pcie_reset_pins: cp0-pcie-reset-pins { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 117 | marvell,pins = < 52 >; |
| 118 | marvell,function = <0>; |
| 119 | }; |
| 120 | }; |
| 121 | |
| 122 | /* uSD slot */ |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 123 | &cp0_sdhci0 { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 124 | pinctrl-names = "default"; |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 125 | pinctrl-0 = <&cp0_sdhci_pins>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 126 | bus-width= <4>; |
| 127 | status = "okay"; |
| 128 | }; |
| 129 | |
| 130 | /* PCIe x4 */ |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 131 | &cp0_pcie0 { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 132 | num-lanes = <4>; |
| 133 | pinctrl-names = "default"; |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 134 | pinctrl-0 = <&cp0_pcie_reset_pins>; |
| 135 | marvell,reset-gpio = <&cp0_gpio1 20 GPIO_ACTIVE_LOW>; /* GPIO[52] */ |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 136 | status = "okay"; |
| 137 | }; |
| 138 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 139 | &cp0_i2c0 { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 140 | pinctrl-names = "default"; |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 141 | pinctrl-0 = <&cp0_i2c0_pins>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 142 | status = "okay"; |
| 143 | clock-frequency = <100000>; |
| 144 | }; |
| 145 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 146 | &cp0_i2c1 { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 147 | pinctrl-names = "default"; |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 148 | pinctrl-0 = <&cp0_i2c1_pins>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 149 | status = "okay"; |
| 150 | clock-frequency = <100000>; |
| 151 | }; |
| 152 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 153 | &cp0_sata0 { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 154 | status = "okay"; |
| 155 | }; |
| 156 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 157 | &cp0_mdio { |
Sven Auhagen | f0268cb | 2021-08-24 10:14:25 +0200 | [diff] [blame] | 158 | status = "okay"; |
Baruch Siach | 7a2aad7 | 2018-11-21 13:12:16 +0200 | [diff] [blame] | 159 | ge_phy: ethernet-phy@0 { |
| 160 | reg = <0>; |
| 161 | }; |
| 162 | }; |
| 163 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 164 | &cp0_comphy { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 165 | /* |
| 166 | * CP0 Serdes Configuration: |
| 167 | * Lane 0: PCIe0 (x4) |
| 168 | * Lane 1: PCIe0 (x4) |
| 169 | * Lane 2: PCIe0 (x4) |
| 170 | * Lane 3: PCIe0 (x4) |
Stefan Roese | db720b7 | 2017-04-24 18:45:21 +0300 | [diff] [blame] | 171 | * Lane 4: SFI (10G) |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 172 | * Lane 5: SATA1 |
| 173 | */ |
| 174 | phy0 { |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 175 | phy-type = <COMPHY_TYPE_PEX0>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 176 | }; |
| 177 | phy1 { |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 178 | phy-type = <COMPHY_TYPE_PEX0>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 179 | }; |
| 180 | phy2 { |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 181 | phy-type = <COMPHY_TYPE_PEX0>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 182 | }; |
| 183 | phy3 { |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 184 | phy-type = <COMPHY_TYPE_PEX0>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 185 | }; |
| 186 | phy4 { |
Igal Liberman | d7297e3 | 2018-05-14 11:20:54 +0300 | [diff] [blame] | 187 | phy-type = <COMPHY_TYPE_SFI0>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 188 | }; |
| 189 | phy5 { |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 190 | phy-type = <COMPHY_TYPE_SATA1>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 191 | }; |
| 192 | }; |
| 193 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 194 | &cp1_sata0 { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 195 | status = "okay"; |
| 196 | }; |
| 197 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 198 | &cp1_usb3_0 { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 199 | vbus-supply = <®_usb3h0_vbus>; |
| 200 | status = "okay"; |
| 201 | }; |
| 202 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 203 | &cp1_utmi0 { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 204 | status = "okay"; |
Baruch Siach | 7a2aad7 | 2018-11-21 13:12:16 +0200 | [diff] [blame] | 205 | }; |
| 206 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 207 | &cp1_ethernet { |
Baruch Siach | 7a2aad7 | 2018-11-21 13:12:16 +0200 | [diff] [blame] | 208 | status = "okay"; |
| 209 | }; |
| 210 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 211 | &cp1_eth1 { |
Baruch Siach | 7a2aad7 | 2018-11-21 13:12:16 +0200 | [diff] [blame] | 212 | status = "okay"; |
| 213 | phy = <&ge_phy>; |
| 214 | phy-mode = "sgmii"; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 215 | }; |
| 216 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 217 | &cp1_pinctl { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 218 | /* |
| 219 | * MPP Bus: |
| 220 | * [0-5] TDM |
| 221 | * [6,7] CP1_UART 0 |
| 222 | * [8] CP1 10G SFP LOS |
| 223 | * [9] CP1 10G PHY RESET |
| 224 | * [10] CP1 10G SFP TX Disable |
| 225 | * [11] CP1 10G SFP Mode |
| 226 | * [12] SPI1 CS1n |
| 227 | * [13] SPI1 MISO (TDM and SPI ROM shared) |
| 228 | * [14] SPI1 CS0n |
| 229 | * [15] SPI1 MOSI (TDM and SPI ROM shared) |
| 230 | * [16] SPI1 CLK (TDM and SPI ROM shared) |
| 231 | * [24] CP1 2.5G SFP TX Disable |
| 232 | * [26] CP0 10G SFP TX Fault |
| 233 | * [27] CP0 10G SFP Mode |
| 234 | * [28] CP0 10G SFP LOS |
| 235 | * [29] CP0 10G SFP TX Disable |
| 236 | * [30] USB Over current indication |
| 237 | * [31] 10G Port 0 phy reset |
| 238 | * [32-62] = 0xff: Keep default CP1_shared_pins: |
| 239 | */ |
| 240 | /* 0 1 2 3 4 5 6 7 8 9 */ |
| 241 | pin-func = < 0x4 0x4 0x4 0x4 0x4 0x4 0x8 0x8 0x0 0x0 |
| 242 | 0x0 0x0 0x3 0x3 0x3 0x3 0x3 0xff 0xff 0xff |
| 243 | 0xff 0xff 0xff 0xff 0x0 0xff 0x0 0x0 0x0 0x0 |
| 244 | 0x0 0x0 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff |
| 245 | 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff |
| 246 | 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff 0xff |
| 247 | 0xff 0xff 0xff>; |
| 248 | }; |
| 249 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 250 | &cp1_spi1 { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 251 | pinctrl-names = "default"; |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 252 | pinctrl-0 = <&cp1_spi1_pins>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 253 | status = "okay"; |
| 254 | |
| 255 | spi-flash@0 { |
| 256 | #address-cells = <1>; |
| 257 | #size-cells = <1>; |
| 258 | compatible = "jedec,spi-nor"; |
| 259 | reg = <0>; |
| 260 | spi-max-frequency = <10000000>; |
| 261 | |
| 262 | partitions { |
| 263 | compatible = "fixed-partitions"; |
| 264 | #address-cells = <1>; |
| 265 | #size-cells = <1>; |
| 266 | |
| 267 | partition@0 { |
| 268 | label = "U-Boot"; |
| 269 | reg = <0 0x200000>; |
| 270 | }; |
| 271 | partition@400000 { |
| 272 | label = "Filesystem"; |
| 273 | reg = <0x200000 0xce0000>; |
| 274 | }; |
| 275 | }; |
| 276 | }; |
| 277 | }; |
| 278 | |
Konstantin Porotchkin | 7134b35 | 2021-01-17 17:19:49 +0200 | [diff] [blame] | 279 | &cp1_comphy { |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 280 | /* |
| 281 | * CP1 Serdes Configuration: |
Stefan Roese | b15d61d | 2017-04-24 18:45:27 +0300 | [diff] [blame] | 282 | * Lane 0: SGMII1 |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 283 | * Lane 1: SATA 0 |
| 284 | * Lane 2: USB HOST 0 |
| 285 | * Lane 3: SATA1 |
Stefan Roese | db720b7 | 2017-04-24 18:45:21 +0300 | [diff] [blame] | 286 | * Lane 4: SFI (10G) |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 287 | * Lane 5: SGMII3 |
| 288 | */ |
| 289 | phy0 { |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 290 | phy-type = <COMPHY_TYPE_SGMII1>; |
| 291 | phy-speed = <COMPHY_SPEED_1_25G>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 292 | }; |
| 293 | phy1 { |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 294 | phy-type = <COMPHY_TYPE_SATA0>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 295 | }; |
| 296 | phy2 { |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 297 | phy-type = <COMPHY_TYPE_USB3_HOST0>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 298 | }; |
| 299 | phy3 { |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 300 | phy-type = <COMPHY_TYPE_SATA1>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 301 | }; |
| 302 | phy4 { |
Igal Liberman | d7297e3 | 2018-05-14 11:20:54 +0300 | [diff] [blame] | 303 | phy-type = <COMPHY_TYPE_SFI0>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 304 | }; |
| 305 | phy5 { |
Marcin Wojtas | bfb758b | 2019-10-15 12:30:39 +0200 | [diff] [blame] | 306 | phy-type = <COMPHY_TYPE_SGMII2>; |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 307 | phy-speed = <COMPHY_SPEED_3_125G>; |
Rabeeh Khoury | 089bada | 2017-02-09 12:39:10 +0200 | [diff] [blame] | 308 | }; |
| 309 | }; |