1// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) 2/* 3 * Copyright (C) Linaro Ltd 2019 - All Rights Reserved 4 * Author: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> 5 * Copyright (C) 2020 Marek Vasut <marex@denx.de> 6 */ 7 8/* Avenger96 uses DHCOR SoM configured for 1V8 IO operation */ 9#include "stm32mp15xx-dhcor-io1v8.dtsi" 10 11/ { 12 aliases { 13 ethernet0 = ðernet0; 14 mmc0 = &sdmmc1; 15 serial0 = &uart4; 16 serial1 = &uart7; 17 serial2 = &usart2; 18 spi0 = &qspi; 19 }; 20 21 /* XTal Q1 */ 22 cec_clock: clk-cec-fixed { 23 #clock-cells = <0>; 24 compatible = "fixed-clock"; 25 clock-frequency = <24000000>; 26 }; 27 28 chosen { 29 stdout-path = "serial0:115200n8"; 30 }; 31 32 hdmi-out { 33 compatible = "hdmi-connector"; 34 type = "a"; 35 36 port { 37 hdmi_con: endpoint { 38 remote-endpoint = <&adv7513_out>; 39 }; 40 }; 41 }; 42 43 led { 44 compatible = "gpio-leds"; 45 led1 { 46 label = "green:user0"; 47 gpios = <&gpioz 7 GPIO_ACTIVE_HIGH>; 48 linux,default-trigger = "heartbeat"; 49 default-state = "off"; 50 }; 51 52 led2 { 53 label = "green:user1"; 54 gpios = <&gpiof 3 GPIO_ACTIVE_HIGH>; 55 linux,default-trigger = "mmc0"; 56 default-state = "off"; 57 }; 58 59 led3 { 60 label = "green:user2"; 61 gpios = <&gpiog 0 GPIO_ACTIVE_HIGH>; 62 linux,default-trigger = "mmc1"; 63 default-state = "off"; 64 }; 65 66 led4 { 67 label = "green:user3"; 68 gpios = <&gpiog 1 GPIO_ACTIVE_HIGH>; 69 linux,default-trigger = "none"; 70 default-state = "off"; 71 panic-indicator; 72 }; 73 }; 74 75 sd_switch: regulator-sd_switch { 76 compatible = "regulator-gpio"; 77 regulator-name = "sd_switch"; 78 regulator-min-microvolt = <1800000>; 79 regulator-max-microvolt = <2900000>; 80 regulator-type = "voltage"; 81 regulator-always-on; 82 83 gpios = <&gpioi 5 GPIO_ACTIVE_HIGH>; 84 gpios-states = <0>; 85 states = <1800000 0x1>, 86 <2900000 0x0>; 87 }; 88 89 sound { 90 compatible = "audio-graph-card"; 91 label = "STM32MP1-AV96-HDMI"; 92 dais = <&sai2a_port>; 93 status = "okay"; 94 }; 95 96 wlan_pwr: regulator-wlan { 97 compatible = "regulator-fixed"; 98 99 regulator-name = "wl-reg"; 100 regulator-min-microvolt = <3300000>; 101 regulator-max-microvolt = <3300000>; 102 103 gpios = <&gpioz 3 GPIO_ACTIVE_HIGH>; 104 enable-active-high; 105 }; 106}; 107 108&adc { 109 pinctrl-names = "default"; 110 pinctrl-0 = <&adc12_ain_pins_b>; 111 vdd-supply = <&vdd>; 112 vdda-supply = <&vdda>; 113 vref-supply = <&vdda>; 114 status = "okay"; 115 116 adc1: adc@0 { 117 st,adc-channels = <0 1 6>; 118 st,min-sample-time-nsecs = <5000>; 119 status = "okay"; 120 }; 121 122 adc2: adc@100 { 123 st,adc-channels = <0 1 2>; 124 st,min-sample-time-nsecs = <5000>; 125 status = "okay"; 126 }; 127}; 128 129ðernet0 { 130 status = "okay"; 131 pinctrl-0 = <ðernet0_rgmii_pins_c>; 132 pinctrl-1 = <ðernet0_rgmii_sleep_pins_c>; 133 pinctrl-names = "default", "sleep"; 134 phy-mode = "rgmii"; 135 max-speed = <1000>; 136 phy-handle = <&phy0>; 137 138 mdio0 { 139 #address-cells = <1>; 140 #size-cells = <0>; 141 compatible = "snps,dwmac-mdio"; 142 reset-gpios = <&gpioz 2 GPIO_ACTIVE_LOW>; 143 reset-delay-us = <1000>; 144 145 phy0: ethernet-phy@7 { 146 reg = <7>; 147 148 rxc-skew-ps = <1500>; 149 rxdv-skew-ps = <540>; 150 rxd0-skew-ps = <420>; 151 rxd1-skew-ps = <420>; 152 rxd2-skew-ps = <420>; 153 rxd3-skew-ps = <420>; 154 155 txc-skew-ps = <1440>; 156 txen-skew-ps = <540>; 157 txd0-skew-ps = <420>; 158 txd1-skew-ps = <420>; 159 txd2-skew-ps = <420>; 160 txd3-skew-ps = <420>; 161 }; 162 }; 163}; 164 165&i2c1 { /* X6 I2C1 */ 166 pinctrl-names = "default"; 167 pinctrl-0 = <&i2c1_pins_b>; 168 i2c-scl-rising-time-ns = <185>; 169 i2c-scl-falling-time-ns = <20>; 170 status = "okay"; 171 /delete-property/dmas; 172 /delete-property/dma-names; 173}; 174 175&i2c2 { /* X6 I2C2 */ 176 pinctrl-names = "default"; 177 pinctrl-0 = <&i2c2_pins_c>; 178 i2c-scl-rising-time-ns = <185>; 179 i2c-scl-falling-time-ns = <20>; 180 status = "okay"; 181 /delete-property/dmas; 182 /delete-property/dma-names; 183}; 184 185&i2c4 { 186 hdmi-transmitter@3d { 187 compatible = "adi,adv7513"; 188 reg = <0x3d>, <0x4d>, <0x2d>, <0x5d>; 189 reg-names = "main", "edid", "cec", "packet"; 190 clocks = <&cec_clock>; 191 clock-names = "cec"; 192 193 avdd-supply = <&v3v3>; 194 dvdd-supply = <&v3v3>; 195 pvdd-supply = <&v3v3>; 196 dvdd-3v-supply = <&v3v3>; 197 bgvdd-supply = <&v3v3>; 198 199 interrupts = <9 IRQ_TYPE_EDGE_FALLING>; 200 interrupt-parent = <&gpiog>; 201 202 status = "okay"; 203 204 adi,input-depth = <8>; 205 adi,input-colorspace = "rgb"; 206 adi,input-clock = "1x"; 207 208 ports { 209 #address-cells = <1>; 210 #size-cells = <0>; 211 212 port@0 { 213 reg = <0>; 214 adv7513_in: endpoint { 215 remote-endpoint = <<dc_ep0_out>; 216 }; 217 }; 218 219 port@1 { 220 reg = <1>; 221 adv7513_out: endpoint { 222 remote-endpoint = <&hdmi_con>; 223 }; 224 }; 225 226 port@2 { 227 reg = <2>; 228 adv7513_i2s0: endpoint { 229 remote-endpoint = <&sai2a_endpoint>; 230 }; 231 }; 232 }; 233 }; 234}; 235 236<dc { 237 pinctrl-names = "default", "sleep"; 238 pinctrl-0 = <<dc_pins_d>; 239 pinctrl-1 = <<dc_sleep_pins_d>; 240 status = "okay"; 241 242 port { 243 #address-cells = <1>; 244 #size-cells = <0>; 245 246 ltdc_ep0_out: endpoint@0 { 247 reg = <0>; 248 remote-endpoint = <&adv7513_in>; 249 }; 250 }; 251}; 252 253&sai2 { 254 clocks = <&rcc SAI2>, <&rcc PLL3_Q>, <&rcc PLL3_R>; 255 pinctrl-names = "default", "sleep"; 256 pinctrl-0 = <&sai2a_pins_c>; 257 pinctrl-1 = <&sai2a_sleep_pins_c>; 258 clock-names = "pclk", "x8k", "x11k"; 259 status = "okay"; 260 261 sai2a: audio-controller@4400b004 { 262 #clock-cells = <0>; 263 dma-names = "tx"; 264 clocks = <&rcc SAI2_K>; 265 clock-names = "sai_ck"; 266 status = "okay"; 267 268 sai2a_port: port { 269 sai2a_endpoint: endpoint { 270 remote-endpoint = <&adv7513_i2s0>; 271 format = "i2s"; 272 mclk-fs = <256>; 273 }; 274 }; 275 }; 276}; 277 278&sdmmc1 { 279 pinctrl-names = "default", "opendrain", "sleep"; 280 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_dir_pins_b>; 281 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_dir_pins_b>; 282 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a &sdmmc1_dir_sleep_pins_b>; 283 cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 284 disable-wp; 285 st,sig-dir; 286 st,neg-edge; 287 st,use-ckin; 288 bus-width = <4>; 289 vmmc-supply = <&vdd_sd>; 290 vqmmc-supply = <&sd_switch>; 291 status = "okay"; 292}; 293 294&sdmmc2 { 295 pinctrl-names = "default", "opendrain", "sleep"; 296 pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_c>; 297 pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_c>; 298 pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_c>; 299 bus-width = <8>; 300 mmc-ddr-1_8v; 301 no-sd; 302 no-sdio; 303 non-removable; 304 st,neg-edge; 305 vmmc-supply = <&v3v3>; 306 vqmmc-supply = <&vdd_io>; 307 status = "okay"; 308}; 309 310&sdmmc3 { 311 pinctrl-names = "default", "opendrain", "sleep"; 312 pinctrl-0 = <&sdmmc3_b4_pins_b>; 313 pinctrl-1 = <&sdmmc3_b4_od_pins_b>; 314 pinctrl-2 = <&sdmmc3_b4_sleep_pins_b>; 315 broken-cd; 316 non-removable; 317 st,neg-edge; 318 bus-width = <4>; 319 vmmc-supply = <&wlan_pwr>; 320 status = "okay"; 321 322 #address-cells = <1>; 323 #size-cells = <0>; 324 brcmf: bcrmf@1 { 325 reg = <1>; 326 compatible = "brcm,bcm4329-fmac"; 327 }; 328}; 329 330&spi2 { 331 pinctrl-names = "default"; 332 pinctrl-0 = <&spi2_pins_a>; 333 cs-gpios = <&gpioi 0 0>; 334 status = "disabled"; 335 /delete-property/dmas; 336 /delete-property/dma-names; 337}; 338 339&uart4 { 340 /* On Low speed expansion header */ 341 label = "LS-UART1"; 342 pinctrl-names = "default"; 343 pinctrl-0 = <&uart4_pins_b>; 344 status = "okay"; 345}; 346 347&uart7 { 348 /* On Low speed expansion header */ 349 label = "LS-UART0"; 350 pinctrl-names = "default"; 351 pinctrl-0 = <&uart7_pins_a>; 352 uart-has-rtscts; 353 status = "okay"; 354}; 355 356/* Bluetooth */ 357&usart2 { 358 pinctrl-names = "default", "sleep"; 359 pinctrl-0 = <&usart2_pins_a>; 360 pinctrl-1 = <&usart2_sleep_pins_a>; 361 st,hw-flow-ctrl; 362 status = "okay"; 363 364 bluetooth { 365 compatible = "brcm,bcm43438-bt"; 366 max-speed = <3000000>; 367 shutdown-gpios = <&gpioz 6 GPIO_ACTIVE_HIGH>; 368 }; 369}; 370 371&usbh_ehci { 372 phys = <&usbphyc_port0>; 373 phy-names = "usb"; 374 status = "okay"; 375}; 376 377&usbotg_hs { 378 pinctrl-0 = <&usbotg_hs_pins_a>; 379 pinctrl-names = "default"; 380 phy-names = "usb2-phy"; 381 phys = <&usbphyc_port1 0>; 382 status = "okay"; 383 vbus-supply = <&vbus_otg>; 384}; 385 386&usbphyc { 387 status = "okay"; 388}; 389 390&usbphyc_port0 { 391 phy-supply = <&vdd_usb>; 392 vdda1v1-supply = <®11>; 393 vdda1v8-supply = <®18>; 394}; 395 396&usbphyc_port1 { 397 phy-supply = <&vdd_usb>; 398 vdda1v1-supply = <®11>; 399 vdda1v8-supply = <®18>; 400}; 401