1fac71e4eSEmmanuel Vadot// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2fac71e4eSEmmanuel Vadot/* 3fac71e4eSEmmanuel Vadot * Copyright (C) 2023 Marek Vasut <marex@denx.de> 4fac71e4eSEmmanuel Vadot * 5fac71e4eSEmmanuel Vadot * DHCOM iMX8MP variant: 6fac71e4eSEmmanuel Vadot * DHCM-iMX8ML8-C160-R409-F1638-SPI16-GE-CAN2-SD-RTC-WBTA-ADC-T-RGB-CSI2-HS-I-01D2 7fac71e4eSEmmanuel Vadot * DHCOM PCB number: 660-100 or newer 8fac71e4eSEmmanuel Vadot * PDK3 PCB number: 669-100 or newer 9fac71e4eSEmmanuel Vadot */ 10fac71e4eSEmmanuel Vadot 11fac71e4eSEmmanuel Vadot/dts-v1/; 12fac71e4eSEmmanuel Vadot 13fac71e4eSEmmanuel Vadot#include <dt-bindings/leds/common.h> 14fac71e4eSEmmanuel Vadot#include <dt-bindings/phy/phy-imx8-pcie.h> 15fac71e4eSEmmanuel Vadot#include "imx8mp-dhcom-som.dtsi" 16fac71e4eSEmmanuel Vadot 17fac71e4eSEmmanuel Vadot/ { 18fac71e4eSEmmanuel Vadot model = "DH electronics i.MX8M Plus DHCOM Premium Developer Kit (3)"; 19fac71e4eSEmmanuel Vadot compatible = "dh,imx8mp-dhcom-pdk3", "dh,imx8mp-dhcom-som", 20fac71e4eSEmmanuel Vadot "fsl,imx8mp"; 21fac71e4eSEmmanuel Vadot 22fac71e4eSEmmanuel Vadot chosen { 23fac71e4eSEmmanuel Vadot stdout-path = &uart1; 24fac71e4eSEmmanuel Vadot }; 25fac71e4eSEmmanuel Vadot 26f126890aSEmmanuel Vadot clk_ext_audio_codec: clock-codec { 27fac71e4eSEmmanuel Vadot compatible = "fixed-clock"; 28fac71e4eSEmmanuel Vadot #clock-cells = <0>; 29f126890aSEmmanuel Vadot clock-frequency = <24000000>; 30f126890aSEmmanuel Vadot }; 31f126890aSEmmanuel Vadot 32f126890aSEmmanuel Vadot clk_xtal25: clock-xtal25 { 33f126890aSEmmanuel Vadot compatible = "fixed-clock"; 34f126890aSEmmanuel Vadot #clock-cells = <0>; 35f126890aSEmmanuel Vadot clock-frequency = <25000000>; 36fac71e4eSEmmanuel Vadot }; 37fac71e4eSEmmanuel Vadot 38fac71e4eSEmmanuel Vadot gpio-keys { 39fac71e4eSEmmanuel Vadot compatible = "gpio-keys"; 40fac71e4eSEmmanuel Vadot 41fac71e4eSEmmanuel Vadot button-0 { 42fac71e4eSEmmanuel Vadot gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; /* GPIO A */ 43fac71e4eSEmmanuel Vadot label = "TA1-GPIO-A"; 44fac71e4eSEmmanuel Vadot linux,code = <KEY_A>; 45fac71e4eSEmmanuel Vadot pinctrl-0 = <&pinctrl_dhcom_a>; 46fac71e4eSEmmanuel Vadot pinctrl-names = "default"; 47fac71e4eSEmmanuel Vadot wakeup-source; 48fac71e4eSEmmanuel Vadot }; 49fac71e4eSEmmanuel Vadot 50fac71e4eSEmmanuel Vadot button-1 { 51fac71e4eSEmmanuel Vadot gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; /* GPIO B */ 52fac71e4eSEmmanuel Vadot label = "TA2-GPIO-B"; 53fac71e4eSEmmanuel Vadot linux,code = <KEY_B>; 54fac71e4eSEmmanuel Vadot pinctrl-0 = <&pinctrl_dhcom_b>; 55fac71e4eSEmmanuel Vadot pinctrl-names = "default"; 56fac71e4eSEmmanuel Vadot wakeup-source; 57fac71e4eSEmmanuel Vadot }; 58fac71e4eSEmmanuel Vadot 59fac71e4eSEmmanuel Vadot button-2 { 60fac71e4eSEmmanuel Vadot gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; /* GPIO C */ 61fac71e4eSEmmanuel Vadot label = "TA3-GPIO-C"; 62fac71e4eSEmmanuel Vadot linux,code = <KEY_C>; 63fac71e4eSEmmanuel Vadot pinctrl-0 = <&pinctrl_dhcom_c>; 64fac71e4eSEmmanuel Vadot pinctrl-names = "default"; 65fac71e4eSEmmanuel Vadot wakeup-source; 66fac71e4eSEmmanuel Vadot }; 67fac71e4eSEmmanuel Vadot 68fac71e4eSEmmanuel Vadot button-3 { 69fac71e4eSEmmanuel Vadot gpios = <&gpio5 22 GPIO_ACTIVE_LOW>; /* GPIO E */ 70fac71e4eSEmmanuel Vadot label = "TA4-GPIO-E"; 71fac71e4eSEmmanuel Vadot linux,code = <KEY_E>; 72fac71e4eSEmmanuel Vadot pinctrl-0 = <&pinctrl_dhcom_e>; 73fac71e4eSEmmanuel Vadot pinctrl-names = "default"; 74fac71e4eSEmmanuel Vadot wakeup-source; 75fac71e4eSEmmanuel Vadot }; 76fac71e4eSEmmanuel Vadot }; 77fac71e4eSEmmanuel Vadot 78fac71e4eSEmmanuel Vadot led { 79fac71e4eSEmmanuel Vadot compatible = "gpio-leds"; 80fac71e4eSEmmanuel Vadot 81fac71e4eSEmmanuel Vadot led-0 { 82fac71e4eSEmmanuel Vadot color = <LED_COLOR_ID_GREEN>; 83fac71e4eSEmmanuel Vadot default-state = "off"; 84fac71e4eSEmmanuel Vadot function = LED_FUNCTION_INDICATOR; 85fac71e4eSEmmanuel Vadot function-enumerator = <0>; 86fac71e4eSEmmanuel Vadot gpios = <&gpio4 27 GPIO_ACTIVE_HIGH>; /* GPIO D */ 87fac71e4eSEmmanuel Vadot pinctrl-0 = <&pinctrl_dhcom_d>; 88fac71e4eSEmmanuel Vadot pinctrl-names = "default"; 89fac71e4eSEmmanuel Vadot }; 90fac71e4eSEmmanuel Vadot 91fac71e4eSEmmanuel Vadot led-1 { 92fac71e4eSEmmanuel Vadot color = <LED_COLOR_ID_GREEN>; 93fac71e4eSEmmanuel Vadot default-state = "off"; 94fac71e4eSEmmanuel Vadot function = LED_FUNCTION_INDICATOR; 95fac71e4eSEmmanuel Vadot function-enumerator = <1>; 96fac71e4eSEmmanuel Vadot gpios = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* GPIO F */ 97fac71e4eSEmmanuel Vadot pinctrl-0 = <&pinctrl_dhcom_f>; 98fac71e4eSEmmanuel Vadot pinctrl-names = "default"; 99fac71e4eSEmmanuel Vadot }; 100fac71e4eSEmmanuel Vadot 101fac71e4eSEmmanuel Vadot led-2 { 102fac71e4eSEmmanuel Vadot color = <LED_COLOR_ID_GREEN>; 103fac71e4eSEmmanuel Vadot default-state = "off"; 104fac71e4eSEmmanuel Vadot function = LED_FUNCTION_INDICATOR; 105fac71e4eSEmmanuel Vadot function-enumerator = <2>; 106fac71e4eSEmmanuel Vadot gpios = <&gpio1 0 GPIO_ACTIVE_HIGH>; /* GPIO G */ 107fac71e4eSEmmanuel Vadot pinctrl-0 = <&pinctrl_dhcom_g>; 108fac71e4eSEmmanuel Vadot pinctrl-names = "default"; 109fac71e4eSEmmanuel Vadot }; 110fac71e4eSEmmanuel Vadot 111fac71e4eSEmmanuel Vadot led-3 { 112fac71e4eSEmmanuel Vadot color = <LED_COLOR_ID_GREEN>; 113fac71e4eSEmmanuel Vadot default-state = "off"; 114fac71e4eSEmmanuel Vadot function = LED_FUNCTION_INDICATOR; 115fac71e4eSEmmanuel Vadot function-enumerator = <3>; 116fac71e4eSEmmanuel Vadot gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; /* GPIO I */ 117fac71e4eSEmmanuel Vadot pinctrl-0 = <&pinctrl_dhcom_i>; 118fac71e4eSEmmanuel Vadot pinctrl-names = "default"; 119fac71e4eSEmmanuel Vadot }; 120fac71e4eSEmmanuel Vadot }; 121fac71e4eSEmmanuel Vadot 122f126890aSEmmanuel Vadot reg_3p3vdd: regulator-3p3vdd { /* 3.3VDD */ 123fac71e4eSEmmanuel Vadot compatible = "regulator-fixed"; 124fac71e4eSEmmanuel Vadot regulator-always-on; 125fac71e4eSEmmanuel Vadot regulator-min-microvolt = <3300000>; 126fac71e4eSEmmanuel Vadot regulator-max-microvolt = <3300000>; 127f126890aSEmmanuel Vadot regulator-name = "3P3VDD"; 128f126890aSEmmanuel Vadot }; 129f126890aSEmmanuel Vadot 130f126890aSEmmanuel Vadot sound { 131f126890aSEmmanuel Vadot compatible = "simple-audio-card"; 132f126890aSEmmanuel Vadot simple-audio-card,name = "SGTL5000-Card"; 133f126890aSEmmanuel Vadot simple-audio-card,format = "i2s"; 134f126890aSEmmanuel Vadot simple-audio-card,bitclock-master = <&codec_dai>; 135f126890aSEmmanuel Vadot simple-audio-card,frame-master = <&codec_dai>; 136f126890aSEmmanuel Vadot simple-audio-card,widgets = "Headphone", "Headphone Jack"; 137f126890aSEmmanuel Vadot simple-audio-card,routing = "Headphone Jack", "HP_OUT"; 138f126890aSEmmanuel Vadot 139f126890aSEmmanuel Vadot cpu_dai: simple-audio-card,cpu { 140f126890aSEmmanuel Vadot sound-dai = <&sai3>; 141f126890aSEmmanuel Vadot }; 142f126890aSEmmanuel Vadot 143f126890aSEmmanuel Vadot codec_dai: simple-audio-card,codec { 144f126890aSEmmanuel Vadot sound-dai = <&sgtl5000>; 145f126890aSEmmanuel Vadot }; 146fac71e4eSEmmanuel Vadot }; 147fac71e4eSEmmanuel Vadot}; 148fac71e4eSEmmanuel Vadot 149fac71e4eSEmmanuel Vadot&i2c5 { 150fac71e4eSEmmanuel Vadot i2c-mux@70 { 151fac71e4eSEmmanuel Vadot compatible = "nxp,pca9540"; 152fac71e4eSEmmanuel Vadot reg = <0x70>; 153fac71e4eSEmmanuel Vadot #address-cells = <1>; 154fac71e4eSEmmanuel Vadot #size-cells = <0>; 155fac71e4eSEmmanuel Vadot 156fac71e4eSEmmanuel Vadot i2cmuxed0: i2c@0 { 157fac71e4eSEmmanuel Vadot #address-cells = <1>; 158fac71e4eSEmmanuel Vadot #size-cells = <0>; 159fac71e4eSEmmanuel Vadot reg = <0>; 160fac71e4eSEmmanuel Vadot 161f126890aSEmmanuel Vadot sgtl5000: codec@a { 162f126890aSEmmanuel Vadot compatible = "fsl,sgtl5000"; 163f126890aSEmmanuel Vadot reg = <0x0a>; 164f126890aSEmmanuel Vadot #sound-dai-cells = <0>; 165f126890aSEmmanuel Vadot clocks = <&clk_ext_audio_codec>; 166f126890aSEmmanuel Vadot VDDA-supply = <®_3p3vdd>; 167f126890aSEmmanuel Vadot VDDIO-supply = <®_vdd_3p3v_awo>; 168f126890aSEmmanuel Vadot }; 169f126890aSEmmanuel Vadot 170fac71e4eSEmmanuel Vadot typec@3d { 171fac71e4eSEmmanuel Vadot compatible = "nxp,ptn5150"; 172fac71e4eSEmmanuel Vadot reg = <0x3d>; 173fac71e4eSEmmanuel Vadot interrupt-parent = <&gpio4>; 174fac71e4eSEmmanuel Vadot interrupts = <25 IRQ_TYPE_EDGE_FALLING>; 175fac71e4eSEmmanuel Vadot pinctrl-names = "default"; 176fac71e4eSEmmanuel Vadot pinctrl-0 = <&pinctrl_ptn5150>; 177fac71e4eSEmmanuel Vadot 178*84943d6fSEmmanuel Vadot port { 179fac71e4eSEmmanuel Vadot 180fac71e4eSEmmanuel Vadot ptn5150_out_ep: endpoint { 181*84943d6fSEmmanuel Vadot remote-endpoint = <&dwc3_0_ep>; 182fac71e4eSEmmanuel Vadot }; 183fac71e4eSEmmanuel Vadot }; 184fac71e4eSEmmanuel Vadot }; 185fac71e4eSEmmanuel Vadot 186fac71e4eSEmmanuel Vadot power-sensor@40 { 187fac71e4eSEmmanuel Vadot compatible = "ti,ina238"; 188fac71e4eSEmmanuel Vadot reg = <0x40>; 189fac71e4eSEmmanuel Vadot shunt-resistor = <20000>; /* 0.02 R */ 190fac71e4eSEmmanuel Vadot ti,shunt-gain = <1>; /* Drop cca. 40mV */ 191fac71e4eSEmmanuel Vadot }; 192fac71e4eSEmmanuel Vadot 193fac71e4eSEmmanuel Vadot eeprom_board: eeprom@54 { 194fac71e4eSEmmanuel Vadot compatible = "atmel,24c04"; 195fac71e4eSEmmanuel Vadot pagesize = <16>; 196fac71e4eSEmmanuel Vadot reg = <0x54>; 197fac71e4eSEmmanuel Vadot }; 198f126890aSEmmanuel Vadot 199f126890aSEmmanuel Vadot pcieclk: clock@6b { 200f126890aSEmmanuel Vadot compatible = "skyworks,si52144"; 201f126890aSEmmanuel Vadot reg = <0x6b>; 202f126890aSEmmanuel Vadot clocks = <&clk_xtal25>; 203f126890aSEmmanuel Vadot #clock-cells = <1>; 204f126890aSEmmanuel Vadot }; 205fac71e4eSEmmanuel Vadot }; 206fac71e4eSEmmanuel Vadot 207fac71e4eSEmmanuel Vadot i2cmuxed1: i2c@1 { /* HDMI DDC I2C */ 208fac71e4eSEmmanuel Vadot #address-cells = <1>; 209fac71e4eSEmmanuel Vadot #size-cells = <0>; 210fac71e4eSEmmanuel Vadot reg = <1>; 211fac71e4eSEmmanuel Vadot }; 212fac71e4eSEmmanuel Vadot }; 213fac71e4eSEmmanuel Vadot}; 214fac71e4eSEmmanuel Vadot 215fac71e4eSEmmanuel Vadot&fec { /* Second ethernet */ 216fac71e4eSEmmanuel Vadot pinctrl-0 = <&pinctrl_fec_rgmii>; 217fac71e4eSEmmanuel Vadot phy-handle = <ðphypdk>; 218fac71e4eSEmmanuel Vadot phy-mode = "rgmii-id"; 219fac71e4eSEmmanuel Vadot 220fac71e4eSEmmanuel Vadot mdio { 221fac71e4eSEmmanuel Vadot ethphypdk: ethernet-phy@7 { /* Micrel KSZ9131RNXI */ 222fac71e4eSEmmanuel Vadot compatible = "ethernet-phy-id0022.1642", 223fac71e4eSEmmanuel Vadot "ethernet-phy-ieee802.3-c22"; 224fac71e4eSEmmanuel Vadot interrupt-parent = <&gpio4>; 225fac71e4eSEmmanuel Vadot interrupts = <3 IRQ_TYPE_LEVEL_LOW>; 226fac71e4eSEmmanuel Vadot pinctrl-0 = <&pinctrl_ethphy1>; 227fac71e4eSEmmanuel Vadot pinctrl-names = "default"; 228fac71e4eSEmmanuel Vadot reg = <7>; 229fac71e4eSEmmanuel Vadot reset-assert-us = <1000>; 230fac71e4eSEmmanuel Vadot /* RESET_N signal rise time ~100ms */ 231fac71e4eSEmmanuel Vadot reset-deassert-us = <120000>; 232fac71e4eSEmmanuel Vadot reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>; 233fac71e4eSEmmanuel Vadot }; 234fac71e4eSEmmanuel Vadot }; 235fac71e4eSEmmanuel Vadot}; 236fac71e4eSEmmanuel Vadot 237fac71e4eSEmmanuel Vadot&flexcan1 { 238fac71e4eSEmmanuel Vadot status = "okay"; 239fac71e4eSEmmanuel Vadot}; 240fac71e4eSEmmanuel Vadot 241fac71e4eSEmmanuel Vadot&pcie_phy { 242f126890aSEmmanuel Vadot clocks = <&pcieclk 1>; 243fac71e4eSEmmanuel Vadot clock-names = "ref"; 244fac71e4eSEmmanuel Vadot fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_INPUT>; 245fac71e4eSEmmanuel Vadot status = "okay"; 246fac71e4eSEmmanuel Vadot}; 247fac71e4eSEmmanuel Vadot 248fac71e4eSEmmanuel Vadot&pcie { 249fac71e4eSEmmanuel Vadot fsl,max-link-speed = <3>; 250fac71e4eSEmmanuel Vadot reset-gpio = <&gpio1 6 GPIO_ACTIVE_LOW>; 251fac71e4eSEmmanuel Vadot status = "okay"; 252fac71e4eSEmmanuel Vadot}; 253fac71e4eSEmmanuel Vadot 254f126890aSEmmanuel Vadot&sai3 { 255f126890aSEmmanuel Vadot pinctrl-names = "default"; 256f126890aSEmmanuel Vadot pinctrl-0 = <&pinctrl_sai3>; 257f126890aSEmmanuel Vadot assigned-clocks = <&clk IMX8MP_CLK_SAI3>; 258f126890aSEmmanuel Vadot assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; 259f126890aSEmmanuel Vadot assigned-clock-rates = <12288000>; 260f126890aSEmmanuel Vadot fsl,sai-mclk-direction-output; 261f126890aSEmmanuel Vadot status = "okay"; 262f126890aSEmmanuel Vadot}; 263f126890aSEmmanuel Vadot 264fac71e4eSEmmanuel Vadot&usb_dwc3_0 { 265fac71e4eSEmmanuel Vadot usb-role-switch; 266fac71e4eSEmmanuel Vadot 267fac71e4eSEmmanuel Vadot port { 268*84943d6fSEmmanuel Vadot dwc3_0_ep: endpoint { 269fac71e4eSEmmanuel Vadot remote-endpoint = <&ptn5150_out_ep>; 270fac71e4eSEmmanuel Vadot }; 271fac71e4eSEmmanuel Vadot }; 272fac71e4eSEmmanuel Vadot}; 273fac71e4eSEmmanuel Vadot 274fac71e4eSEmmanuel Vadot&usb3_1 { 275fac71e4eSEmmanuel Vadot fsl,disable-port-power-control; 276fac71e4eSEmmanuel Vadot fsl,permanently-attached; 277fac71e4eSEmmanuel Vadot}; 278fac71e4eSEmmanuel Vadot 279fac71e4eSEmmanuel Vadot&usb_dwc3_1 { 280fac71e4eSEmmanuel Vadot /* This port has USB5734 Hub connected to it, PWR/OC pins are unused */ 281fac71e4eSEmmanuel Vadot /delete-property/ pinctrl-names; 282fac71e4eSEmmanuel Vadot /delete-property/ pinctrl-0; 283fac71e4eSEmmanuel Vadot}; 284fac71e4eSEmmanuel Vadot 285fac71e4eSEmmanuel Vadot&iomuxc { 286fac71e4eSEmmanuel Vadot /* 287fac71e4eSEmmanuel Vadot * GPIO_A,B,C,E are connected to buttons. 288fac71e4eSEmmanuel Vadot * GPIO_D,F,G,I are connected to LEDs. 289fac71e4eSEmmanuel Vadot * GPIO_H is connected to USB Hub RESET_N. 290fac71e4eSEmmanuel Vadot * GPIO_M is connected to CLKOUT2. 291fac71e4eSEmmanuel Vadot */ 292fac71e4eSEmmanuel Vadot pinctrl-0 = <&pinctrl_hog_base 293fac71e4eSEmmanuel Vadot &pinctrl_dhcom_h &pinctrl_dhcom_j &pinctrl_dhcom_k 294fac71e4eSEmmanuel Vadot &pinctrl_dhcom_l 295fac71e4eSEmmanuel Vadot &pinctrl_dhcom_int>; 296fac71e4eSEmmanuel Vadot 297fac71e4eSEmmanuel Vadot pinctrl_ptn5150: ptn5150grp { 298fac71e4eSEmmanuel Vadot fsl,pins = < 299fac71e4eSEmmanuel Vadot MX8MP_IOMUXC_SAI2_TXC__GPIO4_IO25 0x40000000 300fac71e4eSEmmanuel Vadot >; 301fac71e4eSEmmanuel Vadot }; 302fac71e4eSEmmanuel Vadot}; 303