0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003 * Device Tree Source for the Porter board
0004 *
0005 * Copyright (C) 2015 Cogent Embedded, Inc.
0006 */
0007
0008 /*
0009 * SSI-AK4642
0010 *
0011 * JP3: 2-1: AK4642
0012 * 2-3: ADV7511
0013 *
0014 * This command is required before playback/capture:
0015 *
0016 * amixer set "LINEOUT Mixer DACL" on
0017 */
0018
0019 /dts-v1/;
0020 #include "r8a7791.dtsi"
0021 #include <dt-bindings/gpio/gpio.h>
0022
0023 / {
0024 model = "Porter";
0025 compatible = "renesas,porter", "renesas,r8a7791";
0026
0027 aliases {
0028 serial0 = &scif0;
0029 i2c9 = &gpioi2c2;
0030 i2c10 = &i2chdmi;
0031 mmc0 = &sdhi0;
0032 mmc1 = &sdhi2;
0033 };
0034
0035 chosen {
0036 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
0037 stdout-path = "serial0:115200n8";
0038 };
0039
0040 memory@40000000 {
0041 device_type = "memory";
0042 reg = <0 0x40000000 0 0x40000000>;
0043 };
0044
0045 memory@200000000 {
0046 device_type = "memory";
0047 reg = <2 0x00000000 0 0x40000000>;
0048 };
0049
0050 vcc_sdhi0: regulator-vcc-sdhi0 {
0051 compatible = "regulator-fixed";
0052
0053 regulator-name = "SDHI0 Vcc";
0054 regulator-min-microvolt = <3300000>;
0055 regulator-max-microvolt = <3300000>;
0056 regulator-always-on;
0057 };
0058
0059 vccq_sdhi0: regulator-vccq-sdhi0 {
0060 compatible = "regulator-gpio";
0061
0062 regulator-name = "SDHI0 VccQ";
0063 regulator-min-microvolt = <1800000>;
0064 regulator-max-microvolt = <3300000>;
0065
0066 gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
0067 gpios-states = <1>;
0068 states = <3300000 1>, <1800000 0>;
0069 };
0070
0071 vcc_sdhi2: regulator-vcc-sdhi2 {
0072 compatible = "regulator-fixed";
0073
0074 regulator-name = "SDHI2 Vcc";
0075 regulator-min-microvolt = <3300000>;
0076 regulator-max-microvolt = <3300000>;
0077 regulator-always-on;
0078 };
0079
0080 vccq_sdhi2: regulator-vccq-sdhi2 {
0081 compatible = "regulator-gpio";
0082
0083 regulator-name = "SDHI2 VccQ";
0084 regulator-min-microvolt = <1800000>;
0085 regulator-max-microvolt = <3300000>;
0086
0087 gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
0088 gpios-states = <1>;
0089 states = <3300000 1>, <1800000 0>;
0090 };
0091
0092 hdmi-out {
0093 compatible = "hdmi-connector";
0094 type = "a";
0095
0096 port {
0097 hdmi_con: endpoint {
0098 remote-endpoint = <&adv7511_out>;
0099 };
0100 };
0101 };
0102
0103 x3_clk: x3-clock {
0104 compatible = "fixed-clock";
0105 #clock-cells = <0>;
0106 clock-frequency = <148500000>;
0107 };
0108
0109 x16_clk: x16-clock {
0110 compatible = "fixed-clock";
0111 #clock-cells = <0>;
0112 clock-frequency = <74250000>;
0113 };
0114
0115 x14_clk: audio_clock {
0116 compatible = "fixed-clock";
0117 #clock-cells = <0>;
0118 clock-frequency = <11289600>;
0119 };
0120
0121 sound {
0122 compatible = "simple-audio-card";
0123
0124 simple-audio-card,format = "left_j";
0125 simple-audio-card,bitclock-master = <&soundcodec>;
0126 simple-audio-card,frame-master = <&soundcodec>;
0127
0128 simple-audio-card,cpu {
0129 sound-dai = <&rcar_sound>;
0130 };
0131
0132 soundcodec: simple-audio-card,codec {
0133 sound-dai = <&ak4642>;
0134 clocks = <&x14_clk>;
0135 };
0136 };
0137
0138 gpioi2c2: i2c-9 {
0139 #address-cells = <1>;
0140 #size-cells = <0>;
0141 compatible = "i2c-gpio";
0142 status = "disabled";
0143 scl-gpios = <&gpio2 6 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0144 sda-gpios = <&gpio2 7 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
0145 i2c-gpio,delay-us = <5>;
0146 };
0147
0148 /*
0149 * A fallback to GPIO is provided for I2C2.
0150 */
0151 i2chdmi: i2c-10 {
0152 compatible = "i2c-demux-pinctrl";
0153 i2c-parent = <&i2c2>, <&gpioi2c2>;
0154 i2c-bus-name = "i2c-hdmi";
0155 #address-cells = <1>;
0156 #size-cells = <0>;
0157
0158 ak4642: codec@12 {
0159 compatible = "asahi-kasei,ak4642";
0160 #sound-dai-cells = <0>;
0161 reg = <0x12>;
0162 };
0163
0164 composite-in@20 {
0165 compatible = "adi,adv7180";
0166 reg = <0x20>;
0167
0168 port {
0169 adv7180: endpoint {
0170 bus-width = <8>;
0171 remote-endpoint = <&vin0ep>;
0172 };
0173 };
0174 };
0175
0176 hdmi@39 {
0177 compatible = "adi,adv7511w";
0178 reg = <0x39>;
0179 interrupt-parent = <&gpio3>;
0180 interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
0181
0182 adi,input-depth = <8>;
0183 adi,input-colorspace = "rgb";
0184 adi,input-clock = "1x";
0185
0186 ports {
0187 #address-cells = <1>;
0188 #size-cells = <0>;
0189
0190 port@0 {
0191 reg = <0>;
0192 adv7511_in: endpoint {
0193 remote-endpoint = <&du_out_rgb>;
0194 };
0195 };
0196
0197 port@1 {
0198 reg = <1>;
0199 adv7511_out: endpoint {
0200 remote-endpoint = <&hdmi_con>;
0201 };
0202 };
0203 };
0204 };
0205 };
0206 };
0207
0208 &extal_clk {
0209 clock-frequency = <20000000>;
0210 };
0211
0212 &pfc {
0213 scif0_pins: scif0 {
0214 groups = "scif0_data_d";
0215 function = "scif0";
0216 };
0217
0218 ether_pins: ether {
0219 groups = "eth_link", "eth_mdio", "eth_rmii";
0220 function = "eth";
0221 };
0222
0223 phy1_pins: phy1 {
0224 groups = "intc_irq0";
0225 function = "intc";
0226 };
0227
0228 pmic_irq_pins: pmicirq {
0229 groups = "intc_irq2";
0230 function = "intc";
0231 };
0232
0233 sdhi0_pins: sd0 {
0234 groups = "sdhi0_data4", "sdhi0_ctrl";
0235 function = "sdhi0";
0236 };
0237
0238 sdhi2_pins: sd2 {
0239 groups = "sdhi2_data4", "sdhi2_ctrl";
0240 function = "sdhi2";
0241 };
0242
0243 qspi_pins: qspi {
0244 groups = "qspi_ctrl", "qspi_data4";
0245 function = "qspi";
0246 };
0247
0248 i2c2_pins: i2c2 {
0249 groups = "i2c2";
0250 function = "i2c2";
0251 };
0252
0253 usb0_pins: usb0 {
0254 groups = "usb0";
0255 function = "usb0";
0256 };
0257
0258 usb1_pins: usb1 {
0259 groups = "usb1";
0260 function = "usb1";
0261 };
0262
0263 vin0_pins: vin0 {
0264 groups = "vin0_data8", "vin0_clk";
0265 function = "vin0";
0266 };
0267
0268 can0_pins: can0 {
0269 groups = "can0_data";
0270 function = "can0";
0271 };
0272
0273 du_pins: du {
0274 groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0";
0275 function = "du";
0276 };
0277
0278 ssi_pins: sound {
0279 groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data";
0280 function = "ssi";
0281 };
0282
0283 audio_clk_pins: audio_clk {
0284 groups = "audio_clk_a";
0285 function = "audio_clk";
0286 };
0287 };
0288
0289 &scif0 {
0290 pinctrl-0 = <&scif0_pins>;
0291 pinctrl-names = "default";
0292
0293 status = "okay";
0294 };
0295
0296 ðer {
0297 pinctrl-0 = <ðer_pins>, <&phy1_pins>;
0298 pinctrl-names = "default";
0299
0300 phy-handle = <&phy1>;
0301 renesas,ether-link-active-low;
0302 status = "okay";
0303
0304 phy1: ethernet-phy@1 {
0305 compatible = "ethernet-phy-id0022.1537",
0306 "ethernet-phy-ieee802.3-c22";
0307 reg = <1>;
0308 interrupt-parent = <&irqc0>;
0309 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
0310 micrel,led-mode = <1>;
0311 reset-gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
0312 };
0313 };
0314
0315 &sdhi0 {
0316 pinctrl-0 = <&sdhi0_pins>;
0317 pinctrl-names = "default";
0318
0319 vmmc-supply = <&vcc_sdhi0>;
0320 vqmmc-supply = <&vccq_sdhi0>;
0321 cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
0322 wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
0323 status = "okay";
0324 };
0325
0326 &sdhi2 {
0327 pinctrl-0 = <&sdhi2_pins>;
0328 pinctrl-names = "default";
0329
0330 vmmc-supply = <&vcc_sdhi2>;
0331 vqmmc-supply = <&vccq_sdhi2>;
0332 cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
0333 status = "okay";
0334 };
0335
0336 &qspi {
0337 pinctrl-0 = <&qspi_pins>;
0338 pinctrl-names = "default";
0339
0340 status = "okay";
0341
0342 flash@0 {
0343 compatible = "spansion,s25fl512s", "jedec,spi-nor";
0344 reg = <0>;
0345 spi-max-frequency = <30000000>;
0346 spi-tx-bus-width = <4>;
0347 spi-rx-bus-width = <4>;
0348 m25p,fast-read;
0349
0350 partitions {
0351 compatible = "fixed-partitions";
0352 #address-cells = <1>;
0353 #size-cells = <1>;
0354
0355 partition@0 {
0356 label = "loader_prg";
0357 reg = <0x00000000 0x00040000>;
0358 read-only;
0359 };
0360 partition@40000 {
0361 label = "user_prg";
0362 reg = <0x00040000 0x00400000>;
0363 read-only;
0364 };
0365 partition@440000 {
0366 label = "flash_fs";
0367 reg = <0x00440000 0x03bc0000>;
0368 };
0369 };
0370 };
0371 };
0372
0373 &i2c2 {
0374 pinctrl-0 = <&i2c2_pins>;
0375 pinctrl-names = "i2c-hdmi";
0376
0377 clock-frequency = <400000>;
0378 };
0379
0380 &i2c6 {
0381 pinctrl-names = "default";
0382 pinctrl-0 = <&pmic_irq_pins>;
0383 status = "okay";
0384 clock-frequency = <100000>;
0385
0386 pmic@5a {
0387 compatible = "dlg,da9063l";
0388 reg = <0x5a>;
0389 interrupt-parent = <&irqc0>;
0390 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
0391 interrupt-controller;
0392
0393 watchdog {
0394 compatible = "dlg,da9063-watchdog";
0395 };
0396 };
0397
0398 vdd_dvfs: regulator@68 {
0399 compatible = "dlg,da9210";
0400 reg = <0x68>;
0401 interrupt-parent = <&irqc0>;
0402 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
0403
0404 regulator-min-microvolt = <1000000>;
0405 regulator-max-microvolt = <1000000>;
0406 regulator-boot-on;
0407 regulator-always-on;
0408 };
0409 };
0410
0411 &sata0 {
0412 status = "okay";
0413 };
0414
0415 &cpu0 {
0416 cpu0-supply = <&vdd_dvfs>;
0417 };
0418
0419 /* composite video input */
0420 &vin0 {
0421 status = "okay";
0422 pinctrl-0 = <&vin0_pins>;
0423 pinctrl-names = "default";
0424
0425 port {
0426 vin0ep: endpoint {
0427 remote-endpoint = <&adv7180>;
0428 bus-width = <8>;
0429 };
0430 };
0431 };
0432
0433 &pci0 {
0434 pinctrl-0 = <&usb0_pins>;
0435 pinctrl-names = "default";
0436
0437 status = "okay";
0438 };
0439
0440 &pci1 {
0441 pinctrl-0 = <&usb1_pins>;
0442 pinctrl-names = "default";
0443
0444 status = "okay";
0445 };
0446
0447 &hsusb {
0448 pinctrl-0 = <&usb0_pins>;
0449 pinctrl-names = "default";
0450
0451 status = "okay";
0452 };
0453
0454 &usbphy {
0455 status = "okay";
0456 };
0457
0458 &pcie_bus_clk {
0459 clock-frequency = <100000000>;
0460 };
0461
0462 &pciec {
0463 status = "okay";
0464 };
0465
0466 &can0 {
0467 pinctrl-0 = <&can0_pins>;
0468 pinctrl-names = "default";
0469
0470 status = "okay";
0471 };
0472
0473 &du {
0474 pinctrl-0 = <&du_pins>;
0475 pinctrl-names = "default";
0476 status = "okay";
0477
0478 clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
0479 <&x3_clk>, <&x16_clk>;
0480 clock-names = "du.0", "du.1", "dclkin.0", "dclkin.1";
0481
0482 ports {
0483 port@0 {
0484 endpoint {
0485 remote-endpoint = <&adv7511_in>;
0486 };
0487 };
0488 };
0489 };
0490
0491 &lvds0 {
0492 ports {
0493 port@1 {
0494 lvds_connector: endpoint {
0495 };
0496 };
0497 };
0498 };
0499
0500 &rcar_sound {
0501 pinctrl-0 = <&ssi_pins>, <&audio_clk_pins>;
0502 pinctrl-names = "default";
0503 status = "okay";
0504
0505 /* Single DAI */
0506 #sound-dai-cells = <0>;
0507
0508 rcar_sound,dai {
0509 dai0 {
0510 playback = <&ssi0>;
0511 capture = <&ssi1>;
0512 };
0513 };
0514 };
0515
0516 &rwdt {
0517 timeout-sec = <60>;
0518 status = "okay";
0519 };
0520
0521 &ssi1 {
0522 shared-pin;
0523 };