All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	Paul Elder <paul.elder@ideasonboard.com>,
	kieran.bingham@ideasonboard.com, tomi.valkeinen@ideasonboard.com,
	umang.jain@ideasonboard.com, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Tim Harvey <tharvey@gateworks.com>,
	Philippe Schenker <philippe.schenker@toradex.com>,
	Marek Vasut <marex@denx.de>,
	Gregor Herburger <gregor.herburger@ew.tq-group.com>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	open list <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/2] arm64: dts: imx8mp: Add overlays for ISP instances
Date: Thu, 30 Nov 2023 10:51:22 +0100	[thread overview]
Message-ID: <5734628.DvuYhMxLoT@steina-w> (raw)
In-Reply-To: <20231129151637.GG24293@pendragon.ideasonboard.com>

Hi Laurent,

Am Mittwoch, 29. November 2023, 16:16:37 CET schrieb Laurent Pinchart:
> Hi Alexander,
> 
> On Wed, Nov 29, 2023 at 11:20:07AM +0100, Alexander Stein wrote:
> > Am Mittwoch, 29. November 2023, 10:31:13 CET schrieb Paul Elder:
> > > From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > 
> > > Add two overlay to enable each ISP instance. The ISP is wired directly
> > > to the CSIS for now, bypassing the ISI completely.
> > 
> > I'm not sure if this is worth adding in a separate overlay.
> 
> The trouble is that, at this point, selection between the ISP and the
> ISI can only be performed through DT :-S That's why this is implemented
> as an overlay.

I feel a better place would be the overlay which actually adds the sensor. 
This knows best whether ISI or ISP should be used.

> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> > > ---
> > > 
> > >  arch/arm64/boot/dts/freescale/Makefile        |  2 ++
> > >  .../arm64/boot/dts/freescale/imx8mp-isp1.dtso | 36 +++++++++++++++++++
> > >  .../arm64/boot/dts/freescale/imx8mp-isp2.dtso | 36 +++++++++++++++++++
> > >  3 files changed, 74 insertions(+)
> > >  create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-isp1.dtso
> > >  create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-isp2.dtso
> > > 
> > > diff --git a/arch/arm64/boot/dts/freescale/Makefile
> > > b/arch/arm64/boot/dts/freescale/Makefile index
> > > 300049037eb0..f97dfac11189
> > > 100644
> > > --- a/arch/arm64/boot/dts/freescale/Makefile
> > > +++ b/arch/arm64/boot/dts/freescale/Makefile
> > > @@ -113,6 +113,8 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-dhcom-pdk2.dtb
> > > 
> > >  dtb-$(CONFIG_ARCH_MXC) += imx8mp-dhcom-pdk3.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx8mp-icore-mx8mp-edimm2.2.dtb
> > > 
> > > +dtb-$(CONFIG_ARCH_MXC) += imx8mp-isp1.dtbo
> > > +dtb-$(CONFIG_ARCH_MXC) += imx8mp-isp2.dtbo
> > > 
> > >  dtb-$(CONFIG_ARCH_MXC) += imx8mp-msc-sm2s-ep1.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx8mp-phyboard-pollux-rdk.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx8mp-tqma8mpql-mba8mpxl.dtb
> > > 
> > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-isp1.dtso
> > > b/arch/arm64/boot/dts/freescale/imx8mp-isp1.dtso new file mode 100644
> > > index 000000000000..cf394ed224ab
> > > --- /dev/null
> > > +++ b/arch/arm64/boot/dts/freescale/imx8mp-isp1.dtso
> > > @@ -0,0 +1,36 @@
> > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > > +/*
> > > + * Copyright 2022 Ideas on Board Oy
> > > + */
> > > +
> > > +/dts-v1/;
> > > +/plugin/;
> > > +
> > > +#include <dt-bindings/media/video-interfaces.h>
> > > +
> > > +&isi_0 {
> > > +	status = "disabled";
> > 
> > ISI is disabled by default. What is your intention here?
> 
> It could be enabled by an overlay for a camera module. Ideally we want
> to be able to enable both the ISI and ISP at runtime, but that's not
> possible yet and will require a very large amount of work.

Again IMHO this is part of sensor setup, in a very specific overlay. To put it 
into different words: I barely see the gain of this small overlay.

Runtime switching would require a combined media controller including both ISI 
and ISP, no?

Best regards,
Alexander

> > > +
> > > +	ports {
> > > +		port@0 {
> > > +			/delete-node/ endpoint;
> > 
> > This doesn't work in overlays. See [1]. Otherwise the OF graph connections
> > look fine to me. I'm using the same in my local overlay.
> 
> Interesting, I wasn't aware of that. Maybe we should fix it :-)
> 
> > [1]
> > https://lore.kernel.org/all/CAMuHMdWu4KZbBkvEofUV2wuA1g2S=XHHM3RUN1cNrcZB
> > khsPZA@mail.gmail.com/> 
> > > +		};
> > > +	};
> > > +};
> > > +
> > > +&isp_0 {
> > > +	status = "okay";
> > > +
> > > +	ports {
> > > +		port@1 {
> > > +			isp0_in: endpoint {
> > > +				bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
> > > +				remote-endpoint = <&mipi_csi_0_out>;
> > > +			};
> > > +		};
> > > +	};
> > > +};
> > > +
> > > +&mipi_csi_0_out {
> > > +	remote-endpoint = <&isp0_in>;
> > > +};
> > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-isp2.dtso
> > > b/arch/arm64/boot/dts/freescale/imx8mp-isp2.dtso new file mode 100644
> > > index 000000000000..14e2e7b2617f
> > > --- /dev/null
> > > +++ b/arch/arm64/boot/dts/freescale/imx8mp-isp2.dtso
> > > @@ -0,0 +1,36 @@
> > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > > +/*
> > > + * Copyright 2022 Ideas on Board Oy
> > > + */
> > > +
> > > +/dts-v1/;
> > > +/plugin/;
> > > +
> > > +#include <dt-bindings/media/video-interfaces.h>
> > > +
> > > +&isi_0 {
> > > +	status = "disabled";
> > > +
> > > +	ports {
> > > +		port@1 {
> > > +			/delete-node/ endpoint;
> > > +		};
> > > +	};
> > > +};
> > > +
> > > +&isp_1 {
> > > +	status = "okay";
> > > +
> > > +	ports {
> > > +		port@1 {
> > > +			isp1_in: endpoint {
> > > +				bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
> > > +				remote-endpoint = <&mipi_csi_1_out>;
> > > +			};
> > > +		};
> > > +	};
> > > +};
> > > +
> > > +&mipi_csi_1_out {
> > > +	remote-endpoint = <&isp1_in>;
> > > +};


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: Alexander Stein <alexander.stein@ew.tq-group.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	Paul Elder <paul.elder@ideasonboard.com>,
	kieran.bingham@ideasonboard.com, tomi.valkeinen@ideasonboard.com,
	umang.jain@ideasonboard.com, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	Tim Harvey <tharvey@gateworks.com>,
	Philippe Schenker <philippe.schenker@toradex.com>,
	Marek Vasut <marex@denx.de>,
	Gregor Herburger <gregor.herburger@ew.tq-group.com>,
	Marcel Ziswiler <marcel.ziswiler@toradex.com>,
	open list <linux-kernel@vger.kernel.org>,
	"moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 2/2] arm64: dts: imx8mp: Add overlays for ISP instances
Date: Thu, 30 Nov 2023 10:51:22 +0100	[thread overview]
Message-ID: <5734628.DvuYhMxLoT@steina-w> (raw)
In-Reply-To: <20231129151637.GG24293@pendragon.ideasonboard.com>

Hi Laurent,

Am Mittwoch, 29. November 2023, 16:16:37 CET schrieb Laurent Pinchart:
> Hi Alexander,
> 
> On Wed, Nov 29, 2023 at 11:20:07AM +0100, Alexander Stein wrote:
> > Am Mittwoch, 29. November 2023, 10:31:13 CET schrieb Paul Elder:
> > > From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > 
> > > Add two overlay to enable each ISP instance. The ISP is wired directly
> > > to the CSIS for now, bypassing the ISI completely.
> > 
> > I'm not sure if this is worth adding in a separate overlay.
> 
> The trouble is that, at this point, selection between the ISP and the
> ISI can only be performed through DT :-S That's why this is implemented
> as an overlay.

I feel a better place would be the overlay which actually adds the sensor. 
This knows best whether ISI or ISP should be used.

> > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com>
> > > ---
> > > 
> > >  arch/arm64/boot/dts/freescale/Makefile        |  2 ++
> > >  .../arm64/boot/dts/freescale/imx8mp-isp1.dtso | 36 +++++++++++++++++++
> > >  .../arm64/boot/dts/freescale/imx8mp-isp2.dtso | 36 +++++++++++++++++++
> > >  3 files changed, 74 insertions(+)
> > >  create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-isp1.dtso
> > >  create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-isp2.dtso
> > > 
> > > diff --git a/arch/arm64/boot/dts/freescale/Makefile
> > > b/arch/arm64/boot/dts/freescale/Makefile index
> > > 300049037eb0..f97dfac11189
> > > 100644
> > > --- a/arch/arm64/boot/dts/freescale/Makefile
> > > +++ b/arch/arm64/boot/dts/freescale/Makefile
> > > @@ -113,6 +113,8 @@ dtb-$(CONFIG_ARCH_MXC) += imx8mp-dhcom-pdk2.dtb
> > > 
> > >  dtb-$(CONFIG_ARCH_MXC) += imx8mp-dhcom-pdk3.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx8mp-icore-mx8mp-edimm2.2.dtb
> > > 
> > > +dtb-$(CONFIG_ARCH_MXC) += imx8mp-isp1.dtbo
> > > +dtb-$(CONFIG_ARCH_MXC) += imx8mp-isp2.dtbo
> > > 
> > >  dtb-$(CONFIG_ARCH_MXC) += imx8mp-msc-sm2s-ep1.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx8mp-phyboard-pollux-rdk.dtb
> > >  dtb-$(CONFIG_ARCH_MXC) += imx8mp-tqma8mpql-mba8mpxl.dtb
> > > 
> > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-isp1.dtso
> > > b/arch/arm64/boot/dts/freescale/imx8mp-isp1.dtso new file mode 100644
> > > index 000000000000..cf394ed224ab
> > > --- /dev/null
> > > +++ b/arch/arm64/boot/dts/freescale/imx8mp-isp1.dtso
> > > @@ -0,0 +1,36 @@
> > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > > +/*
> > > + * Copyright 2022 Ideas on Board Oy
> > > + */
> > > +
> > > +/dts-v1/;
> > > +/plugin/;
> > > +
> > > +#include <dt-bindings/media/video-interfaces.h>
> > > +
> > > +&isi_0 {
> > > +	status = "disabled";
> > 
> > ISI is disabled by default. What is your intention here?
> 
> It could be enabled by an overlay for a camera module. Ideally we want
> to be able to enable both the ISI and ISP at runtime, but that's not
> possible yet and will require a very large amount of work.

Again IMHO this is part of sensor setup, in a very specific overlay. To put it 
into different words: I barely see the gain of this small overlay.

Runtime switching would require a combined media controller including both ISI 
and ISP, no?

Best regards,
Alexander

> > > +
> > > +	ports {
> > > +		port@0 {
> > > +			/delete-node/ endpoint;
> > 
> > This doesn't work in overlays. See [1]. Otherwise the OF graph connections
> > look fine to me. I'm using the same in my local overlay.
> 
> Interesting, I wasn't aware of that. Maybe we should fix it :-)
> 
> > [1]
> > https://lore.kernel.org/all/CAMuHMdWu4KZbBkvEofUV2wuA1g2S=XHHM3RUN1cNrcZB
> > khsPZA@mail.gmail.com/> 
> > > +		};
> > > +	};
> > > +};
> > > +
> > > +&isp_0 {
> > > +	status = "okay";
> > > +
> > > +	ports {
> > > +		port@1 {
> > > +			isp0_in: endpoint {
> > > +				bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
> > > +				remote-endpoint = <&mipi_csi_0_out>;
> > > +			};
> > > +		};
> > > +	};
> > > +};
> > > +
> > > +&mipi_csi_0_out {
> > > +	remote-endpoint = <&isp0_in>;
> > > +};
> > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-isp2.dtso
> > > b/arch/arm64/boot/dts/freescale/imx8mp-isp2.dtso new file mode 100644
> > > index 000000000000..14e2e7b2617f
> > > --- /dev/null
> > > +++ b/arch/arm64/boot/dts/freescale/imx8mp-isp2.dtso
> > > @@ -0,0 +1,36 @@
> > > +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> > > +/*
> > > + * Copyright 2022 Ideas on Board Oy
> > > + */
> > > +
> > > +/dts-v1/;
> > > +/plugin/;
> > > +
> > > +#include <dt-bindings/media/video-interfaces.h>
> > > +
> > > +&isi_0 {
> > > +	status = "disabled";
> > > +
> > > +	ports {
> > > +		port@1 {
> > > +			/delete-node/ endpoint;
> > > +		};
> > > +	};
> > > +};
> > > +
> > > +&isp_1 {
> > > +	status = "okay";
> > > +
> > > +	ports {
> > > +		port@1 {
> > > +			isp1_in: endpoint {
> > > +				bus-type = <MEDIA_BUS_TYPE_PARALLEL>;
> > > +				remote-endpoint = <&mipi_csi_1_out>;
> > > +			};
> > > +		};
> > > +	};
> > > +};
> > > +
> > > +&mipi_csi_1_out {
> > > +	remote-endpoint = <&isp1_in>;
> > > +};


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



  reply	other threads:[~2023-11-30  9:52 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29  9:31 [PATCH 0/2] arm64: dts: imx8mp: Add support for the ISPs Paul Elder
2023-11-29  9:31 ` [PATCH 1/2] arm64: dts: imx8mp: Add DT nodes for the two ISPs Paul Elder
2023-11-29  9:31   ` Paul Elder
2023-11-29 10:17   ` Alexander Stein
2023-11-29 10:17     ` Alexander Stein
2023-11-29 11:59   ` Fabio Estevam
2023-11-29 11:59     ` Fabio Estevam
2023-11-29 13:49     ` Adam Ford
2023-11-29 13:49       ` Adam Ford
2023-11-29 14:26       ` Fabio Estevam
2023-11-29 14:26         ` Fabio Estevam
2023-11-29 14:44       ` Laurent Pinchart
2023-11-29 14:44         ` Laurent Pinchart
2024-03-20 12:35   ` Adam Ford
2024-03-20 12:35     ` Adam Ford
2024-03-25 15:14     ` Laurent Pinchart
2024-03-25 15:14       ` Laurent Pinchart
2024-03-25 15:17       ` Adam Ford
2024-03-25 15:17         ` Adam Ford
2023-11-29  9:31 ` [PATCH 2/2] arm64: dts: imx8mp: Add overlays for ISP instances Paul Elder
2023-11-29  9:31   ` Paul Elder
2023-11-29 10:20   ` Alexander Stein
2023-11-29 10:20     ` Alexander Stein
2023-11-29 15:16     ` Laurent Pinchart
2023-11-29 15:16       ` Laurent Pinchart
2023-11-30  9:51       ` Alexander Stein [this message]
2023-11-30  9:51         ` Alexander Stein
2023-11-30 13:48         ` Adam Ford
2023-11-30 13:48           ` Adam Ford
2023-11-30 14:02           ` Kieran Bingham
2023-11-30 14:02             ` Kieran Bingham
2023-11-30 14:02             ` Kieran Bingham
2023-11-30 14:09             ` Adam Ford
2023-11-30 14:09               ` Adam Ford
2023-11-30 14:22             ` Alexander Stein
2023-11-30 14:22               ` Alexander Stein
2023-11-30 14:20         ` Laurent Pinchart
2023-11-30 14:20           ` Laurent Pinchart
2023-11-30 15:34           ` Alexander Stein
2023-11-30 15:34             ` Alexander Stein
2023-11-30 15:54             ` Laurent Pinchart
2023-11-30 15:54               ` Laurent Pinchart
2023-11-29 11:16 ` [PATCH 0/2] arm64: dts: imx8mp: Add support for the ISPs Tommaso Merciai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5734628.DvuYhMxLoT@steina-w \
    --to=alexander.stein@ew.tq-group.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=gregor.herburger@ew.tq-group.com \
    --cc=kernel@pengutronix.de \
    --cc=kieran.bingham@ideasonboard.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=marcel.ziswiler@toradex.com \
    --cc=marex@denx.de \
    --cc=paul.elder@ideasonboard.com \
    --cc=philippe.schenker@toradex.com \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    --cc=tharvey@gateworks.com \
    --cc=tomi.valkeinen@ideasonboard.com \
    --cc=umang.jain@ideasonboard.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.