Merge https://gitlab.denx.de/u-boot/custodians/u-boot-sh
[oweals/u-boot.git] / arch / arm / dts / salvator-common.dtsi
index a36e0ebca0763c98b2f23775022bae7485ceaa92..98bbcafc8c0d030ccd89372028603ad05ec4ea0c 100644 (file)
@@ -1,11 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0
 /*
  * Device Tree Source for common parts of Salvator-X board variants
  *
  * Copyright (C) 2015-2016 Renesas Electronics Corp.
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2.  This program is licensed "as is" without any warranty of any
- * kind, whether express or implied.
  */
 
 /*
  */
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
        aliases {
                serial0 = &scif2;
-               serial1 = &scif1;
+               serial1 = &hscif1;
                ethernet0 = &avb;
        };
 
        chosen {
-               bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
+               bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
                stdout-path = "serial0:115200n8";
        };
 
                enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
        };
 
+       cvbs-in {
+               compatible = "composite-video-connector";
+               label = "CVBS IN";
+
+               port {
+                       cvbs_con: endpoint {
+                               remote-endpoint = <&adv7482_ain7>;
+                       };
+               };
+       };
+
+       hdmi-in {
+               compatible = "hdmi-connector";
+               label = "HDMI IN";
+               type = "a";
+
+               port {
+                       hdmi_in_con: endpoint {
+                               remote-endpoint = <&adv7482_hdmi>;
+                       };
+               };
+       };
+
+       hdmi0-out {
+               compatible = "hdmi-connector";
+               label = "HDMI0 OUT";
+               type = "a";
+
+               port {
+                       hdmi0_con: endpoint {
+                       };
+               };
+       };
+
+       hdmi1-out {
+               compatible = "hdmi-connector";
+               label = "HDMI1 OUT";
+               type = "a";
+
+               port {
+                       hdmi1_con: endpoint {
+                       };
+               };
+       };
+
+       keys {
+               compatible = "gpio-keys";
+
+               pinctrl-0 = <&keys_pins>;
+               pinctrl-names = "default";
+
+               key-1 {
+                       gpios = <&gpio5 17 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_1>;
+                       label = "SW4-1";
+                       wakeup-source;
+                       debounce-interval = <20>;
+               };
+               key-2 {
+                       gpios = <&gpio5 20 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_2>;
+                       label = "SW4-2";
+                       wakeup-source;
+                       debounce-interval = <20>;
+               };
+               key-3 {
+                       gpios = <&gpio5 22 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_3>;
+                       label = "SW4-3";
+                       wakeup-source;
+                       debounce-interval = <20>;
+               };
+               key-4 {
+                       gpios = <&gpio5 23 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_4>;
+                       label = "SW4-4";
+                       wakeup-source;
+                       debounce-interval = <20>;
+               };
+               key-a {
+                       gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_A>;
+                       label = "TSW0";
+                       wakeup-source;
+                       debounce-interval = <20>;
+               };
+               key-b {
+                       gpios = <&gpio6 12 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_B>;
+                       label = "TSW1";
+                       wakeup-source;
+                       debounce-interval = <20>;
+               };
+               key-c {
+                       gpios = <&gpio6 13 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_C>;
+                       label = "TSW2";
+                       wakeup-source;
+                       debounce-interval = <20>;
+               };
+       };
+
        reg_1p8v: regulator0 {
                compatible = "regulator-fixed";
                regulator-name = "fixed-1.8V";
                regulator-always-on;
        };
 
-       rsnd_ak4613: sound {
-               compatible = "simple-audio-card";
+       sound_card: sound {
+               compatible = "audio-graph-card";
 
-               simple-audio-card,format = "left_j";
-               simple-audio-card,bitclock-master = <&sndcpu>;
-               simple-audio-card,frame-master = <&sndcpu>;
+               label = "rcar-sound";
 
-               sndcpu: simple-audio-card,cpu {
-                       sound-dai = <&rcar_sound>;
-               };
-
-               sndcodec: simple-audio-card,codec {
-                       sound-dai = <&ak4613>;
-               };
+               dais = <&rsnd_port0>;
        };
 
        vbus0_usb2: regulator-vbus0-usb2 {
 
                gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
+               states = <3300000 1>, <1800000 0>;
        };
 
        vcc_sdhi3: regulator-vcc-sdhi3 {
 
                gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
                gpios-states = <1>;
-               states = <3300000 1
-                         1800000 0>;
-       };
-
-       hdmi0-out {
-               compatible = "hdmi-connector";
-               label = "HDMI0 OUT";
-               type = "a";
-
-               port {
-                       hdmi0_con: endpoint {
-                       };
-               };
-       };
-
-       hdmi1-out {
-               compatible = "hdmi-connector";
-               label = "HDMI1 OUT";
-               type = "a";
-
-               port {
-                       hdmi1_con: endpoint {
-                       };
-               };
+               states = <3300000 1>, <1800000 0>;
        };
 
        vga {
        };
 };
 
