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