| 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 |
&gpio4 { |
| 106 |
pinctrl-names = "default"; |
| 107 |
pinctrl-0 = <&pinctrl_gpio4>, <&pinctrl_gpio6>; |
| 108 |
}; |
| 109 |
|
| 110 |
&hdmi_pai { |
| 111 |
status = "okay"; |
| 112 |
}; |
| 113 |
|
| 114 |
&hdmi_pvi { |
| 115 |
status = "okay"; |
| 116 |
}; |
| 117 |
|
| 118 |
/* SMARC HDMI */ |
| 119 |
&hdmi_tx { |
| 120 |
status = "okay"; |
| 121 |
|
| 122 |
ports { |
| 123 |
port@1 { |
| 124 |
hdmi_tx_out: endpoint { |
| 125 |
remote-endpoint = <&native_hdmi_connector_in>; |
| 126 |
}; |
| 127 |
}; |
| 128 |
}; |
| 129 |
}; |
| 130 |
|
| 131 |
&hdmi_tx_phy { |
| 132 |
status = "okay"; |
| 133 |
}; |
| 134 |
|
| 135 |
/* SMARC I2C_LCD */ |
| 136 |
&i2c2 { |
| 137 |
status = "okay"; |
| 138 |
|
| 139 |
i2c-mux@70 { |
| 140 |
compatible = "nxp,pca9543"; |
| 141 |
reg = <0x70>; |
| 142 |
#address-cells = <1>; |
| 143 |
#size-cells = <0>; |
| 144 |
|
| 145 |
/* I2C on DSI Connector Pins 4/6 */ |
| 146 |
i2c_dsi_0: i2c@0 { |
| 147 |
reg = <0>; |
| 148 |
#address-cells = <1>; |
| 149 |
#size-cells = <0>; |
| 150 |
}; |
| 151 |
|
| 152 |
/* I2C on DSI Connector Pins 52/54 */ |
| 153 |
i2c_dsi_1: i2c@1 { |
| 154 |
reg = <1>; |
| 155 |
#address-cells = <1>; |
| 156 |
#size-cells = <0>; |
| 157 |
}; |
| 158 |
}; |
| 159 |
}; |
| 160 |
|
| 161 |
/* SMARC I2C_CAM0 */ |
| 162 |
&i2c3 { |
| 163 |
status = "okay"; |
| 164 |
}; |
| 165 |
|
| 166 |
/* SMARC I2C_GP */ |
| 167 |
&i2c4 { |
| 168 |
/* Audio Codec */ |
| 169 |
wm8904_1a: audio-codec@1a { |
| 170 |
compatible = "wlf,wm8904"; |
| 171 |
reg = <0x1a>; |
| 172 |
pinctrl-names = "default"; |
| 173 |
pinctrl-0 = <&pinctrl_sai1>, <&pinctrl_sai1_mclk>; |
| 174 |
#sound-dai-cells = <0>; |
| 175 |
clocks = <&audio_blk_ctrl IMX8MP_CLK_AUDIOMIX_SAI1_MCLK1>; |
| 176 |
clock-names = "mclk"; |
| 177 |
AVDD-supply = <®_carrier_1p8v>; |
| 178 |
CPVDD-supply = <®_carrier_1p8v>; |
| 179 |
DBVDD-supply = <®_carrier_1p8v>; |
| 180 |
DCVDD-supply = <®_carrier_1p8v>; |
| 181 |
MICVDD-supply = <®_carrier_1p8v>; |
| 182 |
}; |
| 183 |
|
| 184 |
/* On-Carrier Temperature Sensor */ |
| 185 |
temperature-sensor@4f { |
| 186 |
compatible = "ti,tmp1075"; |
| 187 |
reg = <0x4f>; |
| 188 |
}; |
| 189 |
|
| 190 |
/* On-Carrier EEPROM */ |
| 191 |
eeprom@57 { |
| 192 |
compatible = "st,24c02", "atmel,24c02"; |
| 193 |
reg = <0x57>; |
| 194 |
pagesize = <16>; |
| 195 |
}; |
| 196 |
}; |
| 197 |
|
| 198 |
/* SMARC I2C_CAM1 */ |
| 199 |
&i2c5 { |
| 200 |
status = "okay"; |
| 201 |
}; |
| 202 |
|
| 203 |
/* SMARC I2C_PM */ |
| 204 |
&i2c6 { |
| 205 |
clock-frequency = <100000>; |
| 206 |
status = "okay"; |
| 207 |
|
| 208 |
/* Fan controller */ |
| 209 |
fan_controller: fan@18 { |
| 210 |
compatible = "ti,amc6821"; |
| 211 |
reg = <0x18>; |
| 212 |
#pwm-cells = <2>; |
| 213 |
|
| 214 |
fan { |
| 215 |
cooling-levels = <255>; |
| 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 |
}; |