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