1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 2/* 3 * Copyright (C) STMicroelectronics 2021 - All Rights Reserved 4 * Author: Alexandre Torgue <alexandre.torgue@foss.st.com> for STMicroelectronics. 5 */ 6 7/dts-v1/; 8 9#include <dt-bindings/gpio/gpio.h> 10#include <dt-bindings/input/input.h> 11#include <dt-bindings/leds/common.h> 12#include <dt-bindings/regulator/st,stm32mp13-regulator.h> 13#include "stm32mp135.dtsi" 14#include "stm32mp13xf.dtsi" 15#include "stm32mp13-pinctrl.dtsi" 16 17/ { 18 model = "STMicroelectronics STM32MP135F-DK Discovery Board"; 19 compatible = "st,stm32mp135f-dk", "st,stm32mp135"; 20 21 aliases { 22 serial0 = &uart4; 23 serial1 = &usart1; 24 serial2 = &uart8; 25 serial3 = &usart2; 26 }; 27 28 chosen { 29 stdout-path = "serial0:115200n8"; 30 }; 31 32 memory@c0000000 { 33 device_type = "memory"; 34 reg = <0xc0000000 0x20000000>; 35 }; 36 37 reserved-memory { 38 #address-cells = <1>; 39 #size-cells = <1>; 40 ranges; 41 42 optee@dd000000 { 43 reg = <0xdd000000 0x3000000>; 44 no-map; 45 }; 46 }; 47 48 gpio-keys { 49 compatible = "gpio-keys"; 50 51 button-user { 52 label = "User-PA13"; 53 linux,code = <BTN_1>; 54 gpios = <&gpioa 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 55 }; 56 }; 57 58 leds { 59 compatible = "gpio-leds"; 60 61 led-blue { 62 function = LED_FUNCTION_HEARTBEAT; 63 color = <LED_COLOR_ID_BLUE>; 64 gpios = <&gpioa 14 GPIO_ACTIVE_LOW>; 65 linux,default-trigger = "heartbeat"; 66 default-state = "off"; 67 }; 68 }; 69 70 panel_backlight: panel-backlight { 71 compatible = "gpio-backlight"; 72 gpios = <&gpioe 12 GPIO_ACTIVE_HIGH>; 73 default-on; 74 status = "okay"; 75 }; 76 77 panel_rgb: panel-rgb { 78 compatible = "rocktech,rk043fn48h"; 79 enable-gpios = <&gpioi 7 GPIO_ACTIVE_HIGH>; 80 backlight = <&panel_backlight>; 81 power-supply = <&scmi_v3v3_sw>; 82 status = "okay"; 83 84 width-mm = <105>; 85 height-mm = <67>; 86 87 panel-timing { 88 clock-frequency = <10000000>; 89 hactive = <480>; 90 hback-porch = <43>; 91 hfront-porch = <10>; 92 hsync-len = <1>; 93 hsync-active = <0>; 94 vactive = <272>; 95 vback-porch = <26>; 96 vfront-porch = <4>; 97 vsync-len = <10>; 98 vsync-active = <0>; 99 de-active = <1>; 100 pixelclk-active = <1>; 101 }; 102 103 port { 104 panel_in_rgb: endpoint { 105 remote-endpoint = <<dc_out_rgb>; 106 }; 107 }; 108 }; 109}; 110 111&adc_1 { 112 pinctrl-names = "default"; 113 pinctrl-0 = <&adc1_usb_cc_pins_a>; 114 vdda-supply = <&scmi_vdd_adc>; 115 vref-supply = <&scmi_vdd_adc>; 116 status = "okay"; 117 adc1: adc@0 { 118 status = "okay"; 119 /* 120 * Type-C USB_PWR_CC1 & USB_PWR_CC2 on in6 & in12. 121 * Use at least 5 * RC time, e.g. 5 * (Rp + Rd) * C: 122 * 5 * (5.1 + 47kOhms) * 5pF => 1.3us. 123 * Use arbitrary margin here (e.g. 5us). 124 */ 125 channel@6 { 126 reg = <6>; 127 st,min-sample-time-ns = <5000>; 128 }; 129 channel@12 { 130 reg = <12>; 131 st,min-sample-time-ns = <5000>; 132 }; 133 }; 134}; 135 136&crc1 { 137 status = "okay"; 138}; 139 140&cryp { 141 status = "okay"; 142}; 143 144&i2c1 { 145 pinctrl-names = "default", "sleep"; 146 pinctrl-0 = <&i2c1_pins_a>; 147 pinctrl-1 = <&i2c1_sleep_pins_a>; 148 i2c-scl-rising-time-ns = <96>; 149 i2c-scl-falling-time-ns = <3>; 150 clock-frequency = <1000000>; 151 status = "okay"; 152 /* spare dmas for other usage */ 153 /delete-property/dmas; 154 /delete-property/dma-names; 155 156 mcp23017: pinctrl@21 { 157 compatible = "microchip,mcp23017"; 158 reg = <0x21>; 159 gpio-controller; 160 #gpio-cells = <2>; 161 interrupts = <12 IRQ_TYPE_LEVEL_LOW>; 162 interrupt-parent = <&gpiog>; 163 pinctrl-names = "default"; 164 pinctrl-0 = <&mcp23017_pins_a>; 165 interrupt-controller; 166 #interrupt-cells = <2>; 167 microchip,irq-mirror; 168 }; 169 170 typec@53 { 171 compatible = "st,stm32g0-typec"; 172 reg = <0x53>; 173 /* Alert pin on PI2 */ 174 interrupts = <2 IRQ_TYPE_EDGE_FALLING>; 175 interrupt-parent = <&gpioi>; 176 /* Internal pull-up on PI2 */ 177 pinctrl-names = "default"; 178 pinctrl-0 = <&stm32g0_intn_pins_a>; 179 firmware-name = "stm32g0-ucsi.mp135f-dk.fw"; 180 connector { 181 compatible = "usb-c-connector"; 182 label = "USB-C"; 183 184 port { 185 con_usb_c_g0_ep: endpoint { 186 remote-endpoint = <&usbotg_hs_ep>; 187 }; 188 }; 189 }; 190 }; 191}; 192 193&i2c5 { 194 pinctrl-names = "default", "sleep"; 195 pinctrl-0 = <&i2c5_pins_a>; 196 pinctrl-1 = <&i2c5_sleep_pins_a>; 197 i2c-scl-rising-time-ns = <170>; 198 i2c-scl-falling-time-ns = <5>; 199 clock-frequency = <400000>; 200 status = "okay"; 201 /* spare dmas for other usage */ 202 /delete-property/dmas; 203 /delete-property/dma-names; 204}; 205 206&iwdg2 { 207 timeout-sec = <32>; 208 status = "okay"; 209}; 210 211<dc { 212 pinctrl-names = "default", "sleep"; 213 pinctrl-0 = <<dc_pins_a>; 214 pinctrl-1 = <<dc_sleep_pins_a>; 215 status = "okay"; 216 217 port { 218 ltdc_out_rgb: endpoint { 219 remote-endpoint = <&panel_in_rgb>; 220 }; 221 }; 222}; 223 224&rtc { 225 status = "okay"; 226}; 227 228&scmi_regu { 229 scmi_vdd_adc: regulator@10 { 230 reg = <VOLTD_SCMI_STPMIC1_LDO1>; 231 regulator-name = "vdd_adc"; 232 }; 233 scmi_vdd_usb: regulator@13 { 234 reg = <VOLTD_SCMI_STPMIC1_LDO4>; 235 regulator-name = "vdd_usb"; 236 }; 237 scmi_vdd_sd: regulator@14 { 238 reg = <VOLTD_SCMI_STPMIC1_LDO5>; 239 regulator-name = "vdd_sd"; 240 }; 241 scmi_v1v8_periph: regulator@15 { 242 reg = <VOLTD_SCMI_STPMIC1_LDO6>; 243 regulator-name = "v1v8_periph"; 244 }; 245 scmi_v3v3_sw: regulator@19 { 246 reg = <VOLTD_SCMI_STPMIC1_PWR_SW2>; 247 regulator-name = "v3v3_sw"; 248 }; 249}; 250 251&sdmmc1 { 252 pinctrl-names = "default", "opendrain", "sleep"; 253 pinctrl-0 = <&sdmmc1_b4_pins_a &sdmmc1_clk_pins_a>; 254 pinctrl-1 = <&sdmmc1_b4_od_pins_a &sdmmc1_clk_pins_a>; 255 pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>; 256 cd-gpios = <&gpioh 4 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>; 257 disable-wp; 258 st,neg-edge; 259 bus-width = <4>; 260 vmmc-supply = <&scmi_vdd_sd>; 261 status = "okay"; 262}; 263 264&spi5 { 265 pinctrl-names = "default", "sleep"; 266 pinctrl-0 = <&spi5_pins_a>; 267 pinctrl-1 = <&spi5_sleep_pins_a>; 268 status = "disabled"; 269}; 270 271&timers3 { 272 /delete-property/dmas; 273 /delete-property/dma-names; 274 status = "disabled"; 275 pwm { 276 pinctrl-0 = <&pwm3_pins_a>; 277 pinctrl-1 = <&pwm3_sleep_pins_a>; 278 pinctrl-names = "default", "sleep"; 279 status = "okay"; 280 }; 281 timer@2 { 282 status = "okay"; 283 }; 284}; 285 286&timers4 { 287 /delete-property/dmas; 288 /delete-property/dma-names; 289 status = "disabled"; 290 pwm { 291 pinctrl-0 = <&pwm4_pins_a>; 292 pinctrl-1 = <&pwm4_sleep_pins_a>; 293 pinctrl-names = "default", "sleep"; 294 status = "okay"; 295 }; 296 timer@3 { 297 status = "okay"; 298 }; 299}; 300 301&timers8 { 302 /delete-property/dmas; 303 /delete-property/dma-names; 304 status = "disabled"; 305 pwm { 306 pinctrl-0 = <&pwm8_pins_a>; 307 pinctrl-1 = <&pwm8_sleep_pins_a>; 308 pinctrl-names = "default", "sleep"; 309 status = "okay"; 310 }; 311 timer@7 { 312 status = "okay"; 313 }; 314}; 315 316&timers14 { 317 status = "disabled"; 318 pwm { 319 pinctrl-0 = <&pwm14_pins_a>; 320 pinctrl-1 = <&pwm14_sleep_pins_a>; 321 pinctrl-names = "default", "sleep"; 322 status = "okay"; 323 }; 324 timer@13 { 325 status = "okay"; 326 }; 327}; 328 329&uart4 { 330 pinctrl-names = "default", "sleep", "idle"; 331 pinctrl-0 = <&uart4_pins_a>; 332 pinctrl-1 = <&uart4_sleep_pins_a>; 333 pinctrl-2 = <&uart4_idle_pins_a>; 334 /delete-property/dmas; 335 /delete-property/dma-names; 336 status = "okay"; 337}; 338 339&uart8 { 340 pinctrl-names = "default", "sleep", "idle"; 341 pinctrl-0 = <&uart8_pins_a>; 342 pinctrl-1 = <&uart8_sleep_pins_a>; 343 pinctrl-2 = <&uart8_idle_pins_a>; 344 /delete-property/dmas; 345 /delete-property/dma-names; 346 status = "disabled"; 347}; 348 349&usart1 { 350 pinctrl-names = "default", "sleep", "idle"; 351 pinctrl-0 = <&usart1_pins_a>; 352 pinctrl-1 = <&usart1_sleep_pins_a>; 353 pinctrl-2 = <&usart1_idle_pins_a>; 354 uart-has-rtscts; 355 status = "disabled"; 356}; 357 358/* Bluetooth */ 359&usart2 { 360 pinctrl-names = "default", "sleep", "idle"; 361 pinctrl-0 = <&usart2_pins_a>; 362 pinctrl-1 = <&usart2_sleep_pins_a>; 363 pinctrl-2 = <&usart2_idle_pins_a>; 364 uart-has-rtscts; 365 status = "okay"; 366}; 367 368&usbh_ehci { 369 phys = <&usbphyc_port0>; 370 status = "okay"; 371 #address-cells = <1>; 372 #size-cells = <0>; 373 /* onboard HUB */ 374 hub@1 { 375 compatible = "usb424,2514"; 376 reg = <1>; 377 vdd-supply = <&scmi_v3v3_sw>; 378 }; 379}; 380 381&usbotg_hs { 382 phys = <&usbphyc_port1 0>; 383 phy-names = "usb2-phy"; 384 usb-role-switch; 385 status = "okay"; 386 port { 387 usbotg_hs_ep: endpoint { 388 remote-endpoint = <&con_usb_c_g0_ep>; 389 }; 390 }; 391}; 392 393&usbphyc { 394 status = "okay"; 395}; 396 397&usbphyc_port0 { 398 phy-supply = <&scmi_vdd_usb>; 399 st,current-boost-microamp = <1000>; 400 st,decrease-hs-slew-rate; 401 st,tune-hs-dc-level = <2>; 402 st,enable-hs-rftime-reduction; 403 st,trim-hs-current = <11>; 404 st,trim-hs-impedance = <2>; 405 st,tune-squelch-level = <1>; 406 st,enable-hs-rx-gain-eq; 407 st,no-hs-ftime-ctrl; 408 st,no-lsfs-sc; 409}; 410 411&usbphyc_port1 { 412 phy-supply = <&scmi_vdd_usb>; 413 st,current-boost-microamp = <1000>; 414 st,decrease-hs-slew-rate; 415 st,tune-hs-dc-level = <2>; 416 st,enable-hs-rftime-reduction; 417 st,trim-hs-current = <11>; 418 st,trim-hs-impedance = <2>; 419 st,tune-squelch-level = <1>; 420 st,enable-hs-rx-gain-eq; 421 st,no-hs-ftime-ctrl; 422 st,no-lsfs-sc; 423}; 424