Devicetree
 help / color / mirror / Atom feed
* [PATCH/RFC] arm64: dts: renesas: draak: Add overlay for HDMI input
@ 2023-02-10 21:15 Laurent Pinchart
  2023-02-10 22:07 ` Niklas Söderlund
  0 siblings, 1 reply; 4+ messages in thread
From: Laurent Pinchart @ 2023-02-10 21:15 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: devicetree, Niklas Söderlund, Rob Herring,
	Krzysztof Kozlowski

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 CVBS decoder being the default. Add an
overlay that selects the HDMI decoder.

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

Niklas, would this be an acceptable way to handle the DIP switches on
the Draak board ?

---
 arch/arm64/boot/dts/renesas/Makefile          |  1 +
 .../boot/dts/renesas/draak-hdmi-input.dtso    | 33 +++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/draak-hdmi-input.dtso

diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
index 0699b51c1247..de4170af611e 100644
--- a/arch/arm64/boot/dts/renesas/Makefile
+++ b/arch/arm64/boot/dts/renesas/Makefile
@@ -88,4 +88,5 @@ dtb-$(CONFIG_ARCH_R9A07G054) += r9a07g054l2-smarc.dtb
 dtb-$(CONFIG_ARCH_R9A09G011) += r9a09g011-v2mevk2.dtb
 
 dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-ebisu-panel-aa104xd12.dtbo
+dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-hdmi-input.dtbo
 dtb-$(CONFIG_ARCH_RCAR_GEN3) += salvator-panel-aa104xd12.dtbo
diff --git a/arch/arm64/boot/dts/renesas/draak-hdmi-input.dtso b/arch/arm64/boot/dts/renesas/draak-hdmi-input.dtso
new file mode 100644
index 000000000000..e0d671f0cab3
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/draak-hdmi-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 HDMI input. This requires
+ * setting DIP switches SW49, SW50, SW51 and SW52 to ON, and SW53 and SW54 to
+ * OFF.
+ */
+
+/dts-v1/;
+/plugin/;
+
+&adv7612_out {
+	remote-endpoint = <&vin4_in>;
+};
+
+&i2c0 {
+	composite-in@20 {
+		ports {
+			port@3 {
+				/delete-node/ endpoint;
+			};
+		};
+	};
+};
+
+&vin4_in {
+	remote-endpoint = <&adv7612_out>;
+};
+
+&vin4_pins_cvbs {
+	groups = "vin4_data24", "vin4_sync", "vin4_clk";
+};

-- 
Regards,

Laurent Pinchart


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH/RFC] arm64: dts: renesas: draak: Add overlay for HDMI input
  2023-02-10 21:15 [PATCH/RFC] arm64: dts: renesas: draak: Add overlay for HDMI input Laurent Pinchart
@ 2023-02-10 22:07 ` Niklas Söderlund
  2023-02-10 22:20   ` Laurent Pinchart
  0 siblings, 1 reply; 4+ messages in thread
From: Niklas Söderlund @ 2023-02-10 22:07 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: linux-renesas-soc, devicetree, Rob Herring, Krzysztof Kozlowski

Hi Laurent,

Thanks for your patch.

On 2023-02-10 23:15:51 +0200, Laurent Pinchart wrote:
> 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 CVBS decoder being the default. Add an
> overlay that selects the HDMI decoder.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
> 
> Niklas, would this be an acceptable way to handle the DIP switches on
> the Draak board ?

I think this is a perfect way to handle DIP switch settings. I have a 
similar patch for Eagle I wish to upstream one of these days.

For this patch, however correct it is, I have a comment. As part of the 
ongoing rebasing of BSP patches I'm preparing to submit a patch which 
makes the HDMI the default input for Draak. The BSP team have requested 
this as they wish to align all Gen3 boards to have HDMI as the default 
input.

Hence, this patch is awesome, but should be reversed to overlay RCA 
entablement :-)

> 
> ---
>  arch/arm64/boot/dts/renesas/Makefile          |  1 +
>  .../boot/dts/renesas/draak-hdmi-input.dtso    | 33 +++++++++++++++++++
>  2 files changed, 34 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/renesas/draak-hdmi-input.dtso
> 
> diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
> index 0699b51c1247..de4170af611e 100644
> --- a/arch/arm64/boot/dts/renesas/Makefile
> +++ b/arch/arm64/boot/dts/renesas/Makefile
> @@ -88,4 +88,5 @@ dtb-$(CONFIG_ARCH_R9A07G054) += r9a07g054l2-smarc.dtb
>  dtb-$(CONFIG_ARCH_R9A09G011) += r9a09g011-v2mevk2.dtb
>  
>  dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-ebisu-panel-aa104xd12.dtbo
> +dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-hdmi-input.dtbo
>  dtb-$(CONFIG_ARCH_RCAR_GEN3) += salvator-panel-aa104xd12.dtbo
> diff --git a/arch/arm64/boot/dts/renesas/draak-hdmi-input.dtso b/arch/arm64/boot/dts/renesas/draak-hdmi-input.dtso
> new file mode 100644
> index 000000000000..e0d671f0cab3
> --- /dev/null
> +++ b/arch/arm64/boot/dts/renesas/draak-hdmi-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 HDMI input. This requires
> + * setting DIP switches SW49, SW50, SW51 and SW52 to ON, and SW53 and SW54 to
> + * OFF.
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +&adv7612_out {
> +	remote-endpoint = <&vin4_in>;
> +};
> +
> +&i2c0 {
> +	composite-in@20 {
> +		ports {
> +			port@3 {
> +				/delete-node/ endpoint;
> +			};
> +		};
> +	};
> +};
> +
> +&vin4_in {
> +	remote-endpoint = <&adv7612_out>;
> +};
> +
> +&vin4_pins_cvbs {
> +	groups = "vin4_data24", "vin4_sync", "vin4_clk";
> +};
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 

-- 
Kind Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH/RFC] arm64: dts: renesas: draak: Add overlay for HDMI input
  2023-02-10 22:07 ` Niklas Söderlund
