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