1// SPDX-License-Identifier: GPL-2.0-or-later OR MIT 2/* 3 * Copyright (c) Toradex 4 * 5 * Common dtsi for Verdin iMX95 SoM on Ivy carrier board 6 * 7 * https://www.toradex.com/computer-on-modules/verdin-arm-family/nxp-imx95 8 * https://www.toradex.com/products/carrier-board/ivy-carrier-board 9 */ 10 11#include <dt-bindings/mux/mux.h> 12#include <dt-bindings/leds/common.h> 13#include <dt-bindings/net/ti-dp83867.h> 14 15/ { 16 aliases { 17 eeprom1 = &carrier_eeprom; 18 }; 19 20 ain1-current { 21 compatible = "io-channel-mux"; 22 channels = "", "ain1_current"; 23 io-channels = <&ain1_current_unmanaged>; 24 io-channel-names = "parent"; 25 mux-controls = <&ain1_mode_mux_ctrl>; 26 settle-time-us = <1000>; 27 }; 28 29 ain1-voltage { 30 compatible = "io-channel-mux"; 31 channels = "ain1_voltage", ""; 32 io-channels = <&ain1_voltage_unmanaged 0>; 33 io-channel-names = "parent"; 34 mux-controls = <&ain1_mode_mux_ctrl>; 35 settle-time-us = <1000>; 36 }; 37 38 ain2-current { 39 compatible = "io-channel-mux"; 40 channels = "", "ain2_current"; 41 io-channels = <&ain2_current_unmanaged>; 42 io-channel-names = "parent"; 43 mux-controls = <&ain2_mode_mux_ctrl>; 44 settle-time-us = <1000>; 45 }; 46 47 ain2-voltage { 48 compatible = "io-channel-mux"; 49 channels = "ain2_voltage", ""; 50 io-channels = <&ain2_voltage_unmanaged 0>; 51 io-channel-names = "parent"; 52 mux-controls = <&ain2_mode_mux_ctrl>; 53 settle-time-us = <1000>; 54 }; 55 56 /* AIN1 Current w/o AIN1_MODE gpio control */ 57 ain1_current_unmanaged: current-sense-shunt-ain1 { 58 compatible = "current-sense-shunt"; 59 #io-channel-cells = <0>; 60 io-channels = <&ivy_adc1 1>; 61 shunt-resistor-micro-ohms = <100000000>; 62 }; 63 64 /* AIN2 Current w/o AIN2_MODE gpio control */ 65 ain2_current_unmanaged: current-sense-shunt-ain2 { 66 compatible = "current-sense-shunt"; 67 #io-channel-cells = <0>; 68 io-channels = <&ivy_adc2 1>; 69 shunt-resistor-micro-ohms = <100000000>; 70 }; 71 72 /* Ivy Power Supply Input Voltage */ 73 ivy-1v8-voltage { 74 compatible = "voltage-divider"; 75 /* Verdin ADC_4 */ 76 io-channels = <&adc1 3>; 77 full-ohms = <39000>; /* 12k + 27k */ 78 output-ohms = <27000>; 79 }; 80 81 ivy-3v3-voltage { 82 compatible = "voltage-divider"; 83 /* Verdin ADC_3 */ 84 io-channels = <&adc1 2>; 85 full-ohms = <54000>; /* 27k + 27k */ 86 output-ohms = <27000>; 87 }; 88 89 ivy-5v-voltage { 90 compatible = "voltage-divider"; 91 /* Verdin ADC_2 */ 92 io-channels = <&adc1 1>; 93 full-ohms = <39000>; /* 27k + 12k */ 94 output-ohms = <12000>; 95 }; 96 97 ivy-input-voltage { 98 compatible = "voltage-divider"; 99 /* Verdin ADC_1 */ 100 io-channels = <&adc1 0>; 101 full-ohms = <204700>; /* 200k + 4.7k */ 102 output-ohms = <4700>; 103 }; 104 105 leds { 106 compatible = "gpio-leds"; 107 pinctrl-names = "default"; 108 pinctrl-0 = <&pinctrl_ivy_leds>; 109 110 /* D7 Blue - SODIMM 30 - LEDs.GPIO1 */ 111 led-0 { 112 color = <LED_COLOR_ID_BLUE>; 113 default-state = "off"; 114 function = LED_FUNCTION_STATUS; 115 function-enumerator = <1>; 116 gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>; 117 }; 118 119 /* D7 Green - SODIMM 32 - LEDs.GPIO2 */ 120 led-1 { 121 color = <LED_COLOR_ID_GREEN>; 122 default-state = "off"; 123 function = LED_FUNCTION_STATUS; 124 function-enumerator = <1>; 125 gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>; 126 }; 127 128 /* D7 Red - SODIMM 34 - LEDs.GPIO3 */ 129 led-2 { 130 color = <LED_COLOR_ID_RED>; 131 default-state = "off"; 132 function = LED_FUNCTION_STATUS; 133 function-enumerator = <1>; 134 gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>; 135 }; 136 137 /* D8 Blue - SODIMM 36 - LEDs.GPIO4 */ 138 led-3 { 139 color = <LED_COLOR_ID_BLUE>; 140 default-state = "off"; 141 function = LED_FUNCTION_STATUS; 142 function-enumerator = <2>; 143 gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>; 144 }; 145 146 /* D8 Green - SODIMM 54 - LEDs.GPIO5 */ 147 led-4 { 148 color = <LED_COLOR_ID_GREEN>; 149 default-state = "off"; 150 function = LED_FUNCTION_STATUS; 151 function-enumerator = <2>; 152 gpios = <&gpio5 10 GPIO_ACTIVE_HIGH>; 153 }; 154 155 /* D8 Red - SODIMM 44 - LEDs.GPIO6 */ 156 led-5 { 157 color = <LED_COLOR_ID_RED>; 158 default-state = "off"; 159 function = LED_FUNCTION_STATUS; 160 function-enumerator = <2>; 161 gpios = <&gpio5 5 GPIO_ACTIVE_HIGH>; 162 }; 163 164 /* D9 Blue - SODIMM 46 - LEDs.GPIO7 */ 165 led-6 { 166 color = <LED_COLOR_ID_BLUE>; 167 default-state = "off"; 168 function = LED_FUNCTION_STATUS; 169 function-enumerator = <3>; 170 gpios = <&gpio5 4 GPIO_ACTIVE_HIGH>; 171 }; 172 173 /* D9 Red - SODIMM 48 - LEDs.GPIO8 */ 174 led-7 { 175 color = <LED_COLOR_ID_RED>; 176 default-state = "off"; 177 function = LED_FUNCTION_STATUS; 178 function-enumerator = <3>; 179 gpios = <&gpio5 7 GPIO_ACTIVE_HIGH>; 180 }; 181 }; 182 183 /* AIN1_MODE - SODIMM 216 */ 184 ain1_mode_mux_ctrl: mux-controller-0 { 185 compatible = "gpio-mux"; 186 pinctrl-names = "default"; 187 pinctrl-0 = <&pinctrl_gpio5>; 188 #mux-control-cells = <0>; 189 mux-gpios = <&gpio4 28 GPIO_ACTIVE_HIGH>; 190 }; 191 192 /* AIN2_MODE - SODIMM 218 */ 193 ain2_mode_mux_ctrl: mux-controller-1 { 194 compatible = "gpio-mux"; 195 pinctrl-names = "default"; 196 pinctrl-0 = <&pinctrl_gpio6>; 197 #mux-control-cells = <0>; 198 mux-gpios = <&gpio3 27 GPIO_ACTIVE_HIGH>; 199 }; 200 201 reg_3v2_ain1: regulator-3v2-ain1 { 202 compatible = "regulator-fixed"; 203 regulator-max-microvolt = <3200000>; 204 regulator-min-microvolt = <3200000>; 205 regulator-name = "+3V2_AIN1"; 206 }; 207 208 reg_3v2_ain2: regulator-3v2-ain2 { 209 compatible = "regulator-fixed"; 210 regulator-max-microvolt = <3200000>; 211 regulator-min-microvolt = <3200000>; 212 regulator-name = "+3V2_AIN2"; 213 }; 214 215 /* AIN1 Voltage w/o AIN1_MODE gpio control */ 216 ain1_voltage_unmanaged: voltage-divider-ain1 { 217 compatible = "voltage-divider"; 218 #io-channel-cells = <1>; 219 io-channels = <&ivy_adc1 0>; 220 full-ohms = <19>; 221 output-ohms = <1>; 222 }; 223 224 /* AIN2 Voltage w/o AIN2_MODE gpio control */ 225 ain2_voltage_unmanaged: voltage-divider-ain2 { 226 compatible = "voltage-divider"; 227 #io-channel-cells = <1>; 228 io-channels = <&ivy_adc2 0>; 229 full-ohms = <19>; 230 output-ohms = <1>; 231 }; 232}; 233 234/* Verdin ADC_1, ADC_2, ADC_3 and ADC_4 */ 235&adc1 { 236 status = "okay"; 237}; 238 239/* Verdin ETH_1 (On-module PHY) */ 240&enetc_port0 { 241 status = "okay"; 242}; 243 244/* Verdin ETH_2_RGMII */ 245&enetc_port1 { 246 phy-handle = <ðphy2>; 247 phy-mode = "rgmii-id"; 248 249 status = "okay"; 250}; 251 252/* Verdin CAN_1 */ 253&flexcan1 { 254 status = "okay"; 255}; 256 257/* Verdin CAN_2 */ 258&flexcan2 { 259 status = "okay"; 260}; 261 262&gpio1 { 263 pinctrl-names = "default"; 264 pinctrl-0 = <&pinctrl_ctrl_sleep_moci>; 265 gpio-line-names = ""; 266}; 267 268&gpio2 { 269 pinctrl-names = "default"; 270 pinctrl-0 = <&pinctrl_gpio2>, 271 <&pinctrl_gpio3>; 272 gpio-line-names = 273 "", /* 0 */ 274 "", 275 "", 276 "", 277 "", 278 "", 279 "", 280 "", 281 "", 282 "", 283 "", /* 10 */ 284 "", 285 "", 286 "", 287 "", 288 "", 289 "", 290 "", 291 "GPIO2", /* Verdin GPIO_2 - SODIMM 208 */ 292 "", 293 "", /* 20 */ 294 "", 295 "", 296 "", 297 "GPIO3", /* Verdin GPIO_3 - SODIMM 210 */ 298 "", 299 "", 300 "", 301 "", 302 "", 303 "", /* 30 */ 304 ""; 305}; 306 307&gpio3 { 308 gpio-line-names = ""; 309}; 310 311&gpio4 { 312 gpio-line-names = ""; 313}; 314 315&gpio5 { 316 pinctrl-names = "default"; 317 pinctrl-0 = <&pinctrl_qspi1_cs2_gpio>, 318 <&pinctrl_qspi1_dqs_gpio>, 319 <&pinctrl_qspi1_io0_gpio>, 320 <&pinctrl_qspi1_io1_gpio>, 321 <&pinctrl_qspi1_io2_gpio>, 322 <&pinctrl_qspi1_io3_gpio>; 323 gpio-line-names = 324 "DIGI_1", /* SODIMM 56 */ 325 "DIGI_2", /* SODIMM 58 */ 326 "REL1", /* SODIMM 60 */ 327 "REL2", /* SODIMM 62 */ 328 "", 329 "", 330 "", 331 "", 332 "REL4", /* SODIMM 66 */ 333 "", 334 "", /* 10 */ 335 "REL3", /* SODIMM 64 */ 336 "", 337 "", 338 "", 339 "", 340 "", 341 ""; 342}; 343 344/* Verdin I2C_1 */ 345&lpi2c4 { 346 status = "okay"; 347 348 temperature-sensor@4f { 349 compatible = "ti,tmp1075"; 350 reg = <0x4f>; 351 }; 352 353 carrier_eeprom: eeprom@57 { 354 compatible = "st,24c02", "atmel,24c02"; 355 reg = <0x57>; 356 pagesize = <16>; 357 }; 358}; 359 360/* Verdin I2C_4_CSI */ 361&lpi2c5 { 362 status = "okay"; 363 364 ivy_adc1: adc@40 { 365 compatible = "ti,ads1119"; 366 reg = <0x40>; 367 interrupt-parent = <&som_gpio_expander>; 368 interrupts = <0 IRQ_TYPE_EDGE_FALLING>; 369 avdd-supply = <®_3v2_ain1>; 370 dvdd-supply = <®_3v2_ain1>; 371 vref-supply = <®_3v2_ain1>; 372 #address-cells = <1>; 373 #io-channel-cells = <1>; 374 #size-cells = <0>; 375 376 /* AIN1 0-33V Voltage Input */ 377 channel@0 { 378 reg = <0>; 379 diff-channels = <0 1>; 380 }; 381 382 /* AIN1 0-20mA Current Input */ 383 channel@1 { 384 reg = <1>; 385 diff-channels = <2 3>; 386 }; 387 }; 388 389 ivy_adc2: adc@41 { 390 compatible = "ti,ads1119"; 391 reg = <0x41>; 392 interrupt-parent = <&som_gpio_expander>; 393 interrupts = <1 IRQ_TYPE_EDGE_FALLING>; 394 avdd-supply = <®_3v2_ain2>; 395 dvdd-supply = <®_3v2_ain2>; 396 vref-supply = <®_3v2_ain2>; 397 #address-cells = <1>; 398 #io-channel-cells = <1>; 399 #size-cells = <0>; 400 401 /* AIN2 0-33V Voltage Input */ 402 channel@0 { 403 reg = <0>; 404 diff-channels = <0 1>; 405 }; 406 407 /* AIN2 0-20mA Current Input */ 408 channel@1 { 409 reg = <1>; 410 diff-channels = <2 3>; 411 }; 412 }; 413}; 414 415/* Verdin SPI_1 */ 416&lpspi6 { 417 pinctrl-names = "default"; 418 pinctrl-0 = <&pinctrl_lpspi6>, 419 <&pinctrl_spi1_cs>, 420 <&pinctrl_gpio1>, 421 <&pinctrl_gpio4>; 422 cs-gpios = <&gpio4 29 GPIO_ACTIVE_LOW>, 423 <&som_gpio_expander 13 GPIO_ACTIVE_LOW>, 424 <&gpio2 0 GPIO_ACTIVE_LOW>, 425 <&gpio5 12 GPIO_ACTIVE_LOW>; 426 427 tpm@2 { 428 compatible = "infineon,slb9670", "tcg,tpm_tis-spi"; 429 reg = <2>; 430 spi-max-frequency = <18500000>; 431 }; 432 433 fram@3 { 434 compatible = "fujitsu,mb85rs256", "atmel,at25"; 435 reg = <3>; 436 address-width = <16>; 437 size = <32768>; 438 spi-max-frequency = <33000000>; 439 pagesize = <1>; 440 }; 441}; 442 443/* Verdin UART_3, used as the Linux console */ 444&lpuart1 { 445 status = "okay"; 446}; 447 448/* Verdin UART_1 */ 449&lpuart7 { 450 status = "okay"; 451}; 452 453/* Verdin UART_2, through RS485 transceiver */ 454&lpuart8 { 455 rs485-rts-active-low; 456 rs485-rx-during-tx; 457 linux,rs485-enabled-at-boot-time; 458 459 status = "okay"; 460}; 461 462&netc_emdio { 463 ethphy2: ethernet-phy@2 { 464 reg = <2>; 465 pinctrl-names = "default"; 466 pinctrl-0 = <&pinctrl_eth2_rgmii_int>; 467 interrupt-parent = <&gpio1>; 468 interrupts = <12 IRQ_TYPE_LEVEL_LOW>; 469 ti,rx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; 470 ti,tx-internal-delay = <DP83867_RGMIIDCTL_2_00_NS>; 471 }; 472}; 473 474/* Verdin PCIE_1 */ 475&pcie0 { 476 status = "okay"; 477}; 478 479&som_gpio_expander { 480 gpio-line-names = ""; 481}; 482 483/* Verdin USB_1 */ 484&usb2 { 485 status = "okay"; 486}; 487 488/* Verdin USB_2 */ 489&usb3 { 490 fsl,permanently-attached; 491 492 status = "okay"; 493}; 494 495&usb3_phy { 496 status = "okay"; 497}; 498 499/* Verdin SD_1 */ 500&usdhc2 { 501 status = "okay"; 502}; 503 504&scmi_iomuxc { 505 pinctrl_ivy_leds: ivyledsgrp { 506 fsl,pins = <IMX95_PAD_GPIO_IO16__GPIO2_IO_BIT16 0x11e>, /* SODIMM 30 */ 507 <IMX95_PAD_GPIO_IO26__GPIO2_IO_BIT26 0x11e>, /* SODIMM 32 */ 508 <IMX95_PAD_GPIO_IO21__GPIO2_IO_BIT21 0x11e>, /* SODIMM 34 */ 509 <IMX95_PAD_GPIO_IO20__GPIO2_IO_BIT20 0x11e>, /* SODIMM 36 */ 510 <IMX95_PAD_XSPI1_DATA5__GPIO5_IO_BIT5 0x11e>, /* SODIMM 44 */ 511 <IMX95_PAD_XSPI1_DATA4__GPIO5_IO_BIT4 0x11e>, /* SODIMM 46 */ 512 <IMX95_PAD_XSPI1_DATA7__GPIO5_IO_BIT7 0x11e>, /* SODIMM 48 */ 513 <IMX95_PAD_XSPI1_SS0_B__GPIO5_IO_BIT10 0x11e>; /* SODIMM 54 */ 514 }; 515}; 516