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 316 status = "okay"; 317}; 318 319ðer { 320 pinctrl-0 = <ðer_pins>, <&phy1_pins>; 321 pinctrl-names = "default"; 322 323 phy-handle = <&phy1>; 324 renesas,ether-link-active-low; 325 status = "okay"; 326 327 phy1: ethernet-phy@1 { 328 compatible = "ethernet-phy-id0022.1537", 329 "ethernet-phy-ieee802.3-c22"; 330 reg = <1>; 331 interrupts-extended = <&irqc0 0 IRQ_TYPE_LEVEL_LOW>; 332 micrel,led-mode = <1>; 333 reset-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>; 334 }; 335}; 336 337&sdhi0 { 338 pinctrl-0 = <&sdhi0_pins>; 339 pinctrl-names = "default"; 340 341 vmmc-supply = <&vcc_sdhi0>; 342 vqmmc-supply = <&vccq_sdhi0>; 343 cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>; 344 wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>; 345 status = "okay"; 346}; 347 348&sdhi2 { 349 pinctrl-0 = <&sdhi2_pins>; 350 pinctrl-names = "default"; 351 352 vmmc-supply = <&vcc_sdhi2>; 353 vqmmc-supply = <&vccq_sdhi2>; 354 cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>; 355 status = "okay"; 356}; 357 358&qspi { 359 pinctrl-0 = <&qspi_pins>; 360 pinctrl-names = "default"; 361 362 status = "okay"; 363 364 flash@0 { 365 compatible = "spansion,s25fl512s", "jedec,spi-nor"; 366 reg = <0>; 367 spi-max-frequency = <30000000>; 368 spi-tx-bus-width = <4>; 369 spi-rx-bus-width = <4>; 370 m25p,fast-read; 371 372 partitions { 373 compatible = "fixed-partitions"; 374 #address-cells = <1>; 375 #size-cells = <1>; 376 377 partition@0 { 378 label = "loader_prg"; 379 reg = <0x00000000 0x00040000>; 380 read-only; 381 }; 382 partition@40000 { 383 label = "user_prg"; 384 reg = <0x00040000 0x00400000>; 385 read-only; 386 }; 387 partition@440000 { 388 label = "flash_fs"; 389 reg = <0x00440000 0x03bc0000>; 390 }; 391 }; 392 }; 393}; 394 395&i2c2 { 396 pinctrl-0 = <&i2c2_pins>; 397 pinctrl-names = "i2c-hdmi"; 398 399 clock-frequency = <400000>; 400}; 401 402&i2c6 { 403 pinctrl-names = "default"; 404 pinctrl-0 = <&pmic_irq_pins>; 405 status = "okay"; 406 clock-frequency = <100000>; 407 408 pmic@5a { 409 compatible = "dlg,da9063l"; 410 reg = <0x5a>; 411 interrupts-extended = <&irqc0 2 IRQ_TYPE_LEVEL_LOW>; 412 interrupt-controller; 413 #interrupt-cells = <2>; 414 415 watchdog { 416 compatible = "dlg,da9063-watchdog"; 417 }; 418 }; 419 420 vdd_dvfs: regulator@68 { 421 compatible = "dlg,da9210"; 422 reg = <0x68>; 423 interrupts-extended = <&irqc0 2 IRQ_TYPE_LEVEL_LOW>; 424 425 regulator-min-microvolt = <1000000>; 426 regulator-max-microvolt = <1000000>; 427 regulator-boot-on; 428 regulator-always-on; 429 }; 430}; 431 432&sata0 { 433 status = "okay"; 434}; 435 436&cpu0 { 437 cpu0-supply = <&vdd_dvfs>; 438}; 439 440/* composite video input */ 441&vin0 { 442 status = "okay"; 443 pinctrl-0 = <&vin0_pins>; 444 pinctrl-names = "default"; 445 446 port { 447 vin0ep: endpoint { 448 remote-endpoint = <&adv7180>; 449 bus-width = <8>; 450 }; 451 }; 452}; 453 454&pci0 { 455 pinctrl-0 = <&usb0_pins>; 456 pinctrl-names = "default"; 457 458 status = "okay"; 459}; 460 461&pci1 { 462 pinctrl-0 = <&usb1_pins>; 463 pinctrl-names = "default"; 464 465 status = "okay"; 466}; 467 468&hsusb { 469 pinctrl-0 = <&usb0_pins>; 470 pinctrl-names = "default"; 471 472 status = "okay"; 473}; 474 475&usbphy { 476 status = "okay"; 477}; 478 479&pcie_bus_clk { 480 clock-frequency = <100000000>; 481}; 482 483&pciec { 484 status = "okay"; 485}; 486 487&can0 { 488 pinctrl-0 = <&can0_pins>; 489 pinctrl-names = "default"; 490 491 status = "okay"; 492}; 493 494&du { 495 pinctrl-0 = <&du_pins>; 496 pinctrl-names = "default"; 497 status = "okay"; 498 499 clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>, 500 <&x3_clk>, <&x16_clk>; 501 clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1"; 502 503 ports { 504 port@0 { 505 endpoint { 506 remote-endpoint = <&adv7511_in>; 507 }; 508 }; 509 }; 510}; 511 512&lvds0 { 513 ports { 514 port@1 { 515 lvds_connector: endpoint { 516 }; 517 }; 518 }; 519}; 520 521&rcar_sound { 522 pinctrl-0 = <&ssi_pins>, <&audio_clk_pins>; 523 pinctrl-names = "default"; 524 status = "okay"; 525 526 /* Single DAI */ 527 #sound-dai-cells = <0>; 528 529 rcar_sound,dai { 530 dai0 { 531 playback = <&ssi0>; 532 capture = <&ssi1>; 533 }; 534 }; 535}; 536 537&rwdt { 538 timeout-sec = <60>; 539 status = "okay"; 540}; 541 542&ssi1 { 543 shared-pin; 544}; 545