1b97ee269SEmmanuel Vadot// SPDX-License-Identifier: GPL-2.0+ 2b97ee269SEmmanuel Vadot/* 3b97ee269SEmmanuel Vadot * Turris 1.x Device Tree Source 4b97ee269SEmmanuel Vadot * 5b97ee269SEmmanuel Vadot * Copyright 2013 - 2022 CZ.NIC z.s.p.o. (http://www.nic.cz/) 6b97ee269SEmmanuel Vadot * 7b97ee269SEmmanuel Vadot * Pinout, Schematics and Altium hardware design files are open source 8b97ee269SEmmanuel Vadot * and available at: https://docs.turris.cz/hw/turris-1x/turris-1x/ 9b97ee269SEmmanuel Vadot */ 10b97ee269SEmmanuel Vadot 11b97ee269SEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 12b97ee269SEmmanuel Vadot#include <dt-bindings/interrupt-controller/irq.h> 13b97ee269SEmmanuel Vadot#include <dt-bindings/leds/common.h> 14b97ee269SEmmanuel Vadot/include/ "fsl/p2020si-pre.dtsi" 15b97ee269SEmmanuel Vadot 16b97ee269SEmmanuel Vadot/ { 17b97ee269SEmmanuel Vadot model = "Turris 1.x"; 18fac71e4eSEmmanuel Vadot compatible = "cznic,turris1x"; 19b97ee269SEmmanuel Vadot 20b97ee269SEmmanuel Vadot aliases { 21b97ee269SEmmanuel Vadot ethernet0 = &enet0; 22b97ee269SEmmanuel Vadot ethernet1 = &enet1; 23b97ee269SEmmanuel Vadot ethernet2 = &enet2; 24b97ee269SEmmanuel Vadot serial0 = &serial0; 25b97ee269SEmmanuel Vadot serial1 = &serial1; 26b97ee269SEmmanuel Vadot pci0 = &pci0; 27b97ee269SEmmanuel Vadot pci1 = &pci1; 28b97ee269SEmmanuel Vadot pci2 = &pci2; 29b97ee269SEmmanuel Vadot spi0 = &spi0; 30b97ee269SEmmanuel Vadot }; 31b97ee269SEmmanuel Vadot 32b97ee269SEmmanuel Vadot memory { 33b97ee269SEmmanuel Vadot device_type = "memory"; 34b97ee269SEmmanuel Vadot }; 35b97ee269SEmmanuel Vadot 36b97ee269SEmmanuel Vadot soc: soc@ffe00000 { 37b97ee269SEmmanuel Vadot ranges = <0x0 0x0 0xffe00000 0x00100000>; 38b97ee269SEmmanuel Vadot 39b97ee269SEmmanuel Vadot i2c@3000 { 40b97ee269SEmmanuel Vadot /* PCA9557PW GPIO controller for boot config */ 41b97ee269SEmmanuel Vadot gpio-controller@18 { 42b97ee269SEmmanuel Vadot compatible = "nxp,pca9557"; 43b97ee269SEmmanuel Vadot label = "bootcfg"; 44b97ee269SEmmanuel Vadot reg = <0x18>; 45b97ee269SEmmanuel Vadot #gpio-cells = <2>; 46b97ee269SEmmanuel Vadot gpio-controller; 47b97ee269SEmmanuel Vadot polarity = <0x00>; 48b97ee269SEmmanuel Vadot }; 49b97ee269SEmmanuel Vadot 50b97ee269SEmmanuel Vadot /* STM32F030R8T6 MCU for power control */ 51b97ee269SEmmanuel Vadot power-control@2a { 52b97ee269SEmmanuel Vadot /* 53b97ee269SEmmanuel Vadot * Turris Power Control firmware runs on STM32F0 MCU. 54b97ee269SEmmanuel Vadot * This firmware is open source and available at: 55b97ee269SEmmanuel Vadot * https://gitlab.nic.cz/turris/hw/turris_power_control 56b97ee269SEmmanuel Vadot */ 57b97ee269SEmmanuel Vadot reg = <0x2a>; 58b97ee269SEmmanuel Vadot }; 59b97ee269SEmmanuel Vadot 60b97ee269SEmmanuel Vadot /* DDR3 SPD/EEPROM PSWP instruction */ 61b97ee269SEmmanuel Vadot eeprom@32 { 62b97ee269SEmmanuel Vadot reg = <0x32>; 63b97ee269SEmmanuel Vadot }; 64b97ee269SEmmanuel Vadot 65b97ee269SEmmanuel Vadot /* SA56004ED temperature control */ 66b97ee269SEmmanuel Vadot temperature-sensor@4c { 67b97ee269SEmmanuel Vadot compatible = "nxp,sa56004"; 68b97ee269SEmmanuel Vadot reg = <0x4c>; 69b97ee269SEmmanuel Vadot interrupt-parent = <&gpio>; 70b97ee269SEmmanuel Vadot interrupts = <12 IRQ_TYPE_LEVEL_LOW>, /* GPIO12 - ALERT pin */ 71b97ee269SEmmanuel Vadot <13 IRQ_TYPE_LEVEL_LOW>; /* GPIO13 - CRIT pin */ 728bab661aSEmmanuel Vadot #address-cells = <1>; 738bab661aSEmmanuel Vadot #size-cells = <0>; 748bab661aSEmmanuel Vadot 758bab661aSEmmanuel Vadot /* Local temperature sensor (SA56004ED internal) */ 768bab661aSEmmanuel Vadot channel@0 { 778bab661aSEmmanuel Vadot reg = <0>; 788bab661aSEmmanuel Vadot label = "board"; 798bab661aSEmmanuel Vadot }; 808bab661aSEmmanuel Vadot 818bab661aSEmmanuel Vadot /* Remote temperature sensor (D+/D- connected to P2020 CPU Temperature Diode) */ 828bab661aSEmmanuel Vadot channel@1 { 838bab661aSEmmanuel Vadot reg = <1>; 848bab661aSEmmanuel Vadot label = "cpu"; 858bab661aSEmmanuel Vadot }; 86b97ee269SEmmanuel Vadot }; 87b97ee269SEmmanuel Vadot 88b97ee269SEmmanuel Vadot /* DDR3 SPD/EEPROM */ 89b97ee269SEmmanuel Vadot eeprom@52 { 90b97ee269SEmmanuel Vadot compatible = "atmel,spd"; 91b97ee269SEmmanuel Vadot reg = <0x52>; 92b97ee269SEmmanuel Vadot }; 93b97ee269SEmmanuel Vadot 94b97ee269SEmmanuel Vadot /* MCP79402-I/ST Protected EEPROM */ 95b97ee269SEmmanuel Vadot eeprom@57 { 96b97ee269SEmmanuel Vadot reg = <0x57>; 97b97ee269SEmmanuel Vadot }; 98b97ee269SEmmanuel Vadot 99b97ee269SEmmanuel Vadot /* ATSHA204-TH-DA-T crypto module */ 100b97ee269SEmmanuel Vadot crypto@64 { 101b97ee269SEmmanuel Vadot compatible = "atmel,atsha204"; 102b97ee269SEmmanuel Vadot reg = <0x64>; 103b97ee269SEmmanuel Vadot }; 104b97ee269SEmmanuel Vadot 105b97ee269SEmmanuel Vadot /* IDT6V49205BNLGI clock generator */ 106b97ee269SEmmanuel Vadot clock-generator@69 { 107b97ee269SEmmanuel Vadot compatible = "idt,6v49205b"; 108b97ee269SEmmanuel Vadot reg = <0x69>; 109b97ee269SEmmanuel Vadot }; 110b97ee269SEmmanuel Vadot 111b97ee269SEmmanuel Vadot /* MCP79402-I/ST RTC */ 112b97ee269SEmmanuel Vadot rtc@6f { 113b97ee269SEmmanuel Vadot compatible = "microchip,mcp7940x"; 114b97ee269SEmmanuel Vadot reg = <0x6f>; 115b97ee269SEmmanuel Vadot interrupt-parent = <&gpio>; 116b97ee269SEmmanuel Vadot interrupts = <14 0>; /* GPIO14 - MFP pin */ 117b97ee269SEmmanuel Vadot }; 118b97ee269SEmmanuel Vadot }; 119b97ee269SEmmanuel Vadot 120b97ee269SEmmanuel Vadot /* SPI on connector P1 */ 121b97ee269SEmmanuel Vadot spi0: spi@7000 { 122b97ee269SEmmanuel Vadot }; 123b97ee269SEmmanuel Vadot 124b97ee269SEmmanuel Vadot gpio: gpio-controller@fc00 { 125b97ee269SEmmanuel Vadot #interrupt-cells = <2>; 126b97ee269SEmmanuel Vadot interrupt-controller; 127b97ee269SEmmanuel Vadot }; 128b97ee269SEmmanuel Vadot 129b97ee269SEmmanuel Vadot /* Connected to SMSC USB2412-DZK 2-Port USB 2.0 Hub Controller */ 130b97ee269SEmmanuel Vadot usb@22000 { 131b97ee269SEmmanuel Vadot phy_type = "ulpi"; 132b97ee269SEmmanuel Vadot dr_mode = "host"; 133b97ee269SEmmanuel Vadot }; 134b97ee269SEmmanuel Vadot 135b97ee269SEmmanuel Vadot enet0: ethernet@24000 { 136b97ee269SEmmanuel Vadot /* Connected to port 6 of QCA8337N-AL3C switch */ 137b97ee269SEmmanuel Vadot phy-connection-type = "rgmii-id"; 138b97ee269SEmmanuel Vadot 139b97ee269SEmmanuel Vadot fixed-link { 140b97ee269SEmmanuel Vadot speed = <1000>; 141b97ee269SEmmanuel Vadot full-duplex; 142b97ee269SEmmanuel Vadot }; 143b97ee269SEmmanuel Vadot }; 144b97ee269SEmmanuel Vadot 145b97ee269SEmmanuel Vadot mdio@24520 { 146b97ee269SEmmanuel Vadot /* KSZ9031RNXCA ethernet phy for WAN port */ 147b97ee269SEmmanuel Vadot phy: ethernet-phy@7 { 148b97ee269SEmmanuel Vadot interrupts = <3 1 0 0>; 149b97ee269SEmmanuel Vadot reg = <0x7>; 150b97ee269SEmmanuel Vadot }; 151b97ee269SEmmanuel Vadot 152b97ee269SEmmanuel Vadot /* QCA8337N-AL3C switch with integrated ethernet PHYs for LAN ports */ 153b97ee269SEmmanuel Vadot switch@10 { 154b97ee269SEmmanuel Vadot compatible = "qca,qca8337"; 155b97ee269SEmmanuel Vadot interrupts = <2 1 0 0>; 156b97ee269SEmmanuel Vadot reg = <0x10>; 157b97ee269SEmmanuel Vadot 158b97ee269SEmmanuel Vadot ports { 159b97ee269SEmmanuel Vadot #address-cells = <1>; 160b97ee269SEmmanuel Vadot #size-cells = <0>; 161b97ee269SEmmanuel Vadot 162b97ee269SEmmanuel Vadot port@0 { 163b97ee269SEmmanuel Vadot reg = <0>; 1647ef62cebSEmmanuel Vadot label = "cpu"; 165b97ee269SEmmanuel Vadot ethernet = <&enet1>; 166b97ee269SEmmanuel Vadot phy-mode = "rgmii-id"; 167b97ee269SEmmanuel Vadot 168b97ee269SEmmanuel Vadot fixed-link { 169b97ee269SEmmanuel Vadot speed = <1000>; 170b97ee269SEmmanuel Vadot full-duplex; 171b97ee269SEmmanuel Vadot }; 172b97ee269SEmmanuel Vadot }; 173b97ee269SEmmanuel Vadot 174b97ee269SEmmanuel Vadot port@1 { 175b97ee269SEmmanuel Vadot reg = <1>; 176b97ee269SEmmanuel Vadot label = "lan5"; 177b97ee269SEmmanuel Vadot }; 178b97ee269SEmmanuel Vadot 179b97ee269SEmmanuel Vadot port@2 { 180b97ee269SEmmanuel Vadot reg = <2>; 181b97ee269SEmmanuel Vadot label = "lan4"; 182b97ee269SEmmanuel Vadot }; 183b97ee269SEmmanuel Vadot 184b97ee269SEmmanuel Vadot port@3 { 185b97ee269SEmmanuel Vadot reg = <3>; 186b97ee269SEmmanuel Vadot label = "lan3"; 187b97ee269SEmmanuel Vadot }; 188b97ee269SEmmanuel Vadot 189b97ee269SEmmanuel Vadot port@4 { 190b97ee269SEmmanuel Vadot reg = <4>; 191b97ee269SEmmanuel Vadot label = "lan2"; 192b97ee269SEmmanuel Vadot }; 193b97ee269SEmmanuel Vadot 194b97ee269SEmmanuel Vadot port@5 { 195b97ee269SEmmanuel Vadot reg = <5>; 196b97ee269SEmmanuel Vadot label = "lan1"; 197b97ee269SEmmanuel Vadot }; 198b97ee269SEmmanuel Vadot 199b97ee269SEmmanuel Vadot port@6 { 200b97ee269SEmmanuel Vadot reg = <6>; 2017ef62cebSEmmanuel Vadot label = "cpu"; 202b97ee269SEmmanuel Vadot ethernet = <&enet0>; 203b97ee269SEmmanuel Vadot phy-mode = "rgmii-id"; 204b97ee269SEmmanuel Vadot 205b97ee269SEmmanuel Vadot fixed-link { 206b97ee269SEmmanuel Vadot speed = <1000>; 207b97ee269SEmmanuel Vadot full-duplex; 208b97ee269SEmmanuel Vadot }; 209b97ee269SEmmanuel Vadot }; 210b97ee269SEmmanuel Vadot }; 211b97ee269SEmmanuel Vadot }; 212b97ee269SEmmanuel Vadot }; 213b97ee269SEmmanuel Vadot 214b97ee269SEmmanuel Vadot ptp_clock@24e00 { 215b97ee269SEmmanuel Vadot fsl,tclk-period = <5>; 216b97ee269SEmmanuel Vadot fsl,tmr-prsc = <200>; 217b97ee269SEmmanuel Vadot fsl,tmr-add = <0xcccccccd>; 218b97ee269SEmmanuel Vadot fsl,tmr-fiper1 = <0x3b9ac9fb>; 219b97ee269SEmmanuel Vadot fsl,tmr-fiper2 = <0x0001869b>; 220b97ee269SEmmanuel Vadot fsl,max-adj = <249999999>; 221b97ee269SEmmanuel Vadot }; 222b97ee269SEmmanuel Vadot 223b97ee269SEmmanuel Vadot enet1: ethernet@25000 { 224b97ee269SEmmanuel Vadot /* Connected to port 0 of QCA8337N-AL3C switch */ 225b97ee269SEmmanuel Vadot phy-connection-type = "rgmii-id"; 226b97ee269SEmmanuel Vadot 227b97ee269SEmmanuel Vadot fixed-link { 228b97ee269SEmmanuel Vadot speed = <1000>; 229b97ee269SEmmanuel Vadot full-duplex; 230b97ee269SEmmanuel Vadot }; 231b97ee269SEmmanuel Vadot }; 232b97ee269SEmmanuel Vadot 233b97ee269SEmmanuel Vadot mdio@25520 { 234b97ee269SEmmanuel Vadot status = "disabled"; 235b97ee269SEmmanuel Vadot }; 236b97ee269SEmmanuel Vadot 237b97ee269SEmmanuel Vadot enet2: ethernet@26000 { 238b97ee269SEmmanuel Vadot /* Connected to KSZ9031RNXCA ethernet phy (WAN port) */ 239b97ee269SEmmanuel Vadot label = "wan"; 240b97ee269SEmmanuel Vadot phy-handle = <&phy>; 241b97ee269SEmmanuel Vadot phy-connection-type = "rgmii-id"; 242b97ee269SEmmanuel Vadot }; 243b97ee269SEmmanuel Vadot 244b97ee269SEmmanuel Vadot mdio@26520 { 245b97ee269SEmmanuel Vadot status = "disabled"; 246b97ee269SEmmanuel Vadot }; 247b97ee269SEmmanuel Vadot 248b97ee269SEmmanuel Vadot sdhc@2e000 { 249b97ee269SEmmanuel Vadot bus-width = <4>; 250b97ee269SEmmanuel Vadot cd-gpios = <&gpio 8 GPIO_ACTIVE_LOW>; 251b97ee269SEmmanuel Vadot }; 252b97ee269SEmmanuel Vadot }; 253b97ee269SEmmanuel Vadot 254b97ee269SEmmanuel Vadot lbc: localbus@ffe05000 { 255b97ee269SEmmanuel Vadot reg = <0 0xffe05000 0 0x1000>; 256b97ee269SEmmanuel Vadot 257b97ee269SEmmanuel Vadot ranges = <0x0 0x0 0x0 0xef000000 0x01000000>, /* NOR */ 258b97ee269SEmmanuel Vadot <0x1 0x0 0x0 0xff800000 0x00040000>, /* NAND */ 259b97ee269SEmmanuel Vadot <0x3 0x0 0x0 0xffa00000 0x00020000>; /* CPLD */ 260b97ee269SEmmanuel Vadot 261b97ee269SEmmanuel Vadot /* S29GL128P90TFIR10 NOR */ 262b97ee269SEmmanuel Vadot nor@0,0 { 263b97ee269SEmmanuel Vadot compatible = "cfi-flash"; 264b97ee269SEmmanuel Vadot reg = <0x0 0x0 0x01000000>; 265b97ee269SEmmanuel Vadot bank-width = <2>; 266b97ee269SEmmanuel Vadot device-width = <1>; 267b97ee269SEmmanuel Vadot 268b97ee269SEmmanuel Vadot partitions { 269b97ee269SEmmanuel Vadot compatible = "fixed-partitions"; 270b97ee269SEmmanuel Vadot #address-cells = <1>; 271b97ee269SEmmanuel Vadot #size-cells = <1>; 272b97ee269SEmmanuel Vadot 273b97ee269SEmmanuel Vadot partition@0 { 274b97ee269SEmmanuel Vadot /* 128 kB for Device Tree Blob */ 275b97ee269SEmmanuel Vadot reg = <0x00000000 0x00020000>; 276b97ee269SEmmanuel Vadot label = "dtb"; 277b97ee269SEmmanuel Vadot }; 278b97ee269SEmmanuel Vadot 279b97ee269SEmmanuel Vadot partition@20000 { 2807ef62cebSEmmanuel Vadot /* 1.7 MB for Linux Kernel Image */ 281b97ee269SEmmanuel Vadot reg = <0x00020000 0x001a0000>; 2827ef62cebSEmmanuel Vadot label = "kernel"; 283b97ee269SEmmanuel Vadot }; 284b97ee269SEmmanuel Vadot 285b97ee269SEmmanuel Vadot partition@1c0000 { 286b97ee269SEmmanuel Vadot /* 1.5 MB for Rescue JFFS2 Root File System */ 287b97ee269SEmmanuel Vadot reg = <0x001c0000 0x00180000>; 2887ef62cebSEmmanuel Vadot label = "rescue"; 289b97ee269SEmmanuel Vadot }; 290b97ee269SEmmanuel Vadot 291b97ee269SEmmanuel Vadot partition@340000 { 2927ef62cebSEmmanuel Vadot /* 11 MB for TAR.XZ Archive with Factory content of NAND Root File System */ 293b97ee269SEmmanuel Vadot reg = <0x00340000 0x00b00000>; 2947ef62cebSEmmanuel Vadot label = "factory"; 295b97ee269SEmmanuel Vadot }; 296b97ee269SEmmanuel Vadot 297b97ee269SEmmanuel Vadot partition@e40000 { 298b97ee269SEmmanuel Vadot /* 768 kB for Certificates JFFS2 File System */ 299b97ee269SEmmanuel Vadot reg = <0x00e40000 0x000c0000>; 300b97ee269SEmmanuel Vadot label = "certificates"; 301b97ee269SEmmanuel Vadot }; 302b97ee269SEmmanuel Vadot 303b97ee269SEmmanuel Vadot /* free unused space 0x00f00000-0x00f20000 */ 304b97ee269SEmmanuel Vadot 305b97ee269SEmmanuel Vadot partition@f20000 { 306b97ee269SEmmanuel Vadot /* 128 kB for U-Boot Environment Variables */ 307b97ee269SEmmanuel Vadot reg = <0x00f20000 0x00020000>; 308b97ee269SEmmanuel Vadot label = "u-boot-env"; 309b97ee269SEmmanuel Vadot }; 310b97ee269SEmmanuel Vadot 311b97ee269SEmmanuel Vadot partition@f40000 { 312b97ee269SEmmanuel Vadot /* 768 kB for U-Boot Bootloader Image */ 313b97ee269SEmmanuel Vadot reg = <0x00f40000 0x000c0000>; 314b97ee269SEmmanuel Vadot label = "u-boot"; 315b97ee269SEmmanuel Vadot }; 316b97ee269SEmmanuel Vadot }; 317b97ee269SEmmanuel Vadot }; 318b97ee269SEmmanuel Vadot 319b97ee269SEmmanuel Vadot /* MT29F2G08ABAEAWP:E NAND */ 320b97ee269SEmmanuel Vadot nand@1,0 { 321b97ee269SEmmanuel Vadot compatible = "fsl,p2020-fcm-nand", "fsl,elbc-fcm-nand"; 322b97ee269SEmmanuel Vadot reg = <0x1 0x0 0x00040000>; 323b97ee269SEmmanuel Vadot nand-ecc-mode = "soft"; 324b97ee269SEmmanuel Vadot nand-ecc-algo = "bch"; 325b97ee269SEmmanuel Vadot 326b97ee269SEmmanuel Vadot partitions { 327b97ee269SEmmanuel Vadot compatible = "fixed-partitions"; 328b97ee269SEmmanuel Vadot #address-cells = <1>; 329b97ee269SEmmanuel Vadot #size-cells = <1>; 330b97ee269SEmmanuel Vadot 331b97ee269SEmmanuel Vadot partition@0 { 332b97ee269SEmmanuel Vadot /* 256 MB for UBI with one volume: UBIFS Root File System */ 333b97ee269SEmmanuel Vadot reg = <0x00000000 0x10000000>; 334b97ee269SEmmanuel Vadot label = "rootfs"; 335b97ee269SEmmanuel Vadot }; 336b97ee269SEmmanuel Vadot }; 337b97ee269SEmmanuel Vadot }; 338b97ee269SEmmanuel Vadot 339b97ee269SEmmanuel Vadot /* LCMXO1200C-3FTN256C FPGA */ 340b97ee269SEmmanuel Vadot cpld@3,0 { 341b97ee269SEmmanuel Vadot /* 342b97ee269SEmmanuel Vadot * Turris CPLD firmware which runs on this Lattice FPGA, 343b97ee269SEmmanuel Vadot * is extended version of P1021RDB-PC CPLD v4.1 firmware. 344b97ee269SEmmanuel Vadot * It is backward compatible with its original version 345b97ee269SEmmanuel Vadot * and the only extension is support for Turris LEDs. 346b97ee269SEmmanuel Vadot * Turris CPLD firmware is open source and available at: 347b97ee269SEmmanuel Vadot * https://gitlab.nic.cz/turris/hw/turris_cpld/-/blob/master/CZ_NIC_Router_CPLD.v 348b97ee269SEmmanuel Vadot */ 349b97ee269SEmmanuel Vadot compatible = "cznic,turris1x-cpld", "fsl,p1021rdb-pc-cpld", "simple-bus", "syscon"; 350b97ee269SEmmanuel Vadot reg = <0x3 0x0 0x30>; 351b97ee269SEmmanuel Vadot #address-cells = <1>; 352b97ee269SEmmanuel Vadot #size-cells = <1>; 353b97ee269SEmmanuel Vadot ranges = <0x0 0x3 0x0 0x00020000>; 354b97ee269SEmmanuel Vadot 355b97ee269SEmmanuel Vadot /* MAX6370KA+T watchdog */ 356b97ee269SEmmanuel Vadot watchdog@2 { 357b97ee269SEmmanuel Vadot /* 358b97ee269SEmmanuel Vadot * CPLD firmware maps SET0, SET1 and SET2 359b97ee269SEmmanuel Vadot * input logic of MAX6370KA+T chip to CPLD 360b97ee269SEmmanuel Vadot * memory space at byte offset 0x2. WDI 361b97ee269SEmmanuel Vadot * input logic is outside of the CPLD and 362b97ee269SEmmanuel Vadot * connected via external GPIO. 363b97ee269SEmmanuel Vadot */ 364b97ee269SEmmanuel Vadot compatible = "maxim,max6370"; 365b97ee269SEmmanuel Vadot reg = <0x02 0x01>; 366b97ee269SEmmanuel Vadot gpios = <&gpio 11 GPIO_ACTIVE_LOW>; 367b97ee269SEmmanuel Vadot }; 368b97ee269SEmmanuel Vadot 369b97ee269SEmmanuel Vadot reboot@d { 370cb7aa33aSEmmanuel Vadot /* 371cb7aa33aSEmmanuel Vadot * CPLD firmware which manages system reset and 372cb7aa33aSEmmanuel Vadot * watchdog registers has bugs. It does not 373cb7aa33aSEmmanuel Vadot * autoclear system reset register after change 374cb7aa33aSEmmanuel Vadot * and watchdog ignores reset line on immediate 375cb7aa33aSEmmanuel Vadot * succeeding reset cycle triggered by watchdog. 376cb7aa33aSEmmanuel Vadot * These bugs have to be workarounded in U-Boot 377cb7aa33aSEmmanuel Vadot * bootloader. So use system reset via syscon as 378cb7aa33aSEmmanuel Vadot * a last resort because older U-Boot versions 379cb7aa33aSEmmanuel Vadot * do not have workaround for watchdog. 380cb7aa33aSEmmanuel Vadot * 381cb7aa33aSEmmanuel Vadot * Reset method via rstcr's global-utilities 382cb7aa33aSEmmanuel Vadot * (the preferred one) has priority level 128, 383cb7aa33aSEmmanuel Vadot * watchdog has priority level 0 and default 384cb7aa33aSEmmanuel Vadot * syscon-reboot priority level is 192. 385cb7aa33aSEmmanuel Vadot * 386cb7aa33aSEmmanuel Vadot * So define syscon-reboot with custom priority 387cb7aa33aSEmmanuel Vadot * level 64 (between rstcr and watchdog) because 388cb7aa33aSEmmanuel Vadot * rstcr should stay as default preferred reset 389cb7aa33aSEmmanuel Vadot * method and reset via watchdog is more broken 390cb7aa33aSEmmanuel Vadot * than system reset via syscon. 391cb7aa33aSEmmanuel Vadot */ 392b97ee269SEmmanuel Vadot compatible = "syscon-reboot"; 393b97ee269SEmmanuel Vadot reg = <0x0d 0x01>; 394b97ee269SEmmanuel Vadot offset = <0x0d>; 395b97ee269SEmmanuel Vadot mask = <0x01>; 396b97ee269SEmmanuel Vadot value = <0x01>; 397cb7aa33aSEmmanuel Vadot priority = <64>; 398b97ee269SEmmanuel Vadot }; 399b97ee269SEmmanuel Vadot 400b97ee269SEmmanuel Vadot led-controller@13 { 401b97ee269SEmmanuel Vadot /* 402b97ee269SEmmanuel Vadot * LEDs are controlled by CPLD firmware. 403b97ee269SEmmanuel Vadot * All five LAN LEDs share common RGB settings 404b97ee269SEmmanuel Vadot * and so it is not possible to set different 405b97ee269SEmmanuel Vadot * colors on different LAN ports. 406b97ee269SEmmanuel Vadot */ 407b97ee269SEmmanuel Vadot compatible = "cznic,turris1x-leds"; 408b97ee269SEmmanuel Vadot reg = <0x13 0x1d>; 409b97ee269SEmmanuel Vadot #address-cells = <1>; 410b97ee269SEmmanuel Vadot #size-cells = <0>; 411b97ee269SEmmanuel Vadot 412b97ee269SEmmanuel Vadot multi-led@0 { 413b97ee269SEmmanuel Vadot reg = <0x0>; 414b97ee269SEmmanuel Vadot color = <LED_COLOR_ID_RGB>; 415b97ee269SEmmanuel Vadot function = LED_FUNCTION_WAN; 416b97ee269SEmmanuel Vadot }; 417b97ee269SEmmanuel Vadot 418b97ee269SEmmanuel Vadot multi-led@1 { 419b97ee269SEmmanuel Vadot reg = <0x1>; 420b97ee269SEmmanuel Vadot color = <LED_COLOR_ID_RGB>; 421b97ee269SEmmanuel Vadot function = LED_FUNCTION_LAN; 422b97ee269SEmmanuel Vadot function-enumerator = <5>; 423b97ee269SEmmanuel Vadot }; 424b97ee269SEmmanuel Vadot 425b97ee269SEmmanuel Vadot multi-led@2 { 426b97ee269SEmmanuel Vadot reg = <0x2>; 427b97ee269SEmmanuel Vadot color = <LED_COLOR_ID_RGB>; 428b97ee269SEmmanuel Vadot function = LED_FUNCTION_LAN; 429b97ee269SEmmanuel Vadot function-enumerator = <4>; 430b97ee269SEmmanuel Vadot }; 431b97ee269SEmmanuel Vadot 432b97ee269SEmmanuel Vadot multi-led@3 { 433b97ee269SEmmanuel Vadot reg = <0x3>; 434b97ee269SEmmanuel Vadot color = <LED_COLOR_ID_RGB>; 435b97ee269SEmmanuel Vadot function = LED_FUNCTION_LAN; 436b97ee269SEmmanuel Vadot function-enumerator = <3>; 437b97ee269SEmmanuel Vadot }; 438b97ee269SEmmanuel Vadot 439b97ee269SEmmanuel Vadot multi-led@4 { 440b97ee269SEmmanuel Vadot reg = <0x4>; 441b97ee269SEmmanuel Vadot color = <LED_COLOR_ID_RGB>; 442b97ee269SEmmanuel Vadot function = LED_FUNCTION_LAN; 443b97ee269SEmmanuel Vadot function-enumerator = <2>; 444b97ee269SEmmanuel Vadot }; 445b97ee269SEmmanuel Vadot 446b97ee269SEmmanuel Vadot multi-led@5 { 447b97ee269SEmmanuel Vadot reg = <0x5>; 448b97ee269SEmmanuel Vadot color = <LED_COLOR_ID_RGB>; 449b97ee269SEmmanuel Vadot function = LED_FUNCTION_LAN; 450b97ee269SEmmanuel Vadot function-enumerator = <1>; 451b97ee269SEmmanuel Vadot }; 452b97ee269SEmmanuel Vadot 453b97ee269SEmmanuel Vadot multi-led@6 { 454b97ee269SEmmanuel Vadot reg = <0x6>; 455b97ee269SEmmanuel Vadot color = <LED_COLOR_ID_RGB>; 456b97ee269SEmmanuel Vadot function = LED_FUNCTION_WLAN; 457b97ee269SEmmanuel Vadot }; 458b97ee269SEmmanuel Vadot 459b97ee269SEmmanuel Vadot multi-led@7 { 460b97ee269SEmmanuel Vadot reg = <0x7>; 461b97ee269SEmmanuel Vadot color = <LED_COLOR_ID_RGB>; 462b97ee269SEmmanuel Vadot function = LED_FUNCTION_POWER; 463b97ee269SEmmanuel Vadot }; 464b97ee269SEmmanuel Vadot }; 465b97ee269SEmmanuel Vadot }; 466b97ee269SEmmanuel Vadot }; 467b97ee269SEmmanuel Vadot 468b97ee269SEmmanuel Vadot pci2: pcie@ffe08000 { 469b97ee269SEmmanuel Vadot /* 470b97ee269SEmmanuel Vadot * PCIe bus for on-board TUSB7340RKM USB 3.0 xHCI controller. 471b97ee269SEmmanuel Vadot * This xHCI controller is available only on Turris 1.1 boards. 472b97ee269SEmmanuel Vadot * Turris 1.0 boards have nothing connected to this PCIe bus, 473b97ee269SEmmanuel Vadot * so system would see only PCIe Root Port of this PCIe Root 474b97ee269SEmmanuel Vadot * Complex. TUSB7340RKM xHCI controller has four SuperSpeed 475b97ee269SEmmanuel Vadot * channels. Channel 0 is connected to the front USB 3.0 port, 476b97ee269SEmmanuel Vadot * channel 1 (but only USB 2.0 subset) to USB 2.0 pins on mPCIe 477b97ee269SEmmanuel Vadot * slot 1 (CN5), channels 2 and 3 to connector P600. 478b97ee269SEmmanuel Vadot * 479*f126890aSEmmanuel Vadot * P2020 PCIe Root Port does not use PCIe MEM and xHCI controller 480b97ee269SEmmanuel Vadot * uses 64kB + 8kB of PCIe MEM. No PCIe IO is used or required. 481*f126890aSEmmanuel Vadot * So allocate 128kB of PCIe MEM for this PCIe bus. 482b97ee269SEmmanuel Vadot */ 483b97ee269SEmmanuel Vadot reg = <0 0xffe08000 0 0x1000>; 484*f126890aSEmmanuel Vadot ranges = <0x02000000 0x0 0xc0000000 0 0xc0000000 0x0 0x00020000>, /* MEM */ 485b97ee269SEmmanuel Vadot <0x01000000 0x0 0x00000000 0 0xffc20000 0x0 0x00010000>; /* IO */ 486b97ee269SEmmanuel Vadot 487b97ee269SEmmanuel Vadot pcie@0 { 488b97ee269SEmmanuel Vadot ranges; 489b97ee269SEmmanuel Vadot }; 490b97ee269SEmmanuel Vadot }; 491b97ee269SEmmanuel Vadot 492b97ee269SEmmanuel Vadot pci1: pcie@ffe09000 { 493b97ee269SEmmanuel Vadot /* PCIe bus on mPCIe slot 2 (CN6) for expansion mPCIe card */ 494b97ee269SEmmanuel Vadot reg = <0 0xffe09000 0 0x1000>; 495b97ee269SEmmanuel Vadot ranges = <0x02000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000>, /* MEM */ 496b97ee269SEmmanuel Vadot <0x01000000 0x0 0x00000000 0 0xffc10000 0x0 0x00010000>; /* IO */ 497b97ee269SEmmanuel Vadot 498b97ee269SEmmanuel Vadot pcie@0 { 499b97ee269SEmmanuel Vadot ranges; 500b97ee269SEmmanuel Vadot }; 501b97ee269SEmmanuel Vadot }; 502b97ee269SEmmanuel Vadot 503b97ee269SEmmanuel Vadot pci0: pcie@ffe0a000 { 504b97ee269SEmmanuel Vadot /* 505b97ee269SEmmanuel Vadot * PCIe bus on mPCIe slot 1 (CN5) for expansion mPCIe card. 506b97ee269SEmmanuel Vadot * Turris 1.1 boards have in this mPCIe slot additional USB 2.0 507b97ee269SEmmanuel Vadot * pins via channel 1 of TUSB7340RKM xHCI controller and also 508b97ee269SEmmanuel Vadot * additional SIM card slot, both for USB-based WWAN cards. 509b97ee269SEmmanuel Vadot */ 510b97ee269SEmmanuel Vadot reg = <0 0xffe0a000 0 0x1000>; 511b97ee269SEmmanuel Vadot ranges = <0x02000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000>, /* MEM */ 512b97ee269SEmmanuel Vadot <0x01000000 0x0 0x00000000 0 0xffc00000 0x0 0x00010000>; /* IO */ 513b97ee269SEmmanuel Vadot 514b97ee269SEmmanuel Vadot pcie@0 { 515b97ee269SEmmanuel Vadot ranges; 516b97ee269SEmmanuel Vadot }; 517b97ee269SEmmanuel Vadot }; 518b97ee269SEmmanuel Vadot}; 519b97ee269SEmmanuel Vadot 520b97ee269SEmmanuel Vadot/include/ "fsl/p2020si-post.dtsi" 521