diff mbox series

[2/3] arm64: dts: renesas: Add panel overlay for Salvator-X(S) boards

Message ID 20211212013351.595-3-laurent.pinchart+renesas@ideasonboard.com (mailing list archive)
State Superseded
Delegated to: Geert Uytterhoeven
Headers show
Series arm64: dts: renesas: Add DT overlays for LVDS panel | expand

Commit Message

Laurent Pinchart Dec. 12, 2021, 1:33 a.m. UTC
The Salvator-X and Salvator-XS boards support an optional LVDS panel.
One compatible panel is the Mitsubishi AA104XD12. Add a corresponding DT
overlay.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 arch/arm64/boot/dts/renesas/Makefile          |  2 ++
 .../dts/renesas/salvator-panel-aa104xd12.dts  | 32 +++++++++++++++++++
 2 files changed, 34 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts

Comments

Kieran Bingham Jan. 17, 2022, 11:45 a.m. UTC | #1
Hi Laurent,

Quoting Laurent Pinchart (2021-12-12 01:33:50)
> The Salvator-X and Salvator-XS boards support an optional LVDS panel.
> One compatible panel is the Mitsubishi AA104XD12. Add a corresponding DT
> overlay.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  arch/arm64/boot/dts/renesas/Makefile          |  2 ++
>  .../dts/renesas/salvator-panel-aa104xd12.dts  | 32 +++++++++++++++++++
>  2 files changed, 34 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts
> 
> diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
> index d1c5c21d8d14..982ca3e0e86f 100644
> --- a/arch/arm64/boot/dts/renesas/Makefile
> +++ b/arch/arm64/boot/dts/renesas/Makefile
> @@ -74,3 +74,5 @@ dtb-$(CONFIG_ARCH_R8A77961) += r8a779m3-ulcb-kf.dtb
>  dtb-$(CONFIG_ARCH_R8A77965) += r8a779m5-salvator-xs.dtb
>  
>  dtb-$(CONFIG_ARCH_R9A07G044) += r9a07g044l2-smarc.dtb
> +
> +dtb-$(CONFIG_ARCH_RCAR_GEN3) += salvator-panel-aa104xd12.dtbo

dts/renesas/ is quite busy with platform support already.  If overlays
are added which could theoretically be anynumber of external devices ...
should they be under a sub-directory here? I think it would make make
overlays both easier to identify, and easier to find.


> diff --git a/arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts b/arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts
> new file mode 100644
> index 000000000000..ca2d579fe42f
> --- /dev/null
> +++ b/arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts
> @@ -0,0 +1,32 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * Device Tree overlay for the AA104XD12 panel connected to LVDS0 on a
> + * Salvator-X or Salvator-XS board
> + *
> + * Copyright 2021 Ideas on Board Oy
> + */
> +
> +/dts-v1/;
> +/plugin/;
> +
> +&{/} {
> +#include "panel-aa104xd12.dtsi"
> +};
> +
> +&{/panel} {
> +       backlight = <&backlight>;
> +
> +       port {
> +               panel_in: endpoint {
> +                       remote-endpoint = <&lvds0_out>;

Of course, overlay are always going to be very platform specific though
...

Which I guess is why you have the panel itself broken out which seems
like a good idea, as that could then be used by multiple platoforms? (at
least within the renesas structure so far)

Seems like overlays are still a pain ;-)


> +               };
> +       };
> +};
> +
> +&lvds0 {
> +       status = "okay";
> +};
> +
> +&lvds0_out {
> +       remote-endpoint = <&panel_in>;
> +};
> -- 
> Regards,
> 
> Laurent Pinchart
>
Laurent Pinchart Jan. 17, 2022, 2:37 p.m. UTC | #2
Hi Kieran,

