Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Device Tree file for SolidRun Clearfog revision A1 rev 2.0 (88F6828) |
| 3 | * |
| 4 | * Copyright (C) 2015 Russell King |
| 5 | * |
| 6 | * This board is in development; the contents of this file work with |
| 7 | * the A1 rev 2.0 of the board, which does not represent final |
| 8 | * production board. Things will change, don't expect this file to |
| 9 | * remain compatible info the future. |
| 10 | * |
| 11 | * This file is dual-licensed: you can use it either under the terms |
| 12 | * of the GPL or the X11 license, at your option. Note that this dual |
| 13 | * licensing only applies to this file, and not this project as a |
| 14 | * whole. |
| 15 | * |
| 16 | * a) This file is free software; you can redistribute it and/or |
| 17 | * modify it under the terms of the GNU General Public License |
| 18 | * version 2 as published by the Free Software Foundation. |
| 19 | * |
| 20 | * This file is distributed in the hope that it will be useful |
| 21 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 22 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 23 | * GNU General Public License for more details. |
| 24 | * |
| 25 | * Or, alternatively |
| 26 | * |
| 27 | * b) Permission is hereby granted, free of charge, to any person |
| 28 | * obtaining a copy of this software and associated documentation |
| 29 | * files (the "Software"), to deal in the Software without |
| 30 | * restriction, including without limitation the rights to use |
| 31 | * copy, modify, merge, publish, distribute, sublicense, and/or |
| 32 | * sell copies of the Software, and to permit persons to whom the |
| 33 | * Software is furnished to do so, subject to the following |
| 34 | * conditions: |
| 35 | * |
| 36 | * The above copyright notice and this permission notice shall be |
| 37 | * included in all copies or substantial portions of the Software. |
| 38 | * |
| 39 | * THE SOFTWARE IS PROVIDED , WITHOUT WARRANTY OF ANY KIND |
| 40 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES |
| 41 | * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 42 | * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT |
| 43 | * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY |
| 44 | * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING |
| 45 | * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR |
| 46 | * OTHER DEALINGS IN THE SOFTWARE. |
| 47 | */ |
| 48 | |
| 49 | /dts-v1/; |
| 50 | #include <dt-bindings/input/input.h> |
| 51 | #include <dt-bindings/gpio/gpio.h> |
| 52 | #include "armada-388.dtsi" |
Baruch Siach | 9b02c5f | 2018-06-14 18:17:52 +0300 | [diff] [blame^] | 53 | #include "armada-38x-solidrun-microsom.dtsi" |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 54 | |
| 55 | / { |
| 56 | model = "SolidRun Clearfog A1"; |
| 57 | compatible = "solidrun,clearfog-a1", "marvell,armada388", |
| 58 | "marvell,armada385", "marvell,armada380"; |
| 59 | |
| 60 | aliases { |
| 61 | /* So that mvebu u-boot can update the MAC addresses */ |
| 62 | ethernet1 = ð0; |
| 63 | ethernet2 = ð1; |
| 64 | ethernet3 = ð2; |
Baruch Siach | 5509dae | 2017-11-13 07:04:31 +0200 | [diff] [blame] | 65 | spi1 = &spi1; |
Jon Nettleton | 959b07e | 2018-05-28 19:10:30 +0300 | [diff] [blame] | 66 | i2c0 = &i2c0; |
| 67 | i2c1 = &i2c1; |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 68 | }; |
| 69 | |
| 70 | chosen { |
| 71 | stdout-path = "serial0:115200n8"; |
| 72 | }; |
| 73 | |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 74 | reg_3p3v: regulator-3p3v { |
| 75 | compatible = "regulator-fixed"; |
| 76 | regulator-name = "3P3V"; |
| 77 | regulator-min-microvolt = <3300000>; |
| 78 | regulator-max-microvolt = <3300000>; |
| 79 | regulator-always-on; |
| 80 | }; |
| 81 | |
| 82 | soc { |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 83 | internal-regs { |
| 84 | ethernet@30000 { |
| 85 | mac-address = [00 50 43 02 02 02]; |
| 86 | phy-mode = "sgmii"; |
| 87 | status = "okay"; |
| 88 | |
| 89 | fixed-link { |
| 90 | speed = <1000>; |
| 91 | full-duplex; |
| 92 | }; |
| 93 | }; |
| 94 | |
| 95 | ethernet@34000 { |
| 96 | mac-address = [00 50 43 02 02 03]; |
| 97 | managed = "in-band-status"; |
| 98 | phy-mode = "sgmii"; |
| 99 | status = "okay"; |
| 100 | }; |
| 101 | |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 102 | i2c@11000 { |
| 103 | /* Is there anything on this? */ |
| 104 | clock-frequency = <100000>; |
| 105 | pinctrl-0 = <&i2c0_pins>; |
| 106 | pinctrl-names = "default"; |
| 107 | status = "okay"; |
| 108 | |
| 109 | /* |
| 110 | * PCA9655 GPIO expander, up to 1MHz clock. |
| 111 | * 0-CON3 CLKREQ# |
| 112 | * 1-CON3 PERST# |
| 113 | * 2-CON2 PERST# |
| 114 | * 3-CON3 W_DISABLE |
| 115 | * 4-CON2 CLKREQ# |
| 116 | * 5-USB3 overcurrent |
| 117 | * 6-USB3 power |
| 118 | * 7-CON2 W_DISABLE |
| 119 | * 8-JP4 P1 |
| 120 | * 9-JP4 P4 |
| 121 | * 10-JP4 P5 |
| 122 | * 11-m.2 DEVSLP |
| 123 | * 12-SFP_LOS |
| 124 | * 13-SFP_TX_FAULT |
| 125 | * 14-SFP_TX_DISABLE |
| 126 | * 15-SFP_MOD_DEF0 |
| 127 | */ |
| 128 | expander0: gpio-expander@20 { |
| 129 | /* |
| 130 | * This is how it should be: |
| 131 | * compatible = "onnn,pca9655", |
| 132 | * "nxp,pca9555"; |
| 133 | * but you can't do this because of |
| 134 | * the way I2C works. |
| 135 | */ |
| 136 | compatible = "nxp,pca9555"; |
| 137 | gpio-controller; |
| 138 | #gpio-cells = <2>; |
| 139 | reg = <0x20>; |
| 140 | |
| 141 | pcie1_0_clkreq { |
| 142 | gpio-hog; |
| 143 | gpios = <0 GPIO_ACTIVE_LOW>; |
| 144 | input; |
| 145 | line-name = "pcie1.0-clkreq"; |
| 146 | }; |
| 147 | pcie1_0_w_disable { |
| 148 | gpio-hog; |
| 149 | gpios = <3 GPIO_ACTIVE_LOW>; |
| 150 | output-low; |
| 151 | line-name = "pcie1.0-w-disable"; |
| 152 | }; |
| 153 | pcie2_0_clkreq { |
| 154 | gpio-hog; |
| 155 | gpios = <4 GPIO_ACTIVE_LOW>; |
| 156 | input; |
| 157 | line-name = "pcie2.0-clkreq"; |
| 158 | }; |
| 159 | pcie2_0_w_disable { |
| 160 | gpio-hog; |
| 161 | gpios = <7 GPIO_ACTIVE_LOW>; |
| 162 | output-low; |
| 163 | line-name = "pcie2.0-w-disable"; |
| 164 | }; |
| 165 | usb3_ilimit { |
| 166 | gpio-hog; |
| 167 | gpios = <5 GPIO_ACTIVE_LOW>; |
| 168 | input; |
| 169 | line-name = "usb3-current-limit"; |
| 170 | }; |
| 171 | usb3_power { |
| 172 | gpio-hog; |
| 173 | gpios = <6 GPIO_ACTIVE_HIGH>; |
| 174 | output-high; |
| 175 | line-name = "usb3-power"; |
| 176 | }; |
| 177 | m2_devslp { |
| 178 | gpio-hog; |
| 179 | gpios = <11 GPIO_ACTIVE_HIGH>; |
| 180 | output-low; |
| 181 | line-name = "m.2 devslp"; |
| 182 | }; |
| 183 | }; |
| 184 | |
| 185 | /* The MCP3021 is 100kHz clock only */ |
| 186 | mikrobus_adc: mcp3021@4c { |
| 187 | compatible = "microchip,mcp3021"; |
| 188 | reg = <0x4c>; |
| 189 | }; |
| 190 | |
| 191 | /* Also something at 0x64 */ |
| 192 | }; |
| 193 | |
| 194 | i2c@11100 { |
| 195 | /* |
| 196 | * Routed to SFP, mikrobus, and PCIe. |
| 197 | * SFP limits this to 100kHz, and requires |
| 198 | * an AT24C01A/02/04 with address pins tied |
| 199 | * low, which takes addresses 0x50 and 0x51. |
| 200 | * Mikrobus doesn't specify beyond an I2C |
| 201 | * bus being present. |
| 202 | * PCIe uses ARP to assign addresses, or |
| 203 | * 0x63-0x64. |
| 204 | */ |
| 205 | clock-frequency = <100000>; |
| 206 | pinctrl-0 = <&clearfog_i2c1_pins>; |
| 207 | pinctrl-names = "default"; |
| 208 | status = "okay"; |
| 209 | }; |
| 210 | |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 211 | pinctrl@18000 { |
| 212 | clearfog_dsa0_clk_pins: clearfog-dsa0-clk-pins { |
| 213 | marvell,pins = "mpp46"; |
| 214 | marvell,function = "ref"; |
| 215 | }; |
| 216 | clearfog_dsa0_pins: clearfog-dsa0-pins { |
| 217 | marvell,pins = "mpp23", "mpp41"; |
| 218 | marvell,function = "gpio"; |
| 219 | }; |
| 220 | clearfog_i2c1_pins: i2c1-pins { |
| 221 | /* SFP, PCIe, mSATA, mikrobus */ |
| 222 | marvell,pins = "mpp26", "mpp27"; |
| 223 | marvell,function = "i2c1"; |
| 224 | }; |
| 225 | clearfog_sdhci_cd_pins: clearfog-sdhci-cd-pins { |
| 226 | marvell,pins = "mpp20"; |
| 227 | marvell,function = "gpio"; |
| 228 | }; |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 229 | clearfog_spi1_cs_pins: spi1-cs-pins { |
| 230 | marvell,pins = "mpp55"; |
| 231 | marvell,function = "spi1"; |
| 232 | }; |
| 233 | mikro_pins: mikro-pins { |
| 234 | /* int: mpp22 rst: mpp29 */ |
| 235 | marvell,pins = "mpp22", "mpp29"; |
| 236 | marvell,function = "gpio"; |
| 237 | }; |
| 238 | mikro_spi_pins: mikro-spi-pins { |
| 239 | marvell,pins = "mpp43"; |
| 240 | marvell,function = "spi1"; |
| 241 | }; |
| 242 | mikro_uart_pins: mikro-uart-pins { |
| 243 | marvell,pins = "mpp24", "mpp25"; |
| 244 | marvell,function = "ua1"; |
| 245 | }; |
| 246 | rear_button_pins: rear-button-pins { |
| 247 | marvell,pins = "mpp34"; |
| 248 | marvell,function = "gpio"; |
| 249 | }; |
| 250 | }; |
| 251 | |
| 252 | rtc@a3800 { |
| 253 | /* |
| 254 | * If the rtc doesn't work, run "date reset" |
| 255 | * twice in u-boot. |
| 256 | */ |
| 257 | status = "okay"; |
| 258 | }; |
| 259 | |
| 260 | sata@a8000 { |
| 261 | /* pinctrl? */ |
| 262 | status = "okay"; |
| 263 | }; |
| 264 | |
| 265 | sata@e0000 { |
| 266 | /* pinctrl? */ |
| 267 | status = "okay"; |
| 268 | }; |
| 269 | |
| 270 | sdhci@d8000 { |
| 271 | bus-width = <4>; |
| 272 | cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; |
| 273 | no-1-8-v; |
Baruch Siach | 9b02c5f | 2018-06-14 18:17:52 +0300 | [diff] [blame^] | 274 | pinctrl-0 = <µsom_sdhci_pins |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 275 | &clearfog_sdhci_cd_pins>; |
| 276 | pinctrl-names = "default"; |
| 277 | status = "okay"; |
| 278 | vmmc = <®_3p3v>; |
| 279 | wp-inverted; |
| 280 | }; |
| 281 | |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 282 | serial@12100 { |
| 283 | /* mikrobus uart */ |
| 284 | pinctrl-0 = <&mikro_uart_pins>; |
| 285 | pinctrl-names = "default"; |
| 286 | status = "okay"; |
| 287 | }; |
| 288 | |
Baruch Siach | 5509dae | 2017-11-13 07:04:31 +0200 | [diff] [blame] | 289 | spi1: spi@10680 { |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 290 | /* |
Baruch Siach | 5509dae | 2017-11-13 07:04:31 +0200 | [diff] [blame] | 291 | * CS0: W25Q32 |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 292 | * CS1: |
| 293 | * CS2: mikrobus |
| 294 | */ |
| 295 | pinctrl-0 = <&spi1_pins &clearfog_spi1_cs_pins &mikro_spi_pins>; |
| 296 | pinctrl-names = "default"; |
| 297 | status = "okay"; |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 298 | }; |
| 299 | |
| 300 | usb3@f8000 { |
| 301 | status = "okay"; |
| 302 | }; |
| 303 | }; |
| 304 | |
| 305 | pcie-controller { |
| 306 | status = "okay"; |
| 307 | /* |
| 308 | * The two PCIe units are accessible through |
| 309 | * the mini-PCIe connectors on the board. |
| 310 | */ |
| 311 | pcie@2,0 { |
| 312 | /* Port 1, Lane 0. CONN3, nearest power. */ |
| 313 | reset-gpios = <&expander0 1 GPIO_ACTIVE_LOW>; |
| 314 | status = "okay"; |
| 315 | }; |
| 316 | pcie@3,0 { |
| 317 | /* Port 2, Lane 0. CONN2, nearest CPU. */ |
| 318 | reset-gpios = <&expander0 2 GPIO_ACTIVE_LOW>; |
| 319 | status = "okay"; |
| 320 | }; |
| 321 | }; |
| 322 | }; |
| 323 | |
| 324 | sfp: sfp { |
| 325 | compatible = "sff,sfp"; |
| 326 | i2c-bus = <&i2c1>; |
| 327 | los-gpio = <&expander0 12 GPIO_ACTIVE_HIGH>; |
| 328 | moddef0-gpio = <&expander0 15 GPIO_ACTIVE_LOW>; |
| 329 | sfp,ethernet = <ð2>; |
| 330 | tx-disable-gpio = <&expander0 14 GPIO_ACTIVE_HIGH>; |
| 331 | tx-fault-gpio = <&expander0 13 GPIO_ACTIVE_HIGH>; |
| 332 | }; |
| 333 | |
| 334 | dsa@0 { |
| 335 | compatible = "marvell,dsa"; |
| 336 | dsa,ethernet = <ð1>; |
| 337 | dsa,mii-bus = <&mdio>; |
| 338 | pinctrl-0 = <&clearfog_dsa0_clk_pins &clearfog_dsa0_pins>; |
| 339 | pinctrl-names = "default"; |
| 340 | #address-cells = <2>; |
| 341 | #size-cells = <0>; |
| 342 | |
| 343 | switch@0 { |
| 344 | #address-cells = <1>; |
| 345 | #size-cells = <0>; |
| 346 | reg = <4 0>; |
| 347 | |
| 348 | port@0 { |
| 349 | reg = <0>; |
| 350 | label = "lan1"; |
| 351 | }; |
| 352 | |
| 353 | port@1 { |
| 354 | reg = <1>; |
| 355 | label = "lan2"; |
| 356 | }; |
| 357 | |
| 358 | port@2 { |
| 359 | reg = <2>; |
| 360 | label = "lan3"; |
| 361 | }; |
| 362 | |
| 363 | port@3 { |
| 364 | reg = <3>; |
| 365 | label = "lan4"; |
| 366 | }; |
| 367 | |
| 368 | port@4 { |
| 369 | reg = <4>; |
| 370 | label = "lan5"; |
| 371 | }; |
| 372 | |
| 373 | port@5 { |
| 374 | reg = <5>; |
| 375 | label = "cpu"; |
| 376 | }; |
| 377 | |
| 378 | port@6 { |
| 379 | /* 88E1512 external phy */ |
| 380 | reg = <6>; |
| 381 | label = "lan6"; |
| 382 | fixed-link { |
| 383 | speed = <1000>; |
| 384 | full-duplex; |
| 385 | }; |
| 386 | }; |
| 387 | }; |
| 388 | }; |
| 389 | |
| 390 | gpio-keys { |
| 391 | compatible = "gpio-keys"; |
| 392 | pinctrl-0 = <&rear_button_pins>; |
| 393 | pinctrl-names = "default"; |
| 394 | |
| 395 | button_0 { |
| 396 | /* The rear SW3 button */ |
| 397 | label = "Rear Button"; |
| 398 | gpios = <&gpio1 2 GPIO_ACTIVE_LOW>; |
| 399 | linux,can-disable; |
| 400 | linux,code = <BTN_0>; |
| 401 | }; |
| 402 | }; |
| 403 | }; |
| 404 | |
Baruch Siach | 9b02c5f | 2018-06-14 18:17:52 +0300 | [diff] [blame^] | 405 | &w25q32 { |
| 406 | status = "okay"; |
| 407 | }; |
| 408 | |
Stefan Roese | 7360640 | 2015-10-20 15:14:47 +0200 | [diff] [blame] | 409 | /* |
| 410 | +#define A38x_CUSTOMER_BOARD_1_MPP16_23 0x00400011 |
| 411 | MPP18: gpio ? (pca9655 int?) |
| 412 | MPP19: gpio ? (clkreq?) |
| 413 | MPP20: gpio ? (sd0 detect) |
| 414 | MPP21: sd0:cmd x sd0 |
| 415 | MPP22: gpio x mikro int |
| 416 | MPP23: gpio x switch irq |
| 417 | +#define A38x_CUSTOMER_BOARD_1_MPP24_31 0x22043333 |
| 418 | MPP24: ua1:rxd x mikro rx |
| 419 | MPP25: ua1:txd x mikro tx |
| 420 | MPP26: i2c1:sck x mikro sck |
| 421 | MPP27: i2c1:sda x mikro sda |
| 422 | MPP28: sd0:clk x sd0 |
| 423 | MPP29: gpio x mikro rst |
| 424 | MPP30: ge1:txd2 ? (config) |
| 425 | MPP31: ge1:txd3 ? (config) |
| 426 | +#define A38x_CUSTOMER_BOARD_1_MPP32_39 0x44400002 |
| 427 | MPP32: ge1:txctl ? (unused) |
| 428 | MPP33: gpio ? (pic_com0) |
| 429 | MPP34: gpio x rear button (pic_com1) |
| 430 | MPP35: gpio ? (pic_com2) |
| 431 | MPP36: gpio ? (unused) |
| 432 | MPP37: sd0:d3 x sd0 |
| 433 | MPP38: sd0:d0 x sd0 |
| 434 | MPP39: sd0:d1 x sd0 |
| 435 | +#define A38x_CUSTOMER_BOARD_1_MPP40_47 0x41144004 |
| 436 | MPP40: sd0:d2 x sd0 |
| 437 | MPP41: gpio x switch reset |
| 438 | MPP42: gpio ? sw1-1 |
| 439 | MPP43: spi1:cs2 x mikro cs |
| 440 | MPP44: sata3:prsnt ? (unused) |
| 441 | MPP45: ref:clk_out0 ? |
| 442 | MPP46: ref:clk_out1 x switch clk |
| 443 | MPP47: 4 ? (unused) |
| 444 | +#define A38x_CUSTOMER_BOARD_1_MPP48_55 0x40333333 |
| 445 | MPP48: tdm:pclk |
| 446 | MPP49: tdm:fsync |
| 447 | MPP50: tdm:drx |
| 448 | MPP51: tdm:dtx |
| 449 | MPP52: tdm:int |
| 450 | MPP53: tdm:rst |
| 451 | MPP54: gpio ? (pwm) |
| 452 | MPP55: spi1:cs1 x slic |
| 453 | +#define A38x_CUSTOMER_BOARD_1_MPP56_63 0x00004444 |
| 454 | MPP56: spi1:mosi x mikro mosi |
| 455 | MPP57: spi1:sck x mikro sck |
| 456 | MPP58: spi1:miso x mikro miso |
| 457 | MPP59: spi1:cs0 x w25q32 |
| 458 | */ |