+&csi20 {
+       status = "okay";
+
+       ports {
+               port@0 {
+                       reg = <0>;
+                       csi20_in: endpoint {
+                               clock-lanes = <0>;
+                               data-lanes = <1>;
+                               remote-endpoint = <&adv7482_txb>;
+                       };
+               };
+       };
+};
+
+&csi40 {
+       status = "okay";
+
+       ports {
+               port@0 {
+                       reg = <0>;
+
+                       csi40_in: endpoint {
+                               clock-lanes = <0>;
+                               data-lanes = <1 2 3 4>;
+                               remote-endpoint = <&adv7482_txa>;
+                       };
+               };
+       };
+};
+
 &du {
        pinctrl-0 = <&du_pins>;
        pinctrl-names = "default";
        clock-frequency = <32768>;
 };
 
+&hscif1 {
+       pinctrl-0 = <&hscif1_pins>;
+       pinctrl-names = "default";
+
+       uart-has-rtscts;
+       /* Please only enable hscif1 or scif1 */
+       status = "okay";
+};
+
 &hsusb {
        dr_mode = "otg";
        status = "okay";
                asahi-kasei,out4-single-end;
                asahi-kasei,out5-single-end;
                asahi-kasei,out6-single-end;
+
+               port {
+                       ak4613_endpoint: endpoint {
+                               remote-endpoint = <&rsnd_endpoint0>;
+                       };
+               };
        };
 
        cs2000: clk_multiplier@4f {
                #gpio-cells = <2>;
        };
 