On Mon, Jan 17, 2022 at 11:45:58AM +0000, Kieran Bingham wrote:
> Quoting Laurent Pinchart (2021-12-12 01:33:50)
> > The Salvator-X and Salvator-XS boards support an optional LVDS panel.
> > One compatible panel is the Mitsubishi AA104XD12. Add a corresponding DT
> > overlay.
> > 
> > Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> >  arch/arm64/boot/dts/renesas/Makefile          |  2 ++
> >  .../dts/renesas/salvator-panel-aa104xd12.dts  | 32 +++++++++++++++++++
> >  2 files changed, 34 insertions(+)
> >  create mode 100644 arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts
> > 
> > diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
> > index d1c5c21d8d14..982ca3e0e86f 100644
> > --- a/arch/arm64/boot/dts/renesas/Makefile
> > +++ b/arch/arm64/boot/dts/renesas/Makefile
> > @@ -74,3 +74,5 @@ dtb-$(CONFIG_ARCH_R8A77961) += r8a779m3-ulcb-kf.dtb
> >  dtb-$(CONFIG_ARCH_R8A77965) += r8a779m5-salvator-xs.dtb
> >  
> >  dtb-$(CONFIG_ARCH_R9A07G044) += r9a07g044l2-smarc.dtb
> > +
> > +dtb-$(CONFIG_ARCH_RCAR_GEN3) += salvator-panel-aa104xd12.dtbo
> 
> dts/renesas/ is quite busy with platform support already.  If overlays
> are added which could theoretically be anynumber of external devices ...
> should they be under a sub-directory here? I think it would make make
> overlays both easier to identify, and easier to find.

I don't mind. I'd like to know Rob's opinion on this.

I would also prefer naming the device tree overlay sources .dtso, but
that doesn't seem to have gained any traction upstream.

> > diff --git a/arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts b/arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts
> > new file mode 100644
> > index 000000000000..ca2d579fe42f
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts
> > @@ -0,0 +1,32 @@
> > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > +/*
> > + * Device Tree overlay for the AA104XD12 panel connected to LVDS0 on a
> > + * Salvator-X or Salvator-XS board
> > + *
> > + * Copyright 2021 Ideas on Board Oy
> > + */
> > +
> > +/dts-v1/;
> > +/plugin/;
> > +
> > +&{/} {
> > +#include "panel-aa104xd12.dtsi"
> > +};
> > +
> > +&{/panel} {
> > +       backlight = <&backlight>;
> > +
> > +       port {
> > +               panel_in: endpoint {
> > +                       remote-endpoint = <&lvds0_out>;
> 
> Of course, overlay are always going to be very platform specific though
> ...
> 
> Which I guess is why you have the panel itself broken out which seems
> like a good idea, as that could then be used by multiple platoforms? (at
> least within the renesas structure so far)

It can be used with any Salvator-X(S) board, yes.

> Seems like overlays are still a pain ;-)

Not more painful that patching the .dts to enable the panel :-)

> > +               };
> > +       };
> > +};
> > +
> > +&lvds0 {
> > +       status = "okay";
> > +};
> > +
> > +&lvds0_out {
> > +       remote-endpoint = <&panel_in>;
> > +};
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/renesas/Makefile b/arch/arm64/boot/dts/renesas/Makefile
index d1c5c21d8d14..982ca3e0e86f 100644
--- a/arch/arm64/boot/dts/renesas/Makefile
+++ b/arch/arm64/boot/dts/renesas/Makefile
@@ -74,3 +74,5 @@  dtb-$(CONFIG_ARCH_R8A77961) += r8a779m3-ulcb-kf.dtb
 dtb-$(CONFIG_ARCH_R8A77965) += r8a779m5-salvator-xs.dtb
 
 dtb-$(CONFIG_ARCH_R9A07G044) += r9a07g044l2-smarc.dtb
+
+dtb-$(CONFIG_ARCH_RCAR_GEN3) += salvator-panel-aa104xd12.dtbo
diff --git a/arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts b/arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts
new file mode 100644
index 000000000000..ca2d579fe42f
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/salvator-panel-aa104xd12.dts
@@ -0,0 +1,32 @@ 
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree overlay for the AA104XD12 panel connected to LVDS0 on a
+ * Salvator-X or Salvator-XS board
+ *
+ * Copyright 2021 Ideas on Board Oy
+ */
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+#include "panel-aa104xd12.dtsi"
+};
+
+&{/panel} {
+	backlight = <&backlight>;
+
+	port {
+		panel_in: endpoint {
+			remote-endpoint = <&lvds0_out>;
+		};
+	};
+};
+
+&lvds0 {
+	status = "okay";
+};
+
+&lvds0_out {
+	remote-endpoint = <&panel_in>;
+};