1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * Copyright 2018-2020 Purism SPC 4 */ 5 6/dts-v1/; 7 8#include "dt-bindings/input/input.h" 9#include <dt-bindings/interrupt-controller/irq.h> 10#include "dt-bindings/pwm/pwm.h" 11#include "dt-bindings/usb/pd.h" 12#include "imx8mq.dtsi" 13 14/ { 15 model = "Purism Librem 5"; 16 compatible = "purism,librem5", "fsl,imx8mq"; 17 18 backlight_dsi: backlight-dsi { 19 compatible = "led-backlight"; 20 leds = <&led_backlight>; 21 }; 22 23 pmic_osc: clock-pmic { 24 compatible = "fixed-clock"; 25 #clock-cells = <0>; 26 clock-frequency = <32768>; 27 clock-output-names = "pmic_osc"; 28 }; 29 30 chosen { 31 stdout-path = &uart1; 32 }; 33 34 gpio-keys { 35 compatible = "gpio-keys"; 36 pinctrl-names = "default"; 37 pinctrl-0 = <&pinctrl_keys>; 38 39 vol-down { 40 label = "VOL_DOWN"; 41 gpios = <&gpio1 17 GPIO_ACTIVE_LOW>; 42 linux,code = <KEY_VOLUMEDOWN>; 43 }; 44 45 vol-up { 46 label = "VOL_UP"; 47 gpios = <&gpio1 16 GPIO_ACTIVE_LOW>; 48 linux,code = <KEY_VOLUMEUP>; 49 }; 50 }; 51 52 reg_aud_1v8: regulator-audio-1v8 { 53 compatible = "regulator-fixed"; 54 pinctrl-names = "default"; 55 pinctrl-0 = <&pinctrl_audiopwr>; 56 regulator-name = "AUDIO_PWR_EN"; 57 regulator-min-microvolt = <1800000>; 58 regulator-max-microvolt = <1800000>; 59 gpio = <&gpio1 4 GPIO_ACTIVE_HIGH>; 60 enable-active-high; 61 }; 62 63 reg_gnss: regulator-gnss { 64 compatible = "regulator-fixed"; 65 pinctrl-names = "default"; 66 pinctrl-0 = <&pinctrl_gnsspwr>; 67 regulator-name = "GNSS"; 68 regulator-min-microvolt = <3300000>; 69 regulator-max-microvolt = <3300000>; 70 gpio = <&gpio3 12 GPIO_ACTIVE_HIGH>; 71 enable-active-high; 72 }; 73 74 reg_hub: regulator-hub { 75 compatible = "regulator-fixed"; 76 pinctrl-names = "default"; 77 pinctrl-0 = <&pinctrl_hub_pwr>; 78 regulator-name = "HUB"; 79 regulator-min-microvolt = <3300000>; 80 regulator-max-microvolt = <3300000>; 81 gpio = <&gpio1 14 GPIO_ACTIVE_HIGH>; 82 enable-active-high; 83 }; 84 85 reg_lcd_1v8: regulator-lcd-1v8 { 86 compatible = "regulator-fixed"; 87 pinctrl-names = "default"; 88 pinctrl-0 = <&pinctrl_dsien>; 89 regulator-name = "LCD_1V8"; 90 regulator-min-microvolt = <1800000>; 91 regulator-max-microvolt = <1800000>; 92 vin-supply = <®_vdd_1v8>; 93 gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>; 94 enable-active-high; 95 /* Otherwise i2c3 is not functional */ 96 regulator-always-on; 97 }; 98 99 reg_lcd_3v4: regulator-lcd-3v4 { 100 compatible = "regulator-fixed"; 101 regulator-name = "LCD_3V4"; 102 pinctrl-names = "default"; 103 pinctrl-0 = <&pinctrl_dsibiasen>; 104 vin-supply = <®_vsys_3v4>; 105 gpio = <&gpio1 20 GPIO_ACTIVE_HIGH>; 106 enable-active-high; 107 }; 108 109 reg_vdd_sen: regulator-vdd-sen { 110 compatible = "regulator-fixed"; 111 regulator-name = "VDD_SEN"; 112 regulator-min-microvolt = <3300000>; 113 regulator-max-microvolt = <3300000>; 114 }; 115 116 reg_vdd_1v8: regulator-vdd-1v8 { 117 compatible = "regulator-fixed"; 118 regulator-name = "VDD_1V8"; 119 regulator-min-microvolt = <1800000>; 120 regulator-max-microvolt = <1800000>; 121 vin-supply = <&buck7_reg>; 122 }; 123 124 reg_vdd_3v3: regulator-vdd-3v3 { 125 compatible = "regulator-fixed"; 126 regulator-name = "VDD_3V3"; 127 regulator-min-microvolt = <3300000>; 128 regulator-max-microvolt = <3300000>; 129 }; 130 131 reg_vsys_3v4: regulator-vsys-3v4 { 132 compatible = "regulator-fixed"; 133 regulator-name = "VSYS_3V4"; 134 regulator-min-microvolt = <3400000>; 135 regulator-max-microvolt = <3400000>; 136 regulator-always-on; 137 }; 138 139 reg_wifi_3v3: regulator-wifi-3v3 { 140 compatible = "regulator-fixed"; 141 regulator-name = "3V3_WIFI"; 142 regulator-min-microvolt = <3300000>; 143 regulator-max-microvolt = <3300000>; 144 }; 145 146 sound { 147 compatible = "simple-audio-card"; 148 pinctrl-names = "default"; 149 pinctrl-0 = <&pinctrl_hp>; 150 simple-audio-card,name = "Librem 5"; 151 simple-audio-card,format = "i2s"; 152 simple-audio-card,widgets = 153 "Headphone", "Headphones", 154 "Microphone", "Headset Mic", 155 "Microphone", "Digital Mic", 156 "Speaker", "Speaker"; 157 simple-audio-card,routing = 158 "Headphones", "HPOUTL", 159 "Headphones", "HPOUTR", 160 "Speaker", "SPKOUTL", 161 "Speaker", "SPKOUTR", 162 "Headset Mic", "MICBIAS", 163 "IN3R", "Headset Mic", 164 "DMICDAT", "Digital Mic"; 165 simple-audio-card,hp-det-gpio = <&gpio3 9 GPIO_ACTIVE_HIGH>; 166 167 simple-audio-card,cpu { 168 sound-dai = <&sai2>; 169 }; 170 171 simple-audio-card,codec { 172 sound-dai = <&codec>; 173 clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>; 174 frame-master; 175 bitclock-master; 176 }; 177 }; 178 179 sound-wwan { 180 compatible = "simple-audio-card"; 181 simple-audio-card,name = "Modem"; 182 simple-audio-card,format = "i2s"; 183 184 simple-audio-card,cpu { 185 sound-dai = <&sai6>; 186 frame-inversion; 187 }; 188 189 simple-audio-card,codec { 190 sound-dai = <&bm818_codec>; 191 frame-master; 192 bitclock-master; 193 }; 194 }; 195 196 bm818_codec: sound-wwan-codec { 197 compatible = "broadmobi,bm818", "option,gtm601"; 198 #sound-dai-cells = <0>; 199 }; 200 201 vibrator { 202 compatible = "pwm-vibrator"; 203 pwms = <&pwm1 0 1000000000 0>; 204 pwm-names = "enable"; 205 vcc-supply = <®_vdd_3v3>; 206 }; 207}; 208 209&A53_0 { 210 cpu-supply = <&buck2_reg>; 211}; 212 213&A53_1 { 214 cpu-supply = <&buck2_reg>; 215}; 216 217&A53_2 { 218 cpu-supply = <&buck2_reg>; 219}; 220 221&A53_3 { 222 cpu-supply = <&buck2_reg>; 223}; 224 225&ddrc { 226 operating-points-v2 = <&ddrc_opp_table>; 227 228 ddrc_opp_table: ddrc-opp-table { 229 compatible = "operating-points-v2"; 230 231 opp-25M { 232 opp-hz = /bits/ 64 <25000000>; 233 }; 234 235 opp-100M { 236 opp-hz = /bits/ 64 <100000000>; 237 }; 238 239 opp-800M { 240 opp-hz = /bits/ 64 <800000000>; 241 }; 242 }; 243}; 244 245&dphy { 246 status = "okay"; 247}; 248 249&ecspi1 { 250 pinctrl-names = "default"; 251 pinctrl-0 = <&pinctrl_ecspi1>; 252 cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>; 253 #address-cells = <1>; 254 #size-cells = <0>; 255 status = "okay"; 256 257 nor_flash: flash@0 { 258 compatible = "jedec,spi-nor"; 259 reg = <0>; 260 spi-max-frequency = <1000000>; 261 }; 262}; 263 264&gpio1 { 265 pinctrl-names = "default"; 266 pinctrl-0 = <&pinctrl_pmic_5v>; 267 268 pmic-5v-hog { 269 gpio-hog; 270 gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>; 271 input; 272 }; 273}; 274 275&iomuxc { 276 pinctrl_audiopwr: audiopwrgrp { 277 fsl,pins = < 278 /* AUDIO_POWER_EN_3V3 */ 279 MX8MQ_IOMUXC_GPIO1_IO04_GPIO1_IO4 0x83 280 >; 281 }; 282 283 pinctrl_bl: blgrp { 284 fsl,pins = < 285 /* BACKLINGE_EN */ 286 MX8MQ_IOMUXC_NAND_DQS_GPIO3_IO14 0x83 287 >; 288 }; 289 290 pinctrl_charger_in: chargeringrp { 291 fsl,pins = < 292 /* CHRG_INT */ 293 MX8MQ_IOMUXC_NAND_CE2_B_GPIO3_IO3 0x80 294 /* CHG_STATUS_B */ 295 MX8MQ_IOMUXC_NAND_ALE_GPIO3_IO0 0x80 296 >; 297 }; 298 299 pinctrl_dsibiasen: dsibiasengrp { 300 fsl,pins = < 301 /* DSI_BIAS_EN */ 302 MX8MQ_IOMUXC_ENET_TD1_GPIO1_IO20 0x83 303 >; 304 }; 305 306 pinctrl_dsien: dsiengrp { 307 fsl,pins = < 308 /* DSI_EN_3V3 */ 309 MX8MQ_IOMUXC_GPIO1_IO05_GPIO1_IO5 0x83 310 >; 311 }; 312 313 pinctrl_dsirst: dsirstgrp { 314 fsl,pins = < 315 /* DSI_RST */ 316 MX8MQ_IOMUXC_ENET_RD3_GPIO1_IO29 0x83 317 /* DSI_TE */ 318 MX8MQ_IOMUXC_ENET_RD2_GPIO1_IO28 0x83 319 /* TP_RST */ 320 MX8MQ_IOMUXC_ENET_RX_CTL_GPIO1_IO24 0x83 321 >; 322 }; 323 324 pinctrl_ecspi1: ecspigrp { 325 fsl,pins = < 326 MX8MQ_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x83 327 MX8MQ_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x83 328 MX8MQ_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x19 329 MX8MQ_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x83 330 >; 331 }; 332 333 pinctrl_gauge: gaugegrp { 334 fsl,pins = < 335 /* BAT_LOW */ 336 MX8MQ_IOMUXC_SAI5_RXC_GPIO3_IO20 0x80 337 >; 338 }; 339 340 pinctrl_gnsspwr: gnsspwrgrp { 341 fsl,pins = < 342 /* GPS3V3_EN */ 343 MX8MQ_IOMUXC_NAND_DATA06_GPIO3_IO12 0x83 344 >; 345 }; 346 347 pinctrl_haptic: hapticgrp { 348 fsl,pins = < 349 /* MOTO */ 350 MX8MQ_IOMUXC_SPDIF_EXT_CLK_PWM1_OUT 0x83 351 >; 352 }; 353 354 pinctrl_hp: hpgrp { 355 fsl,pins = < 356 /* HEADPHONE_DET_1V8 */ 357 MX8MQ_IOMUXC_NAND_DATA03_GPIO3_IO9 0x180 358 >; 359 }; 360 361 pinctrl_hub_pwr: hubpwrgrp { 362 fsl,pins = < 363 /* HUB_PWR_3V3_EN */ 364 MX8MQ_IOMUXC_GPIO1_IO14_GPIO1_IO14 0x83 365 >; 366 }; 367 368 pinctrl_i2c1: i2c1grp { 369 fsl,pins = < 370 MX8MQ_IOMUXC_I2C1_SCL_I2C1_SCL 0x40000026 371 MX8MQ_IOMUXC_I2C1_SDA_I2C1_SDA 0x40000026 372 >; 373 }; 374 375 pinctrl_i2c2: i2c2grp { 376 fsl,pins = < 377 MX8MQ_IOMUXC_I2C2_SCL_I2C2_SCL 0x40000026 378 MX8MQ_IOMUXC_I2C2_SDA_I2C2_SDA 0x40000026 379 >; 380 }; 381 382 pinctrl_i2c3: i2c3grp { 383 fsl,pins = < 384 MX8MQ_IOMUXC_I2C3_SCL_I2C3_SCL 0x40000026 385 MX8MQ_IOMUXC_I2C3_SDA_I2C3_SDA 0x40000026 386 >; 387 }; 388 389 pinctrl_i2c4: i2c4grp { 390 fsl,pins = < 391 MX8MQ_IOMUXC_I2C4_SCL_I2C4_SCL 0x40000026 392 MX8MQ_IOMUXC_I2C4_SDA_I2C4_SDA 0x40000026 393 >; 394 }; 395 396 pinctrl_keys: keysgrp { 397 fsl,pins = < 398 /* VOL- */ 399 MX8MQ_IOMUXC_ENET_MDIO_GPIO1_IO17 0x01C0 400 /* VOL+ */ 401 MX8MQ_IOMUXC_ENET_MDC_GPIO1_IO16 0x01C0 402 >; 403 }; 404 405 pinctrl_led_b: ledbgrp { 406 fsl,pins = < 407 /* LED_B */ 408 MX8MQ_IOMUXC_GPIO1_IO13_PWM2_OUT 0x06 409 >; 410 }; 411 412 pinctrl_led_g: ledggrp { 413 fsl,pins = < 414 /* LED_G */ 415 MX8MQ_IOMUXC_SAI3_MCLK_PWM4_OUT 0x06 416 >; 417 }; 418 419 pinctrl_led_r: ledrgrp { 420 fsl,pins = < 421 /* LED_R */ 422 MX8MQ_IOMUXC_SPDIF_TX_PWM3_OUT 0x06 423 >; 424 }; 425 426 pinctrl_mag: maggrp { 427 fsl,pins = < 428 /* INT_MAG */ 429 MX8MQ_IOMUXC_SAI5_RXD1_GPIO3_IO22 0x80 430 >; 431 }; 432 433 pinctrl_pmic: pmicgrp { 434 fsl,pins = < 435 /* PMIC_NINT */ 436 MX8MQ_IOMUXC_GPIO1_IO07_GPIO1_IO7 0x80 437 >; 438 }; 439 440 pinctrl_pmic_5v: pmic5vgrp { 441 fsl,pins = < 442 /* PMIC_5V */ 443 MX8MQ_IOMUXC_GPIO1_IO01_GPIO1_IO1 0x80 444 >; 445 }; 446 447 pinctrl_prox: proxgrp { 448 fsl,pins = < 449 /* INT_LIGHT */ 450 MX8MQ_IOMUXC_NAND_DATA01_GPIO3_IO7 0x80 451 >; 452 }; 453 454 pinctrl_rtc: rtcgrp { 455 fsl,pins = < 456 /* RTC_INT */ 457 MX8MQ_IOMUXC_GPIO1_IO09_GPIO1_IO9 0x80 458 >; 459 }; 460 461 pinctrl_sai2: sai2grp { 462 fsl,pins = < 463 MX8MQ_IOMUXC_SAI2_TXD0_SAI2_TX_DATA0 0xd6 464 MX8MQ_IOMUXC_SAI2_TXFS_SAI2_TX_SYNC 0xd6 465 MX8MQ_IOMUXC_SAI2_MCLK_SAI2_MCLK 0xd6 466 MX8MQ_IOMUXC_SAI2_RXD0_SAI2_RX_DATA0 0xd6 467 MX8MQ_IOMUXC_SAI2_TXC_SAI2_TX_BCLK 0xd6 468 >; 469 }; 470 471 pinctrl_sai6: sai6grp { 472 fsl,pins = < 473 MX8MQ_IOMUXC_SAI1_RXD5_SAI6_RX_DATA0 0xd6 474 MX8MQ_IOMUXC_SAI1_RXD6_SAI6_RX_SYNC 0xd6 475 MX8MQ_IOMUXC_SAI1_TXD4_SAI6_RX_BCLK 0xd6 476 MX8MQ_IOMUXC_SAI1_TXD5_SAI6_TX_DATA0 0xd6 477 >; 478 }; 479 480 pinctrl_tcpc: tcpcgrp { 481 fsl,pins = < 482 /* TCPC_INT */ 483 MX8MQ_IOMUXC_GPIO1_IO10_GPIO1_IO10 0x01C0 484 >; 485 }; 486 487 pinctrl_touch: touchgrp { 488 fsl,pins = < 489 /* TP_INT */ 490 MX8MQ_IOMUXC_ENET_RD1_GPIO1_IO27 0x80 491 >; 492 }; 493 494 pinctrl_typec: typecgrp { 495 fsl,pins = < 496 /* TYPEC_MUX_EN */ 497 MX8MQ_IOMUXC_GPIO1_IO11_GPIO1_IO11 0x83 498 >; 499 }; 500 501 pinctrl_uart1: uart1grp { 502 fsl,pins = < 503 MX8MQ_IOMUXC_UART1_RXD_UART1_DCE_RX 0x49 504 MX8MQ_IOMUXC_UART1_TXD_UART1_DCE_TX 0x49 505 >; 506 }; 507 508 pinctrl_uart2: uart2grp { 509 fsl,pins = < 510 MX8MQ_IOMUXC_UART2_TXD_UART2_DCE_TX 0x49 511 MX8MQ_IOMUXC_UART2_RXD_UART2_DCE_RX 0x49 512 >; 513 }; 514 515 pinctrl_uart3: uart3grp { 516 fsl,pins = < 517 MX8MQ_IOMUXC_UART3_RXD_UART3_DCE_RX 0x49 518 MX8MQ_IOMUXC_UART3_TXD_UART3_DCE_TX 0x49 519 >; 520 }; 521 522 pinctrl_uart4: uart4grp { 523 fsl,pins = < 524 MX8MQ_IOMUXC_ECSPI2_SCLK_UART4_DCE_RX 0x49 525 MX8MQ_IOMUXC_ECSPI2_MOSI_UART4_DCE_TX 0x49 526 MX8MQ_IOMUXC_ECSPI2_MISO_UART4_DCE_CTS_B 0x49 527 MX8MQ_IOMUXC_ECSPI2_SS0_UART4_DCE_RTS_B 0x49 528 >; 529 }; 530 531 pinctrl_usdhc1: usdhc1grp { 532 fsl,pins = < 533 MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK 0x83 534 MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD 0xc3 535 MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0 0xc3 536 MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1 0xc3 537 MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2 0xc3 538 MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3 0xc3 539 MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4 0xc3 540 MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5 0xc3 541 MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6 0xc3 542 MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7 0xc3 543 MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE 0x83 544 MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B 0xc1 545 >; 546 }; 547 548 pinctrl_usdhc1_100mhz: usdhc1grp100mhz { 549 fsl,pins = < 550 MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK 0x8d 551 MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD 0xcd 552 MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0 0xcd 553 MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1 0xcd 554 MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2 0xcd 555 MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3 0xcd 556 MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4 0xcd 557 MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5 0xcd 558 MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6 0xcd 559 MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7 0xcd 560 MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE 0x8d 561 MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B 0xc1 562 >; 563 }; 564 565 pinctrl_usdhc1_200mhz: usdhc1grp200mhz { 566 fsl,pins = < 567 MX8MQ_IOMUXC_SD1_CLK_USDHC1_CLK 0x9f 568 MX8MQ_IOMUXC_SD1_CMD_USDHC1_CMD 0xdf 569 MX8MQ_IOMUXC_SD1_DATA0_USDHC1_DATA0 0xdf 570 MX8MQ_IOMUXC_SD1_DATA1_USDHC1_DATA1 0xdf 571 MX8MQ_IOMUXC_SD1_DATA2_USDHC1_DATA2 0xdf 572 MX8MQ_IOMUXC_SD1_DATA3_USDHC1_DATA3 0xdf 573 MX8MQ_IOMUXC_SD1_DATA4_USDHC1_DATA4 0xdf 574 MX8MQ_IOMUXC_SD1_DATA5_USDHC1_DATA5 0xdf 575 MX8MQ_IOMUXC_SD1_DATA6_USDHC1_DATA6 0xdf 576 MX8MQ_IOMUXC_SD1_DATA7_USDHC1_DATA7 0xdf 577 MX8MQ_IOMUXC_SD1_STROBE_USDHC1_STROBE 0x9f 578 MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B 0xc1 579 >; 580 }; 581 582 pinctrl_usdhc2: usdhc2grp { 583 fsl,pins = < 584 MX8MQ_IOMUXC_SD2_CD_B_GPIO2_IO12 0x80 585 MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK 0x83 586 MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD 0xc3 587 MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0 0xc3 588 MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1 0xc3 589 MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2 0xc3 590 MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3 0xc3 591 MX8MQ_IOMUXC_SD2_RESET_B_USDHC2_RESET_B 0xc1 592 >; 593 }; 594 595 pinctrl_usdhc2_100mhz: usdhc2grp100mhz { 596 fsl,pins = < 597 MX8MQ_IOMUXC_SD2_CD_B_GPIO2_IO12 0x80 598 MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK 0x8d 599 MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD 0xcd 600 MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0 0xcd 601 MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1 0xcd 602 MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2 0xcd 603 MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3 0xcd 604 MX8MQ_IOMUXC_SD2_RESET_B_USDHC2_RESET_B 0xc1 605 >; 606 }; 607 608 pinctrl_usdhc2_200mhz: usdhc2grp200mhz { 609 fsl,pins = < 610 MX8MQ_IOMUXC_SD2_CD_B_GPIO2_IO12 0x80 611 MX8MQ_IOMUXC_SD2_CLK_USDHC2_CLK 0x9f 612 MX8MQ_IOMUXC_SD2_CMD_USDHC2_CMD 0xcf 613 MX8MQ_IOMUXC_SD2_DATA0_USDHC2_DATA0 0xcf 614 MX8MQ_IOMUXC_SD2_DATA1_USDHC2_DATA1 0xcf 615 MX8MQ_IOMUXC_SD2_DATA2_USDHC2_DATA2 0xcf 616 MX8MQ_IOMUXC_SD2_DATA3_USDHC2_DATA3 0xcf 617 MX8MQ_IOMUXC_SD2_RESET_B_USDHC2_RESET_B 0xc1 618 >; 619 }; 620 621 pinctrl_wdog: wdoggrp { 622 fsl,pins = < 623 /* nWDOG */ 624 MX8MQ_IOMUXC_GPIO1_IO02_WDOG1_WDOG_B 0x1f 625 >; 626 }; 627}; 628 629&i2c1 { 630 clock-frequency = <387000>; 631 pinctrl-names = "default"; 632 pinctrl-0 = <&pinctrl_i2c1>; 633 status = "okay"; 634 635 typec_pd: usb-pd@3f { 636 compatible = "ti,tps6598x"; 637 reg = <0x3f>; 638 pinctrl-names = "default"; 639 pinctrl-0 = <&pinctrl_typec>, <&pinctrl_tcpc>; 640 interrupt-parent = <&gpio1>; 641 interrupts = <10 IRQ_TYPE_LEVEL_LOW>; 642 interrupt-names = "irq"; 643 644 connector { 645 ports { 646 #address-cells = <1>; 647 #size-cells = <0>; 648 649 port@0 { 650 reg = <0>; 651 652 usb_con_hs: endpoint { 653 remote-endpoint = <&typec_hs>; 654 }; 655 }; 656 657 port@1 { 658 reg = <1>; 659 660 usb_con_ss: endpoint { 661 remote-endpoint = <&typec_ss>; 662 }; 663 }; 664 }; 665 }; 666 }; 667 668 pmic: pmic@4b { 669 compatible = "rohm,bd71837"; 670 reg = <0x4b>; 671 pinctrl-names = "default"; 672 pinctrl-0 = <&pinctrl_pmic>; 673 clocks = <&pmic_osc>; 674 clock-names = "osc"; 675 clock-output-names = "pmic_clk"; 676 interrupt-parent = <&gpio1>; 677 interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 678 rohm,reset-snvs-powered; 679 680 regulators { 681 buck1_reg: BUCK1 { 682 regulator-name = "buck1"; 683 regulator-min-microvolt = <700000>; 684 regulator-max-microvolt = <1300000>; 685 regulator-boot-on; 686 regulator-ramp-delay = <1250>; 687 rohm,dvs-run-voltage = <900000>; 688 rohm,dvs-idle-voltage = <850000>; 689 rohm,dvs-suspend-voltage = <800000>; 690 regulator-always-on; 691 }; 692 693 buck2_reg: BUCK2 { 694 regulator-name = "buck2"; 695 regulator-min-microvolt = <700000>; 696 regulator-max-microvolt = <1300000>; 697 regulator-boot-on; 698 regulator-ramp-delay = <1250>; 699 rohm,dvs-run-voltage = <1000000>; 700 rohm,dvs-idle-voltage = <900000>; 701 regulator-always-on; 702 }; 703 704 buck3_reg: BUCK3 { 705 regulator-name = "buck3"; 706 regulator-min-microvolt = <700000>; 707 regulator-max-microvolt = <1300000>; 708 regulator-boot-on; 709 rohm,dvs-run-voltage = <900000>; 710 }; 711 712 buck4_reg: BUCK4 { 713 regulator-name = "buck4"; 714 regulator-min-microvolt = <700000>; 715 regulator-max-microvolt = <1300000>; 716 rohm,dvs-run-voltage = <1000000>; 717 }; 718 719 buck5_reg: BUCK5 { 720 regulator-name = "buck5"; 721 regulator-min-microvolt = <700000>; 722 regulator-max-microvolt = <1350000>; 723 regulator-boot-on; 724 regulator-always-on; 725 }; 726 727 buck6_reg: BUCK6 { 728 regulator-name = "buck6"; 729 regulator-min-microvolt = <3000000>; 730 regulator-max-microvolt = <3300000>; 731 regulator-boot-on; 732 regulator-always-on; 733 }; 734 735 buck7_reg: BUCK7 { 736 regulator-name = "buck7"; 737 regulator-min-microvolt = <1605000>; 738 regulator-max-microvolt = <1995000>; 739 regulator-boot-on; 740 regulator-always-on; 741 }; 742 743 buck8_reg: BUCK8 { 744 regulator-name = "buck8"; 745 regulator-min-microvolt = <800000>; 746 regulator-max-microvolt = <1400000>; 747 regulator-boot-on; 748 regulator-always-on; 749 }; 750 751 ldo1_reg: LDO1 { 752 regulator-name = "ldo1"; 753 regulator-min-microvolt = <3000000>; 754 regulator-max-microvolt = <3300000>; 755 regulator-boot-on; 756 /* leave on for snvs power button */ 757 regulator-always-on; 758 }; 759 760 ldo2_reg: LDO2 { 761 regulator-name = "ldo2"; 762 regulator-min-microvolt = <900000>; 763 regulator-max-microvolt = <900000>; 764 regulator-boot-on; 765 /* leave on for snvs power button */ 766 regulator-always-on; 767 }; 768 769 ldo3_reg: LDO3 { 770 regulator-name = "ldo3"; 771 regulator-min-microvolt = <1800000>; 772 regulator-max-microvolt = <3300000>; 773 regulator-boot-on; 774 regulator-always-on; 775 }; 776 777 ldo4_reg: LDO4 { 778 regulator-name = "ldo4"; 779 regulator-min-microvolt = <900000>; 780 regulator-max-microvolt = <1800000>; 781 regulator-boot-on; 782 regulator-always-on; 783 }; 784 785 ldo5_reg: LDO5 { 786 /* VDD_PHY_0V9 - MIPI and HDMI domains */ 787 regulator-name = "ldo5"; 788 regulator-min-microvolt = <1800000>; 789 regulator-max-microvolt = <3300000>; 790 regulator-always-on; 791 }; 792 793 ldo6_reg: LDO6 { 794 /* VDD_PHY_0V9 - MIPI, HDMI and USB domains */ 795 regulator-name = "ldo6"; 796 regulator-min-microvolt = <900000>; 797 regulator-max-microvolt = <1800000>; 798 regulator-boot-on; 799 regulator-always-on; 800 }; 801 802 ldo7_reg: LDO7 { 803 /* VDD_PHY_3V3 - USB domain */ 804 regulator-name = "ldo7"; 805 regulator-min-microvolt = <1800000>; 806 regulator-max-microvolt = <3300000>; 807 regulator-boot-on; 808 regulator-always-on; 809 }; 810 }; 811 }; 812 813 rtc@68 { 814 compatible = "microcrystal,rv4162"; 815 reg = <0x68>; 816 pinctrl-names = "default"; 817 pinctrl-0 = <&pinctrl_rtc>; 818 interrupt-parent = <&gpio1>; 819 interrupts = <9 IRQ_TYPE_LEVEL_LOW>; 820 }; 821}; 822 823&i2c2 { 824 clock-frequency = <387000>; 825 pinctrl-names = "default"; 826 pinctrl-0 = <&pinctrl_i2c2>; 827 status = "okay"; 828 829 magnetometer@1e { 830 compatible = "st,lsm9ds1-magn"; 831 reg = <0x1e>; 832 pinctrl-names = "default"; 833 pinctrl-0 = <&pinctrl_mag>; 834 interrupt-parent = <&gpio3>; 835 interrupts = <22 IRQ_TYPE_LEVEL_HIGH>; 836 vdd-supply = <®_vdd_sen>; 837 vddio-supply = <®_vdd_1v8>; 838 }; 839 840 regulator@3e { 841 compatible = "tps65132"; 842 reg = <0x3e>; 843 844 reg_lcd_avdd: outp { 845 regulator-name = "LCD_AVDD"; 846 vin-supply = <®_lcd_3v4>; 847 }; 848 849 reg_lcd_avee: outn { 850 regulator-name = "LCD_AVEE"; 851 vin-supply = <®_lcd_3v4>; 852 }; 853 }; 854 855 proximity: prox@60 { 856 compatible = "vishay,vcnl4040"; 857 reg = <0x60>; 858 pinctrl-names = "default"; 859 pinctrl-0 = <&pinctrl_prox>; 860 interrupt-parent = <&gpio3>; 861 interrupts = <7 IRQ_TYPE_LEVEL_LOW>; 862 }; 863 864 accel_gyro: accel-gyro@6a { 865 compatible = "st,lsm9ds1-imu"; 866 reg = <0x6a>; 867 vdd-supply = <®_vdd_sen>; 868 vddio-supply = <®_vdd_1v8>; 869 }; 870}; 871 872&i2c3 { 873 clock-frequency = <387000>; 874 pinctrl-names = "default"; 875 pinctrl-0 = <&pinctrl_i2c3>; 876 status = "okay"; 877 878 codec: audio-codec@1a { 879 compatible = "wlf,wm8962"; 880 reg = <0x1a>; 881 clocks = <&clk IMX8MQ_CLK_SAI2_ROOT>; 882 assigned-clocks = <&clk IMX8MQ_CLK_SAI2>; 883 assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>; 884 assigned-clock-rates = <24576000>; 885 #sound-dai-cells = <0>; 886 mic-cfg = <0x200>; 887 DCVDD-supply = <®_aud_1v8>; 888 DBVDD-supply = <®_aud_1v8>; 889 AVDD-supply = <®_aud_1v8>; 890 CPVDD-supply = <®_aud_1v8>; 891 MICVDD-supply = <®_aud_1v8>; 892 PLLVDD-supply = <®_aud_1v8>; 893 SPKVDD1-supply = <®_vsys_3v4>; 894 SPKVDD2-supply = <®_vsys_3v4>; 895 gpio-cfg = < 896 0x0000 /* n/c */ 897 0x0001 /* gpio2, 1: default */ 898 0x0013 /* gpio3, 2: dmicclk */ 899 0x0000 /* n/c, 3: default */ 900 0x8014 /* gpio5, 4: dmic_dat */ 901 0x0000 /* gpio6, 5: default */ 902 >; 903 }; 904 905 backlight@36 { 906 compatible = "ti,lm36922"; 907 reg = <0x36>; 908 pinctrl-names = "default"; 909 pinctrl-0 = <&pinctrl_bl>; 910 #address-cells = <1>; 911 #size-cells = <0>; 912 enable-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; 913 vled-supply = <®_vsys_3v4>; 914 ti,ovp-microvolt = <25000000>; 915 916 led_backlight: led@0 { 917 reg = <0>; 918 label = ":backlight"; 919 linux,default-trigger = "backlight"; 920 led-max-microamp = <20000>; 921 }; 922 }; 923 924 touchscreen@38 { 925 compatible = "edt,edt-ft5506"; 926 reg = <0x38>; 927 pinctrl-names = "default"; 928 pinctrl-0 = <&pinctrl_touch>; 929 interrupt-parent = <&gpio1>; 930 interrupts = <27 IRQ_TYPE_EDGE_FALLING>; 931 touchscreen-size-x = <720>; 932 touchscreen-size-y = <1440>; 933 vcc-supply = <®_lcd_1v8>; 934 }; 935}; 936 937&i2c4 { 938 clock-frequency = <387000>; 939 pinctrl-names = "default"; 940 pinctrl-0 = <&pinctrl_i2c4>; 941 status = "okay"; 942 943 bat: fuel-gauge@36 { 944 compatible = "maxim,max17055"; 945 reg = <0x36>; 946 interrupt-parent = <&gpio3>; 947 interrupts = <20 IRQ_TYPE_LEVEL_LOW>; 948 pinctrl-names = "default"; 949 pinctrl-0 = <&pinctrl_gauge>; 950 maxim,over-heat-temp = <700>; 951 maxim,over-volt = <4500>; 952 maxim,rsns-microohm = <5000>; 953 }; 954 955 bq25895: charger@6a { 956 compatible = "ti,bq25895", "ti,bq25890"; 957 reg = <0x6a>; 958 pinctrl-names = "default"; 959 pinctrl-0 = <&pinctrl_charger_in>; 960 interrupt-parent = <&gpio3>; 961 interrupts = <3 IRQ_TYPE_EDGE_FALLING>; 962 phys = <&usb3_phy0>; 963 ti,precharge-current = <130000>; /* uA */ 964 ti,minimum-sys-voltage = <3700000>; /* uV */ 965 ti,boost-voltage = <5000000>; /* uV */ 966 ti,boost-max-current = <500000>; /* uA */ 967 ti,use-vinmin-threshold = <1>; /* enable VINDPM */ 968 ti,vinmin-threshold = <3900000>; /* uV */ 969 monitored-battery = <&bat>; 970 power-supplies = <&typec_pd>; 971 }; 972}; 973 974&lcdif { 975 status = "okay"; 976}; 977 978&mipi_dsi { 979 #address-cells = <1>; 980 #size-cells = <0>; 981 status = "okay"; 982 983 lcd_panel: panel@0 { 984 compatible = "mantix,mlaf057we51-x"; 985 reg = <0>; 986 pinctrl-names = "default"; 987 pinctrl-0 = <&pinctrl_dsirst>; 988 avdd-supply = <®_lcd_avdd>; 989 avee-supply = <®_lcd_avee>; 990 vddi-supply = <®_lcd_1v8>; 991 backlight = <&backlight_dsi>; 992 reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>; 993 994 port { 995 panel_in: endpoint { 996 remote-endpoint = <&mipi_dsi_out>; 997 }; 998 }; 999 }; 1000 1001 ports { 1002 port@1 { 1003 reg = <1>; 1004 1005 mipi_dsi_out: endpoint { 1006 remote-endpoint = <&panel_in>; 1007 }; 1008 }; 1009 }; 1010}; 1011 1012&pgc_gpu { 1013 power-supply = <&buck3_reg>; 1014}; 1015 1016&pgc_mipi { 1017 power-supply = <&ldo5_reg>; 1018}; 1019 1020&pgc_vpu { 1021 power-supply = <&buck4_reg>; 1022}; 1023 1024&pwm1 { 1025 pinctrl-names = "default"; 1026 pinctrl-0 = <&pinctrl_haptic>; 1027 status = "okay"; 1028}; 1029 1030&pwm2 { 1031 pinctrl-names = "default"; 1032 pinctrl-0 = <&pinctrl_led_b>; 1033 status = "okay"; 1034}; 1035 1036&pwm3 { 1037 pinctrl-names = "default"; 1038 pinctrl-0 = <&pinctrl_led_g>; 1039 status = "okay"; 1040}; 1041 1042&pwm4 { 1043 pinctrl-names = "default"; 1044 pinctrl-0 = <&pinctrl_led_r>; 1045 status = "okay"; 1046}; 1047 1048&sai2 { 1049 pinctrl-names = "default"; 1050 pinctrl-0 = <&pinctrl_sai2>; 1051 assigned-clocks = <&clk IMX8MQ_CLK_SAI2>; 1052 assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>; 1053 assigned-clock-rates = <24576000>; 1054 assigned-clocks = <&clk IMX8MQ_AUDIO_PLL1>, <&clk IMX8MQ_AUDIO_PLL2>; 1055 assigned-clock-rates = <786432000>, <722534400>; 1056 status = "okay"; 1057}; 1058 1059&sai6 { 1060 pinctrl-names = "default"; 1061 pinctrl-0 = <&pinctrl_sai6>; 1062 assigned-clocks = <&clk IMX8MQ_CLK_SAI6>; 1063 assigned-clock-parents = <&clk IMX8MQ_AUDIO_PLL1_OUT>; 1064 assigned-clock-rates = <24576000>; 1065 fsl,sai-synchronous-rx; 1066 status = "okay"; 1067}; 1068 1069&snvs_pwrkey { 1070 status = "okay"; 1071}; 1072 1073&snvs_rtc { 1074 status = "disabled"; 1075}; 1076 1077&uart1 { /* console */ 1078 pinctrl-names = "default"; 1079 pinctrl-0 = <&pinctrl_uart1>; 1080 status = "okay"; 1081}; 1082 1083&uart2 { /* TPS - GPS - DEBUG */ 1084 pinctrl-names = "default"; 1085 pinctrl-0 = <&pinctrl_uart2>; 1086 status = "okay"; 1087 1088 gnss { 1089 compatible = "globaltop,pa6h"; 1090 vcc-supply = <®_gnss>; 1091 current-speed = <9600>; 1092 }; 1093}; 1094 1095&uart3 { /* SMC */ 1096 pinctrl-names = "default"; 1097 pinctrl-0 = <&pinctrl_uart3>; 1098 status = "okay"; 1099}; 1100 1101&uart4 { /* BT */ 1102 pinctrl-names = "default"; 1103 pinctrl-0 = <&pinctrl_uart4>; 1104 uart-has-rtscts; 1105 status = "okay"; 1106}; 1107 1108&usb3_phy0 { 1109 status = "okay"; 1110}; 1111 1112&usb3_phy1 { 1113 vbus-supply = <®_hub>; 1114 status = "okay"; 1115}; 1116 1117&usb_dwc3_0 { 1118 #address-cells = <1>; 1119 #size-cells = <0>; 1120 dr_mode = "otg"; 1121 snps,dis_u3_susphy_quirk; 1122 status = "okay"; 1123 1124 port@0 { 1125 reg = <0>; 1126 1127 typec_hs: endpoint { 1128 remote-endpoint = <&usb_con_hs>; 1129 }; 1130 }; 1131 1132 port@1 { 1133 reg = <1>; 1134 1135 typec_ss: endpoint { 1136 remote-endpoint = <&usb_con_ss>; 1137 }; 1138 }; 1139}; 1140 1141&usb_dwc3_1 { 1142 dr_mode = "host"; 1143 status = "okay"; 1144 #address-cells = <1>; 1145 #size-cells = <0>; 1146 1147 /* Microchip USB2642 */ 1148 hub@1 { 1149 compatible = "usb424,2640"; 1150 reg = <1>; 1151 #address-cells = <1>; 1152 #size-cells = <0>; 1153 1154 mass-storage@1 { 1155 compatible = "usb424,4041"; 1156 reg = <1>; 1157 }; 1158 }; 1159}; 1160 1161&usdhc1 { 1162 assigned-clocks = <&clk IMX8MQ_CLK_USDHC1>; 1163 assigned-clock-rates = <400000000>; 1164 pinctrl-names = "default", "state_100mhz", "state_200mhz"; 1165 pinctrl-0 = <&pinctrl_usdhc1>; 1166 pinctrl-1 = <&pinctrl_usdhc1_100mhz>; 1167 pinctrl-2 = <&pinctrl_usdhc1_200mhz>; 1168 bus-width = <8>; 1169 vmmc-supply = <®_vdd_3v3>; 1170 power-supply = <®_vdd_1v8>; 1171 non-removable; 1172 status = "okay"; 1173}; 1174 1175&usdhc2 { 1176 assigned-clocks = <&clk IMX8MQ_CLK_USDHC2>; 1177 assigned-clock-rates = <200000000>; 1178 pinctrl-names = "default", "state_100mhz", "state_200mhz"; 1179 pinctrl-0 = <&pinctrl_usdhc2>; 1180 pinctrl-1 = <&pinctrl_usdhc2_100mhz>; 1181 pinctrl-2 = <&pinctrl_usdhc2_200mhz>; 1182 bus-width = <4>; 1183 vmmc-supply = <®_wifi_3v3>; 1184 cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; 1185 disable-wp; 1186 cap-sdio-irq; 1187 keep-power-in-suspend; 1188 wakeup-source; 1189 status = "okay"; 1190}; 1191 1192&wdog1 { 1193 pinctrl-names = "default"; 1194 pinctrl-0 = <&pinctrl_wdog>; 1195 fsl,ext-reset-output; 1196 status = "okay"; 1197}; 1198