diff mbox series

[2/2] arm64: dts: renesas: draak: Add overlay for CVBS input

Message ID 20230211165715.4024992-3-niklas.soderlund+renesas@ragnatech.se
State New
Headers show
Series arm64: dts: renesas: draak: Make HDMI default video source | expand

Commit Message

Niklas Söderlund Feb. 11, 2023, 4:57 p.m. UTC
From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

The Draak board has an ADV7180 CVBS decoder and an ADV7612 HDMI decoder,
both connected to the same VIN input. DIP switches are used to select
one of the two devices, with the HDMI decoder being the default. Add an
overlay that selects the CVBS decoder.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
[Niklas: Inverted it from HDMI to CVBS]
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
 arch/arm64/boot/dts/renesas/Makefile          |  1 +
 .../boot/dts/renesas/draak-cvbs-input.dtso    | 33 +++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/draak-cvbs-input.dtso

Comments

Laurent Pinchart Feb. 11, 2023, 9:37 p.m. UTC | #1
Hi Niklas,

Thank you for the patch.

On Sat, Feb 11, 2023 at 05:57:15PM +0100, Niklas Söderlund wrote:
> From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> 
> The Draak board has an ADV7180 CVBS decoder and an ADV7612 HDMI decoder,
> both connected to the same VIN input. DIP switches are used to select
> one of the two devices, with the HDMI decoder being the default. Add an
> overlay that selects the CVBS decoder.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> [Niklas: Inverted it from HDMI to CVBS]
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>

Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

> ---
>  arch/arm64/boot/dts/renesas/Makefile          |  1 +
>  .../boot/dts/renesas/draak-cvbs-input.dtso    | 33 +++++++++++++++++++
>  2 files changed, 34 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/renesas/draak-cvbs-input.dtso
> 
> diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
> index 0699b51c1247..f5df37253184 100644
> --- a/arch/arm64/boot/dts/renesas/Makefile
> +++ b/arch/arm64/boot/dts/renesas/Makefile
> @@ -87,5 +87,6 @@ dtb-$(CONFIG_ARCH_R9A07G054) += r9a07g054l2-smarc.dtb
>  
>  dtb-$(CONFIG_ARCH_R9A09G011) += r9a09g011-v2mevk2.dtb
>  
> +dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-cvbs-input.dtbo
>  dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-ebisu-panel-aa104xd12.dtbo
>  dtb-$(CONFIG_ARCH_RCAR_GEN3) += salvator-panel-aa104xd12.dtbo
> diff --git a/arch/arm64/boot/dts/renesas/draak-cvbs-input.dtso b/arch/arm64/boot/dts/renesas/draak-cvbs-input.dtso
> new file mode 100644
> index 000000000000..b833c58c2029
> --- /dev/null
> +++ b/arch/arm64/boot/dts/renesas/draak-cvbs-input.dtso
> @@ -0,0 +1,33 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Copyright 2023 Ideas on Board Oy
> + *
> + * Device tree overlay for the Draak board, to enable CVBS input. This requires
> + * setting DIP switches SW49, SW50, SW51 and SW52 to OFF, and SW53 and SW54 to
> + * ON.
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +&adv7180_out {
> +	remote-endpoint = <&vin4_in>;
> +};
> +
> +&i2c0 {
> +	hdmi-decoder@4c {
> +		ports {
> +			port@2 {
> +				/delete-node/ endpoint;
> +			};
> +		};
> +	};
> +};
> +
> +&vin4_in {
> +	remote-endpoint = <&adv7180_out>;
> +};
> +
> +&vin4_pins {
> +	groups = "vin4_data8", "vin4_sync", "vin4_clk";
> +};
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
index 0699b51c1247..f5df37253184 100644
--- a/arch/arm64/boot/dts/renesas/Makefile
+++ b/arch/arm64/boot/dts/renesas/Makefile
@@ -87,5 +87,6 @@  dtb-$(CONFIG_ARCH_R9A07G054) += r9a07g054l2-smarc.dtb
 
 dtb-$(CONFIG_ARCH_R9A09G011) += r9a09g011-v2mevk2.dtb
 
+dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-cvbs-input.dtbo
 dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-ebisu-panel-aa104xd12.dtbo
 dtb-$(CONFIG_ARCH_RCAR_GEN3) += salvator-panel-aa104xd12.dtbo
diff --git a/arch/arm64/boot/dts/renesas/draak-cvbs-input.dtso b/arch/arm64/boot/dts/renesas/draak-cvbs-input.dtso
new file mode 100644
index 000000000000..b833c58c2029
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/draak-cvbs-input.dtso
@@ -0,0 +1,33 @@ 
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2023 Ideas on Board Oy
+ *
+ * Device tree overlay for the Draak board, to enable CVBS input. This requires
+ * setting DIP switches SW49, SW50, SW51 and SW52 to OFF, and SW53 and SW54 to
+ * ON.
+ */
+
+/dts-v1/;
+/plugin/;
+
+&adv7180_out {
+	remote-endpoint = <&vin4_in>;
+};
+
+&i2c0 {
+	hdmi-decoder@4c {
+		ports {
+			port@2 {
+				/delete-node/ endpoint;
+			};
+		};
+	};
+};
+
+&vin4_in {
+	remote-endpoint = <&adv7180_out>;
+};
+
+&vin4_pins {
+	groups = "vin4_data8", "vin4_sync", "vin4_clk";
+};