1*f126890aSEmmanuel Vadot/* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause) */ 2*f126890aSEmmanuel Vadot/* 3*f126890aSEmmanuel Vadot * Copyright (C) 2020 STMicroelectronics - All Rights Reserved 4*f126890aSEmmanuel Vadot * Copyright (C) 2020 Ahmad Fatoum, Pengutronix 5*f126890aSEmmanuel Vadot */ 6*f126890aSEmmanuel Vadot 7*f126890aSEmmanuel Vadot/dts-v1/; 8*f126890aSEmmanuel Vadot 9*f126890aSEmmanuel Vadot#include "stm32mp157.dtsi" 10*f126890aSEmmanuel Vadot#include "stm32mp15xx-osd32.dtsi" 11*f126890aSEmmanuel Vadot#include "stm32mp15xxac-pinctrl.dtsi" 12*f126890aSEmmanuel Vadot 13*f126890aSEmmanuel Vadot#include <dt-bindings/gpio/gpio.h> 14*f126890aSEmmanuel Vadot#include <dt-bindings/pwm/pwm.h> 15*f126890aSEmmanuel Vadot 16*f126890aSEmmanuel Vadot/ { 17*f126890aSEmmanuel Vadot model = "Linux Automation MC-1 board"; 18*f126890aSEmmanuel Vadot compatible = "lxa,stm32mp157c-mc1", "oct,stm32mp15xx-osd32", "st,stm32mp157"; 19*f126890aSEmmanuel Vadot 20*f126890aSEmmanuel Vadot aliases { 21*f126890aSEmmanuel Vadot ethernet0 = ðernet0; 22*f126890aSEmmanuel Vadot mmc0 = &sdmmc1; 23*f126890aSEmmanuel Vadot mmc1 = &sdmmc2; 24*f126890aSEmmanuel Vadot serial0 = &uart4; 25*f126890aSEmmanuel Vadot }; 26*f126890aSEmmanuel Vadot 27*f126890aSEmmanuel Vadot backlight: backlight { 28*f126890aSEmmanuel Vadot compatible = "pwm-backlight"; 29*f126890aSEmmanuel Vadot pwms = <&backlight_pwm 1 100000 PWM_POLARITY_INVERTED>; 30*f126890aSEmmanuel Vadot brightness-levels = <0 31 63 95 127 159 191 223 255>; 31*f126890aSEmmanuel Vadot default-brightness-level = <7>; 32*f126890aSEmmanuel Vadot power-supply = <®_5v2>; /* 3V3_BACKLIGHT */ 33*f126890aSEmmanuel Vadot }; 34*f126890aSEmmanuel Vadot 35*f126890aSEmmanuel Vadot chosen { 36*f126890aSEmmanuel Vadot stdout-path = &uart4; 37*f126890aSEmmanuel Vadot }; 38*f126890aSEmmanuel Vadot 39*f126890aSEmmanuel Vadot led-controller-0 { 40*f126890aSEmmanuel Vadot compatible = "gpio-leds"; 41*f126890aSEmmanuel Vadot 42*f126890aSEmmanuel Vadot led-0 { 43*f126890aSEmmanuel Vadot label = "mc1:green:act"; 44*f126890aSEmmanuel Vadot gpios = <&gpioa 13 GPIO_ACTIVE_LOW>; 45*f126890aSEmmanuel Vadot linux,default-trigger = "heartbeat"; 46*f126890aSEmmanuel Vadot }; 47*f126890aSEmmanuel Vadot }; 48*f126890aSEmmanuel Vadot 49*f126890aSEmmanuel Vadot led-controller-1 { 50*f126890aSEmmanuel Vadot compatible = "pwm-leds"; 51*f126890aSEmmanuel Vadot 52*f126890aSEmmanuel Vadot /* led-1 to led-3 are part of a single RGB led */ 53*f126890aSEmmanuel Vadot led-1 { 54*f126890aSEmmanuel Vadot label = "mc1:red:rgb"; 55*f126890aSEmmanuel Vadot pwms = <&leds_pwm 1 1000000 0>; 56*f126890aSEmmanuel Vadot max-brightness = <255>; 57*f126890aSEmmanuel Vadot active-low; 58*f126890aSEmmanuel Vadot }; 59*f126890aSEmmanuel Vadot 60*f126890aSEmmanuel Vadot led-2 { 61*f126890aSEmmanuel Vadot label = "mc1:green:rgb"; 62*f126890aSEmmanuel Vadot pwms = <&leds_pwm 2 1000000 0>; 63*f126890aSEmmanuel Vadot max-brightness = <255>; 64*f126890aSEmmanuel Vadot active-low; 65*f126890aSEmmanuel Vadot }; 66*f126890aSEmmanuel Vadot 67*f126890aSEmmanuel Vadot led-3 { 68*f126890aSEmmanuel Vadot label = "mc1:blue:rgb"; 69*f126890aSEmmanuel Vadot pwms = <&leds_pwm 3 1000000 0>; 70*f126890aSEmmanuel Vadot max-brightness = <255>; 71*f126890aSEmmanuel Vadot active-low; 72*f126890aSEmmanuel Vadot }; 73*f126890aSEmmanuel Vadot }; 74*f126890aSEmmanuel Vadot 75*f126890aSEmmanuel Vadot panel: panel { 76*f126890aSEmmanuel Vadot compatible = "edt,etm0700g0edh6"; 77*f126890aSEmmanuel Vadot backlight = <&backlight>; 78*f126890aSEmmanuel Vadot enable-gpios = <&gpiod 4 GPIO_ACTIVE_HIGH>; 79*f126890aSEmmanuel Vadot power-supply = <®_3v3>; 80*f126890aSEmmanuel Vadot 81*f126890aSEmmanuel Vadot port { 82*f126890aSEmmanuel Vadot panel_input: endpoint { 83*f126890aSEmmanuel Vadot remote-endpoint = <<dc_ep0_out>; 84*f126890aSEmmanuel Vadot }; 85*f126890aSEmmanuel Vadot }; 86*f126890aSEmmanuel Vadot }; 87*f126890aSEmmanuel Vadot 88*f126890aSEmmanuel Vadot reg_3v3: regulator_3v3 { 89*f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 90*f126890aSEmmanuel Vadot regulator-name = "3V3"; 91*f126890aSEmmanuel Vadot regulator-min-microvolt = <3300000>; 92*f126890aSEmmanuel Vadot regulator-max-microvolt = <3300000>; 93*f126890aSEmmanuel Vadot regulator-always-on; 94*f126890aSEmmanuel Vadot vin-supply = <&v3v3>; 95*f126890aSEmmanuel Vadot }; 96*f126890aSEmmanuel Vadot 97*f126890aSEmmanuel Vadot /* supplied by either debug board or PoE */ 98*f126890aSEmmanuel Vadot reg_5v2: regulator_5v2 { 99*f126890aSEmmanuel Vadot compatible = "regulator-fixed"; 100*f126890aSEmmanuel Vadot regulator-name = "5V2"; 101*f126890aSEmmanuel Vadot regulator-min-microvolt = <5200000>; 102*f126890aSEmmanuel Vadot regulator-max-microvolt = <5200000>; 103*f126890aSEmmanuel Vadot regulator-always-on; 104*f126890aSEmmanuel Vadot }; 105*f126890aSEmmanuel Vadot}; 106*f126890aSEmmanuel Vadot 107*f126890aSEmmanuel Vadotðernet0 { 108*f126890aSEmmanuel Vadot pinctrl-names = "default", "sleep"; 109*f126890aSEmmanuel Vadot pinctrl-0 = <ðernet0_rgmii_pins_b>; 110*f126890aSEmmanuel Vadot pinctrl-1 = <ðernet0_rgmii_sleep_pins_b>; 111*f126890aSEmmanuel Vadot phy-mode = "rgmii-id"; 112*f126890aSEmmanuel Vadot phy-handle = <ðphy>; 113*f126890aSEmmanuel Vadot status = "okay"; 114*f126890aSEmmanuel Vadot 115*f126890aSEmmanuel Vadot mdio { 116*f126890aSEmmanuel Vadot compatible = "snps,dwmac-mdio"; 117*f126890aSEmmanuel Vadot #address-cells = <1>; 118*f126890aSEmmanuel Vadot #size-cells = <0>; 119*f126890aSEmmanuel Vadot 120*f126890aSEmmanuel Vadot ethphy: ethernet-phy@3 { /* KSZ9031RN */ 121*f126890aSEmmanuel Vadot reg = <3>; 122*f126890aSEmmanuel Vadot reset-gpios = <&gpiog 0 GPIO_ACTIVE_LOW>; /* ETH_RST# */ 123*f126890aSEmmanuel Vadot interrupt-parent = <&gpioa>; 124*f126890aSEmmanuel Vadot interrupts = <6 IRQ_TYPE_EDGE_FALLING>; /* ETH_MDINT# */ 125*f126890aSEmmanuel Vadot reset-assert-us = <10000>; 126*f126890aSEmmanuel Vadot reset-deassert-us = <300>; 127*f126890aSEmmanuel Vadot micrel,force-master; 128*f126890aSEmmanuel Vadot }; 129*f126890aSEmmanuel Vadot }; 130*f126890aSEmmanuel Vadot}; 131*f126890aSEmmanuel Vadot 132*f126890aSEmmanuel Vadot&gpioz { 133*f126890aSEmmanuel Vadot gpio-line-names = "HWID0", "HWID1", "HWID2", "HWID3", "", "", 134*f126890aSEmmanuel Vadot "HWID4", "HWID5"; 135*f126890aSEmmanuel Vadot}; 136*f126890aSEmmanuel Vadot 137*f126890aSEmmanuel Vadot&i2c5 { 138*f126890aSEmmanuel Vadot pinctrl-names = "default", "sleep"; 139*f126890aSEmmanuel Vadot pinctrl-0 = <&i2c5_pins_b>; 140*f126890aSEmmanuel Vadot pinctrl-1 = <&i2c5_sleep_pins_b>; 141*f126890aSEmmanuel Vadot clock-frequency = <400000>; 142*f126890aSEmmanuel Vadot status = "okay"; 143*f126890aSEmmanuel Vadot 144*f126890aSEmmanuel Vadot touchscreen@38 { 145*f126890aSEmmanuel Vadot compatible = "edt,edt-ft5x06"; 146*f126890aSEmmanuel Vadot interrupt-parent = <&gpiod>; 147*f126890aSEmmanuel Vadot interrupts = <11 IRQ_TYPE_EDGE_FALLING>; /* TOUCH_INT# */ 148*f126890aSEmmanuel Vadot vcc-supply = <®_3v3>; 149*f126890aSEmmanuel Vadot reg = <0x38>; 150*f126890aSEmmanuel Vadot reset-gpios = <&gpiof 8 GPIO_ACTIVE_LOW>; /* TOUCH_RESET# */ 151*f126890aSEmmanuel Vadot touchscreen-size-x = <1792>; 152*f126890aSEmmanuel Vadot touchscreen-size-y = <1024>; 153*f126890aSEmmanuel Vadot wakeup-source; 154*f126890aSEmmanuel Vadot }; 155*f126890aSEmmanuel Vadot}; 156*f126890aSEmmanuel Vadot 157*f126890aSEmmanuel Vadot<dc { 158*f126890aSEmmanuel Vadot pinctrl-names = "default", "sleep"; 159*f126890aSEmmanuel Vadot pinctrl-0 = <<dc_pins_c>; 160*f126890aSEmmanuel Vadot pinctrl-1 = <<dc_sleep_pins_c>; 161*f126890aSEmmanuel Vadot status = "okay"; 162*f126890aSEmmanuel Vadot 163*f126890aSEmmanuel Vadot port { 164*f126890aSEmmanuel Vadot ltdc_ep0_out: endpoint { 165*f126890aSEmmanuel Vadot remote-endpoint = <&panel_input>; 166*f126890aSEmmanuel Vadot }; 167*f126890aSEmmanuel Vadot }; 168*f126890aSEmmanuel Vadot}; 169*f126890aSEmmanuel Vadot 170*f126890aSEmmanuel Vadot&pmic { 171*f126890aSEmmanuel Vadot regulators { 172*f126890aSEmmanuel Vadot buck4-supply = <®_5v2>; /* VIN */ 173*f126890aSEmmanuel Vadot ldo2-supply = <®_5v2>; /* PMIC_LDO25IN */ 174*f126890aSEmmanuel Vadot ldo5-supply = <®_5v2>; /* PMIC_LDO25IN */ 175*f126890aSEmmanuel Vadot boost-supply = <®_5v2>; /* PMIC_BSTIN */ 176*f126890aSEmmanuel Vadot pwr_sw2-supply = <&bst_out>; /* PMIC_SWIN */ 177*f126890aSEmmanuel Vadot }; 178*f126890aSEmmanuel Vadot}; 179*f126890aSEmmanuel Vadot 180*f126890aSEmmanuel Vadot&sdmmc1 { 181*f126890aSEmmanuel Vadot pinctrl-names = "default", "opendrain", "sleep"; 182*f126890aSEmmanuel Vadot pinctrl-0 = <&sdmmc1_b4_pins_a>; 183*f126890aSEmmanuel Vadot pinctrl-1 = <&sdmmc1_b4_od_pins_a>; 184*f126890aSEmmanuel Vadot pinctrl-2 = <&sdmmc1_b4_sleep_pins_a>; 185*f126890aSEmmanuel Vadot bus-width = <4>; 186*f126890aSEmmanuel Vadot cd-gpios = <&gpioh 3 GPIO_ACTIVE_LOW>; 187*f126890aSEmmanuel Vadot disable-wp; 188*f126890aSEmmanuel Vadot no-1-8-v; 189*f126890aSEmmanuel Vadot st,neg-edge; 190*f126890aSEmmanuel Vadot vmmc-supply = <®_3v3>; 191*f126890aSEmmanuel Vadot status = "okay"; 192*f126890aSEmmanuel Vadot}; 193*f126890aSEmmanuel Vadot 194*f126890aSEmmanuel Vadot&sdmmc1_b4_pins_a { 195*f126890aSEmmanuel Vadot /* 196*f126890aSEmmanuel Vadot * board lacks external pull-ups on SDMMC lines. Class 10 SD refuses to 197*f126890aSEmmanuel Vadot * work, thus enable internal pull-ups. 198*f126890aSEmmanuel Vadot */ 199*f126890aSEmmanuel Vadot pins1 { 200*f126890aSEmmanuel Vadot /delete-property/ bias-disable; 201*f126890aSEmmanuel Vadot bias-pull-up; 202*f126890aSEmmanuel Vadot }; 203*f126890aSEmmanuel Vadot pins2 { 204*f126890aSEmmanuel Vadot /delete-property/ bias-disable; 205*f126890aSEmmanuel Vadot bias-pull-up; 206*f126890aSEmmanuel Vadot }; 207*f126890aSEmmanuel Vadot}; 208*f126890aSEmmanuel Vadot 209*f126890aSEmmanuel Vadot&sdmmc2 { 210*f126890aSEmmanuel Vadot pinctrl-names = "default", "opendrain", "sleep"; 211*f126890aSEmmanuel Vadot pinctrl-0 = <&sdmmc2_b4_pins_a &sdmmc2_d47_pins_b>; 212*f126890aSEmmanuel Vadot pinctrl-1 = <&sdmmc2_b4_od_pins_a &sdmmc2_d47_pins_b>; 213*f126890aSEmmanuel Vadot pinctrl-2 = <&sdmmc2_b4_sleep_pins_a &sdmmc2_d47_sleep_pins_b>; 214*f126890aSEmmanuel Vadot bus-width = <8>; 215*f126890aSEmmanuel Vadot mmc-ddr-3_3v; 216*f126890aSEmmanuel Vadot no-1-8-v; 217*f126890aSEmmanuel Vadot no-sd; 218*f126890aSEmmanuel Vadot no-sdio; 219*f126890aSEmmanuel Vadot non-removable; 220*f126890aSEmmanuel Vadot st,neg-edge; 221*f126890aSEmmanuel Vadot vmmc-supply = <®_3v3>; 222*f126890aSEmmanuel Vadot status = "okay"; 223*f126890aSEmmanuel Vadot}; 224*f126890aSEmmanuel Vadot 225*f126890aSEmmanuel Vadot&timers3 { 226*f126890aSEmmanuel Vadot status = "okay"; 227*f126890aSEmmanuel Vadot 228*f126890aSEmmanuel Vadot backlight_pwm: pwm { 229*f126890aSEmmanuel Vadot pinctrl-names = "default", "sleep"; 230*f126890aSEmmanuel Vadot pinctrl-0 = <&pwm3_pins_b>; 231*f126890aSEmmanuel Vadot pinctrl-1 = <&pwm3_sleep_pins_b>; 232*f126890aSEmmanuel Vadot status = "okay"; 233*f126890aSEmmanuel Vadot }; 234*f126890aSEmmanuel Vadot}; 235*f126890aSEmmanuel Vadot 236*f126890aSEmmanuel Vadot&timers5 { 237*f126890aSEmmanuel Vadot status = "okay"; 238*f126890aSEmmanuel Vadot 239*f126890aSEmmanuel Vadot leds_pwm: pwm { 240*f126890aSEmmanuel Vadot pinctrl-names = "default", "sleep"; 241*f126890aSEmmanuel Vadot pinctrl-0 = <&pwm5_pins_b>; 242*f126890aSEmmanuel Vadot pinctrl-1 = <&pwm5_sleep_pins_b>; 243*f126890aSEmmanuel Vadot status = "okay"; 244*f126890aSEmmanuel Vadot }; 245*f126890aSEmmanuel Vadot}; 246*f126890aSEmmanuel Vadot 247*f126890aSEmmanuel Vadot&uart4 { 248*f126890aSEmmanuel Vadot pinctrl-names = "default"; 249*f126890aSEmmanuel Vadot pinctrl-0 = <&uart4_pins_a>; 250*f126890aSEmmanuel Vadot /delete-property/dmas; 251*f126890aSEmmanuel Vadot /delete-property/dma-names; 252*f126890aSEmmanuel Vadot status = "okay"; 253*f126890aSEmmanuel Vadot}; 254