ARM: dts: iwg23s-sbc: Add HDMI support
authorFabrizio Castro <fabrizio.castro@bp.renesas.com>
Tue, 19 Mar 2019 12:21:39 +0000 (12:21 +0000)
committerSimon Horman <horms+renesas@verge.net.au>
Mon, 25 Mar 2019 10:56:59 +0000 (11:56 +0100)
This patch adds HDMI video output support to the iwg23s board
from iWave. Due to a problem with the bootloader not dealing
with the configuration of one of the pins correctly, we have
to use a gpio-hog for the interrupt line to make sure the pin
is configured as GPIO-input when requesting the interrupt.

Signed-off-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/r8a77470-iwg23s-sbc.dts

index 77d1824..9f9eb15 100644 (file)
                stdout-path = "serial1:115200n8";
        };
 
+       hdmi-out {
+               compatible = "hdmi-connector";
+               type = "a";
+
+               port {
+                       hdmi_con: endpoint {
+                               remote-endpoint = <&bridge_out>;
+                       };
+               };
+       };
+
        memory@40000000 {
                device_type = "memory";
                reg = <0 0x40000000 0 0x20000000>;
        status = "okay";
 };
 
+&du {
+       pinctrl-0 = <&du0_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+
+       ports {
+               port@0 {
+                       endpoint {
+                               remote-endpoint = <&bridge_in>;
+                       };
+               };
+       };
+};
+
 &extal_clk {
        clock-frequency = <20000000>;
 };
 
+&gpio2 {
+       interrupt-fixup {
+               gpio-hog;
+               gpios = <29 GPIO_ACTIVE_HIGH>;
+               line-name = "hdmi-hpd-int";
+               input;
+       };
+};
+
 &i2c3 {
        pinctrl-0 = <&i2c3_pins>;
        pinctrl-names = "default";
        };
 };
 
+&i2c4 {
+       pinctrl-0 = <&i2c4_pins>;
+       pinctrl-names = "default";
+
+       status = "okay";
+       clock-frequency = <100000>;
+
+       hdmi@39 {
+               compatible = "sil,sii9022";
+               reg = <0x39>;
+               interrupt-parent = <&gpio2>;
+               interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       port@0 {
+                               reg = <0>;
+                               bridge_in: endpoint {
+                                       remote-endpoint = <&du_out_rgb0>;
+                               };
+                       };
+
+                       port@1 {
+                               reg = <1>;
+                               bridge_out: endpoint {
+                                       remote-endpoint = <&hdmi_con>;
+                               };
+                       };
+               };
+       };
+};
+
 &pfc {
        avb_pins: avb {
                groups = "avb_mdio", "avb_gmii_tx_rx";
                function = "avb";
        };
 
+       du0_pins: du0 {
+               groups = "du0_rgb888", "du0_sync", "du0_disp", "du0_clk0_out";
+               function = "du0";
+       };
+
+       i2c4_pins: i2c4 {
+               groups = "i2c4_e";
+               function = "i2c4";
+       };
+
        i2c3_pins: i2c3 {
                groups = "i2c3_c";
                function = "i2c3";