0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003 * Device Tree Source for the SILK board
0004 *
0005 * Copyright (C) 2014 Renesas Electronics Corporation
0006 * Copyright (C) 2014-2015 Renesas Solutions Corp.
0007 * Copyright (C) 2014-2015 Cogent Embedded, Inc.
0008 */
0009
0010 /*
0011 * SSI-AK4643
0012 *
0013 * SW1: 2-1: AK4643
0014 * 2-3: ADV7511
0015 *
0016 * This command is required before playback/capture:
0017 *
0018 * amixer set "LINEOUT Mixer DACL" on
0019 */
0020
0021 /dts-v1/;
0022 #include "r8a7794.dtsi"
0023 #include <dt-bindings/gpio/gpio.h>
0024 #include <dt-bindings/input/input.h>
0025
0026 / {
0027 model = "SILK";
0028 compatible = "renesas,silk", "renesas,r8a7794";
0029
0030 aliases {
0031 serial0 = &scif2;
0032 i2c9 = &gpioi2c1;
0033 i2c10 = &i2chdmi;
0034 mmc0 = &mmcif0;
0035 mmc1 = &sdhi1;
0036 };
0037
0038 chosen {
0039 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
0040 stdout-path = "serial0:115200n8";
0041 };
0042
0043 memory@40000000 {
0044 device_type = "memory";
0045 reg = <0 0x40000000 0 0x40000000>;
0046 };
0047
0048 keyboard {
0049 compatible = "gpio-keys";
0050
0051 pinctrl-0 = <&keyboard_pins>;
0052 pinctrl-names = "default";
0053
0054 key-3 {
0055 gpios = <&gpio5 10 GPIO_ACTIVE_LOW>;
0056 linux,code = <KEY_3>;
0057 label = "SW3";
0058 wakeup-source;
0059 debounce-interval = <20>;
0060 };
0061 key-4 {
0062 gpios = <&gpio5 11 GPIO_ACTIVE_LOW>;
0063 linux,code = <KEY_4>;
0064 label = "SW4";
0065 wakeup-source;
0066 debounce-interval = <20>;
0067 };
0068 key-6 {
0069 gpios = <&gpio5 12 GPIO_ACTIVE_LOW>;
0070 linux,code = <KEY_6>;
0071 label = "SW6";
0072 wakeup-source;
0073 debounce-interval = <20>;
0074 };
0075 key-a {
0076 gpios = <&gpio3 9 GPIO_ACTIVE_LOW>;
0077 linux,code = <KEY_A>;
0078 label = "SW12-1";
0079 wakeup-source;
0080 debounce-interval = <20>;
0081 };
0082 key-b {
0083 gpios = <&gpio3 10 GPIO_ACTIVE_LOW>;
0084 linux,code = <KEY_B>;
0085 label = "SW12-2";
0086 wakeup-source;
0087 debounce-interval = <20>;
0088 };
0089 key-c {
0090 gpios = <&gpio3 11 GPIO_ACTIVE_LOW>;
0091 linux,code = <KEY_C>;
0092 label = "SW12-3";
0093 wakeup-source;
0094 debounce-interval = <20>;
0095 };
0096 key-d {
0097 gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
0098 linux,code = <KEY_D>;
0099 label = "SW12-4";
0100 wakeup-source;
0101 debounce-interval = <20>;
0102 };
0103 };
0104
0105 d3_3v: regulator-d3-3v {
0106 compatible = "regulator-fixed";
0107 regulator-name = "D3.3V";
0108 regulator-min-microvolt = <3300000>;
0109 regulator-max-microvolt = <3300000>;
0110 regulator-boot-on;
0111 regulator-always-on;
0112 };
0113
0114 vcc_sdhi1: regulator-vcc-sdhi1 {
0115 compatible = "regulator-fixed";
0116
0117 regulator-name = "SDHI1 Vcc";
0118 regulator-min-microvolt = <3300000>;
0119 regulator-max-microvolt = <3300000>;
0120
0121 gpio = <&gpio4 26 GPIO_ACTIVE_HIGH>;
0122 enable-active-high;
0123 };
0124
0125 vccq_sdhi1: regulator-vccq-sdhi1 {
0126 compatible = "regulator-gpio";
0127
0128 regulator-name = "SDHI1 VccQ";
0129 regulator-min-microvolt = <1800000>;
0130 regulator-max-microvolt = <3300000>;
0131
0132 gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
0133 gpios-states = <1>;
0134 states = <3300000 1>, <1800000 0>;
0135 };
0136
0137 vga-encoder {
0138 compatible = "adi,adv7123";
0139
0140 ports {
0141 #address-cells = <1>;
0142 #size-cells = <0>;
0143
0144 port@0 {
0145 reg = <0>;
0146 adv7123_in: endpoint {
0147 remote-endpoint = <&du_out_rgb1>;
0148 };
0149 };
0150 port@1 {
0151 reg = <1>;
0152 adv7123_out: endpoint {
0153 remote-endpoint = <&vga_in>;
0154 };
0155 };
0156 };
0157 };
0158
0159 hdmi-out {
0160 compatible = "hdmi-connector";
0161 type = "a";
0162
0163 port {
0164 hdmi_con: endpoint {
0165 remote-endpoint = <&adv7511_out>;
0166 };
0167 };
0168 };
0169
0170 vga {
0171 compatible = "vga-connector";
0172
0173 port {
0174 vga_in: endpoint {
0175 remote-endpoint = <&adv7123_out>;
0176 };
0177 };
0178 };
0179
0180 x2_clk: x2-clock {
0181 compatible = "fixed-clock";
0182 #clock-cells = <0>;
0183 clock-frequency = <148500000>;
0184 };
0185
0186 x3_clk: x3-clock {
0187 compatible = "fixed-clock";
0188 #clock-cells = <0>;
0189 clock-frequency = <74250000>;
0190 };
0191
0192 x9_clk: audio_clock {
0193 compatible = "fixed-clock";
0194 #clock-cells = <0>;
0195 clock-frequency = <12288000>;
0196 };
0197
0198 sound {
0199 compatible = "simple-audio-card";
0200
0201 simple-audio-card,format = "left_j";
0202 simple-audio-card,bitclock-master = <&soundcodec>;
0203 simple-audio-card,frame-master = <&soundcodec>;
0204
0205 simple-audio-card,cpu {
0206 sound-dai = <&rcar_sound>;
0207 };
0208
0209 soundcodec: simple-audio-card,codec {
0210 sound-dai = <&ak4643>;
0211 clocks = <&x9_clk>;
0212 };
0213 };
0214
0215 gpioi2c1: i2c-9 {
0216 #address-cells = <1>;
0217 #size-cells = <0>;
0218 compatible = "i2c-gpio";
0219 status = "disabled";
0220 scl-gpios = <&gpio4 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0221 sda-gpios = <&gpio4 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0222 i2c-gpio,delay-us = <5>;
0223 };
0224
0225 /*
0226 * A fallback to GPIO is provided for I2C1.
0227 */
0228 i2chdmi: i2c-10 {
0229 compatible = "i2c-demux-pinctrl";
0230 i2c-parent = <&i2c1>, <&gpioi2c1>;
0231 i2c-bus-name = "i2c-hdmi";
0232 #address-cells = <1>;
0233 #size-cells = <0>;
0234
0235 ak4643: codec@12 {
0236 compatible = "asahi-kasei,ak4643";
0237 #sound-dai-cells = <0>;
0238 reg = <0x12>;
0239 };
0240
0241 composite-in@20 {
0242 compatible = "adi,adv7180";
0243 reg = <0x20>;
0244
0245 port {
0246 adv7180: endpoint {
0247 bus-width = <8>;
0248 remote-endpoint = <&vin0ep>;
0249 };
0250 };
0251 };
0252
0253 hdmi@39 {
0254 compatible = "adi,adv7511w";
0255 reg = <0x39>;
0256 interrupt-parent = <&gpio5>;
0257 interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
0258
0259 adi,input-depth = <8>;
0260 adi,input-colorspace = "rgb";
0261 adi,input-clock = "1x";
0262
0263 ports {
0264 #address-cells = <1>;
0265 #size-cells = <0>;
0266
0267 port@0 {
0268 reg = <0>;
0269 adv7511_in: endpoint {
0270 remote-endpoint = <&du_out_rgb0>;
0271 };
0272 };
0273
0274 port@1 {
0275 reg = <1>;
0276 adv7511_out: endpoint {
0277 remote-endpoint = <&hdmi_con>;
0278 };
0279 };
0280 };
0281 };
0282
0283 eeprom@50 {
0284 compatible = "renesas,r1ex24002", "atmel,24c02";
0285 reg = <0x50>;
0286 pagesize = <16>;
0287 };
0288 };
0289 };
0290
0291 &extal_clk {
0292 clock-frequency = <20000000>;
0293 };
0294
0295 &pfc {
0296 pinctrl-0 = <&scif_clk_pins>;
0297 pinctrl-names = "default";
0298
0299 scif2_pins: scif2 {
0300 groups = "scif2_data";
0301 function = "scif2";
0302 };
0303
0304 scif_clk_pins: scif_clk {
0305 groups = "scif_clk";
0306 function = "scif_clk";
0307 };
0308
0309 ether_pins: ether {
0310 groups = "eth_link", "eth_mdio", "eth_rmii";
0311 function = "eth";
0312 };
0313
0314 phy1_pins: phy1 {
0315 groups = "intc_irq8";
0316 function = "intc";
0317 };
0318
0319 i2c1_pins: i2c1 {
0320 groups = "i2c1";
0321 function = "i2c1";
0322 };
0323
0324 mmcif0_pins: mmcif0 {
0325 groups = "mmc_data8", "mmc_ctrl";
0326 function = "mmc";
0327 };
0328
0329 sdhi1_pins: sd1 {
0330 groups = "sdhi1_data4", "sdhi1_ctrl";
0331 function = "sdhi1";
0332 };
0333
0334 qspi_pins: qspi {
0335 groups = "qspi_ctrl", "qspi_data4";
0336 function = "qspi";
0337 };
0338
0339 vin0_pins: vin0 {
0340 groups = "vin0_data8", "vin0_clk";
0341 function = "vin0";
0342 };
0343
0344 usb0_pins: usb0 {
0345 groups = "usb0";
0346 function = "usb0";
0347 };
0348
0349 usb1_pins: usb1 {
0350 groups = "usb1";
0351 function = "usb1";
0352 };
0353
0354 du0_pins: du0 {
0355 groups = "du0_rgb888", "du0_sync", "du0_disp", "du0_clk0_out";
0356 function = "du0";
0357 };
0358
0359 du1_pins: du1 {
0360 groups = "du1_rgb666", "du1_sync", "du1_disp", "du1_clk0_out";
0361 function = "du1";
0362 };
0363
0364 keyboard_pins: keyboard {
0365 pins = "GP_3_9", "GP_3_10", "GP_3_11", "GP_3_12";
0366 bias-pull-up;
0367 };
0368
0369 ssi_pins: sound {
0370 groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
0371 function = "ssi";
0372 };
0373
0374 audio_clk_pins: audio_clk {
0375 groups = "audio_clkc";
0376 function = "audio_clk";
0377 };
0378 };
0379
0380 &scif2 {
0381 pinctrl-0 = <&scif2_pins>;
0382 pinctrl-names = "default";
0383
0384 status = "okay";
0385 };
0386
0387 &scif_clk {
0388 clock-frequency = <14745600>;
0389 };
0390
0391 ðer {
0392 pinctrl-0 = <ðer_pins>, <&phy1_pins>;
0393 pinctrl-names = "default";
0394
0395 phy-handle = <&phy1>;
0396 renesas,ether-link-active-low;
0397 status = "okay";
0398
0399 phy1: ethernet-phy@1 {
0400 compatible = "ethernet-phy-id0022.1537",
0401 "ethernet-phy-ieee802.3-c22";
0402 reg = <1>;
0403 interrupt-parent = <&irqc0>;
0404 interrupts = <8 IRQ_TYPE_LEVEL_LOW>;
0405 micrel,led-mode = <1>;
0406 reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
0407 };
0408 };
0409
0410 &i2c1 {
0411 pinctrl-0 = <&i2c1_pins>;
0412 pinctrl-names = "i2c-hdmi";
0413
0414 clock-frequency = <400000>;
0415 };
0416
0417 &i2c7 {
0418 status = "okay";
0419 clock-frequency = <100000>;
0420
0421 pmic@58 {
0422 compatible = "dlg,da9063";
0423 reg = <0x58>;
0424 interrupt-parent = <&gpio3>;
0425 interrupts = <31 IRQ_TYPE_LEVEL_LOW>;
0426 interrupt-controller;
0427
0428 onkey {
0429 compatible = "dlg,da9063-onkey";
0430 };
0431
0432 rtc {
0433 compatible = "dlg,da9063-rtc";
0434 };
0435
0436 watchdog {
0437 compatible = "dlg,da9063-watchdog";
0438 };
0439 };
0440 };
0441
0442 &mmcif0 {
0443 pinctrl-0 = <&mmcif0_pins>;
0444 pinctrl-names = "default";
0445
0446 vmmc-supply = <&d3_3v>;
0447 vqmmc-supply = <&d3_3v>;
0448 bus-width = <8>;
0449 non-removable;
0450 status = "okay";
0451 };
0452
0453 &sdhi1 {
0454 pinctrl-0 = <&sdhi1_pins>;
0455 pinctrl-names = "default";
0456
0457 vmmc-supply = <&vcc_sdhi1>;
0458 vqmmc-supply = <&vccq_sdhi1>;
0459 cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
0460 status = "okay";
0461 };
0462
0463 &qspi {
0464 pinctrl-0 = <&qspi_pins>;
0465 pinctrl-names = "default";
0466
0467 status = "okay";
0468
0469 flash@0 {
0470 compatible = "spansion,s25fl512s", "jedec,spi-nor";
0471 reg = <0>;
0472 spi-max-frequency = <30000000>;
0473 spi-tx-bus-width = <4>;
0474 spi-rx-bus-width = <4>;
0475 spi-cpol;
0476 spi-cpha;
0477 m25p,fast-read;
0478
0479 partitions {
0480 compatible = "fixed-partitions";
0481 #address-cells = <1>;
0482 #size-cells = <1>;
0483
0484 partition@0 {
0485 label = "loader";
0486 reg = <0x00000000 0x00040000>;
0487 read-only;
0488 };
0489 partition@40000 {
0490 label = "user";
0491 reg = <0x00040000 0x00400000>;
0492 read-only;
0493 };
0494 partition@440000 {
0495 label = "flash";
0496 reg = <0x00440000 0x03bc0000>;
0497 };
0498 };
0499 };
0500 };
0501
0502 /* composite video input */
0503 &vin0 {
0504 status = "okay";
0505 pinctrl-0 = <&vin0_pins>;
0506 pinctrl-names = "default";
0507
0508 port {
0509 vin0ep: endpoint {
0510 remote-endpoint = <&adv7180>;
0511 bus-width = <8>;
0512 };
0513 };
0514 };
0515
0516 &pci0 {
0517 status = "okay";
0518 pinctrl-0 = <&usb0_pins>;
0519 pinctrl-names = "default";
0520 };
0521
0522 &pci1 {
0523 status = "okay";
0524 pinctrl-0 = <&usb1_pins>;
0525 pinctrl-names = "default";
0526 };
0527
0528 &usbphy {
0529 status = "okay";
0530 };
0531
0532 &du {
0533 pinctrl-0 = <&du0_pins>, <&du1_pins>;
0534 pinctrl-names = "default";
0535 status = "okay";
0536
0537 clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
0538 <&x2_clk>, <&x3_clk>;
0539 clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
0540
0541 ports {
0542 port@0 {
0543 endpoint {
0544 remote-endpoint = <&adv7511_in>;
0545 };
0546 };
0547 port@1 {
0548 endpoint {
0549 remote-endpoint = <&adv7123_in>;
0550 };
0551 };
0552 };
0553 };
0554
0555 &rcar_sound {
0556 pinctrl-0 = <&ssi_pins>, <&audio_clk_pins>;
0557 pinctrl-names = "default";
0558 status = "okay";
0559
0560 /* Single DAI */
0561 #sound-dai-cells = <0>;
0562
0563 rcar_sound,dai {
0564 dai0 {
0565 playback = <&ssi0>;
0566 capture = <&ssi1>;
0567 };
0568 };
0569 };
0570
0571 &rwdt {
0572 timeout-sec = <60>;
0573 status = "okay";
0574 };
0575
0576 &ssi1 {
0577 shared-pin;
0578 };