+       video-receiver@70 {
+               compatible = "adi,adv7482";
+               reg = <0x70 0x71 0x72 0x73 0x74 0x75
+                      0x60 0x61 0x62 0x63 0x64 0x65>;
+               reg-names = "main", "dpll", "cp", "hdmi", "edid", "repeater",
+                           "infoframe", "cbus", "cec", "sdp", "txa", "txb" ;
+
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               interrupt-parent = <&gpio6>;
+               interrupt-names = "intrq1", "intrq2";
+               interrupts = <30 IRQ_TYPE_LEVEL_LOW>,
+                            <31 IRQ_TYPE_LEVEL_LOW>;
+
+               port@7 {
+                       reg = <7>;
+
+                       adv7482_ain7: endpoint {
+                               remote-endpoint = <&cvbs_con>;
+                       };
+               };
+
+               port@8 {
+                       reg = <8>;
+
+                       adv7482_hdmi: endpoint {
+                               remote-endpoint = <&hdmi_in_con>;
+                       };
+               };
+
+               port@a {
+                       reg = <10>;
+
+                       adv7482_txa: endpoint {
+                               clock-lanes = <0>;
+                               data-lanes = <1 2 3 4>;
+                               remote-endpoint = <&csi40_in>;
+                       };
+               };
+
+               port@b {
+                       reg = <11>;
+
+                       adv7482_txb: endpoint {
+                               clock-lanes = <0>;
+                               data-lanes = <1>;
+                               remote-endpoint = <&csi20_in>;
+                       };
+               };
+       };
+
        csa_vdd: adc@7c {
                compatible = "maxim,max9611";
                reg = <0x7c>;
 &i2c_dvfs {
        status = "okay";
 
+       clock-frequency = <400000>;
+
        pmic: pmic@30 {
                pinctrl-0 = <&irq0_pins>;
                pinctrl-names = "default";
                #interrupt-cells = <2>;
                gpio-controller;
                #gpio-cells = <2>;
+               rohm,ddr-backup-power = <0xf>;
+               rohm,rstbmode-level;
 
                regulators {
                        dvfs: dvfs {
                        };
                };
        };
+
+       eeprom@50 {
+               compatible = "rohm,br24t01", "atmel,24c01";
+               reg = <0x50>;
+               pagesize = <8>;
+       };
 };
 
 &ohci0 {
 
        avb_pins: avb {
                mux {
-                       groups = "avb_link", "avb_mdc", "avb_mii";
+                       groups = "avb_link", "avb_mdio", "avb_mii";
                        function = "avb";
                };
 
-               pins_mdc {
-                       groups = "avb_mdc";
+               pins_mdio {
+                       groups = "avb_mdio";
                        drive-strength = <24>;
                };
 
                function = "du";
        };
 
+       hscif1_pins: hscif1 {
+               groups = "hscif1_data_a", "hscif1_ctrl_a";
+               function = "hscif1";
+       };
+
        i2c2_pins: i2c2 {
                groups = "i2c2_a";
                function = "i2c2";
                function = "intc_ex";
        };
 
+       keys_pins: keys {
+               pins = "GP_5_17", "GP_5_20", "GP_5_22";
+               bias-pull-up;
+       };
+
        pwm1_pins: pwm1 {
                groups = "pwm1_a";
                function = "pwm1";
        };
 
        sdhi2_pins: sd2 {
-               groups = "sdhi2_data8", "sdhi2_ctrl";
-               function = "sdhi2";
-               power-source = <1800>;
-       };
-
-       sdhi2_pins_uhs: sd2_uhs {
-               groups = "sdhi2_data8", "sdhi2_ctrl";
+               groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
                function = "sdhi2";
                power-source = <1800>;
        };
                 <&audio_clk_c>,
                 <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
 
-       rcar_sound,dai {
-               dai0 {
-                       playback = <&ssi0 &src0 &dvc0>;
-                       capture  = <&ssi1 &src1 &dvc1>;
+       ports {
+               #address-cells = <1>;
+               #size-cells = <0>;
+               rsnd_port0: port@0 {
+                       reg = <0>;
+                       rsnd_endpoint0: endpoint {
+                               remote-endpoint = <&ak4613_endpoint>;
+
+                               dai-format = "left_j";
+                               bitclock-master = <&rsnd_endpoint0>;
+                               frame-master = <&rsnd_endpoint0>;
+
+                               playback = <&ssi0 &src0 &dvc0>;
+                               capture  = <&ssi1 &src1 &dvc1>;
+                       };
                };
        };
 };
 
+&rwdt {
+       timeout-sec = <60>;
+       status = "okay";
+};
+
 &scif1 {
        pinctrl-0 = <&scif1_pins>;
        pinctrl-names = "default";
 
        uart-has-rtscts;
-       status = "okay";
+       /* Please only enable hscif1 or scif1 */
+       /* status = "okay"; */
 };
 
 &scif2 {
        wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
        bus-width = <4>;
        sd-uhs-sdr50;
+       sd-uhs-sdr104;
        status = "okay";
 };
 
 &sdhi2 {
        /* used for on-board 8bit eMMC */
        pinctrl-0 = <&sdhi2_pins>;
-       pinctrl-1 = <&sdhi2_pins_uhs>;
+       pinctrl-1 = <&sdhi2_pins>;
        pinctrl-names = "default", "state_uhs";
 
        vmmc-supply = <&reg_3p3v>;
        vqmmc-supply = <&reg_1p8v>;
        bus-width = <8>;
        mmc-hs200-1_8v;
+       mmc-hs400-1_8v;
        non-removable;
        fixed-emmc-driver-type = <1>;
        status = "okay";
        wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
        bus-width = <4>;
        sd-uhs-sdr50;
+       sd-uhs-sdr104;
        status = "okay";
 };
 
        phys = <&usb3_phy0>;
        phy-names = "usb";
 
+       companion = <&xhci0>;
+
        status = "okay";
 };
 
        clock-frequency = <100000000>;
 };
 
-&wdt0 {
-       timeout-sec = <60>;
+&vin0 {
+       status = "okay";
+};
+
+&vin1 {
+       status = "okay";
+};
+
+&vin2 {
+       status = "okay";
+};
+
+&vin3 {
+       status = "okay";
+};
+
+&vin4 {
+       status = "okay";
+};
+
+&vin5 {
+       status = "okay";
+};
+
+&vin6 {
+       status = "okay";
+};
+
+&vin7 {
        status = "okay";
 };