public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Guoniu Zhou <guoniu.zhou@oss.nxp.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.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>,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Guoniu Zhou <guoniu.zhou@nxp.com>
Subject: Re: [PATCH 3/3] media: nxp: imx8-isi: Add ISI support for i.MX95
Date: Fri, 24 Oct 2025 09:50:08 -0400	[thread overview]
Message-ID: <aPuEEDzY3FoeM9tQ@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20251024-isi_imx95-v1-3-3ad1af7c3d61@nxp.com>

On Fri, Oct 24, 2025 at 05:46:54PM +0800, Guoniu Zhou wrote:
> From: Guoniu Zhou <guoniu.zhou@nxp.com>
>
> The ISI module on i.MX95 supports up to eight channels and four link
> sources to obtain the image data for processing in its pipelines. It
> can process up to eight image sources at the same time.
>
> In i.MX95, the gasket callbacks set ISI QoS which decide the priority
> to access system memory when there are multiple masters access memory
> simultaneously in camera domain.
>
> Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> ---
>  .../media/platform/nxp/imx8-isi/imx8-isi-core.c    | 13 +++++++
>  .../media/platform/nxp/imx8-isi/imx8-isi-core.h    |  2 +
>  .../media/platform/nxp/imx8-isi/imx8-isi-gasket.c  | 44 ++++++++++++++++++++++
>  3 files changed, 59 insertions(+)
>
> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
> index adc8d9960bf0df87d4e475661a3439beaf5ce9f6..ea9cc6d72bd4605000c6cbac2fa8cb9806e3cd3b 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
> @@ -337,6 +337,18 @@ static const struct mxc_isi_plat_data mxc_imx93_data = {
>  	.has_36bit_dma		= false,
>  };
>
> +static const struct mxc_isi_plat_data mxc_imx95_data = {
> +	.model			= MXC_ISI_IMX95,
> +	.num_ports		= 4,
> +	.num_channels		= 8,
> +	.reg_offset		= 0x10000,
> +	.ier_reg		= &mxc_imx8_isi_ier_v2,
> +	.set_thd		= &mxc_imx8_isi_thd_v1,
> +	.buf_active_reverse	= true,
> +	.gasket_ops		= &mxc_imx95_gasket_ops,
> +	.has_36bit_dma		= true,
> +};
> +
>  static const struct mxc_isi_plat_data mxc_imx8qm_data = {
>  	.model			= MXC_ISI_IMX8QM,
>  	.num_ports		= 5,
> @@ -548,6 +560,7 @@ static const struct of_device_id mxc_isi_of_match[] = {
>  	{ .compatible = "fsl,imx8qxp-isi", .data = &mxc_imx8qxp_data },
>  	{ .compatible = "fsl,imx8ulp-isi", .data = &mxc_imx8ulp_data },
>  	{ .compatible = "fsl,imx93-isi", .data = &mxc_imx93_data },
> +	{ .compatible = "fsl,imx95-isi", .data = &mxc_imx95_data },
>  	{ /* sentinel */ },
>  };
>  MODULE_DEVICE_TABLE(of, mxc_isi_of_match);
> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
> index e84af5127e4e7938e55e31b7063bee5e2cd4cb11..d1297ac26c56bdd97e4dd325b2a7394430a7adb9 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
> @@ -161,6 +161,7 @@ enum model {
>  	MXC_ISI_IMX8QXP,
>  	MXC_ISI_IMX8ULP,
>  	MXC_ISI_IMX93,
> +	MXC_ISI_IMX95,
>  };
>
>  struct mxc_isi_plat_data {
> @@ -297,6 +298,7 @@ struct mxc_isi_dev {
>
>  extern const struct mxc_gasket_ops mxc_imx8_gasket_ops;
>  extern const struct mxc_gasket_ops mxc_imx93_gasket_ops;
> +extern const struct mxc_gasket_ops mxc_imx95_gasket_ops;
>
>  int mxc_isi_crossbar_init(struct mxc_isi_dev *isi);
>  void mxc_isi_crossbar_cleanup(struct mxc_isi_crossbar *xbar);
> diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c
> index f69c3b5d478209c083738477edf380e3f280c471..6418ee1aabdad3cb92e84f2ef6406c5503987401 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c
> @@ -3,6 +3,7 @@
>   * Copyright 2019-2023 NXP
>   */
>
> +#include <linux/bits.h>
>  #include <linux/regmap.h>
>
>  #include <media/mipi-csi2.h>
> @@ -83,3 +84,46 @@ const struct mxc_gasket_ops mxc_imx93_gasket_ops = {
>  	.enable = mxc_imx93_gasket_enable,
>  	.disable = mxc_imx93_gasket_disable,
>  };
> +
> +/* -----------------------------------------------------------------------------
> + * i.MX95 gasket
> + */
> +#define ISI_QOS						0x10
> +#define ISI_QOS_AWQOS(x)				FIELD_PREP(GENMASK(2, 0), (x))
> +
> +#define ISI_PANIC_QOS					0x14
> +#define ISI_PANIC_QOS_HURRY_AWQOS(x)			FIELD_PREP(GENMASK(2, 0), (x))
> +
> +static void mxc_imx95_set_qos(struct mxc_isi_dev *isi, unsigned int val)
> +{
> +	/* Config QoS */
> +	regmap_write(isi->gasket, ISI_QOS, ISI_QOS_AWQOS(val));
> +
> +	/* Config Panic QoS */
> +	regmap_write(isi->gasket, ISI_PANIC_QOS, ISI_PANIC_QOS_HURRY_AWQOS(val));
> +}
> +
> +static void mxc_imx95_clear_qos(struct mxc_isi_dev *isi)
> +{
> +	regmap_write(isi->gasket, ISI_QOS, 0x0);
> +	regmap_write(isi->gasket, ISI_PANIC_QOS, 0x0);
> +}
> +
> +static void mxc_imx95_gasket_enable(struct mxc_isi_dev *isi,
> +				    const struct v4l2_mbus_frame_desc *fd,
> +				    const struct v4l2_mbus_framefmt *fmt,
> +				    const unsigned int port)
> +{
> +	mxc_imx95_set_qos(isi, 0x3);
> +}

can we use standard interconnects standard interface to config Qos stuff.
https://elixir.bootlin.com/linux/v6.17.4/source/include/linux/interconnect.h

Frank Li
> +
> +static void mxc_imx95_gasket_disable(struct mxc_isi_dev *isi,
> +				     unsigned int port)
> +{
> +	mxc_imx95_clear_qos(isi);
> +}
> +
> +const struct mxc_gasket_ops mxc_imx95_gasket_ops = {
> +	.enable = mxc_imx95_gasket_enable,
> +	.disable = mxc_imx95_gasket_disable,
> +};
>
> --
> 2.34.1
>


  reply	other threads:[~2025-10-24 13:50 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-24  9:46 [PATCH 0/3] media: nxp: imx8-isi: Add ISI support for i.MX95 Guoniu Zhou
2025-10-24  9:46 ` [PATCH 1/3] media: dt-bindings: nxp,imx8-isi: Add i.MX95 ISI compatible string Guoniu Zhou
2025-10-24 13:34   ` Frank Li
2025-10-26 22:04     ` Laurent Pinchart
2025-10-27 19:19       ` Frank Li
2025-11-03 12:23         ` Laurent Pinchart
2025-10-24  9:46 ` [PATCH 2/3] media: nxp: imx8-isi: Keep the default value for BLANK_PXL field Guoniu Zhou
2025-10-24 13:41   ` Frank Li
2025-10-26 22:11     ` Laurent Pinchart
2025-11-03  6:01       ` G.N. Zhou (OSS)
2025-10-24  9:46 ` [PATCH 3/3] media: nxp: imx8-isi: Add ISI support for i.MX95 Guoniu Zhou
2025-10-24 13:50   ` Frank Li [this message]
2025-10-26 22:15     ` Laurent Pinchart

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=aPuEEDzY3FoeM9tQ@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=guoniu.zhou@nxp.com \
    --cc=guoniu.zhou@oss.nxp.com \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=krzk+dt@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=robh@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox