Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ or X11 |
| 2 | /* |
| 3 | * Device Tree file for CZ.NIC Turris Mox Board |
| 4 | * 2018 by Marek Behun <marek.behun@nic.cz> |
| 5 | * |
| 6 | * Based on armada-3720-espressobin.dts by: |
| 7 | * Gregory CLEMENT <gregory.clement@free-electrons.com> |
| 8 | * Konstantin Porotchkin <kostap@marvell.com> |
| 9 | */ |
| 10 | |
| 11 | /dts-v1/; |
| 12 | |
| 13 | #include <dt-bindings/gpio/gpio.h> |
Marek Behún | fe254c4 | 2021-06-07 16:34:46 +0200 | [diff] [blame] | 14 | #include <dt-bindings/input/input.h> |
| 15 | #include <dt-bindings/leds/common.h> |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 16 | #include "armada-372x.dtsi" |
| 17 | |
| 18 | / { |
| 19 | model = "CZ.NIC Turris Mox Board"; |
| 20 | compatible = "cznic,turris-mox", "marvell,armada3720", |
| 21 | "marvell,armada3710"; |
| 22 | |
| 23 | chosen { |
| 24 | stdout-path = "serial0:115200n8"; |
| 25 | }; |
| 26 | |
| 27 | aliases { |
| 28 | ethernet0 = ð0; |
Marek Behún | 4feafb2 | 2018-12-17 16:10:04 +0100 | [diff] [blame] | 29 | ethernet1 = ð1; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 30 | i2c0 = &i2c0; |
| 31 | spi0 = &spi0; |
| 32 | }; |
| 33 | |
| 34 | memory { |
| 35 | device_type = "memory"; |
| 36 | reg = <0x00000000 0x00000000 0x00000000 0x20000000>; |
| 37 | }; |
| 38 | |
Marek Behún | fe254c4 | 2021-06-07 16:34:46 +0200 | [diff] [blame] | 39 | leds { |
| 40 | compatible = "gpio-leds"; |
| 41 | |
| 42 | led { |
| 43 | gpios = <&gpiosb 21 GPIO_ACTIVE_LOW>; |
| 44 | color = <LED_COLOR_ID_RED>; |
| 45 | function = LED_FUNCTION_ACTIVITY; |
| 46 | }; |
| 47 | }; |
| 48 | |
| 49 | gpio-keys { |
| 50 | compatible = "gpio-keys"; |
| 51 | |
| 52 | reset { |
| 53 | compatible = "gpio-keys"; |
| 54 | label = "reset"; |
| 55 | linux,code = <KEY_RESTART>; |
| 56 | gpios = <&gpiosb 20 GPIO_ACTIVE_LOW>; |
| 57 | debounce-interval = <60>; |
| 58 | }; |
| 59 | }; |
| 60 | |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 61 | reg_usb3_vbus: usb3_vbus@0 { |
| 62 | compatible = "regulator-fixed"; |
| 63 | regulator-name = "usb3-vbus"; |
| 64 | regulator-min-microvolt = <5000000>; |
| 65 | regulator-max-microvolt = <5000000>; |
Marek Behún | 4feafb2 | 2018-12-17 16:10:04 +0100 | [diff] [blame] | 66 | startup-delay-us = <2000000>; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 67 | shutdown-delay-us = <1000000>; |
| 68 | gpio = <&gpiosb 0 GPIO_ACTIVE_HIGH>; |
Marek Behún | de13b61 | 2020-04-08 12:02:06 +0200 | [diff] [blame] | 69 | enable-active-high; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 70 | regulator-boot-on; |
| 71 | }; |
| 72 | |
Marek Behún | b78519b | 2020-04-08 12:02:04 +0200 | [diff] [blame] | 73 | vsdc_reg: vsdc-reg { |
| 74 | compatible = "regulator-gpio"; |
| 75 | regulator-name = "vsdc"; |
| 76 | regulator-min-microvolt = <1800000>; |
| 77 | regulator-max-microvolt = <3300000>; |
| 78 | regulator-boot-on; |
| 79 | |
| 80 | gpios = <&gpiosb 23 GPIO_ACTIVE_HIGH>; |
| 81 | gpios-states = <0>; |
| 82 | states = <1800000 0x1 |
| 83 | 3300000 0x0>; |
| 84 | enable-active-high; |
| 85 | }; |
| 86 | |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 87 | mdio { |
Marek Behún | 4feafb2 | 2018-12-17 16:10:04 +0100 | [diff] [blame] | 88 | #address-cells = <1>; |
| 89 | #size-cells = <0>; |
| 90 | |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 91 | eth_phy1: ethernet-phy@1 { |
| 92 | reg = <1>; |
| 93 | }; |
| 94 | }; |
| 95 | }; |
| 96 | |
| 97 | &comphy { |
| 98 | max-lanes = <3>; |
| 99 | phy0 { |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 100 | phy-type = <COMPHY_TYPE_SGMII1>; |
| 101 | phy-speed = <COMPHY_SPEED_3_125G>; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 102 | }; |
| 103 | |
| 104 | phy1 { |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 105 | phy-type = <COMPHY_TYPE_PEX0>; |
| 106 | phy-speed = <COMPHY_SPEED_5G>; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 107 | }; |
| 108 | |
| 109 | phy2 { |
Igal Liberman | ffd5d2f | 2017-04-26 15:40:00 +0300 | [diff] [blame] | 110 | phy-type = <COMPHY_TYPE_USB3_HOST0>; |
| 111 | phy-speed = <COMPHY_SPEED_5G>; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 112 | }; |
| 113 | }; |
| 114 | |
| 115 | ð0 { |
| 116 | status = "okay"; |
| 117 | pinctrl-names = "default"; |
| 118 | pinctrl-0 = <&rgmii_pins>, <&smi_pins>; |
| 119 | phy-mode = "rgmii"; |
| 120 | phy = <ð_phy1>; |
| 121 | }; |
| 122 | |
| 123 | &i2c0 { |
| 124 | pinctrl-names = "default"; |
| 125 | pinctrl-0 = <&i2c1_pins>; |
| 126 | status = "okay"; |
Stefan Roese | 50ec50c | 2020-08-10 10:16:56 +0200 | [diff] [blame] | 127 | #address-cells = <1>; |
| 128 | #size-cells = <0>; |
Marek Behún | 4feafb2 | 2018-12-17 16:10:04 +0100 | [diff] [blame] | 129 | |
| 130 | rtc@6f { |
| 131 | compatible = "microchip,mcp7941x"; |
| 132 | reg = <0x6f>; |
| 133 | }; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 134 | }; |
| 135 | |
| 136 | &sdhci1 { |
Marek Behún | b78519b | 2020-04-08 12:02:04 +0200 | [diff] [blame] | 137 | wp-inverted; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 138 | bus-width = <4>; |
Marek Behún | b78519b | 2020-04-08 12:02:04 +0200 | [diff] [blame] | 139 | cd-gpios = <&gpionb 10 GPIO_ACTIVE_HIGH>; |
| 140 | vqmmc-supply = <&vsdc_reg>; |
| 141 | marvell,pad-type = "sd"; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 142 | status = "okay"; |
| 143 | }; |
| 144 | |
| 145 | &pinctrl_nb { |
| 146 | spi_cs1_pins: spi-cs1-pins { |
| 147 | groups = "spi_cs1"; |
| 148 | function = "spi"; |
| 149 | }; |
| 150 | }; |
| 151 | |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 152 | &spi0 { |
| 153 | status = "okay"; |
| 154 | pinctrl-names = "default"; |
| 155 | pinctrl-0 = <&spi_cs1_pins>; |
Marek Behún | f94ec8a | 2018-08-17 12:59:01 +0200 | [diff] [blame] | 156 | assigned-clocks = <&nb_periph_clk 7>; |
| 157 | assigned-clock-parents = <&tbg 1>; |
| 158 | assigned-clock-rates = <20000000>; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 159 | |
| 160 | spi-flash@0 { |
| 161 | #address-cells = <1>; |
| 162 | #size-cells = <1>; |
Neil Armstrong | a009fa7 | 2019-02-10 10:16:20 +0000 | [diff] [blame] | 163 | compatible = "st,s25fl064l", "jedec,spi-nor"; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 164 | reg = <0>; |
| 165 | spi-max-frequency = <20000000>; |
| 166 | m25p,fast-read; |
Marek Behún | 59b50af | 2021-06-07 16:34:50 +0200 | [diff] [blame] | 167 | |
| 168 | partitions { |
| 169 | compatible = "fixed-partitions"; |
| 170 | #address-cells = <1>; |
| 171 | #size-cells = <1>; |
| 172 | |
| 173 | partition@0 { |
| 174 | label = "secure-firmware"; |
| 175 | reg = <0x0 0x20000>; |
| 176 | }; |
| 177 | |
| 178 | partition@20000 { |
| 179 | label = "a53-firmware"; |
| 180 | reg = <0x20000 0x160000>; |
| 181 | }; |
| 182 | |
| 183 | partition@180000 { |
| 184 | label = "u-boot-env"; |
| 185 | reg = <0x180000 0x10000>; |
| 186 | }; |
| 187 | |
| 188 | partition@190000 { |
| 189 | label = "Rescue system"; |
| 190 | reg = <0x190000 0x660000>; |
| 191 | }; |
| 192 | |
| 193 | partition@7f0000 { |
| 194 | label = "dtb"; |
| 195 | reg = <0x7f0000 0x10000>; |
| 196 | }; |
| 197 | }; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 198 | }; |
Marek Behún | 35b3513 | 2018-12-17 16:10:03 +0100 | [diff] [blame] | 199 | |
| 200 | moxtet@1 { |
| 201 | #address-cells = <1>; |
| 202 | #size-cells = <0>; |
| 203 | compatible = "cznic,moxtet"; |
| 204 | reg = <1>; |
| 205 | reset-gpios = <&gpiosb 2 GPIO_ACTIVE_LOW>; |
| 206 | spi-max-frequency = <1000000>; |
| 207 | spi-cpol; |
| 208 | spi-cpha; |
| 209 | }; |
Marek Behún | f835bed | 2018-04-24 17:21:31 +0200 | [diff] [blame] | 210 | }; |
| 211 | |
| 212 | &uart0 { |
| 213 | pinctrl-names = "default"; |
| 214 | pinctrl-0 = <&uart1_pins>; |
| 215 | status = "okay"; |
| 216 | }; |
| 217 | |
| 218 | &usb2 { |
| 219 | status = "okay"; |
| 220 | }; |
| 221 | |
| 222 | &usb3 { |
| 223 | vbus-supply = <®_usb3_vbus>; |
| 224 | status = "okay"; |
| 225 | }; |
Marek Behún | 9602a8c | 2018-08-21 12:22:09 +0200 | [diff] [blame] | 226 | |
| 227 | &pcie0 { |
| 228 | pinctrl-names = "default"; |
| 229 | pinctrl-0 = <&pcie_pins>; |
Pali Rohár | 0130a61 | 2020-08-19 15:57:06 +0200 | [diff] [blame] | 230 | reset-gpios = <&gpiosb 3 GPIO_ACTIVE_LOW>; |
Marek Behún | 9602a8c | 2018-08-21 12:22:09 +0200 | [diff] [blame] | 231 | status = "disabled"; |
| 232 | }; |