1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (C) 2022 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 * PDK2 PCB number: 516-400 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 (2)"; 19 compatible = "dh,imx8mp-dhcom-pdk2", "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 gpio-keys { 33 compatible = "gpio-keys"; 34 35 button-0 { 36 gpios = <&gpio1 9 GPIO_ACTIVE_LOW>; /* GPIO A */ 37 label = "TA1-GPIO-A"; 38 linux,code = <KEY_A>; 39 pinctrl-0 = <&pinctrl_dhcom_a>; 40 pinctrl-names = "default"; 41 wakeup-source; 42 }; 43 44 button-1 { 45 gpios = <&gpio1 8 GPIO_ACTIVE_LOW>; /* GPIO B */ 46 label = "TA2-GPIO-B"; 47 linux,code = <KEY_B>; 48 pinctrl-0 = <&pinctrl_dhcom_b>; 49 pinctrl-names = "default"; 50 wakeup-source; 51 }; 52 53 button-2 { 54 gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; /* GPIO C */ 55 label = "TA3-GPIO-C"; 56 linux,code = <KEY_C>; 57 pinctrl-0 = <&pinctrl_dhcom_c>; 58 pinctrl-names = "default"; 59 wakeup-source; 60 }; 61 62 button-3 { 63 gpios = <&gpio4 27 GPIO_ACTIVE_LOW>; /* GPIO D */ 64 label = "TA4-GPIO-D"; 65 linux,code = <KEY_D>; 66 pinctrl-0 = <&pinctrl_dhcom_d>; 67 pinctrl-names = "default"; 68 wakeup-source; 69 }; 70 }; 71 72 hdmi-connector { 73 compatible = "hdmi-connector"; 74 label = "X38"; 75 type = "a"; 76 77 port { 78 hdmi_connector_in: endpoint { 79 remote-endpoint = <&hdmi_tx_out>; 80 }; 81 }; 82 }; 83 84 led { 85 compatible = "gpio-leds"; 86 87 led-0 { 88 color = <LED_COLOR_ID_GREEN>; 89 default-state = "off"; 90 function = LED_FUNCTION_INDICATOR; 91 function-enumerator = <0>; 92 gpios = <&gpio5 22 GPIO_ACTIVE_HIGH>; /* GPIO E */ 93 pinctrl-0 = <&pinctrl_dhcom_e>; 94 pinctrl-names = "default"; 95 }; 96 97 led-1 { 98 color = <LED_COLOR_ID_GREEN>; 99 default-state = "off"; 100 function = LED_FUNCTION_INDICATOR; 101 function-enumerator = <1>; 102 gpios = <&gpio5 23 GPIO_ACTIVE_HIGH>; /* GPIO F */ 103 pinctrl-0 = <&pinctrl_dhcom_f>; 104 pinctrl-names = "default"; 105 }; 106 107 led-2 { 108 color = <LED_COLOR_ID_GREEN>; 109 default-state = "off"; 110 function = LED_FUNCTION_INDICATOR; 111 function-enumerator = <2>; 112 gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>; /* GPIO H */ 113 pinctrl-0 = <&pinctrl_dhcom_h>; 114 pinctrl-names = "default"; 115 }; 116 117 led-3 { 118 color = <LED_COLOR_ID_GREEN>; 119 default-state = "off"; 120 function = LED_FUNCTION_INDICATOR; 121 function-enumerator = <3>; 122 gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>; /* GPIO I */ 123 pinctrl-0 = <&pinctrl_dhcom_i>; 124 pinctrl-names = "default"; 125 }; 126 }; 127 128 reg_3p3vdd: regulator-3p3vdd { /* 3.3VDD */ 129 compatible = "regulator-fixed"; 130 regulator-always-on; 131 regulator-min-microvolt = <3300000>; 132 regulator-max-microvolt = <3300000>; 133 regulator-name = "3P3VDD"; 134 }; 135 136 sound { 137 compatible = "simple-audio-card"; 138 simple-audio-card,name = "SGTL5000-Card"; 139 simple-audio-card,format = "i2s"; 140 simple-audio-card,bitclock-master = <&codec_dai>; 141 simple-audio-card,frame-master = <&codec_dai>; 142 simple-audio-card,widgets = "Headphone", "Headphone Jack"; 143 simple-audio-card,routing = "Headphone Jack", "HP_OUT"; 144 145 cpu_dai: simple-audio-card,cpu { 146 sound-dai = <&sai3>; 147 }; 148 149 codec_dai: simple-audio-card,codec { 150 sound-dai = <&sgtl5000>; 151 }; 152 }; 153}; 154 155&i2c5 { 156 sgtl5000: codec@a { 157 compatible = "fsl,sgtl5000"; 158 reg = <0x0a>; 159 #sound-dai-cells = <0>; 160 clocks = <&clk_ext_audio_codec>; 161 VDDA-supply = <®_3p3vdd>; 162 VDDIO-supply = <®_vdd_3p3v_awo>; 163 }; 164}; 165 166&fec { /* Second ethernet */ 167 pinctrl-0 = <&pinctrl_fec_rgmii>; 168 phy-handle = <ðphypdk>; 169 phy-mode = "rgmii"; 170 171 mdio { 172 ethphypdk: ethernet-phy@7 { /* KSZ 9021 */ 173 compatible = "ethernet-phy-ieee802.3-c22"; 174 pinctrl-0 = <&pinctrl_ethphy1>; 175 pinctrl-names = "default"; 176 interrupt-parent = <&gpio4>; 177 interrupts = <3 IRQ_TYPE_LEVEL_LOW>; 178 max-speed = <100>; 179 reg = <7>; 180 reset-assert-us = <1000>; 181 reset-deassert-us = <1000>; 182 reset-gpios = <&gpio4 2 GPIO_ACTIVE_LOW>; 183 rxc-skew-ps = <3000>; 184 rxd0-skew-ps = <0>; 185 rxd1-skew-ps = <0>; 186 rxd2-skew-ps = <0>; 187 rxd3-skew-ps = <0>; 188 rxdv-skew-ps = <0>; 189 txc-skew-ps = <3000>; 190 txd0-skew-ps = <0>; 191 txd1-skew-ps = <0>; 192 txd2-skew-ps = <0>; 193 txd3-skew-ps = <0>; 194 txen-skew-ps = <0>; 195 }; 196 }; 197}; 198 199&flexcan1 { 200 status = "okay"; 201}; 202 203&hdmi_pvi { 204 status = "okay"; 205}; 206 207&hdmi_tx { 208 ddc-i2c-bus = <&i2c5>; 209 pinctrl-names = "default"; 210 pinctrl-0 = <&pinctrl_hdmi>; 211 status = "okay"; 212 213 ports { 214 port@1 { 215 hdmi_tx_out: endpoint { 216 remote-endpoint = <&hdmi_connector_in>; 217 }; 218 }; 219 }; 220}; 221 222&hdmi_tx_phy { 223 status = "okay"; 224}; 225 226&lcdif3 { 227 status = "okay"; 228}; 229 230&pcie_phy { 231 clock-names = "ref"; 232 clocks = <&hsio_blk_ctrl>; 233 fsl,clkreq-unsupported; 234 fsl,refclk-pad-mode = <IMX8_PCIE_REFCLK_PAD_OUTPUT>; 235 status = "okay"; 236}; 237 238&pcie { 239 fsl,max-link-speed = <1>; 240 reset-gpio = <&gpio1 6 GPIO_ACTIVE_LOW>; /* GPIO J */ 241 status = "okay"; 242}; 243 244&sai3 { 245 #sound-dai-cells = <0>; 246 pinctrl-names = "default"; 247 pinctrl-0 = <&pinctrl_sai3>; 248 assigned-clocks = <&clk IMX8MP_CLK_SAI3>; 249 assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; 250 assigned-clock-rates = <12288000>; 251 fsl,sai-mclk-direction-output; 252 status = "okay"; 253}; 254 255&usb3_1 { 256 fsl,over-current-active-low; 257}; 258 259&iomuxc { 260 /* 261 * GPIO_A,B,C,D are connected to buttons. 262 * GPIO_E,F,H,I are connected to LEDs. 263 * GPIO_M is connected to CLKOUT1. 264 */ 265 pinctrl-0 = <&pinctrl_hog_base 266 &pinctrl_dhcom_g &pinctrl_dhcom_j 267 &pinctrl_dhcom_k &pinctrl_dhcom_l 268 &pinctrl_dhcom_int>; 269}; 270