1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Device Tree Source for the SILK board 4 * 5 * Copyright (C) 2014 Renesas Electronics Corporation 6 * Copyright (C) 2014-2015 Renesas Solutions Corp. 7 * Copyright (C) 2014-2015 Cogent Embedded, Inc. 8 */ 9 10/* 11 * SSI-AK4643 12 * 13 * SW1: 2-1: AK4643 14 * 2-3: ADV7511 15 * 16 * This command is required before playback/capture: 17 * 18 * amixer set "LINEOUT Mixer DACL" on 19 */ 20 21/dts-v1/; 22#include "r8a7794.dtsi" 23#include <dt-bindings/gpio/gpio.h> 24#include <dt-bindings/input/input.h> 25 26/ { 27 model = "SILK"; 28 compatible = "renesas,silk", "renesas,r8a7794"; 29 30 aliases { 31 serial0 = &scif2; 32 i2c9 = &gpioi2c1; 33 i2c10 = &i2chdmi; 34 mmc0 = &mmcif0; 35 mmc1 = &sdhi1; 36 }; 37 38 chosen { 39 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on"; 40 stdout-path = "serial0:115200n8"; 41 }; 42 43 memory@40000000 { 44 device_type = "memory"; 45 reg = <0 0x40000000 0 0x40000000>; 46 }; 47 48 keyboard { 49 compatible = "gpio-keys"; 50 51 pinctrl-0 = <&keyboard_pins>; 52 pinctrl-names = "default"; 53 54 key-3 { 55 gpios = <&gpio5 10 GPIO_ACTIVE_LOW>; 56 linux,code = <KEY_3>; 57 label = "SW3"; 58 wakeup-source; 59 debounce-interval = <20>; 60 }; 61 key-4 { 62 gpios = <&gpio5 11 GPIO_ACTIVE_LOW>; 63 linux,code = <KEY_4>; 64 label = "SW4"; 65 wakeup-source; 66 debounce-interval = <20>; 67 }; 68 key-6 { 69 gpios = <&gpio5 12 GPIO_ACTIVE_LOW>; 70 linux,code = <KEY_6>; 71 label = "SW6"; 72 wakeup-source; 73 debounce-interval = <20>; 74 }; 75 key-a { 76 gpios = <&gpio3 9 GPIO_ACTIVE_LOW>; 77 linux,code = <KEY_A>; 78 label = "SW12-1"; 79 wakeup-source; 80 debounce-interval = <20>; 81 }; 82 key-b { 83 gpios = <&gpio3 10 GPIO_ACTIVE_LOW>; 84 linux,code = <KEY_B>; 85 label = "SW12-2"; 86 wakeup-source; 87 debounce-interval = <20>; 88 }; 89 key-c { 90 gpios = <&gpio3 11 GPIO_ACTIVE_LOW>; 91 linux,code = <KEY_C>; 92 label = "SW12-3"; 93 wakeup-source; 94 debounce-interval = <20>; 95 }; 96 key-d { 97 gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; 98 linux,code = <KEY_D>; 99 label = "SW12-4"; 100 wakeup-source; 101 debounce-interval = <20>; 102 }; 103 }; 104 105 d1_8v: regulator-d1-8v { 106 compatible = "regulator-fixed"; 107 regulator-name = "D1.8V"; 108 regulator-min-microvolt = <1800000>; 109 regulator-max-microvolt = <1800000>; 110 regulator-boot-on; 111 regulator-always-on; 112 }; 113 114 d3_3v: regulator-d3-3v { 115 compatible = "regulator-fixed"; 116 regulator-name = "D3.3V"; 117 regulator-min-microvolt = <3300000>; 118 regulator-max-microvolt = <3300000>; 119 regulator-boot-on; 120 regulator-always-on; 121 }; 122 123 vcc_sdhi1: regulator-vcc-sdhi1 { 124 compatible = "regulator-fixed"; 125 126 regulator-name = "SDHI1 Vcc"; 127 regulator-min-microvolt = <3300000>; 128 regulator-max-microvolt = <3300000>; 129 130 gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>; 131 enable-active-high; 132 }; 133 134 vccq_sdhi1: regulator-vccq-sdhi1 { 135 compatible = "regulator-gpio"; 136 137 regulator-name = "SDHI1 VccQ"; 138 regulator-min-microvolt = <1800000>; 139 regulator-max-microvolt = <3300000>; 140 141 gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>; 142 gpios-states = <1>; 143 states = <3300000 1>, <1800000 0>; 144 }; 145 146 vga-encoder { 147 compatible = "adi,adv7123"; 148 149 ports { 150 #address-cells = <1>; 151 #size-cells = <0>; 152 153 port@0 { 154 reg = <0>; 155 adv7123_in: endpoint { 156 remote-endpoint = <&du_out_rgb1>; 157 }; 158 }; 159 port@1 { 160 reg = <1>; 161 adv7123_out: endpoint { 162 remote-endpoint = <&vga_in>; 163 }; 164 }; 165 }; 166 }; 167 168 hdmi-out { 169 compatible = "hdmi-connector"; 170 type = "a"; 171 172 port { 173 hdmi_con: endpoint { 174 remote-endpoint = <&adv7511_out>; 175 }; 176 }; 177 }; 178 179 vga { 180 compatible = "vga-connector"; 181 182 port { 183 vga_in: endpoint { 184 remote-endpoint = <&adv7123_out>; 185 }; 186 }; 187 }; 188 189 x2_clk: x2-clock { 190 compatible = "fixed-clock"; 191 #clock-cells = <0>; 192 clock-frequency = <148500000>; 193 }; 194 195 x3_clk: x3-clock { 196 compatible = "fixed-clock"; 197 #clock-cells = <0>; 198 clock-frequency = <74250000>; 199 }; 200 201 x9_clk: audio_clock { 202 compatible = "fixed-clock"; 203 #clock-cells = <0>; 204 clock-frequency = <12288000>; 205 }; 206 207 sound { 208 compatible = "simple-audio-card"; 209 210 simple-audio-card,format = "left_j"; 211 simple-audio-card,bitclock-master = <&soundcodec>; 212 simple-audio-card,frame-master = <&soundcodec>; 213 214 simple-audio-card,cpu { 215 sound-dai = <&rcar_sound>; 216 }; 217 218 soundcodec: simple-audio-card,codec { 219 sound-dai = <&ak4643>; 220 clocks = <&x9_clk>; 221 }; 222 }; 223 224 gpioi2c1: i2c-9 { 225 #address-cells = <1>; 226 #size-cells = <0>; 227 compatible = "i2c-gpio"; 228 status = "disabled"; 229 scl-gpios = <&gpio4 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 230 sda-gpios = <&gpio4 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; 231 i2c-gpio,delay-us = <5>; 232 }; 233 234 /* 235 * A fallback to GPIO is provided for I2C1. 236 */ 237 i2chdmi: i2c-mux1 { 238 compatible = "i2c-demux-pinctrl"; 239 i2c-parent = <&i2c1>, <&gpioi2c1>; 240 i2c-bus-name = "i2c-hdmi"; 241 #address-cells = <1>; 242 #size-cells = <0>; 243 244 ak4643: codec@12 { 245 compatible = "asahi-kasei,ak4643"; 246 #sound-dai-cells = <0>; 247 reg = <0x12>; 248 }; 249 250 composite-in@20 { 251 compatible = "adi,adv7180"; 252 reg = <0x20>; 253 254 port { 255 adv7180: endpoint { 256 bus-width = <8>; 257 remote-endpoint = <&vin0ep>; 258 }; 259 }; 260 }; 261 262 hdmi@39 { 263 compatible = "adi,adv7511w"; 264 reg = <0x39>; 265 interrupts-extended = <&gpio5 23 IRQ_TYPE_LEVEL_LOW>; 266 267 avdd-supply = <&d1_8v>; 268 dvdd-supply = <&d1_8v>; 269 pvdd-supply = <&d1_8v>; 270 dvdd-3v-supply = <&d3_3v>; 271 bgvdd-supply = <&d1_8v>; 272 273 adi,input-depth = <8>; 274 adi,input-colorspace = "rgb"; 275 adi,input-clock = "1x"; 276 277 ports { 278 #address-cells = <1>; 279 #size-cells = <0>; 280 281 port@0 { 282 reg = <0>; 283 adv7511_in: endpoint { 284 remote-endpoint = <&du_out_rgb0>; 285 }; 286 }; 287 288 port@1 { 289 reg = <1>; 290 adv7511_out: endpoint { 291 remote-endpoint = <&hdmi_con>; 292 }; 293 }; 294 }; 295 }; 296 297 eeprom@50 { 298 compatible = "renesas,r1ex24002", "atmel,24c02"; 299 reg = <0x50>; 300 pagesize = <16>; 301 }; 302 }; 303}; 304 305&extal_clk { 306 clock-frequency = <20000000>; 307}; 308 309&pfc { 310 pinctrl-0 = <&scif_clk_pins>; 311 pinctrl-names = "default"; 312 313 scif2_pins: scif2 { 314 groups = "scif2_data"; 315 function = "scif2"; 316 }; 317 318 scif_clk_pins: scif_clk { 319 groups = "scif_clk"; 320 function = "scif_clk"; 321 }; 322 323 ether_pins: ether { 324 groups = "eth_link", "eth_mdio", "eth_rmii"; 325 function = "eth"; 326 }; 327 328 phy1_pins: phy1 { 329 groups = "intc_irq8"; 330 function = "intc"; 331 }; 332 333 i2c1_pins: i2c1 { 334 groups = "i2c1"; 335 function = "i2c1"; 336 }; 337 338 mmcif0_pins: mmcif0 { 339 groups = "mmc_data8", "mmc_ctrl"; 340 function = "mmc"; 341 }; 342 343 sdhi1_pins: sd1 { 344 groups = "sdhi1_data4", "sdhi1_ctrl"; 345 function = "sdhi1"; 346 }; 347 348 qspi_pins: qspi { 349 groups = "qspi_ctrl", "qspi_data4"; 350 function = "qspi"; 351 }; 352 353 vin0_pins: vin0 { 354 groups = "vin0_data8", "vin0_clk"; 355 function = "vin0"; 356 }; 357 358 usb0_pins: usb0 { 359 groups = "usb0"; 360 function = "usb0"; 361 }; 362 363 usb1_pins: usb1 { 364 groups = "usb1"; 365 function = "usb1"; 366 }; 367 368 du0_pins: du0 { 369 groups = "du0_rgb888", "du0_sync", "du0_disp", "du0_clk0_out"; 370 function = "du0"; 371 }; 372 373 du1_pins: du1 { 374 groups = "du1_rgb666", "du1_sync", "du1_disp", "du1_clk0_out"; 375 function = "du1"; 376 }; 377 378 keyboard_pins: keyboard { 379 pins = "GP_3_9", "GP_3_10", "GP_3_11", "GP_3_12"; 380 bias-pull-up; 381 }; 382 383 ssi_pins: sound { 384 groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; 385 function = "ssi"; 386 }; 387 388 audio_clk_pins: audio_clk { 389 groups = "audio_clkc"; 390 function = "audio_clk"; 391 }; 392}; 393 394&scif2 { 395 pinctrl-0 = <&scif2_pins>; 396 pinctrl-names = "default"; 397 398 status = "okay"; 399}; 400 401&scif_clk { 402 clock-frequency = <14745600>; 403}; 404 405ðer { 406 pinctrl-0 = <ðer_pins>, <&phy1_pins>; 407 pinctrl-names = "default"; 408 409 phy-handle = <&phy1>; 410 renesas,ether-link-active-low; 411 status = "okay"; 412 413 phy1: ethernet-phy@1 { 414 compatible = "ethernet-phy-id0022.1537", 415 "ethernet-phy-ieee802.3-c22"; 416 reg = <1>; 417 interrupts-extended = <&irqc0 8 IRQ_TYPE_LEVEL_LOW>; 418 micrel,led-mode = <1>; 419 reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; 420 }; 421}; 422 423&i2c1 { 424 pinctrl-0 = <&i2c1_pins>; 425 pinctrl-names = "i2c-hdmi"; 426 427 clock-frequency = <400000>; 428}; 429 430&i2c7 { 431 status = "okay"; 432 clock-frequency = <100000>; 433 434 pmic@58 { 435 compatible = "dlg,da9063"; 436 reg = <0x58>; 437 interrupts-extended = <&gpio3 31 IRQ_TYPE_LEVEL_LOW>; 438 interrupt-controller; 439 #interrupt-cells = <2>; 440 441 onkey { 442 compatible = "dlg,da9063-onkey"; 443 }; 444 445 rtc { 446 compatible = "dlg,da9063-rtc"; 447 }; 448 449 watchdog { 450 compatible = "dlg,da9063-watchdog"; 451 }; 452 }; 453}; 454 455&mmcif0 { 456 pinctrl-0 = <&mmcif0_pins>; 457 pinctrl-names = "default"; 458 459 vmmc-supply = <&d3_3v>; 460 vqmmc-supply = <&d3_3v>; 461 bus-width = <8>; 462 non-removable; 463 status = "okay"; 464}; 465 466&sdhi1 { 467 pinctrl-0 = <&sdhi1_pins>; 468 pinctrl-names = "default"; 469 470 vmmc-supply = <&vcc_sdhi1>; 471 vqmmc-supply = <&vccq_sdhi1>; 472 cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>; 473 status = "okay"; 474}; 475 476&qspi { 477 pinctrl-0 = <&qspi_pins>; 478 pinctrl-names = "default"; 479 480 status = "okay"; 481 482 flash@0 { 483 compatible = "spansion,s25fl512s", "jedec,spi-nor"; 484 reg = <0>; 485 spi-max-frequency = <30000000>; 486 spi-tx-bus-width = <4>; 487 spi-rx-bus-width = <4>; 488 spi-cpol; 489 spi-cpha; 490 m25p,fast-read; 491 492 partitions { 493 compatible = "fixed-partitions"; 494 #address-cells = <1>; 495 #size-cells = <1>; 496 497 partition@0 { 498 label = "loader"; 499 reg = <0x00000000 0x00040000>; 500 read-only; 501 }; 502 partition@40000 { 503 label = "user"; 504 reg = <0x00040000 0x00400000>; 505 read-only; 506 }; 507 partition@440000 { 508 label = "flash"; 509 reg = <0x00440000 0x03bc0000>; 510 }; 511 }; 512 }; 513}; 514 515/* composite video input */ 516&vin0 { 517 status = "okay"; 518 pinctrl-0 = <&vin0_pins>; 519 pinctrl-names = "default"; 520 521 port { 522 vin0ep: endpoint { 523 remote-endpoint = <&adv7180>; 524 bus-width = <8>; 525 }; 526 }; 527}; 528 529&pci0 { 530 status = "okay"; 531 pinctrl-0 = <&usb0_pins>; 532 pinctrl-names = "default"; 533}; 534 535&pci1 { 536 status = "okay"; 537 pinctrl-0 = <&usb1_pins>; 538 pinctrl-names = "default"; 539}; 540 541&usbphy { 542 status = "okay"; 543}; 544 545&du { 546 pinctrl-0 = <&du0_pins>, <&du1_pins>; 547 pinctrl-names = "default"; 548 status = "okay"; 549 550 clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>, 551 <&x2_clk>, <&x3_clk>; 552 clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1"; 553 554 ports { 555 port@0 { 556 endpoint { 557 remote-endpoint = <&adv7511_in>; 558 }; 559 }; 560 port@1 { 561 endpoint { 562 remote-endpoint = <&adv7123_in>; 563 }; 564 }; 565 }; 566}; 567 568&rcar_sound { 569 pinctrl-0 = <&ssi_pins>, <&audio_clk_pins>; 570 pinctrl-names = "default"; 571 status = "okay"; 572 573 /* Single DAI */ 574 #sound-dai-cells = <0>; 575 576 rcar_sound,dai { 577 dai0 { 578 playback = <&ssi0>; 579 capture = <&ssi1>; 580 }; 581 }; 582}; 583 584&rwdt { 585 timeout-sec = <60>; 586 status = "okay"; 587}; 588 589&ssi1 { 590 shared-pin; 591}; 592