1c2502e7bSMarek Behún/* 2c2502e7bSMarek Behún * Device Tree file for the Turris Omnia 3c2502e7bSMarek Behún * 4c2502e7bSMarek Behún * Copyright (C) 2016 Uwe Kleine-König <uwe@kleine-koenig.org> 5c2502e7bSMarek Behún * Copyright (C) 2016 Tomas Hlavacek <tmshlvkc@gmail.com> 6c2502e7bSMarek Behún * 7c2502e7bSMarek Behún * This file is dual-licensed: you can use it either under the terms 8c2502e7bSMarek Behún * of the GPL or the X11 license, at your option. Note that this dual 9c2502e7bSMarek Behún * licensing only applies to this file, and not this project as a 10c2502e7bSMarek Behún * whole. 11c2502e7bSMarek Behún * 12c2502e7bSMarek Behún * a) This file is licensed under the terms of the GNU General Public 13c2502e7bSMarek Behún * License version 2. This program is licensed "as is" without 14c2502e7bSMarek Behún * any warranty of any kind, whether express or implied. 15c2502e7bSMarek Behún * 16c2502e7bSMarek Behún * Or, alternatively, 17c2502e7bSMarek Behún * 18c2502e7bSMarek Behún * b) Permission is hereby granted, free of charge, to any person 19c2502e7bSMarek Behún * obtaining a copy of this software and associated documentation 20c2502e7bSMarek Behún * files (the "Software"), to deal in the Software without 21c2502e7bSMarek Behún * restriction, including without limitation the rights to use, 22c2502e7bSMarek Behún * copy, modify, merge, publish, distribute, sublicense, and/or 23c2502e7bSMarek Behún * sell copies of the Software, and to permit persons to whom the 24c2502e7bSMarek Behún * Software is furnished to do so, subject to the following 25c2502e7bSMarek Behún * conditions: 26c2502e7bSMarek Behún * 27c2502e7bSMarek Behún * The above copyright notice and this permission notice shall be 28c2502e7bSMarek Behún * included in all copies or substantial portions of the Software. 29c2502e7bSMarek Behún * 30c2502e7bSMarek Behún * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 31c2502e7bSMarek Behún * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 32c2502e7bSMarek Behún * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 33c2502e7bSMarek Behún * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 34c2502e7bSMarek Behún * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 35c2502e7bSMarek Behún * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 36c2502e7bSMarek Behún * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 37c2502e7bSMarek Behún * OTHER DEALINGS IN THE SOFTWARE. 38c2502e7bSMarek Behún */ 39c2502e7bSMarek Behún 40c2502e7bSMarek Behún/* 41c2502e7bSMarek Behún * Schematic available at https://www.turris.cz/doc/_media/rtrom01-schema.pdf 42c2502e7bSMarek Behún */ 43c2502e7bSMarek Behún 44c2502e7bSMarek Behún/dts-v1/; 45c2502e7bSMarek Behún 46c2502e7bSMarek Behún#include <dt-bindings/gpio/gpio.h> 47c2502e7bSMarek Behún#include <dt-bindings/input/input.h> 48c2502e7bSMarek Behún#include "armada-385.dtsi" 49c2502e7bSMarek Behún 50c2502e7bSMarek Behún/ { 51c2502e7bSMarek Behún model = "Turris Omnia"; 52c2502e7bSMarek Behún compatible = "cznic,turris-omnia", "marvell,armada385", "marvell,armada380"; 53c2502e7bSMarek Behún 54c2502e7bSMarek Behún chosen { 55c2502e7bSMarek Behún stdout-path = &uart0; 56c2502e7bSMarek Behún }; 57c2502e7bSMarek Behún 58c2502e7bSMarek Behún memory { 59c2502e7bSMarek Behún device_type = "memory"; 60c2502e7bSMarek Behún reg = <0x00000000 0x40000000>; /* 1024 MB */ 61c2502e7bSMarek Behún }; 62c2502e7bSMarek Behún 63c2502e7bSMarek Behún soc { 64c2502e7bSMarek Behún ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 65c2502e7bSMarek Behún MBUS_ID(0x01, 0x1d) 0 0xfff00000 0x100000 66c2502e7bSMarek Behún MBUS_ID(0x09, 0x19) 0 0xf1100000 0x10000 67c2502e7bSMarek Behún MBUS_ID(0x09, 0x15) 0 0xf1110000 0x10000>; 68c2502e7bSMarek Behún 69c2502e7bSMarek Behún internal-regs { 70c2502e7bSMarek Behún 71c2502e7bSMarek Behún /* USB part of the PCIe2/USB 2.0 port */ 72c2502e7bSMarek Behún usb@58000 { 73c2502e7bSMarek Behún status = "okay"; 74c2502e7bSMarek Behún }; 75c2502e7bSMarek Behún 76c2502e7bSMarek Behún sata@a8000 { 77c2502e7bSMarek Behún status = "okay"; 78c2502e7bSMarek Behún }; 79c2502e7bSMarek Behún 80c2502e7bSMarek Behún sdhci@d8000 { 81c2502e7bSMarek Behún pinctrl-names = "default"; 82c2502e7bSMarek Behún pinctrl-0 = <&sdhci_pins>; 83c2502e7bSMarek Behún status = "okay"; 84c2502e7bSMarek Behún 85c2502e7bSMarek Behún bus-width = <8>; 86c2502e7bSMarek Behún no-1-8-v; 87c2502e7bSMarek Behún non-removable; 88c2502e7bSMarek Behún }; 89c2502e7bSMarek Behún 90c2502e7bSMarek Behún usb3@f0000 { 91c2502e7bSMarek Behún status = "okay"; 92c2502e7bSMarek Behún }; 93c2502e7bSMarek Behún 94c2502e7bSMarek Behún usb3@f8000 { 95c2502e7bSMarek Behún status = "okay"; 96c2502e7bSMarek Behún }; 97c2502e7bSMarek Behún }; 98c2502e7bSMarek Behún 99*825dd50fSChris Packham pcie { 100c2502e7bSMarek Behún status = "okay"; 101c2502e7bSMarek Behún 102c2502e7bSMarek Behún pcie@1,0 { 103c2502e7bSMarek Behún /* Port 0, Lane 0 */ 104c2502e7bSMarek Behún status = "okay"; 105c2502e7bSMarek Behún }; 106c2502e7bSMarek Behún 107c2502e7bSMarek Behún pcie@2,0 { 108c2502e7bSMarek Behún /* Port 1, Lane 0 */ 109c2502e7bSMarek Behún status = "okay"; 110c2502e7bSMarek Behún }; 111c2502e7bSMarek Behún 112c2502e7bSMarek Behún pcie@3,0 { 113c2502e7bSMarek Behún /* Port 2, Lane 0 */ 114c2502e7bSMarek Behún status = "okay"; 115c2502e7bSMarek Behún }; 116c2502e7bSMarek Behún }; 117c2502e7bSMarek Behún }; 118c2502e7bSMarek Behún}; 119c2502e7bSMarek Behún 120c2502e7bSMarek Behún/* Connected to 88E6176 switch, port 6 */ 121c2502e7bSMarek Behúnð0 { 122c2502e7bSMarek Behún pinctrl-names = "default"; 123c2502e7bSMarek Behún pinctrl-0 = <&ge0_rgmii_pins>; 124c2502e7bSMarek Behún status = "okay"; 125c2502e7bSMarek Behún phy-mode = "rgmii"; 126c2502e7bSMarek Behún 127c2502e7bSMarek Behún fixed-link { 128c2502e7bSMarek Behún speed = <1000>; 129c2502e7bSMarek Behún full-duplex; 130c2502e7bSMarek Behún }; 131c2502e7bSMarek Behún}; 132c2502e7bSMarek Behún 133c2502e7bSMarek Behún/* Connected to 88E6176 switch, port 5 */ 134c2502e7bSMarek Behúnð1 { 135c2502e7bSMarek Behún pinctrl-names = "default"; 136c2502e7bSMarek Behún pinctrl-0 = <&ge1_rgmii_pins>; 137c2502e7bSMarek Behún status = "okay"; 138c2502e7bSMarek Behún phy-mode = "rgmii"; 139c2502e7bSMarek Behún 140c2502e7bSMarek Behún fixed-link { 141c2502e7bSMarek Behún speed = <1000>; 142c2502e7bSMarek Behún full-duplex; 143c2502e7bSMarek Behún }; 144c2502e7bSMarek Behún}; 145c2502e7bSMarek Behún 146c2502e7bSMarek Behún/* WAN port */ 147c2502e7bSMarek Behúnð2 { 148c2502e7bSMarek Behún status = "okay"; 149c2502e7bSMarek Behún phy-mode = "sgmii"; 150c2502e7bSMarek Behún phy = <&phy1>; 151c2502e7bSMarek Behún}; 152c2502e7bSMarek Behún 153c2502e7bSMarek Behún&i2c0 { 154c2502e7bSMarek Behún pinctrl-names = "default"; 155c2502e7bSMarek Behún pinctrl-0 = <&i2c0_pins>; 156c2502e7bSMarek Behún status = "okay"; 157c2502e7bSMarek Behún 158c2502e7bSMarek Behún i2cmux@70 { 159c2502e7bSMarek Behún compatible = "nxp,pca9547"; 160c2502e7bSMarek Behún #address-cells = <1>; 161c2502e7bSMarek Behún #size-cells = <0>; 162c2502e7bSMarek Behún reg = <0x70>; 163c2502e7bSMarek Behún status = "okay"; 164c2502e7bSMarek Behún 165c2502e7bSMarek Behún i2c@0 { 166c2502e7bSMarek Behún #address-cells = <1>; 167c2502e7bSMarek Behún #size-cells = <0>; 168c2502e7bSMarek Behún reg = <0>; 169c2502e7bSMarek Behún 170c2502e7bSMarek Behún /* STM32F0 command interface at address 0x2a */ 171c2502e7bSMarek Behún /* leds device (in STM32F0) at address 0x2b */ 172c2502e7bSMarek Behún 173c2502e7bSMarek Behún eeprom@54 { 174c2502e7bSMarek Behún compatible = "at,24c64"; 175c2502e7bSMarek Behún reg = <0x54>; 176c2502e7bSMarek Behún 177c2502e7bSMarek Behún /* The EEPROM contains data for bootloader. 178c2502e7bSMarek Behún * Contents: 179c2502e7bSMarek Behún * struct omnia_eeprom { 180c2502e7bSMarek Behún * u32 magic; (=0x0341a034 in LE) 181c2502e7bSMarek Behún * u32 ramsize; (in GiB) 182c2502e7bSMarek Behún * char regdomain[4]; 183c2502e7bSMarek Behún * u32 crc32; 184c2502e7bSMarek Behún * }; 185c2502e7bSMarek Behún */ 186c2502e7bSMarek Behún }; 187c2502e7bSMarek Behún }; 188c2502e7bSMarek Behún 189c2502e7bSMarek Behún i2c@1 { 190c2502e7bSMarek Behún #address-cells = <1>; 191c2502e7bSMarek Behún #size-cells = <0>; 192c2502e7bSMarek Behún reg = <1>; 193c2502e7bSMarek Behún 194c2502e7bSMarek Behún /* routed to PCIe0/mSATA connector (CN7A) */ 195c2502e7bSMarek Behún }; 196c2502e7bSMarek Behún 197c2502e7bSMarek Behún i2c@2 { 198c2502e7bSMarek Behún #address-cells = <1>; 199c2502e7bSMarek Behún #size-cells = <0>; 200c2502e7bSMarek Behún reg = <2>; 201c2502e7bSMarek Behún 202c2502e7bSMarek Behún /* routed to PCIe1/USB2 connector (CN61A) */ 203c2502e7bSMarek Behún }; 204c2502e7bSMarek Behún 205c2502e7bSMarek Behún i2c@3 { 206c2502e7bSMarek Behún #address-cells = <1>; 207c2502e7bSMarek Behún #size-cells = <0>; 208c2502e7bSMarek Behún reg = <3>; 209c2502e7bSMarek Behún 210c2502e7bSMarek Behún /* routed to PCIe2 connector (CN62A) */ 211c2502e7bSMarek Behún }; 212c2502e7bSMarek Behún 213c2502e7bSMarek Behún i2c@4 { 214c2502e7bSMarek Behún #address-cells = <1>; 215c2502e7bSMarek Behún #size-cells = <0>; 216c2502e7bSMarek Behún reg = <4>; 217c2502e7bSMarek Behún 218c2502e7bSMarek Behún /* routed to SFP+ */ 219c2502e7bSMarek Behún }; 220c2502e7bSMarek Behún 221c2502e7bSMarek Behún i2c@5 { 222c2502e7bSMarek Behún #address-cells = <1>; 223c2502e7bSMarek Behún #size-cells = <0>; 224c2502e7bSMarek Behún reg = <5>; 225c2502e7bSMarek Behún 226c2502e7bSMarek Behún /* ATSHA204A at address 0x64 */ 227c2502e7bSMarek Behún }; 228c2502e7bSMarek Behún 229c2502e7bSMarek Behún i2c@6 { 230c2502e7bSMarek Behún #address-cells = <1>; 231c2502e7bSMarek Behún #size-cells = <0>; 232c2502e7bSMarek Behún reg = <6>; 233c2502e7bSMarek Behún 234c2502e7bSMarek Behún /* exposed on pin header */ 235c2502e7bSMarek Behún }; 236c2502e7bSMarek Behún 237c2502e7bSMarek Behún i2c@7 { 238c2502e7bSMarek Behún #address-cells = <1>; 239c2502e7bSMarek Behún #size-cells = <0>; 240c2502e7bSMarek Behún reg = <7>; 241c2502e7bSMarek Behún 242c2502e7bSMarek Behún pcawan: gpio@71 { 243c2502e7bSMarek Behún /* 244c2502e7bSMarek Behún * GPIO expander for SFP+ signals and 245c2502e7bSMarek Behún * and phy irq 246c2502e7bSMarek Behún */ 247c2502e7bSMarek Behún compatible = "nxp,pca9538"; 248c2502e7bSMarek Behún reg = <0x71>; 249c2502e7bSMarek Behún 250c2502e7bSMarek Behún pinctrl-names = "default"; 251c2502e7bSMarek Behún pinctrl-0 = <&pcawan_pins>; 252c2502e7bSMarek Behún 253c2502e7bSMarek Behún interrupt-parent = <&gpio1>; 254c2502e7bSMarek Behún interrupts = <14 IRQ_TYPE_LEVEL_LOW>; 255c2502e7bSMarek Behún 256c2502e7bSMarek Behún gpio-controller; 257c2502e7bSMarek Behún #gpio-cells = <2>; 258c2502e7bSMarek Behún }; 259c2502e7bSMarek Behún }; 260c2502e7bSMarek Behún }; 261c2502e7bSMarek Behún}; 262c2502e7bSMarek Behún 263c2502e7bSMarek Behún&mdio { 264c2502e7bSMarek Behún pinctrl-names = "default"; 265c2502e7bSMarek Behún pinctrl-0 = <&mdio_pins>; 266c2502e7bSMarek Behún status = "okay"; 267c2502e7bSMarek Behún 268c2502e7bSMarek Behún phy1: phy@1 { 269c2502e7bSMarek Behún status = "okay"; 270c2502e7bSMarek Behún compatible = "ethernet-phy-id0141.0DD1", "ethernet-phy-ieee802.3-c22"; 271c2502e7bSMarek Behún reg = <1>; 272c2502e7bSMarek Behún 273c2502e7bSMarek Behún /* irq is connected to &pcawan pin 7 */ 274c2502e7bSMarek Behún }; 275c2502e7bSMarek Behún 276c2502e7bSMarek Behún /* Switch MV88E6176 at address 0x10 */ 277c2502e7bSMarek Behún switch@10 { 278c2502e7bSMarek Behún compatible = "marvell,mv88e6085"; 279c2502e7bSMarek Behún #address-cells = <1>; 280c2502e7bSMarek Behún #size-cells = <0>; 281c2502e7bSMarek Behún dsa,member = <0 0>; 282c2502e7bSMarek Behún 283c2502e7bSMarek Behún reg = <0x10>; 284c2502e7bSMarek Behún 285c2502e7bSMarek Behún ports { 286c2502e7bSMarek Behún #address-cells = <1>; 287c2502e7bSMarek Behún #size-cells = <0>; 288c2502e7bSMarek Behún 289c2502e7bSMarek Behún ports@0 { 290c2502e7bSMarek Behún reg = <0>; 291c2502e7bSMarek Behún label = "lan0"; 292c2502e7bSMarek Behún }; 293c2502e7bSMarek Behún 294c2502e7bSMarek Behún ports@1 { 295c2502e7bSMarek Behún reg = <1>; 296c2502e7bSMarek Behún label = "lan1"; 297c2502e7bSMarek Behún }; 298c2502e7bSMarek Behún 299c2502e7bSMarek Behún ports@2 { 300c2502e7bSMarek Behún reg = <2>; 301c2502e7bSMarek Behún label = "lan2"; 302c2502e7bSMarek Behún }; 303c2502e7bSMarek Behún 304c2502e7bSMarek Behún ports@3 { 305c2502e7bSMarek Behún reg = <3>; 306c2502e7bSMarek Behún label = "lan3"; 307c2502e7bSMarek Behún }; 308c2502e7bSMarek Behún 309c2502e7bSMarek Behún ports@4 { 310c2502e7bSMarek Behún reg = <4>; 311c2502e7bSMarek Behún label = "lan4"; 312c2502e7bSMarek Behún }; 313c2502e7bSMarek Behún 314c2502e7bSMarek Behún ports@5 { 315c2502e7bSMarek Behún reg = <5>; 316c2502e7bSMarek Behún label = "cpu"; 317c2502e7bSMarek Behún ethernet = <ð1>; 318c2502e7bSMarek Behún phy-mode = "rgmii-id"; 319c2502e7bSMarek Behún 320c2502e7bSMarek Behún fixed-link { 321c2502e7bSMarek Behún speed = <1000>; 322c2502e7bSMarek Behún full-duplex; 323c2502e7bSMarek Behún }; 324c2502e7bSMarek Behún }; 325c2502e7bSMarek Behún 326c2502e7bSMarek Behún /* port 6 is connected to eth0 */ 327c2502e7bSMarek Behún }; 328c2502e7bSMarek Behún }; 329c2502e7bSMarek Behún}; 330c2502e7bSMarek Behún 331c2502e7bSMarek Behún&pinctrl { 332c2502e7bSMarek Behún pcawan_pins: pcawan-pins { 333c2502e7bSMarek Behún marvell,pins = "mpp46"; 334c2502e7bSMarek Behún marvell,function = "gpio"; 335c2502e7bSMarek Behún }; 336c2502e7bSMarek Behún 337c2502e7bSMarek Behún spi0cs0_pins: spi0cs0-pins { 338c2502e7bSMarek Behún marvell,pins = "mpp25"; 339c2502e7bSMarek Behún marvell,function = "spi0"; 340c2502e7bSMarek Behún }; 341c2502e7bSMarek Behún 342c2502e7bSMarek Behún spi0cs1_pins: spi0cs1-pins { 343c2502e7bSMarek Behún marvell,pins = "mpp26"; 344c2502e7bSMarek Behún marvell,function = "spi0"; 345c2502e7bSMarek Behún }; 346c2502e7bSMarek Behún}; 347c2502e7bSMarek Behún 348c2502e7bSMarek Behún&spi0 { 349c2502e7bSMarek Behún pinctrl-names = "default"; 350c2502e7bSMarek Behún pinctrl-0 = <&spi0_pins &spi0cs0_pins>; 351c2502e7bSMarek Behún status = "okay"; 352c2502e7bSMarek Behún 353c2502e7bSMarek Behún spi-nor@0 { 354c2502e7bSMarek Behún compatible = "spansion,s25fl164k", "jedec,spi-nor"; 355c2502e7bSMarek Behún #address-cells = <1>; 356c2502e7bSMarek Behún #size-cells = <1>; 357c2502e7bSMarek Behún reg = <0>; 358c2502e7bSMarek Behún spi-max-frequency = <40000000>; 359c2502e7bSMarek Behún 360c2502e7bSMarek Behún partitions { 361c2502e7bSMarek Behún compatible = "fixed-partitions"; 362c2502e7bSMarek Behún #address-cells = <1>; 363c2502e7bSMarek Behún #size-cells = <1>; 364c2502e7bSMarek Behún 365c2502e7bSMarek Behún partition@0 { 366c2502e7bSMarek Behún reg = <0x0 0x00100000>; 367c2502e7bSMarek Behún label = "U-Boot"; 368c2502e7bSMarek Behún }; 369c2502e7bSMarek Behún 370c2502e7bSMarek Behún partition@100000 { 371c2502e7bSMarek Behún reg = <0x00100000 0x00700000>; 372c2502e7bSMarek Behún label = "Rescue system"; 373c2502e7bSMarek Behún }; 374c2502e7bSMarek Behún }; 375c2502e7bSMarek Behún }; 376c2502e7bSMarek Behún 377c2502e7bSMarek Behún /* MISO, MOSI, SCLK and CS1 are routed to pin header CN11 */ 378c2502e7bSMarek Behún}; 379c2502e7bSMarek Behún 380c2502e7bSMarek Behún&uart0 { 381c2502e7bSMarek Behún /* Pin header CN10 */ 382c2502e7bSMarek Behún pinctrl-names = "default"; 383c2502e7bSMarek Behún pinctrl-0 = <&uart0_pins>; 384c2502e7bSMarek Behún status = "okay"; 385c2502e7bSMarek Behún}; 386c2502e7bSMarek Behún 387c2502e7bSMarek Behún&uart1 { 388c2502e7bSMarek Behún /* Pin header CN11 */ 389c2502e7bSMarek Behún pinctrl-names = "default"; 390c2502e7bSMarek Behún pinctrl-0 = <&uart1_pins>; 391c2502e7bSMarek Behún status = "okay"; 392c2502e7bSMarek Behún}; 393