@ 2023-02-10 22:20   ` Laurent Pinchart
  2023-02-11  0:09     ` Niklas Söderlund
  0 siblings, 1 reply; 4+ messages in thread
From: Laurent Pinchart @ 2023-02-10 22:20 UTC (permalink / raw)
  To: Niklas Söderlund
  Cc: linux-renesas-soc, devicetree, Rob Herring, Krzysztof Kozlowski

Hi Niklas,

On Fri, Feb 10, 2023 at 11:07:43PM +0100, Niklas Söderlund wrote:
> Hi Laurent,
> 
> Thanks for your patch.
> 
> On 2023-02-10 23:15:51 +0200, Laurent Pinchart wrote:
> > 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 CVBS decoder being the default. Add an
> > overlay that selects the HDMI decoder.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > 
> > Niklas, would this be an acceptable way to handle the DIP switches on
> > the Draak board ?
> 
> I think this is a perfect way to handle DIP switch settings. I have a 
> similar patch for Eagle I wish to upstream one of these days.
> 
> For this patch, however correct it is, I have a comment. As part of the 
> ongoing rebasing of BSP patches I'm preparing to submit a patch which 
> makes the HDMI the default input for Draak. The BSP team have requested 
> this as they wish to align all Gen3 boards to have HDMI as the default 
> input.
> 
> Hence, this patch is awesome, but should be reversed to overlay RCA 
> entablement :-)

Works for me. Would you mind taking this in your tree and reversing it
on top of the patch that switches to HDMI by default ?

> > ---
> >  arch/arm64/boot/dts/renesas/Makefile          |  1 +
> >  .../boot/dts/renesas/draak-hdmi-input.dtso    | 33 +++++++++++++++++++
> >  2 files changed, 34 insertions(+)
> >  create mode 100644 arch/arm64/boot/dts/renesas/draak-hdmi-input.dtso
> > 
> > diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
> > index 0699b51c1247..de4170af611e 100644
> > --- a/arch/arm64/boot/dts/renesas/Makefile
> > +++ b/arch/arm64/boot/dts/renesas/Makefile
> > @@ -88,4 +88,5 @@ dtb-$(CONFIG_ARCH_R9A07G054) += r9a07g054l2-smarc.dtb
> >  dtb-$(CONFIG_ARCH_R9A09G011) += r9a09g011-v2mevk2.dtb
> >  
> >  dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-ebisu-panel-aa104xd12.dtbo
> > +dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-hdmi-input.dtbo
> >  dtb-$(CONFIG_ARCH_RCAR_GEN3) += salvator-panel-aa104xd12.dtbo
> > diff --git a/arch/arm64/boot/dts/renesas/draak-hdmi-input.dtso b/arch/arm64/boot/dts/renesas/draak-hdmi-input.dtso
> > new file mode 100644
> > index 000000000000..e0d671f0cab3
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/renesas/draak-hdmi-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 HDMI input. This requires
> > + * setting DIP switches SW49, SW50, SW51 and SW52 to ON, and SW53 and SW54 to
> > + * OFF.
> > + */
> > +
> > +/dts-v1/;
> > +/plugin/;
> > +
> > +&adv7612_out {
> > +	remote-endpoint = <&vin4_in>;
> > +};
> > +
> > +&i2c0 {
> > +	composite-in@20 {
> > +		ports {
> > +			port@3 {
> > +				/delete-node/ endpoint;
> > +			};
> > +		};
> > +	};
> > +};
> > +
> > +&vin4_in {
> > +	remote-endpoint = <&adv7612_out>;
> > +};
> > +
> > +&vin4_pins_cvbs {
> > +	groups = "vin4_data24", "vin4_sync", "vin4_clk";
> > +};

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH/RFC] arm64: dts: renesas: draak: Add overlay for HDMI input
  2023-02-10 22:20   ` Laurent Pinchart
@ 2023-02-11  0:09     ` Niklas Söderlund
  0 siblings, 0 replies; 4+ messages in thread
