1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT 2/* Copyright (C) 2025 Toradex */ 3 4/dts-v1/; 5 6#include <dt-bindings/pwm/pwm.h> 7 8#include "imx8mp-toradex-smarc.dtsi" 9 10/ { 11 model = "Toradex SMARC iMX8M Plus on Toradex SMARC Development Board"; 12 compatible = "toradex,smarc-imx8mp-dev", 13 "toradex,smarc-imx8mp", 14 "fsl,imx8mp"; 15 16 hdmi-connector { 17 compatible = "hdmi-connector"; 18 label = "J64"; 19 type = "a"; 20 21 port { 22 native_hdmi_connector_in: endpoint { 23 remote-endpoint = <&hdmi_tx_out>; 24 }; 25 }; 26 }; 27 28 reg_carrier_1p8v: regulator-carrier-1p8v { 29 compatible = "regulator-fixed"; 30 regulator-max-microvolt = <1800000>; 31 regulator-min-microvolt = <1800000>; 32 regulator-name = "On-carrier 1V8"; 33 }; 34 35 sound { 36 compatible = "simple-audio-card"; 37 simple-audio-card,bitclock-master = <&codec_dai>; 38 simple-audio-card,format = "i2s"; 39 simple-audio-card,frame-master = <&codec_dai>; 40 simple-audio-card,mclk-fs = <256>; 41 simple-audio-card,name = "tdx-smarc-wm8904"; 42 simple-audio-card,routing = 43 "Headphone Jack", "HPOUTL", 44 "Headphone Jack", "HPOUTR", 45 "IN2L", "Line In Jack", 46 "IN2R", "Line In Jack", 47 "Microphone Jack", "MICBIAS", 48 "IN1L", "Microphone Jack"; 49 simple-audio-card,widgets = 50 "Microphone", "Microphone Jack", 51 "Headphone", "Headphone Jack", 52 "Line", "Line In Jack"; 53 54 codec_dai: simple-audio-card,codec { 55 clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>; 56 sound-dai = <&wm8904_1a>; 57 }; 58 59 simple-audio-card,cpu { 60 sound-dai = <&sai1>; 61 }; 62 }; 63}; 64 65&aud2htx { 66 status = "okay"; 67}; 68 69/* SMARC SPI0 */ 70&ecspi1 { 71 status = "okay"; 72}; 73 74/* SMARC GBE0 */ 75&eqos { 76 status = "okay"; 77}; 78 79/* SMARC GBE1 */ 80&fec { 81 status = "okay"; 82}; 83 84/* SMARC CAN1 */ 85&flexcan1 { 86 status = "okay"; 87}; 88 89/* SMARC CAN0 */ 90&flexcan2 { 91 status = "okay"; 92}; 93 94&gpio1 { 95 pinctrl-names = "default"; 96 pinctrl-0 = <&pinctrl_gpio7>, 97 <&pinctrl_gpio8>, 98 <&pinctrl_gpio9>, 99 <&pinctrl_gpio10>, 100 <&pinctrl_gpio11>, 101 <&pinctrl_gpio12>, 102 <&pinctrl_gpio13>; 103}; 104 105&gpio3 { 106 pinctrl-names = "default"; 107 pinctrl-0 = <&pinctrl_lvds_dsi_sel>; 108}; 109 110&gpio4 { 111 pinctrl-names = "default"; 112 pinctrl-0 = <&pinctrl_gpio4>, <&pinctrl_gpio6>; 113}; 114 115&hdmi_pvi { 116 status = "okay"; 117}; 118 119/* SMARC HDMI */ 120&hdmi_tx { 121 status = "okay"; 122 123 ports { 124 port@1 { 125 hdmi_tx_out: endpoint { 126 remote-endpoint = <&native_hdmi_connector_in>; 127 }; 128 }; 129 }; 130}; 131 132&hdmi_tx_phy { 133 status = "okay"; 134}; 135 136/* SMARC I2C_LCD */ 137&i2c2 { 138 status = "okay"; 139 140 i2c-mux@70 { 141 compatible = "nxp,pca9543"; 142 reg = <0x70>; 143 #address-cells = <1>; 144 #size-cells = <0>; 145 146 /* I2C on DSI Connector Pins 4/6 */ 147 i2c_dsi_0: i2c@0 { 148 reg = <0>; 149 #address-cells = <1>; 150 #size-cells = <0>; 151 }; 152 153 /* I2C on DSI Connector Pins 52/54 */ 154 i2c_dsi_1: i2c@1 { 155 reg = <1>; 156 #address-cells = <1>; 157 #size-cells = <0>; 158 }; 159 }; 160}; 161 162/* SMARC I2C_CAM0 */ 163&i2c3 { 164 status = "okay"; 165}; 166 167/* SMARC I2C_GP */ 168&i2c4 { 169 /* Audio Codec */ 170 wm8904_1a: audio-codec@1a { 171 compatible = "wlf,wm8904"; 172 reg = <0x1a>; 173 pinctrl-names = "default"; 174 pinctrl-0 = <&pinctrl_sai1>, <&pinctrl_sai1_mclk>; 175 #sound-dai-cells = <0>; 176 clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>; 177 clock-names = "mclk"; 178 AVDD-supply = <®_carrier_1p8v>; 179 CPVDD-supply = <®_carrier_1p8v>; 180 DBVDD-supply = <®_carrier_1p8v>; 181 DCVDD-supply = <®_carrier_1p8v>; 182 MICVDD-supply = <®_carrier_1p8v>; 183 }; 184 185 /* On-Carrier Temperature Sensor */ 186 temperature-sensor@4f { 187 compatible = "ti,tmp1075"; 188 reg = <0x4f>; 189 }; 190 191 /* On-Carrier EEPROM */ 192 eeprom@57 { 193 compatible = "st,24c02", "atmel,24c02"; 194 reg = <0x57>; 195 pagesize = <16>; 196 }; 197}; 198 199/* SMARC I2C_CAM1 */ 200&i2c5 { 201 status = "okay"; 202}; 203 204/* SMARC I2C_PM */ 205&i2c6 { 206 clock-frequency = <100000>; 207 status = "okay"; 208 209 /* Fan controller */ 210 fan_controller: fan@18 { 211 compatible = "ti,amc6821"; 212 reg = <0x18>; 213 #pwm-cells = <2>; 214 215 fan { 216 pwms = <&fan_controller 40000 PWM_POLARITY_INVERTED>; 217 }; 218 }; 219 220 /* Current measurement into module VDD */ 221 hwmon@40 { 222 compatible = "ti,ina226"; 223 reg = <0x40>; 224 shunt-resistor = <5000>; 225 }; 226}; 227 228&lcdif3 { 229 status = "okay"; 230}; 231 232/* SMARC PCIE_A, M2 Key B */ 233&pcie { 234 status = "okay"; 235}; 236 237&pcie_phy { 238 status = "okay"; 239}; 240 241/* SMARC LCD1_BKLT_PWM */ 242&pwm1 { 243 status = "okay"; 244}; 245 246/* SMARC LCD0_BKLT_PWM */ 247&pwm2 { 248 status = "okay"; 249}; 250 251/* SMARC I2S0 */ 252&sai1 { 253 assigned-clocks = <&clk IMX8MP_CLK_SAI1>; 254 assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; 255 assigned-clock-rates = <24576000>; 256 fsl,sai-mclk-direction-output; 257 status = "okay"; 258}; 259 260/* SMARC HDMI Audio */ 261&sound_hdmi { 262 status = "okay"; 263}; 264 265/* SMARC SER0, RS485. Optional M.2 KEY E */ 266&uart1 { 267 linux,rs485-enabled-at-boot-time; 268 rs485-rts-active-low; 269 rs485-rx-during-tx; 270 status = "okay"; 271}; 272 273/* SMARC SER2 */ 274&uart2 { 275 status = "okay"; 276}; 277 278/* SMARC SER1, used as the Linux Console */ 279&uart4 { 280 status = "okay"; 281}; 282 283/* SMARC USB0 */ 284&usb3_0 { 285 status = "okay"; 286}; 287 288/* SMARC USB1..4 */ 289&usb3_1 { 290 status = "okay"; 291}; 292 293&usb3_phy0 { 294 status = "okay"; 295}; 296 297&usb3_phy1 { 298 status = "okay"; 299}; 300 301/* SMARC SDIO */ 302&usdhc2 { 303 status = "okay"; 304}; 305