1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Device Tree Source for the Porter board 4 * 5 * Copyright (C) 2015 Cogent Embedded, Inc. 6 */ 7 8/* 9 * SSI-AK4642 10 * 11 * JP3: 2-1: AK4642 12 * 2-3: ADV7511 13 * 14 * This command is required before playback/capture: 15 * 16 * amixer set "LINEOUT Mixer DACL" on 17 */ 18 19/dts-v1/; 20#include "r8a7791.dtsi" 21#include <dt-bindings/gpio/gpio.h> 22 23/ { 24 model = "Porter"; 25 compatible = "renesas,porter", "renesas,r8a7791"; 26 27 aliases { 28 serial0 = &scif0; 29 i2c9 = &gpioi2c2; 30 i2c10 = &i2chdmi; 31 mmc0 = &sdhi0; 32 mmc1 = &sdhi2; 33 }; 34 35 chosen { 36 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on"; 37 stdout-path = "serial0:115200n8"; 38 }; 39 40 memory@40000000 { 41 device_type = "memory"; 42 reg = <0 0x40000000 0 0x40000000>; 43 }; 44 45 memory@200000000 { 46 device_type = "memory"; 47 reg = <2 0x00000000 0 0x40000000>; 48 }; 49 50 reg_1p8v: regulator-1v8 { 51 compatible = "regulator-fixed"; 52 regulator-name = "fixed-1.8V"; 53 regulator-min-microvolt = <1800000>; 54 regulator-max-microvolt = <1800000>; 55 regulator-boot-on; 56 regulator-always-on; 57 }; 58 59 reg_3p3v: regulator-3v3 { 60 compatible = "regulator-fixed"; 61 regulator-name = "fixed-3.3V"; 62 regulator-min-microvolt = <3300000>; 63 regulator-max-microvolt = <3300000>; 64 regulator-boot-on; 65 regulator-always-on; 66 }; 67 68 vcc_sdhi0: regulator-vcc-sdhi0 { 69 compatible = "regulator-fixed"; 70 71 regulator-name = "SDHI0 Vcc"; 72 regulator-min-microvolt = <3300000>; 73 regulator-max-microvolt = <3300000>; 74 regulator-always-on; 75 }; 76 77 vccq_sdhi0: regulator-vccq-sdhi0 { 78 compatible = "regulator-gpio"; 79 80 regulator-name = "SDHI0 VccQ"; 81 regulator-min-microvolt = <1800000>; 82 regulator-max-microvolt = <3300000>; 83 84 gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; 85 gpios-states = <1>; 86 states = <3300000 1>, <1800000 0>; 87 }; 88 89 vcc_sdhi2: regulator-vcc-sdhi2 { 90 compatible = "regulator-fixed"; 91 92 regulator-name = "SDHI2 Vcc"; 93 regulator-min-microvolt = <3300000>; 94 regulator-max-microvolt = <3300000>; 95 regulator-always-on; 96 }; 97 98 vccq_sdhi2: regulator-vccq-sdhi2 { 99 compatible = "regulator-gpio"; 100 101 regulator-name = "SDHI2 VccQ"; 102 regulator-min-microvolt = <1800000>; 103 regulator-max-microvolt = <3300000>; 104 105 gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>; 106 gpios-states = <1>; 107 states = <3300000 1>, <1800000 0>; 108 }; 109 110 hdmi-out { 111 compatible = "hdmi-connector"; 112 type = "a"; 113 114 port { 115 hdmi_con: endpoint { 116 remote-endpoint = <&adv7511_out>; 117 }; 118 }; 119 }; 120 121 x3_clk: x3-clock { 122 compatible = "fixed-clock"; 123 #clock-cells = <0>; 124 clock-frequency = <148500000>; 125 }; 126 127 x16_clk: x16-clock { 128 compatible = "fixed-clock"; 129 #clock-cells = <0>; 130 clock-frequency = <74250000>; 131 }; 132 133 x14_clk: audio_clock { 134 compatible = "fixed-clock"; 135 #clock-cells = <0>; 136 clock-frequency = <11289600>; 137 }; 138 139 sound { 140 compatible = "simple-audio-card"; 141 142 simple-audio-card,format = "left_j"; 143 simple-audio-card,bitclock-master = <&soundcodec>; 144 simple-audio-card,frame-master = <&soundcodec>; 145 146 simple-audio-card,cpu { 147 sound-dai = <&rcar_sound>; 148 }; 149 150 soundcodec: simple-audio-card,codec { 151 sound-dai = <&ak4642>; 152 clocks = <&x14_clk>; 153 }; 154 }; 155 156 gpioi2c2: i2c-9 { 157 #address-cells = <1>; 158 #size-cells = <0>; 159 compatible = "i2c-gpio"; 160 status = "disabled"; 161 scl-gpios = <&gpio2 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 162 sda-gpios = <&gpio2 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 163 i2c-gpio,delay-us = <5>; 164 }; 165 166 /* 167 * A fallback to GPIO is provided for I2C2. 168 */ 169 i2chdmi: i2c-mux1 { 170 compatible = "i2c-demux-pinctrl"; 171 i2c-parent = <&i2c2>, <&gpioi2c2>; 172 i2c-bus-name = "i2c-hdmi"; 173 #address-cells = <1>; 174 #size-cells = <0>; 175 176 ak4642: codec@12 { 177 compatible = "asahi-kasei,ak4642"; 178 #sound-dai-cells = <0>; 179 reg = <0x12>; 180 }; 181 182 composite-in@20 { 183 compatible = "adi,adv7180"; 184 reg = <0x20>; 185 186 port { 187 adv7180: endpoint { 188 bus-width = <8>; 189 remote-endpoint = <&vin0ep>; 190 }; 191 }; 192 }; 193 194 hdmi@39 { 195 compatible = "adi,adv7511w"; 196 reg = <0x39>; 197 interrupts-extended = <&gpio3 29 IRQ_TYPE_LEVEL_LOW>; 198 199 avdd-supply = <®_1p8v>; 200 dvdd-supply = <®_1p8v>; 201 pvdd-supply = <®_1p8v>; 202 dvdd-3v-supply = <®_3p3v>; 203 bgvdd-supply = <®_1p8v>; 204 205 adi,input-depth = <8>; 206 adi,input-colorspace = "rgb"; 207 adi,input-clock = "1x"; 208 209 ports { 210 #address-cells = <1>; 211 #size-cells = <0>; 212 213 port@0 { 214 reg = <0>; 215 adv7511_in: endpoint { 216 remote-endpoint = <&du_out_rgb>; 217 }; 218 }; 219 220 port@1 { 221 reg = <1>; 222 adv7511_out: endpoint { 223 remote-endpoint = <&hdmi_con>; 224 }; 225 }; 226 }; 227 }; 228 }; 229}; 230 231&extal_clk { 232 clock-frequency = <20000000>; 233}; 234 235&pfc { 236 scif0_pins: scif0 { 237 groups = "scif0_data_d"; 238 function = "scif0"; 239 }; 240 241 ether_pins: ether { 242 groups = "eth_link", "eth_mdio", "eth_rmii"; 243 function = "eth"; 244 }; 245 246 phy1_pins: phy1 { 247 groups = "intc_irq0"; 248 function = "intc"; 249 }; 250 251 pmic_irq_pins: pmicirq { 252 groups = "intc_irq2"; 253 function = "intc"; 254 }; 255 256 sdhi0_pins: sd0 { 257 groups = "sdhi0_data4", "sdhi0_ctrl"; 258 function = "sdhi0"; 259 }; 260 261 sdhi2_pins: sd2 { 262 groups = "sdhi2_data4", "sdhi2_ctrl"; 263 function = "sdhi2"; 264 }; 265 266 qspi_pins: qspi { 267 groups = "qspi_ctrl", "qspi_data4"; 268 function = "qspi"; 269 }; 270 271 i2c2_pins: i2c2 { 272 groups = "i2c2"; 273 function = "i2c2"; 274 }; 275 276 usb0_pins: usb0 { 277 groups = "usb0"; 278 function = "usb0"; 279 }; 280 281 usb1_pins: usb1 { 282 groups = "usb1"; 283 function = "usb1"; 284 }; 285 286 vin0_pins: vin0 { 287 groups = "vin0_data8", "vin0_clk"; 288 function = "vin0"; 289 }; 290 291 can0_pins: can0 { 292 groups = "can0_data"; 293 function = "can0"; 294 }; 295 296 du_pins: du { 297 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0"; 298 function = "du"; 299 }; 300 301 ssi_pins: sound { 302 groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; 303 function = "ssi"; 304 }; 305 306 audio_clk_pins: audio_clk { 307 groups = "audio_clk_a"; 308 function = "audio_clk"; 309 }; 310}; 311 312&scif0 { 313 pinctrl-0 = <&scif0_pins>; 314 pinctrl-names = "default"; 315 bootph-all; 316 317 status = "okay"; 318}; 319 320ðer { 321 pinctrl-0 = <ðer_pins>, <&phy1_pins>; 322 pinctrl-names = "default"; 323 324 phy-handle = <&phy1>; 325 renesas,ether-link-active-low; 326 status = "okay"; 327 328 phy1: ethernet-phy@1 { 329 compatible = "ethernet-phy-id0022.1537", 330 "ethernet-phy-ieee802.3-c22"; 331 reg = <1>; 332 interrupts-extended = <&irqc0 0 IRQ_TYPE_LEVEL_LOW>; 333 micrel,led-mode = <1>; 334 reset-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>; 335 }; 336}; 337 338&sdhi0 { 339 pinctrl-0 = <&sdhi0_pins>; 340 pinctrl-names = "default"; 341 342 vmmc-supply = <&vcc_sdhi0>; 343 vqmmc-supply = <&vccq_sdhi0>; 344 cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>; 345 wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>; 346 status = "okay"; 347}; 348 349&sdhi2 { 350 pinctrl-0 = <&sdhi2_pins>; 351 pinctrl-names = "default"; 352 353 vmmc-supply = <&vcc_sdhi2>; 354 vqmmc-supply = <&vccq_sdhi2>; 355 cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>; 356 status = "okay"; 357}; 358 359&qspi { 360 pinctrl-0 = <&qspi_pins>; 361 pinctrl-names = "default"; 362 363 status = "okay"; 364 365 flash@0 { 366 compatible = "spansion,s25fl512s", "jedec,spi-nor"; 367 reg = <0>; 368 spi-max-frequency = <30000000>; 369 spi-tx-bus-width = <4>; 370 spi-rx-bus-width = <4>; 371 m25p,fast-read; 372 373 partitions { 374 compatible = "fixed-partitions"; 375 #address-cells = <1>; 376 #size-cells = <1>; 377 378 partition@0 { 379 label = "loader_prg"; 380 reg = <0x00000000 0x00040000>; 381 read-only; 382 }; 383 partition@40000 { 384 label = "user_prg"; 385 reg = <0x00040000 0x00400000>; 386 read-only; 387 }; 388 partition@440000 { 389 label = "flash_fs"; 390 reg = <0x00440000 0x03bc0000>; 391 }; 392 }; 393 }; 394}; 395 396&i2c2 { 397 pinctrl-0 = <&i2c2_pins>; 398 pinctrl-names = "i2c-hdmi"; 399 400 clock-frequency = <400000>; 401}; 402 403&i2c6 { 404 pinctrl-names = "default"; 405 pinctrl-0 = <&pmic_irq_pins>; 406 status = "okay"; 407 clock-frequency = <100000>; 408 409 pmic@5a { 410 compatible = "dlg,da9063l"; 411 reg = <0x5a>; 412 interrupts-extended = <&irqc0 2 IRQ_TYPE_LEVEL_LOW>; 413 interrupt-controller; 414 #interrupt-cells = <2>; 415 416 watchdog { 417 compatible = "dlg,da9063-watchdog"; 418 }; 419 }; 420 421 vdd_dvfs: regulator@68 { 422 compatible = "dlg,da9210"; 423 reg = <0x68>; 424 interrupts-extended = <&irqc0 2 IRQ_TYPE_LEVEL_LOW>; 425 426 regulator-min-microvolt = <1000000>; 427 regulator-max-microvolt = <1000000>; 428 regulator-boot-on; 429 regulator-always-on; 430 }; 431}; 432 433&sata0 { 434 status = "okay"; 435}; 436 437&cpu0 { 438 cpu0-supply = <&vdd_dvfs>; 439}; 440 441/* composite video input */ 442&vin0 { 443 status = "okay"; 444 pinctrl-0 = <&vin0_pins>; 445 pinctrl-names = "default"; 446 447 port { 448 vin0ep: endpoint { 449 remote-endpoint = <&adv7180>; 450 bus-width = <8>; 451 }; 452 }; 453}; 454 455&pci0 { 456 pinctrl-0 = <&usb0_pins>; 457 pinctrl-names = "default"; 458 459 status = "okay"; 460}; 461 462&pci1 { 463 pinctrl-0 = <&usb1_pins>; 464 pinctrl-names = "default"; 465 466 status = "okay"; 467}; 468 469&hsusb { 470 pinctrl-0 = <&usb0_pins>; 471 pinctrl-names = "default"; 472 473 status = "okay"; 474}; 475 476&usbphy { 477 status = "okay"; 478}; 479 480&pcie_bus_clk { 481 clock-frequency = <100000000>; 482}; 483 484&pciec { 485 status = "okay"; 486}; 487 488&can0 { 489 pinctrl-0 = <&can0_pins>; 490 pinctrl-names = "default"; 491 492 status = "okay"; 493}; 494 495&du { 496 pinctrl-0 = <&du_pins>; 497 pinctrl-names = "default"; 498 status = "okay"; 499 500 clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>, 501 <&x3_clk>, <&x16_clk>; 502 clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1"; 503 504 ports { 505 port@0 { 506 endpoint { 507 remote-endpoint = <&adv7511_in>; 508 }; 509 }; 510 }; 511}; 512 513&lvds0 { 514 ports { 515 port@1 { 516 lvds_connector: endpoint { 517 }; 518 }; 519 }; 520}; 521 522&rcar_sound { 523 pinctrl-0 = <&ssi_pins>, <&audio_clk_pins>; 524 pinctrl-names = "default"; 525 status = "okay"; 526 527 /* Single DAI */ 528 #sound-dai-cells = <0>; 529 530 rcar_sound,dai { 531 dai0 { 532 playback = <&ssi0>; 533 capture = <&ssi1>; 534 }; 535 }; 536}; 537 538&rwdt { 539 timeout-sec = <60>; 540 status = "okay"; 541}; 542 543&ssi1 { 544 shared-pin; 545}; 546