1*724ba675SRob Herring// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) 2*724ba675SRob Herring/* 3*724ba675SRob Herring * Copyright (C) STMicroelectronics 2017 - All Rights Reserved 4*724ba675SRob Herring * Author: Ludovic Barre <ludovic.barre@st.com> for STMicroelectronics. 5*724ba675SRob Herring */ 6*724ba675SRob Herring/dts-v1/; 7*724ba675SRob Herring 8*724ba675SRob Herring#include "stm32mp157c-ed1.dts" 9*724ba675SRob Herring#include <dt-bindings/gpio/gpio.h> 10*724ba675SRob Herring#include <dt-bindings/input/input.h> 11*724ba675SRob Herring#include <dt-bindings/media/video-interfaces.h> 12*724ba675SRob Herring 13*724ba675SRob Herring/ { 14*724ba675SRob Herring model = "STMicroelectronics STM32MP157C eval daughter on eval mother"; 15*724ba675SRob Herring compatible = "st,stm32mp157c-ev1", "st,stm32mp157c-ed1", "st,stm32mp157"; 16*724ba675SRob Herring 17*724ba675SRob Herring aliases { 18*724ba675SRob Herring serial1 = &usart3; 19*724ba675SRob Herring ethernet0 = ðernet0; 20*724ba675SRob Herring }; 21*724ba675SRob Herring 22*724ba675SRob Herring chosen { 23*724ba675SRob Herring stdout-path = "serial0:115200n8"; 24*724ba675SRob Herring }; 25*724ba675SRob Herring 26*724ba675SRob Herring clocks { 27*724ba675SRob Herring clk_ext_camera: clk-ext-camera { 28*724ba675SRob Herring #clock-cells = <0>; 29*724ba675SRob Herring compatible = "fixed-clock"; 30*724ba675SRob Herring clock-frequency = <24000000>; 31*724ba675SRob Herring }; 32*724ba675SRob Herring }; 33*724ba675SRob Herring 34*724ba675SRob Herring joystick { 35*724ba675SRob Herring compatible = "gpio-keys"; 36*724ba675SRob Herring pinctrl-0 = <&joystick_pins>; 37*724ba675SRob Herring pinctrl-names = "default"; 38*724ba675SRob Herring button-0 { 39*724ba675SRob Herring label = "JoySel"; 40*724ba675SRob Herring linux,code = <KEY_ENTER>; 41*724ba675SRob Herring interrupt-parent = <&stmfx_pinctrl>; 42*724ba675SRob Herring interrupts = <0 IRQ_TYPE_EDGE_RISING>; 43*724ba675SRob Herring }; 44*724ba675SRob Herring button-1 { 45*724ba675SRob Herring label = "JoyDown"; 46*724ba675SRob Herring linux,code = <KEY_DOWN>; 47*724ba675SRob Herring interrupt-parent = <&stmfx_pinctrl>; 48*724ba675SRob Herring interrupts = <1 IRQ_TYPE_EDGE_RISING>; 49*724ba675SRob Herring }; 50*724ba675SRob Herring button-2 { 51*724ba675SRob Herring label = "JoyLeft"; 52*724ba675SRob Herring linux,code = <KEY_LEFT>; 53*724ba675SRob Herring interrupt-parent = <&stmfx_pinctrl>; 54*724ba675SRob Herring interrupts = <2 IRQ_TYPE_EDGE_RISING>; 55*724ba675SRob Herring }; 56*724ba675SRob Herring button-3 { 57*724ba675SRob Herring label = "JoyRight"; 58*724ba675SRob Herring linux,code = <KEY_RIGHT>; 59*724ba675SRob Herring interrupt-parent = <&stmfx_pinctrl>; 60*724ba675SRob Herring interrupts = <3 IRQ_TYPE_EDGE_RISING>; 61*724ba675SRob Herring }; 62*724ba675SRob Herring button-4 { 63*724ba675SRob Herring label = "JoyUp"; 64*724ba675SRob Herring linux,code = <KEY_UP>; 65*724ba675SRob Herring interrupt-parent = <&stmfx_pinctrl>; 66*724ba675SRob Herring interrupts = <4 IRQ_TYPE_EDGE_RISING>; 67*724ba675SRob Herring }; 68*724ba675SRob Herring }; 69*724ba675SRob Herring 70*724ba675SRob Herring panel_backlight: panel-backlight { 71*724ba675SRob Herring compatible = "gpio-backlight"; 72*724ba675SRob Herring gpios = <&gpiod 13 GPIO_ACTIVE_LOW>; 73*724ba675SRob Herring default-on; 74*724ba675SRob Herring status = "okay"; 75*724ba675SRob Herring }; 76*724ba675SRob Herring}; 77*724ba675SRob Herring 78*724ba675SRob Herring&cec { 79*724ba675SRob Herring pinctrl-names = "default"; 80*724ba675SRob Herring pinctrl-0 = <&cec_pins_a>; 81*724ba675SRob Herring status = "okay"; 82*724ba675SRob Herring}; 83*724ba675SRob Herring 84*724ba675SRob Herring&dcmi { 85*724ba675SRob Herring status = "okay"; 86*724ba675SRob Herring pinctrl-names = "default", "sleep"; 87*724ba675SRob Herring pinctrl-0 = <&dcmi_pins_a>; 88*724ba675SRob Herring pinctrl-1 = <&dcmi_sleep_pins_a>; 89*724ba675SRob Herring 90*724ba675SRob Herring port { 91*724ba675SRob Herring dcmi_0: endpoint { 92*724ba675SRob Herring remote-endpoint = <&ov5640_0>; 93*724ba675SRob Herring bus-type = <MEDIA_BUS_TYPE_PARALLEL>; 94*724ba675SRob Herring bus-width = <8>; 95*724ba675SRob Herring hsync-active = <0>; 96*724ba675SRob Herring vsync-active = <0>; 97*724ba675SRob Herring pclk-sample = <1>; 98*724ba675SRob Herring }; 99*724ba675SRob Herring }; 100*724ba675SRob Herring}; 101*724ba675SRob Herring 102*724ba675SRob Herring&dsi { 103*724ba675SRob Herring phy-dsi-supply = <®18>; 104*724ba675SRob Herring #address-cells = <1>; 105*724ba675SRob Herring #size-cells = <0>; 106*724ba675SRob Herring status = "okay"; 107*724ba675SRob Herring 108*724ba675SRob Herring ports { 109*724ba675SRob Herring #address-cells = <1>; 110*724ba675SRob Herring #size-cells = <0>; 111*724ba675SRob Herring 112*724ba675SRob Herring port@0 { 113*724ba675SRob Herring reg = <0>; 114*724ba675SRob Herring dsi_in: endpoint { 115*724ba675SRob Herring remote-endpoint = <<dc_ep0_out>; 116*724ba675SRob Herring }; 117*724ba675SRob Herring }; 118*724ba675SRob Herring 119*724ba675SRob Herring port@1 { 120*724ba675SRob Herring reg = <1>; 121*724ba675SRob Herring dsi_out: endpoint { 122*724ba675SRob Herring remote-endpoint = <&dsi_panel_in>; 123*724ba675SRob Herring }; 124*724ba675SRob Herring }; 125*724ba675SRob Herring }; 126*724ba675SRob Herring 127*724ba675SRob Herring panel@0 { 128*724ba675SRob Herring compatible = "raydium,rm68200"; 129*724ba675SRob Herring reg = <0>; 130*724ba675SRob Herring reset-gpios = <&gpiof 15 GPIO_ACTIVE_LOW>; 131*724ba675SRob Herring backlight = <&panel_backlight>; 132*724ba675SRob Herring power-supply = <&v3v3>; 133*724ba675SRob Herring status = "okay"; 134*724ba675SRob Herring 135*724ba675SRob Herring port { 136*724ba675SRob Herring dsi_panel_in: endpoint { 137*724ba675SRob Herring remote-endpoint = <&dsi_out>; 138*724ba675SRob Herring }; 139*724ba675SRob Herring }; 140*724ba675SRob Herring }; 141*724ba675SRob Herring}; 142*724ba675SRob Herring 143*724ba675SRob Herringðernet0 { 144*724ba675SRob Herring status = "okay"; 145*724ba675SRob Herring pinctrl-0 = <ðernet0_rgmii_pins_a>; 146*724ba675SRob Herring pinctrl-1 = <ðernet0_rgmii_sleep_pins_a>; 147*724ba675SRob Herring pinctrl-names = "default", "sleep"; 148*724ba675SRob Herring phy-mode = "rgmii-id"; 149*724ba675SRob Herring max-speed = <1000>; 150*724ba675SRob Herring phy-handle = <&phy0>; 151*724ba675SRob Herring 152*724ba675SRob Herring mdio { 153*724ba675SRob Herring #address-cells = <1>; 154*724ba675SRob Herring #size-cells = <0>; 155*724ba675SRob Herring compatible = "snps,dwmac-mdio"; 156*724ba675SRob Herring phy0: ethernet-phy@0 { 157*724ba675SRob Herring reg = <0>; 158*724ba675SRob Herring }; 159*724ba675SRob Herring }; 160*724ba675SRob Herring}; 161*724ba675SRob Herring 162*724ba675SRob Herring&fmc { 163*724ba675SRob Herring pinctrl-names = "default", "sleep"; 164*724ba675SRob Herring pinctrl-0 = <&fmc_pins_a>; 165*724ba675SRob Herring pinctrl-1 = <&fmc_sleep_pins_a>; 166*724ba675SRob Herring status = "okay"; 167*724ba675SRob Herring 168*724ba675SRob Herring nand-controller@4,0 { 169*724ba675SRob Herring status = "okay"; 170*724ba675SRob Herring 171*724ba675SRob Herring nand@0 { 172*724ba675SRob Herring reg = <0>; 173*724ba675SRob Herring nand-on-flash-bbt; 174*724ba675SRob Herring #address-cells = <1>; 175*724ba675SRob Herring #size-cells = <1>; 176*724ba675SRob Herring }; 177*724ba675SRob Herring }; 178*724ba675SRob Herring}; 179*724ba675SRob Herring 180*724ba675SRob Herring&i2c2 { 181*724ba675SRob Herring pinctrl-names = "default", "sleep"; 182*724ba675SRob Herring pinctrl-0 = <&i2c2_pins_a>; 183*724ba675SRob Herring pinctrl-1 = <&i2c2_sleep_pins_a>; 184*724ba675SRob Herring i2c-scl-rising-time-ns = <185>; 185*724ba675SRob Herring i2c-scl-falling-time-ns = <20>; 186*724ba675SRob Herring status = "okay"; 187*724ba675SRob Herring 188*724ba675SRob Herring ov5640: camera@3c { 189*724ba675SRob Herring compatible = "ovti,ov5640"; 190*724ba675SRob Herring reg = <0x3c>; 191*724ba675SRob Herring clocks = <&clk_ext_camera>; 192*724ba675SRob Herring clock-names = "xclk"; 193*724ba675SRob Herring AVDD-supply = <&v2v8>; 194*724ba675SRob Herring DOVDD-supply = <&v2v8>; 195*724ba675SRob Herring DVDD-supply = <&v2v8>; 196*724ba675SRob Herring powerdown-gpios = <&stmfx_pinctrl 18 (GPIO_ACTIVE_HIGH | GPIO_PUSH_PULL)>; 197*724ba675SRob Herring reset-gpios = <&stmfx_pinctrl 19 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>; 198*724ba675SRob Herring rotation = <180>; 199*724ba675SRob Herring status = "okay"; 200*724ba675SRob Herring 201*724ba675SRob Herring port { 202*724ba675SRob Herring ov5640_0: endpoint { 203*724ba675SRob Herring remote-endpoint = <&dcmi_0>; 204*724ba675SRob Herring bus-width = <8>; 205*724ba675SRob Herring data-shift = <2>; /* lines 9:2 are used */ 206*724ba675SRob Herring hsync-active = <0>; 207*724ba675SRob Herring vsync-active = <0>; 208*724ba675SRob Herring pclk-sample = <1>; 209*724ba675SRob Herring }; 210*724ba675SRob Herring }; 211*724ba675SRob Herring }; 212*724ba675SRob Herring 213*724ba675SRob Herring stmfx: stmfx@42 { 214*724ba675SRob Herring compatible = "st,stmfx-0300"; 215*724ba675SRob Herring reg = <0x42>; 216*724ba675SRob Herring interrupts = <8 IRQ_TYPE_EDGE_RISING>; 217*724ba675SRob Herring interrupt-parent = <&gpioi>; 218*724ba675SRob Herring vdd-supply = <&v3v3>; 219*724ba675SRob Herring 220*724ba675SRob Herring stmfx_pinctrl: pinctrl { 221*724ba675SRob Herring compatible = "st,stmfx-0300-pinctrl"; 222*724ba675SRob Herring gpio-controller; 223*724ba675SRob Herring #gpio-cells = <2>; 224*724ba675SRob Herring interrupt-controller; 225*724ba675SRob Herring #interrupt-cells = <2>; 226*724ba675SRob Herring gpio-ranges = <&stmfx_pinctrl 0 0 24>; 227*724ba675SRob Herring 228*724ba675SRob Herring joystick_pins: joystick-pins { 229*724ba675SRob Herring pins = "gpio0", "gpio1", "gpio2", "gpio3", "gpio4"; 230*724ba675SRob Herring bias-pull-down; 231*724ba675SRob Herring }; 232*724ba675SRob Herring }; 233*724ba675SRob Herring }; 234*724ba675SRob Herring}; 235*724ba675SRob Herring 236*724ba675SRob Herring&i2c5 { 237*724ba675SRob Herring pinctrl-names = "default", "sleep"; 238*724ba675SRob Herring pinctrl-0 = <&i2c5_pins_a>; 239*724ba675SRob Herring pinctrl-1 = <&i2c5_sleep_pins_a>; 240*724ba675SRob Herring i2c-scl-rising-time-ns = <185>; 241*724ba675SRob Herring i2c-scl-falling-time-ns = <20>; 242*724ba675SRob Herring status = "okay"; 243*724ba675SRob Herring}; 244*724ba675SRob Herring 245*724ba675SRob Herring<dc { 246*724ba675SRob Herring status = "okay"; 247*724ba675SRob Herring 248*724ba675SRob Herring port { 249*724ba675SRob Herring ltdc_ep0_out: endpoint { 250*724ba675SRob Herring remote-endpoint = <&dsi_in>; 251*724ba675SRob Herring }; 252*724ba675SRob Herring }; 253*724ba675SRob Herring}; 254*724ba675SRob Herring 255*724ba675SRob Herring&m_can1 { 256*724ba675SRob Herring pinctrl-names = "default", "sleep"; 257*724ba675SRob Herring pinctrl-0 = <&m_can1_pins_a>; 258*724ba675SRob Herring pinctrl-1 = <&m_can1_sleep_pins_a>; 259*724ba675SRob Herring status = "okay"; 260*724ba675SRob Herring}; 261*724ba675SRob Herring 262*724ba675SRob Herring&qspi { 263*724ba675SRob Herring pinctrl-names = "default", "sleep"; 264*724ba675SRob Herring pinctrl-0 = <&qspi_clk_pins_a 265*724ba675SRob Herring &qspi_bk1_pins_a 266*724ba675SRob Herring &qspi_cs1_pins_a 267*724ba675SRob Herring &qspi_bk2_pins_a 268*724ba675SRob Herring &qspi_cs2_pins_a>; 269*724ba675SRob Herring pinctrl-1 = <&qspi_clk_sleep_pins_a 270*724ba675SRob Herring &qspi_bk1_sleep_pins_a 271*724ba675SRob Herring &qspi_cs1_sleep_pins_a 272*724ba675SRob Herring &qspi_bk2_sleep_pins_a 273*724ba675SRob Herring &qspi_cs2_sleep_pins_a>; 274*724ba675SRob Herring reg = <0x58003000 0x1000>, <0x70000000 0x4000000>; 275*724ba675SRob Herring #address-cells = <1>; 276*724ba675SRob Herring #size-cells = <0>; 277*724ba675SRob Herring status = "okay"; 278*724ba675SRob Herring 279*724ba675SRob Herring flash0: flash@0 { 280*724ba675SRob Herring compatible = "jedec,spi-nor"; 281*724ba675SRob Herring reg = <0>; 282*724ba675SRob Herring spi-rx-bus-width = <4>; 283*724ba675SRob Herring spi-max-frequency = <108000000>; 284*724ba675SRob Herring #address-cells = <1>; 285*724ba675SRob Herring #size-cells = <1>; 286*724ba675SRob Herring }; 287*724ba675SRob Herring 288*724ba675SRob Herring flash1: flash@1 { 289*724ba675SRob Herring compatible = "jedec,spi-nor"; 290*724ba675SRob Herring reg = <1>; 291*724ba675SRob Herring spi-rx-bus-width = <4>; 292*724ba675SRob Herring spi-max-frequency = <108000000>; 293*724ba675SRob Herring #address-cells = <1>; 294*724ba675SRob Herring #size-cells = <1>; 295*724ba675SRob Herring }; 296*724ba675SRob Herring}; 297*724ba675SRob Herring 298*724ba675SRob Herring&sdmmc3 { 299*724ba675SRob Herring pinctrl-names = "default", "opendrain", "sleep"; 300*724ba675SRob Herring pinctrl-0 = <&sdmmc3_b4_pins_a>; 301*724ba675SRob Herring pinctrl-1 = <&sdmmc3_b4_od_pins_a>; 302*724ba675SRob Herring pinctrl-2 = <&sdmmc3_b4_sleep_pins_a>; 303*724ba675SRob Herring broken-cd; 304*724ba675SRob Herring st,neg-edge; 305*724ba675SRob Herring bus-width = <4>; 306*724ba675SRob Herring vmmc-supply = <&v3v3>; 307*724ba675SRob Herring status = "disabled"; 308*724ba675SRob Herring}; 309*724ba675SRob Herring 310*724ba675SRob Herring&spi1 { 311*724ba675SRob Herring pinctrl-names = "default"; 312*724ba675SRob Herring pinctrl-0 = <&spi1_pins_a>; 313*724ba675SRob Herring status = "disabled"; 314*724ba675SRob Herring}; 315*724ba675SRob Herring 316*724ba675SRob Herring&timers2 { 317*724ba675SRob Herring /* spare dmas for other usage (un-delete to enable pwm capture) */ 318*724ba675SRob Herring /delete-property/dmas; 319*724ba675SRob Herring /delete-property/dma-names; 320*724ba675SRob Herring status = "disabled"; 321*724ba675SRob Herring pwm { 322*724ba675SRob Herring pinctrl-0 = <&pwm2_pins_a>; 323*724ba675SRob Herring pinctrl-1 = <&pwm2_sleep_pins_a>; 324*724ba675SRob Herring pinctrl-names = "default", "sleep"; 325*724ba675SRob Herring status = "okay"; 326*724ba675SRob Herring }; 327*724ba675SRob Herring timer@1 { 328*724ba675SRob Herring status = "okay"; 329*724ba675SRob Herring }; 330*724ba675SRob Herring}; 331*724ba675SRob Herring 332*724ba675SRob Herring&timers8 { 333*724ba675SRob Herring /delete-property/dmas; 334*724ba675SRob Herring /delete-property/dma-names; 335*724ba675SRob Herring status = "disabled"; 336*724ba675SRob Herring pwm { 337*724ba675SRob Herring pinctrl-0 = <&pwm8_pins_a>; 338*724ba675SRob Herring pinctrl-1 = <&pwm8_sleep_pins_a>; 339*724ba675SRob Herring pinctrl-names = "default", "sleep"; 340*724ba675SRob Herring status = "okay"; 341*724ba675SRob Herring }; 342*724ba675SRob Herring timer@7 { 343*724ba675SRob Herring status = "okay"; 344*724ba675SRob Herring }; 345*724ba675SRob Herring}; 346*724ba675SRob Herring 347*724ba675SRob Herring&timers12 { 348*724ba675SRob Herring /delete-property/dmas; 349*724ba675SRob Herring /delete-property/dma-names; 350*724ba675SRob Herring status = "disabled"; 351*724ba675SRob Herring pwm { 352*724ba675SRob Herring pinctrl-0 = <&pwm12_pins_a>; 353*724ba675SRob Herring pinctrl-1 = <&pwm12_sleep_pins_a>; 354*724ba675SRob Herring pinctrl-names = "default", "sleep"; 355*724ba675SRob Herring status = "okay"; 356*724ba675SRob Herring }; 357*724ba675SRob Herring timer@11 { 358*724ba675SRob Herring status = "okay"; 359*724ba675SRob Herring }; 360*724ba675SRob Herring}; 361*724ba675SRob Herring 362*724ba675SRob Herring&usart3 { 363*724ba675SRob Herring pinctrl-names = "default", "sleep", "idle"; 364*724ba675SRob Herring pinctrl-0 = <&usart3_pins_b>; 365*724ba675SRob Herring pinctrl-1 = <&usart3_sleep_pins_b>; 366*724ba675SRob Herring pinctrl-2 = <&usart3_idle_pins_b>; 367*724ba675SRob Herring /* 368*724ba675SRob Herring * HW flow control USART3_RTS is optional, and isn't default wired to 369*724ba675SRob Herring * the connector. SB23 needs to be soldered in order to use it, and R77 370*724ba675SRob Herring * (ETH_CLK) should be removed. 371*724ba675SRob Herring */ 372*724ba675SRob Herring uart-has-rtscts; 373*724ba675SRob Herring status = "disabled"; 374*724ba675SRob Herring}; 375*724ba675SRob Herring 376*724ba675SRob Herring&usbh_ehci { 377*724ba675SRob Herring phys = <&usbphyc_port0>; 378*724ba675SRob Herring status = "okay"; 379*724ba675SRob Herring #address-cells = <1>; 380*724ba675SRob Herring #size-cells = <0>; 381*724ba675SRob Herring /* onboard HUB */ 382*724ba675SRob Herring hub@1 { 383*724ba675SRob Herring compatible = "usb424,2514"; 384*724ba675SRob Herring reg = <1>; 385*724ba675SRob Herring vdd-supply = <&v3v3>; 386*724ba675SRob Herring }; 387*724ba675SRob Herring}; 388*724ba675SRob Herring 389*724ba675SRob Herring&usbotg_hs { 390*724ba675SRob Herring pinctrl-0 = <&usbotg_hs_pins_a>; 391*724ba675SRob Herring pinctrl-names = "default"; 392*724ba675SRob Herring phys = <&usbphyc_port1 0>; 393*724ba675SRob Herring phy-names = "usb2-phy"; 394*724ba675SRob Herring status = "okay"; 395*724ba675SRob Herring}; 396*724ba675SRob Herring 397*724ba675SRob Herring&usbphyc { 398*724ba675SRob Herring status = "okay"; 399*724ba675SRob Herring}; 400*724ba675SRob Herring 401*724ba675SRob Herring&usbphyc_port0 { 402*724ba675SRob Herring st,tune-hs-dc-level = <2>; 403*724ba675SRob Herring st,enable-fs-rftime-tuning; 404*724ba675SRob Herring st,enable-hs-rftime-reduction; 405*724ba675SRob Herring st,trim-hs-current = <15>; 406*724ba675SRob Herring st,trim-hs-impedance = <1>; 407*724ba675SRob Herring st,tune-squelch-level = <3>; 408*724ba675SRob Herring st,tune-hs-rx-offset = <2>; 409*724ba675SRob Herring st,no-lsfs-sc; 410*724ba675SRob Herring 411*724ba675SRob Herring connector { 412*724ba675SRob Herring compatible = "usb-a-connector"; 413*724ba675SRob Herring vbus-supply = <&vbus_sw>; 414*724ba675SRob Herring }; 415*724ba675SRob Herring}; 416*724ba675SRob Herring 417*724ba675SRob Herring&usbphyc_port1 { 418*724ba675SRob Herring st,tune-hs-dc-level = <2>; 419*724ba675SRob Herring st,enable-fs-rftime-tuning; 420*724ba675SRob Herring st,enable-hs-rftime-reduction; 421*724ba675SRob Herring st,trim-hs-current = <15>; 422*724ba675SRob Herring st,trim-hs-impedance = <1>; 423*724ba675SRob Herring st,tune-squelch-level = <3>; 424*724ba675SRob Herring st,tune-hs-rx-offset = <2>; 425*724ba675SRob Herring st,no-lsfs-sc; 426*724ba675SRob Herring}; 427