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