From: Niklas Söderlund @ 2023-02-11  0:09 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: linux-renesas-soc, devicetree, Rob Herring, Krzysztof Kozlowski

Hi Laurent,

On 2023-02-11 00:20:05 +0200, Laurent Pinchart wrote:
> Hi Niklas,
> 
> On Fri, Feb 10, 2023 at 11:07:43PM +0100, Niklas Söderlund wrote:
> > Hi Laurent,
> > 
> > Thanks for your patch.
> > 
> > On 2023-02-10 23:15:51 +0200, Laurent Pinchart wrote:
> > > 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 CVBS decoder being the default. Add an
> > > overlay that selects the HDMI decoder.
> > > 
> > > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > > ---
> > > 
> > > Niklas, would this be an acceptable way to handle the DIP switches on
> > > the Draak board ?
> > 
> > I think this is a perfect way to handle DIP switch settings. I have a 
> > similar patch for Eagle I wish to upstream one of these days.
> > 
> > For this patch, however correct it is, I have a comment. As part of the 
> > ongoing rebasing of BSP patches I'm preparing to submit a patch which 
> > makes the HDMI the default input for Draak. The BSP team have requested 
> > this as they wish to align all Gen3 boards to have HDMI as the default 
> > input.
> > 
> > Hence, this patch is awesome, but should be reversed to overlay RCA 
> > entablement :-)
> 
> Works for me. Would you mind taking this in your tree and reversing it
> on top of the patch that switches to HDMI by default ?

Will do.

> 
> > > ---
> > >  arch/arm64/boot/dts/renesas/Makefile          |  1 +
> > >  .../boot/dts/renesas/draak-hdmi-input.dtso    | 33 +++++++++++++++++++
> > >  2 files changed, 34 insertions(+)
> > >  create mode 100644 arch/arm64/boot/dts/renesas/draak-hdmi-input.dtso
> > > 
> > > diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
> > > index 0699b51c1247..de4170af611e 100644
> > > --- a/arch/arm64/boot/dts/renesas/Makefile
> > > +++ b/arch/arm64/boot/dts/renesas/Makefile
> > > @@ -88,4 +88,5 @@ dtb-$(CONFIG_ARCH_R9A07G054) += r9a07g054l2-smarc.dtb
> > >  dtb-$(CONFIG_ARCH_R9A09G011) += r9a09g011-v2mevk2.dtb
> > >  
> > >  dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-ebisu-panel-aa104xd12.dtbo
> > > +dtb-$(CONFIG_ARCH_RCAR_GEN3) += draak-hdmi-input.dtbo
> > >  dtb-$(CONFIG_ARCH_RCAR_GEN3) += salvator-panel-aa104xd12.dtbo
> > > diff --git a/arch/arm64/boot/dts/renesas/draak-hdmi-input.dtso b/arch/arm64/boot/dts/renesas/draak-hdmi-input.dtso
> > > new file mode 100644
> > > index 000000000000..e0d671f0cab3
> > > --- /dev/null
> > > +++ b/arch/arm64/boot/dts/renesas/draak-hdmi-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 HDMI input. This requires
> > > + * setting DIP switches SW49, SW50, SW51 and SW52 to ON, and SW53 and SW54 to
> > > + * OFF.
> > > + */
> > > +
> > > +/dts-v1/;
> > > +/plugin/;
> > > +
> > > +&adv7612_out {
> > > +	remote-endpoint = <&vin4_in>;
> > > +};
> > > +
> > > +&i2c0 {
> > > +	composite-in@20 {
> > > +		ports {
> > > +			port@3 {
> > > +				/delete-node/ endpoint;
> > > +			};
> > > +		};
> > > +	};
> > > +};
> > > +
> > > +&vin4_in {
> > > +	remote-endpoint = <&adv7612_out>;
> > > +};
> > > +
> > > +&vin4_pins_cvbs {
> > > +	groups = "vin4_data24", "vin4_sync", "vin4_clk";
> > > +};
> 
> -- 
> Regards,
> 
> Laurent Pinchart

-- 
Kind Regards,
Niklas Söderlund

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-11  0:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-02-10 21:15 [PATCH/RFC] arm64: dts: renesas: draak: Add overlay for HDMI input Laurent Pinchart
2023-02-10 22:07 ` Niklas Söderlund
2023-02-10 22:20   ` Laurent Pinchart
2023-02-11  0:09     ` Niklas Söderlund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox