1// SPDX-License-Identifier: (GPL-2.0+ OR MIT) 2/* 3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd. 4 * Copyright (c) 2023 Thomas McKahan 5 * Copyright (c) 2024 Sebastian Kropatsch 6 * 7 */ 8 9/dts-v1/; 10 11#include <dt-bindings/gpio/gpio.h> 12#include <dt-bindings/input/input.h> 13#include <dt-bindings/pinctrl/rockchip.h> 14#include <dt-bindings/soc/rockchip,vop2.h> 15#include <dt-bindings/usb/pd.h> 16#include "rk3588-friendlyelec-cm3588.dtsi" 17 18/ { 19 model = "FriendlyElec CM3588 NAS"; 20 compatible = "friendlyarm,cm3588-nas", "friendlyarm,cm3588", "rockchip,rk3588"; 21 22 adc_key_recovery: adc-key-recovery { 23 compatible = "adc-keys"; 24 io-channels = <&saradc 1>; 25 io-channel-names = "buttons"; 26 keyup-threshold-microvolt = <1800000>; 27 poll-interval = <100>; 28 29 button-recovery { 30 label = "Recovery"; 31 linux,code = <KEY_VENDOR>; 32 press-threshold-microvolt = <17000>; 33 }; 34 }; 35 36 analog-sound { 37 compatible = "simple-audio-card"; 38 pinctrl-names = "default"; 39 pinctrl-0 = <&headphone_detect>; 40 41 simple-audio-card,format = "i2s"; 42 simple-audio-card,hp-det-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>; 43 simple-audio-card,mclk-fs = <256>; 44 simple-audio-card,name = "realtek,rt5616-codec"; 45 46 simple-audio-card,routing = 47 "Headphones", "HPOL", 48 "Headphones", "HPOR", 49 "MIC1", "Microphone Jack", 50 "Microphone Jack", "micbias1"; 51 simple-audio-card,widgets = 52 "Headphone", "Headphones", 53 "Microphone", "Microphone Jack"; 54 55 simple-audio-card,cpu { 56 sound-dai = <&i2s0_8ch>; 57 }; 58 59 simple-audio-card,codec { 60 sound-dai = <&rt5616>; 61 }; 62 }; 63 64 buzzer: pwm-beeper { 65 compatible = "pwm-beeper"; 66 amp-supply = <&vcc_5v0_sys>; 67 beeper-hz = <500>; 68 pwms = <&pwm8 0 500000 0>; 69 }; 70 71 fan: pwm-fan { 72 compatible = "pwm-fan"; 73 #cooling-cells = <2>; 74 cooling-levels = <0 50 80 120 160 220>; 75 fan-supply = <&vcc_5v0_sys>; 76 pwms = <&pwm1 0 50000 0>; 77 }; 78 79 gpio_keys: gpio-keys { 80 compatible = "gpio-keys"; 81 pinctrl-names = "default"; 82 pinctrl-0 = <&key1_pin>; 83 84 button-user { 85 debounce-interval = <50>; 86 gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_LOW>; 87 label = "User Button"; 88 linux,code = <BTN_1>; 89 wakeup-source; 90 }; 91 }; 92 93 hdmi0-con { 94 compatible = "hdmi-connector"; 95 type = "a"; 96 97 port { 98 hdmi0_con_in: endpoint { 99 remote-endpoint = <&hdmi0_out_con>; 100 }; 101 }; 102 }; 103 104 ir-receiver { 105 compatible = "gpio-ir-receiver"; 106 gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_LOW>; 107 }; 108 109 vcc_12v_dcin: regulator-vcc-12v-dcin { 110 compatible = "regulator-fixed"; 111 regulator-name = "vcc_12v_dcin"; 112 regulator-always-on; 113 regulator-boot-on; 114 regulator-min-microvolt = <12000000>; 115 regulator-max-microvolt = <12000000>; 116 }; 117 118 vcc_3v3_m2_a: regulator-vcc-3v3-m2-a { 119 compatible = "regulator-fixed"; 120 regulator-name = "vcc_3v3_m2_a"; 121 regulator-always-on; 122 regulator-boot-on; 123 regulator-min-microvolt = <3300000>; 124 regulator-max-microvolt = <3300000>; 125 vin-supply = <&vcc_12v_dcin>; 126 }; 127 128 vcc_3v3_m2_b: regulator-vcc-3v3-m2-b { 129 compatible = "regulator-fixed"; 130 regulator-name = "vcc_3v3_m2_b"; 131 regulator-always-on; 132 regulator-boot-on; 133 regulator-min-microvolt = <3300000>; 134 regulator-max-microvolt = <3300000>; 135 vin-supply = <&vcc_12v_dcin>; 136 }; 137 138 vcc_3v3_m2_c: regulator-vcc-3v3-m2-c { 139 compatible = "regulator-fixed"; 140 regulator-name = "vcc_3v3_m2_c"; 141 regulator-always-on; 142 regulator-boot-on; 143 regulator-min-microvolt = <3300000>; 144 regulator-max-microvolt = <3300000>; 145 vin-supply = <&vcc_12v_dcin>; 146 }; 147 148 vcc_3v3_m2_d: regulator-vcc-3v3-m2-d { 149 compatible = "regulator-fixed"; 150 regulator-name = "vcc_3v3_m2_d"; 151 regulator-always-on; 152 regulator-boot-on; 153 regulator-min-microvolt = <3300000>; 154 regulator-max-microvolt = <3300000>; 155 vin-supply = <&vcc_12v_dcin>; 156 }; 157 158 /* vcc_5v0_sys powers the peripherals */ 159 vcc_5v0_sys: regulator-vcc-5v0-sys { 160 compatible = "regulator-fixed"; 161 regulator-name = "vcc_5v0_sys"; 162 regulator-always-on; 163 regulator-boot-on; 164 regulator-min-microvolt = <5000000>; 165 regulator-max-microvolt = <5000000>; 166 vin-supply = <&vcc_12v_dcin>; 167 }; 168 169 /* SY6280AAC power switch (U14 in schematics) */ 170 vcc_5v0_host_20: regulator-vcc-5v0-host-20 { 171 compatible = "regulator-fixed"; 172 enable-active-high; 173 gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>; 174 pinctrl-names = "default"; 175 pinctrl-0 = <&vcc_5v0_host20_en>; 176 regulator-name = "vcc_5v0_host_20"; 177 regulator-min-microvolt = <5000000>; 178 regulator-max-microvolt = <5000000>; 179 vin-supply = <&vcc_5v0_sys>; 180 }; 181 182 /* SY6280AAC power switch (U8 in schematics) */ 183 vcc_5v0_host_30_p1: regulator-vcc-5v0-host-30-p1 { 184 compatible = "regulator-fixed"; 185 enable-active-high; 186 gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>; 187 pinctrl-names = "default"; 188 pinctrl-0 = <&vcc_5v0_host30p1_en>; 189 regulator-name = "vcc_5v0_host_30_p1"; 190 regulator-min-microvolt = <5000000>; 191 regulator-max-microvolt = <5000000>; 192 vin-supply = <&vcc_5v0_sys>; 193 }; 194 195 /* SY6280AAC power switch (U9 in schematics) */ 196 vcc_5v0_host_30_p2: regulator-vcc-5v0-host-30-p2 { 197 compatible = "regulator-fixed"; 198 enable-active-high; 199 gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>; 200 pinctrl-names = "default"; 201 pinctrl-0 = <&vcc_5v0_host30p2_en>; 202 regulator-name = "vcc_5v0_host_30_p2"; 203 regulator-min-microvolt = <5000000>; 204 regulator-max-microvolt = <5000000>; 205 vin-supply = <&vcc_5v0_sys>; 206 }; 207 208 /* SY6280AAC power switch (U10 in schematics) */ 209 vbus_5v0_typec: regulator-vbus-5v0-typec { 210 compatible = "regulator-fixed"; 211 enable-active-high; 212 gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>; 213 pinctrl-names = "default"; 214 pinctrl-0 = <&typec_5v_pwr_en>; 215 regulator-name = "vbus_5v0_typec"; 216 regulator-min-microvolt = <5000000>; 217 regulator-max-microvolt = <5000000>; 218 vin-supply = <&vcc_5v0_sys>; 219 }; 220}; 221 222/* vcc_4v0_sys powers the RK806 and RK860's */ 223&vcc_4v0_sys { 224 vin-supply = <&vcc_12v_dcin>; 225}; 226 227/* Combo PHY 1 is configured to act as as PCIe 2.0 PHY */ 228/* Used by PCIe controller 2 (pcie2x1l0) */ 229&combphy1_ps { 230 status = "okay"; 231}; 232 233/* Combo PHY 2 is configured to act as USB3 PHY */ 234/* Used by USB 3.0 OTG 2 controller (USB 3.0 Type-A port 2) */ 235/* CM3588 USB Controller Config Table: USB30 HOST2 */ 236&combphy2_psu { 237 status = "okay"; 238}; 239 240/* GPIO names are in the format "Human-readable-name [SIGNAL_LABEL]" */ 241/* Signal labels match the official CM3588 NAS SDK schematic revision 2309 */ 242&gpio0 { 243 gpio-line-names = 244 /* GPIO0 A0-A7 */ 245 "", "", "", "", 246 "MicroSD detect [SDMMC_DET_L]", "", "", "", 247 /* GPIO0 B0-B7 */ 248 "", "", "", "", 249 "", "", "", "", 250 /* GPIO0 C0-C7 */ 251 "", "", "", "", 252 "Pin 10 [UART0_RX_M0]", "Pin 08 [UART0_TX_M0/PWM4_M0]", "Pin 32 [PWM5_M1]", "", 253 /* GPIO0 D0-D7 */ 254 "", "", "", "USB3 Type-C [CC_INT_L]", 255 "IR receiver [PWM3_IR_M0]", "User Button", "", ""; 256}; 257 258&gpio1 { 259 gpio-line-names = 260 /* GPIO1 A0-A7 */ 261 "Pin 27 [UART6_RX_M1]", "Pin 28 [UART6_TX_M1]", "", "", 262 "USB2 Type-A [USB2_PWREN]", "", "", "Pin 15", 263 /* GPIO1 B0-B7 */ 264 "Pin 26", "Pin 21 [SPI0_MISO_M2]", "Pin 19 [SPI0_MOSI_M2/UART4_RX_M2]", "Pin 23 [SPI0_CLK_M2/UART4_TX_M2]", 265 "Pin 24 [SPI0_CS0_M2/UART7_RX_M2]", "Pin 22 [SPI0_CS1_M0/UART7_TX_M2]", "", "CSI-Pin 14 [MIPI_CAM2_CLKOUT]", 266 /* GPIO1 C0-C7 */ 267 "", "", "", "", 268 "Headphone detect [HP_DET_L]", "", "", "", 269 /* GPIO1 D0-D7 */ 270 "", "", "USB3 Type-C [TYPEC5V_PWREN_H]", "5V Fan [PWM1_M1]", 271 "", "HDMI-in detect [HDMIIRX_DET_L]", "Pin 05 [I2C8_SCL_M2]", "Pin 03 [I2C8_SDA_M2]"; 272}; 273 274&gpio2 { 275 gpio-line-names = 276 /* GPIO2 A0-A7 */ 277 "", "", "", "", 278 "", "", "SPI NOR Flash [FSPI_D0_M1]", "SPI NOR Flash [FSPI_D1_M1]", 279 /* GPIO2 B0-B7 */ 280 "SPI NOR Flash [FSPI_D2_M1]", "SPI NOR Flash [FSPI_D3_M1]", "", "SPI NOR Flash [FSPI_CLK_M1]", 281 "SPI NOR Flash [FSPI_CSN0_M1]", "", "", "", 282 /* GPIO2 C0-C7 */ 283 "", "CSI-Pin 11 [MIPI_CAM2_RESET_L]", "CSI-Pin 12 [MIPI_CAM2_PDN_L]", "", 284 "", "", "", "", 285 /* GPIO2 D0-D7 */ 286 "", "", "", "", 287 "", "", "", ""; 288}; 289 290&gpio3 { 291 gpio-line-names = 292 /* GPIO3 A0-A7 */ 293 "Pin 35 [SPI4_MISO_M1/PWM10_M0]", "Pin 38 [SPI4_MOSI_M1]", "Pin 40 [SPI4_CLK_M1/UART8_TX_M1]", "Pin 36 [SPI4_CS0_M1/UART8_RX_M1]", 294 "Pin 37 [SPI4_CS1_M1]", "USB3-A #2 [USB3_2_PWREN]", "DSI-Pin 12 [LCD_RST]", "Buzzer [PWM8_M0]", 295 /* GPIO3 B0-B7 */ 296 "Pin 33 [PWM9_M0]", "DSI-Pin 10 [PWM2_M1/LCD_BL]", "Pin 07", "Pin 16", 297 "Pin 18", "Pin 29 [UART3_TX_M1/PWM12_M0]", "Pin 31 [UART3_RX_M1/PWM13_M0]", "Pin 12", 298 /* GPIO3 C0-C7 */ 299 "DSI-Pin 08 [TP_INT_L]", "DSI-Pin 14 [TP_RST_L]", "Pin 11 [PWM14_M0]", "Pin 13 [PWM15_IR_M0]", 300 "", "", "", "DSI-Pin 06 [I2C5_SCL_M0_TP]", 301 /* GPIO3 D0-D7 */ 302 "DSI-Pin 05 [I2C5_SDA_M0_TP]", "", "", "", 303 "", "", "", ""; 304}; 305 306&gpio4 { 307 gpio-line-names = 308 /* GPIO4 A0-A7 */ 309 "", "", "M.2 M-Key Slot4 [M2_D_PERST_L]", "", 310 "", "", "", "", 311 /* GPIO4 B0-B7 */ 312 "USB3-A #1 [USB3_TYPEC1_PWREN]", "", "", "M.2 M-Key Slot3 [M2_C_PERST_L]", 313 "M.2 M-Key Slot2 [M2_B_PERST_L]", "M.2 M-Key Slot1 [M2_A_CLKREQ_L]", "M.2 M-Key Slot1 [M2_A_PERST_L]", "", 314 /* GPIO4 C0-C7 */ 315 "", "", "", "", 316 "", "", "", "", 317 /* GPIO4 D0-D7 */ 318 "", "", "", "", 319 "", "", "", ""; 320}; 321 322&hdmi0 { 323 status = "okay"; 324}; 325 326&hdmi0_in { 327 hdmi0_in_vp0: endpoint { 328 remote-endpoint = <&vp0_out_hdmi0>; 329 }; 330}; 331 332&hdmi0_out { 333 hdmi0_out_con: endpoint { 334 remote-endpoint = <&hdmi0_con_in>; 335 }; 336}; 337 338&hdmi_receiver_cma { 339 status = "okay"; 340}; 341 342&hdmi_receiver { 343 hpd-gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_HIGH>; 344 pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_hpd>; 345 pinctrl-names = "default"; 346 status = "okay"; 347}; 348 349&hdptxphy0 { 350 status = "okay"; 351}; 352 353/* Connected to MIPI-DSI0 */ 354&i2c5 { 355 pinctrl-names = "default"; 356 pinctrl-0 = <&i2c5m0_xfer>; 357 status = "disabled"; 358}; 359 360&i2c6 { 361 fusb302: typec-portc@22 { 362 compatible = "fcs,fusb302"; 363 reg = <0x22>; 364 interrupt-parent = <&gpio0>; 365 interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>; 366 pinctrl-names = "default"; 367 pinctrl-0 = <&usbc0_int>; 368 vbus-supply = <&vbus_5v0_typec>; 369 370 usb_con: connector { 371 compatible = "usb-c-connector"; 372 data-role = "dual"; 373 label = "USB-C"; 374 power-role = "source"; 375 source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>; 376 try-power-role = "source"; 377 vbus-supply = <&vbus_5v0_typec>; 378 379 ports { 380 #address-cells = <1>; 381 #size-cells = <0>; 382 383 port@0 { 384 reg = <0>; 385 386 usbc0_orien_sw: endpoint { 387 remote-endpoint = <&usbdp_phy0_orientation_switch>; 388 }; 389 }; 390 391 port@1 { 392 reg = <1>; 393 394 usbc0_role_sw: endpoint { 395 remote-endpoint = <&dwc3_0_role_switch>; 396 }; 397 }; 398 399 port@2 { 400 reg = <2>; 401 402 dp_altmode_mux: endpoint { 403 remote-endpoint = <&usbdp_phy0_dp_altmode_mux>; 404 }; 405 }; 406 }; 407 }; 408 }; 409}; 410 411/* Connected to MIPI-CSI1 */ 412/* &i2c7 */ 413 414/* GPIO Connector, connected to 40-pin GPIO header */ 415&i2c8 { 416 pinctrl-names = "default"; 417 pinctrl-0 = <&i2c8m2_xfer>; 418 status = "okay"; 419}; 420 421&pcie2x1l0 { 422 /* 2. M.2 socket, CON14: pcie30phy port0 lane1, @fe170000 */ 423 max-link-speed = <3>; 424 num-lanes = <1>; 425 phys = <&pcie30phy>; 426 pinctrl-names = "default"; 427 pinctrl-0 = <&pcie2_0_rst>; 428 reset-gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>; 429 vpcie3v3-supply = <&vcc_3v3_m2_b>; 430 status = "okay"; 431}; 432 433&pcie2x1l1 { 434 /* 4. M.2 socket, CON16: pcie30phy port1 lane1, @fe180000 */ 435 max-link-speed = <3>; 436 num-lanes = <1>; 437 phys = <&pcie30phy>; 438 pinctrl-names = "default"; 439 pinctrl-0 = <&pcie2_1_rst>; 440 reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>; 441 vpcie3v3-supply = <&vcc_3v3_m2_d>; 442 status = "okay"; 443}; 444 445&pcie30phy { 446 /* 447 * Data lane mapping <1 3 2 4> = x1x1 x1x1 (bifurcation of both ports) 448 * port 0 lane 0 - always mapped to controller 0 (4L) 449 * port 0 lane 1 - map to controller 2 (1L0) 450 * port 1 lane 0 - map to controller 1 (2L) 451 * port 1 lane 1 - map to controller 3 (1L1) 452 */ 453 data-lanes = <1 3 2 4>; 454 status = "okay"; 455}; 456 457&pcie3x4 { 458 /* 1. M.2 socket, CON13: pcie30phy port0 lane0, @fe150000 */ 459 max-link-speed = <3>; 460 num-lanes = <1>; 461 pinctrl-names = "default"; 462 pinctrl-0 = <&pcie3x4_rst>; 463 reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>; 464 vpcie3v3-supply = <&vcc_3v3_m2_a>; 465 status = "okay"; 466}; 467 468&pcie3x2 { 469 /* 3. M.2 socket, CON15: pcie30phy port1 lane0, @fe160000 */ 470 max-link-speed = <3>; 471 num-lanes = <1>; 472 pinctrl-names = "default"; 473 pinctrl-0 = <&pcie3x2_rst>; 474 reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>; 475 vpcie3v3-supply = <&vcc_3v3_m2_c>; 476 status = "okay"; 477}; 478 479&pinctrl { 480 audio { 481 headphone_detect: headphone-detect { 482 rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>; 483 }; 484 }; 485 486 gpio-key { 487 key1_pin: key1-pin { 488 rockchip,pins = <0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>; 489 }; 490 }; 491 492 hdmirx { 493 hdmirx_hpd: hdmirx-5v-detection { 494 rockchip,pins = <3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>; 495 }; 496 }; 497 498 pcie { 499 pcie2_0_rst: pcie2-0-rst { 500 rockchip,pins = <4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>; 501 }; 502 503 pcie2_1_rst: pcie2-1-rst { 504 rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>; 505 }; 506 507 pcie3x2_rst: pcie3x2-rst { 508 rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>; 509 }; 510 511 pcie3x4_rst: pcie3x4-rst { 512 rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; 513 }; 514 }; 515 516 usb { 517 vcc_5v0_host20_en: vcc-5v0-host20-en { 518 rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>; 519 }; 520 521 vcc_5v0_host30p1_en: vcc-5v0-host30p1-en { 522 rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>; 523 }; 524 525 vcc_5v0_host30p2_en: vcc-5v0-host30p2-en { 526 rockchip,pins = <3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>; 527 }; 528 }; 529 530 usb-typec { 531 usbc0_int: usbc0-int { 532 rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>; 533 }; 534 535 typec_5v_pwr_en: typec-5v-pwr-en { 536 rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>; 537 }; 538 }; 539}; 540 541/* Connected to 5V Fan */ 542&pwm1 { 543 pinctrl-names = "default"; 544 pinctrl-0 = <&pwm1m1_pins>; 545 status = "okay"; 546}; 547 548/* Connected to MIPI-DSI0 */ 549&pwm2 { 550 pinctrl-names = "default"; 551 pinctrl-0 = <&pwm2m1_pins>; 552}; 553 554/* Connected to IR Receiver */ 555&pwm3 { 556 pinctrl-names = "default"; 557 pinctrl-0 = <&pwm3m0_pins>; 558 status = "okay"; 559}; 560 561/* GPIO Connector, connected to 40-pin GPIO header */ 562/* Shared with UART0 */ 563&pwm4 { 564 pinctrl-names = "default"; 565 pinctrl-0 = <&pwm4m1_pins>; 566 status = "disabled"; 567}; 568 569/* GPIO Connector, connected to 40-pin GPIO header */ 570&pwm5 { 571 pinctrl-names = "default"; 572 pinctrl-0 = <&pwm5m1_pins>; 573 status = "okay"; 574}; 575 576/* Connected to Buzzer */ 577&pwm8 { 578 pinctrl-names = "default"; 579 pinctrl-0 = <&pwm8m0_pins>; 580 status = "okay"; 581}; 582 583/* GPIO Connector, connected to 40-pin GPIO header */ 584&pwm9 { 585 pinctrl-names = "default"; 586 pinctrl-0 = <&pwm9m0_pins>; 587 status = "okay"; 588}; 589 590/* GPIO Connector, connected to 40-pin GPIO header */ 591/* Shared with SPI4 */ 592&pwm10 { 593 pinctrl-names = "default"; 594 pinctrl-0 = <&pwm10m0_pins>; 595 status = "disabled"; 596}; 597 598/* GPIO Connector, connected to 40-pin GPIO header */ 599/* Shared with UART3 */ 600&pwm12 { 601 pinctrl-names = "default"; 602 pinctrl-0 = <&pwm12m0_pins>; 603 status = "disabled"; 604}; 605 606/* GPIO Connector, connected to 40-pin GPIO header */ 607/* Shared with UART3 */ 608&pwm13 { 609 pinctrl-names = "default"; 610 pinctrl-0 = <&pwm13m0_pins>; 611 status = "disabled"; 612}; 613 614/* GPIO Connector, connected to 40-pin GPIO header */ 615&pwm14 { 616 pinctrl-names = "default"; 617 pinctrl-0 = <&pwm14m0_pins>; 618 status = "okay"; 619}; 620 621/* GPIO Connector, connected to 40-pin GPIO header */ 622/* Optimized for infrared applications */ 623&pwm15 { 624 pinctrl-names = "default"; 625 pinctrl-0 = <&pwm15m0_pins>; 626 status = "disabled"; 627}; 628 629/* microSD card */ 630&sdmmc { 631 status = "okay"; 632}; 633 634/* GPIO Connector, connected to 40-pin GPIO header */ 635/* Shared with UART4, UART7 and PWM10 */ 636&spi0 { 637 num-cs = <1>; 638 pinctrl-names = "default"; 639 pinctrl-0 = <&spi0m2_cs0 &spi0m2_pins>; 640 status = "disabled"; 641}; 642 643/* GPIO Connector, connected to 40-pin GPIO header */ 644/* Shared with UART8 */ 645&spi4 { 646 num-cs = <1>; 647 pinctrl-names = "default"; 648 pinctrl-0 = <&spi4m1_cs0 &spi4m1_pins>; 649 status = "disabled"; 650}; 651 652/* GPIO Connector, connected to 40-pin GPIO header */ 653/* Shared with PWM4 */ 654&uart0 { 655 pinctrl-names = "default"; 656 pinctrl-0 = <&uart0m0_xfer>; 657 status = "disabled"; 658}; 659 660/* Debug UART */ 661&uart2 { 662 status = "okay"; 663}; 664 665/* GPIO Connector, connected to 40-pin GPIO header */ 666/* Shared with PWM12 and PWM13 */ 667&uart3 { 668 pinctrl-names = "default"; 669 pinctrl-0 = <&uart3m1_xfer>; 670 status = "disabled"; 671}; 672 673/* GPIO Connector, connected to 40-pin GPIO header */ 674/* Shared with SPI0 */ 675&uart4 { 676 pinctrl-names = "default"; 677 pinctrl-0 = <&uart4m2_xfer>; 678 status = "disabled"; 679}; 680 681/* GPIO Connector, connected to 40-pin GPIO header */ 682&uart6 { 683 pinctrl-names = "default"; 684 pinctrl-0 = <&uart6m1_xfer>; 685 status = "okay"; 686}; 687 688/* GPIO Connector, connected to 40-pin GPIO header */ 689/* Shared with SPI0 */ 690&uart7 { 691 pinctrl-names = "default"; 692 pinctrl-0 = <&uart7m2_xfer>; 693 status = "disabled"; 694}; 695 696/* GPIO Connector, connected to 40-pin GPIO header */ 697/* Shared with SPI4 */ 698&uart8 { 699 pinctrl-names = "default"; 700 pinctrl-0 = <&uart8m1_xfer>; 701 status = "disabled"; 702}; 703 704/* USB2 PHY for USB Type-C port */ 705/* CM3588 USB Controller Config Table: USB20 OTG0 */ 706&u2phy0 { 707 status = "okay"; 708}; 709 710&u2phy0_otg { 711 phy-supply = <&vbus_5v0_typec>; 712 status = "okay"; 713}; 714 715/* USB2 PHY for USB 3.0 Type-A port 1 */ 716/* CM3588 USB Controller Config Table: USB20 OTG1 */ 717&u2phy1 { 718 status = "okay"; 719}; 720 721&u2phy1_otg { 722 phy-supply = <&vcc_5v0_host_30_p1>; 723 status = "okay"; 724}; 725 726/* USB2 PHY for USB 2.0 Type-A */ 727/* CM3588 USB Controller Config Table: USB20 HOST0 */ 728&u2phy2 { 729 status = "okay"; 730}; 731 732&u2phy2_host { 733 phy-supply = <&vcc_5v0_host_20>; 734 status = "okay"; 735}; 736 737/* USB2 PHY for USB 3.0 Type-A port 2 */ 738/* CM3588 USB Controller Config Table: USB20 HOST1 */ 739&u2phy3 { 740 status = "okay"; 741}; 742 743&u2phy3_host { 744 phy-supply = <&vcc_5v0_host_30_p2>; 745 status = "okay"; 746}; 747 748/* USB 2.0 Type-A */ 749/* PHY: <&u2phy2_host> */ 750&usb_host0_ehci { 751 status = "okay"; 752}; 753 754/* USB 2.0 Type-A */ 755/* PHY: <&u2phy2_host> */ 756&usb_host0_ohci { 757 status = "okay"; 758}; 759 760/* USB Type-C */ 761/* PHYs: <&u2phy0_otg>, <&usbdp_phy0 PHY_TYPE_USB3> */ 762&usb_host0_xhci { 763 usb-role-switch; 764 status = "okay"; 765 766 port { 767 dwc3_0_role_switch: endpoint { 768 remote-endpoint = <&usbc0_role_sw>; 769 }; 770 }; 771}; 772 773/* Lower USB 3.0 Type-A (port 2) */ 774/* PHY: <&u2phy3_host> */ 775&usb_host1_ehci { 776 status = "okay"; 777}; 778 779/* Lower USB 3.0 Type-A (port 2) */ 780/* PHY: <&u2phy3_host> */ 781&usb_host1_ohci { 782 status = "okay"; 783}; 784 785/* Upper USB 3.0 Type-A (port 1) */ 786/* PHYs: <&u2phy1_otg>, <&usbdp_phy1 PHY_TYPE_USB3> */ 787&usb_host1_xhci { 788 dr_mode = "host"; 789 status = "okay"; 790}; 791 792/* Lower USB 3.0 Type-A (port 2) */ 793/* PHYs: <&combphy2_psu PHY_TYPE_USB3> */ 794&usb_host2_xhci { 795 status = "okay"; 796}; 797 798/* USB3 PHY for USB Type-C port */ 799/* CM3588 USB Controller Config Table: USB30 OTG0 */ 800&usbdp_phy0 { 801 mode-switch; 802 orientation-switch; 803 sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>; 804 sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>; 805 status = "okay"; 806 807 port { 808 #address-cells = <1>; 809 #size-cells = <0>; 810 811 usbdp_phy0_orientation_switch: endpoint@0 { 812 reg = <0>; 813 remote-endpoint = <&usbc0_orien_sw>; 814 }; 815 816 usbdp_phy0_dp_altmode_mux: endpoint@1 { 817 reg = <1>; 818 remote-endpoint = <&dp_altmode_mux>; 819 }; 820 }; 821}; 822 823/* USB3 PHY for USB 3.0 Type-A port 1 */ 824/* CM3588 USB Controller Config Table: USB30 OTG1 */ 825&usbdp_phy1 { 826 status = "okay"; 827}; 828 829&vop { 830 status = "okay"; 831}; 832 833&vop_mmu { 834 status = "okay"; 835}; 836 837&vp0 { 838 vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 { 839 reg = <ROCKCHIP_VOP2_EP_HDMI0>; 840 remote-endpoint = <&hdmi0_in_vp0>; 841 }; 842}; 843