devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/5] media: imx91: Add ISI support
@ 2025-09-05  6:55 Guoniu Zhou
  2025-09-05  6:55 ` [PATCH v2 1/5] media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string Guoniu Zhou
                   ` (5 more replies)
  0 siblings, 6 replies; 21+ messages in thread
From: Guoniu Zhou @ 2025-09-05  6:55 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Frank Li
  Cc: linux-media, devicetree, imx, linux-arm-kernel, linux-kernel,
	Guoniu Zhou, Alice Yuan, Krzysztof Kozlowski

Add ISI support for i.MX91 chip.

The bellow patch refine code, no functions changed.
   media: nxp: imx8-isi: Simplify code by using helper macro
   media: nxp: imx8-isi: Reorder the platform data

The bindings and driver patch for i.MX91 ISI.
   media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
   media: nxp: imx8-isi: Add ISI support for i.MX91

Add parallel camera input for i.MX93 ISI.
   media: nxp: imx8-isi: Add parallel camera input support

Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
---
Changes in v2:
- Update commit log in patch 5 to better describe why introduce it.
- Include two header files in patch 2 since kernel test robot report build
  issue when arch is riscv and compiler is clang-22.
  #include <linux/bitfield.h>
  #include <linux/bits.h>
- Link to v1: https://lore.kernel.org/all/20250827-isi_imx93-v1-0-83e6b4b50c4d@nxp.com

---
Alice Yuan (2):
      media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
      media: nxp: imx8-isi: Add parallel camera input support

Guoniu Zhou (3):
      media: nxp: imx8-isi: Simplify code by using helper macro
      media: nxp: imx8-isi: Reorder the platform data
      media: nxp: imx8-isi: Add ISI support for i.MX91

 .../devicetree/bindings/media/nxp,imx8-isi.yaml    | 13 +++++-
 .../media/platform/nxp/imx8-isi/imx8-isi-core.c    | 50 ++++++++++++++--------
 .../media/platform/nxp/imx8-isi/imx8-isi-core.h    |  1 +
 .../media/platform/nxp/imx8-isi/imx8-isi-gasket.c  | 18 ++++++--
 4 files changed, 59 insertions(+), 23 deletions(-)
---
base-commit: 603957ae903e81fb80d3788297c0f58a68802dfc
change-id: 20250826-isi_imx93-4a59288b33e4

Best regards,
-- 
Guoniu Zhou <guoniu.zhou@nxp.com>


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

* [PATCH v2 1/5] media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
  2025-09-05  6:55 [PATCH v2 0/5] media: imx91: Add ISI support Guoniu Zhou
@ 2025-09-05  6:55 ` Guoniu Zhou
  2025-09-21 22:10   ` Laurent Pinchart
  2025-09-05  6:55 ` [PATCH v2 2/5] media: nxp: imx8-isi: Simplify code by using helper macro Guoniu Zhou
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Guoniu Zhou @ 2025-09-05  6:55 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Frank Li
  Cc: linux-media, devicetree, imx, linux-arm-kernel, linux-kernel,
	Guoniu Zhou, Alice Yuan, Krzysztof Kozlowski

From: Alice Yuan <alice.yuan@nxp.com>

The ISI module on i.MX91 is reused from i.MX93 and implements one channel
and one camera input which only can be connected to parallel camera input.
So needn't to select camera source like i.MX93 in gasket ops.

Signed-off-by: Alice Yuan <alice.yuan@nxp.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
---
 Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
index f43b91984f0152fbbcf80db3b3bbad7e8ad6c11e..001a0d9b71e096db3f543adaad40b84af378d707 100644
--- a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
+++ b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
@@ -22,6 +22,7 @@ properties:
       - fsl,imx8mn-isi
       - fsl,imx8mp-isi
       - fsl,imx8ulp-isi
+      - fsl,imx91-isi
       - fsl,imx93-isi
 
   reg:
@@ -66,7 +67,6 @@ required:
   - interrupts
   - clocks
   - clock-names
-  - fsl,blk-ctrl
   - ports
 
 allOf:
@@ -77,6 +77,7 @@ allOf:
             enum:
               - fsl,imx8mn-isi
               - fsl,imx8ulp-isi
+              - fsl,imx91-isi
               - fsl,imx93-isi
     then:
       properties:
@@ -109,6 +110,16 @@ allOf:
             - port@0
             - port@1
 
+  - if:
+      properties:
+        compatible:
+          not:
+            contains:
+              const: fsl,imx91-isi
+    then:
+      required:
+        - fsl,blk-ctrl
+
 additionalProperties: false
 
 examples:

-- 
2.34.1


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

* [PATCH v2 2/5] media: nxp: imx8-isi: Simplify code by using helper macro
  2025-09-05  6:55 [PATCH v2 0/5] media: imx91: Add ISI support Guoniu Zhou
  2025-09-05  6:55 ` [PATCH v2 1/5] media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string Guoniu Zhou
@ 2025-09-05  6:55 ` Guoniu Zhou
  2025-09-21 22:13   ` Laurent Pinchart
  2025-09-05  6:56 ` [PATCH v2 3/5] media: nxp: imx8-isi: Add parallel camera input support Guoniu Zhou
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Guoniu Zhou @ 2025-09-05  6:55 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Frank Li
  Cc: linux-media, devicetree, imx, linux-arm-kernel, linux-kernel,
	Guoniu Zhou

Simplify code by using helper macro FIELD_PREP() and GENMASK().

No functions changed.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
---
 drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

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..2f5e7299b537d612fb1fe6688c1b75bfd2d6049b 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,8 @@
  * Copyright 2019-2023 NXP
  */
 
+#include <linux/bitfield.h>
+#include <linux/bits.h>
 #include <linux/regmap.h>
 
 #include <media/mipi-csi2.h>
@@ -16,8 +18,7 @@
 #define GASKET_BASE(n)				(0x0060 + (n) * 0x30)
 
 #define GASKET_CTRL				0x0000
-#define GASKET_CTRL_DATA_TYPE(dt)		((dt) << 8)
-#define GASKET_CTRL_DATA_TYPE_MASK		(0x3f << 8)
+#define GASKET_CTRL_DATA_TYPE(dt)		FIELD_PREP(GENMASK(13, 8), (dt))
 #define GASKET_CTRL_DUAL_COMP_ENABLE		BIT(1)
 #define GASKET_CTRL_ENABLE			BIT(0)
 
@@ -58,7 +59,7 @@ const struct mxc_gasket_ops mxc_imx8_gasket_ops = {
  */
 
 #define DISP_MIX_CAMERA_MUX                     0x30
-#define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)        (((x) & 0x3f) << 3)
+#define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)        FIELD_PREP(GENMASK(8, 3), (x))
 #define DISP_MIX_CAMERA_MUX_GASKET_ENABLE       BIT(16)
 
 static void mxc_imx93_gasket_enable(struct mxc_isi_dev *isi,

-- 
2.34.1


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

* [PATCH v2 3/5] media: nxp: imx8-isi: Add parallel camera input support
  2025-09-05  6:55 [PATCH v2 0/5] media: imx91: Add ISI support Guoniu Zhou
  2025-09-05  6:55 ` [PATCH v2 1/5] media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string Guoniu Zhou
  2025-09-05  6:55 ` [PATCH v2 2/5] media: nxp: imx8-isi: Simplify code by using helper macro Guoniu Zhou
@ 2025-09-05  6:56 ` Guoniu Zhou
  2025-09-21 22:18   ` Laurent Pinchart
  2025-09-05  6:56 ` [PATCH v2 4/5] media: nxp: imx8-isi: Reorder the platform data Guoniu Zhou
                   ` (2 subsequent siblings)
  5 siblings, 1 reply; 21+ messages in thread
From: Guoniu Zhou @ 2025-09-05  6:56 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Frank Li
  Cc: linux-media, devicetree, imx, linux-arm-kernel, linux-kernel,
	Guoniu Zhou, Alice Yuan

From: Alice Yuan <alice.yuan@nxp.com>

The ISI module on i.MX93 implements one camera input which can be
connected to either of MIPI CSI-2 or parallel camera. The source
type can be selected by setting camera mux control register.

Signed-off-by: Alice Yuan <alice.yuan@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
---
 drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

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 2f5e7299b537d612fb1fe6688c1b75bfd2d6049b..42b2ed2bbdf7259bc83d0678256343a3b606568a 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c
@@ -61,6 +61,7 @@ const struct mxc_gasket_ops mxc_imx8_gasket_ops = {
 #define DISP_MIX_CAMERA_MUX                     0x30
 #define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)        FIELD_PREP(GENMASK(8, 3), (x))
 #define DISP_MIX_CAMERA_MUX_GASKET_ENABLE       BIT(16)
+#define DISP_MIX_CAMERA_MUX_GASKET_SRC          BIT(17)
 
 static void mxc_imx93_gasket_enable(struct mxc_isi_dev *isi,
 				    const struct v4l2_mbus_frame_desc *fd,
@@ -71,6 +72,16 @@ static void mxc_imx93_gasket_enable(struct mxc_isi_dev *isi,
 
 	val = DISP_MIX_CAMERA_MUX_DATA_TYPE(fd->entry[0].bus.csi2.dt);
 	val |= DISP_MIX_CAMERA_MUX_GASKET_ENABLE;
+
+	/*
+	 * CAMERA MUX
+	 * - [17]:	Selects source input to gasket
+	 *		0: Data from MIPI CSI
+	 *		1: Data from parallel camera
+	 */
+	if (fd->type == V4L2_MBUS_FRAME_DESC_TYPE_PARALLEL)
+		val |= DISP_MIX_CAMERA_MUX_GASKET_SRC;
+
 	regmap_write(isi->gasket, DISP_MIX_CAMERA_MUX, val);
 }
 

-- 
2.34.1


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

* [PATCH v2 4/5] media: nxp: imx8-isi: Reorder the platform data
  2025-09-05  6:55 [PATCH v2 0/5] media: imx91: Add ISI support Guoniu Zhou
                   ` (2 preceding siblings ...)
  2025-09-05  6:56 ` [PATCH v2 3/5] media: nxp: imx8-isi: Add parallel camera input support Guoniu Zhou
@ 2025-09-05  6:56 ` Guoniu Zhou
  2025-09-21 22:20   ` Laurent Pinchart
  2025-09-05  6:56 ` [PATCH v2 5/5] media: nxp: imx8-isi: Add ISI support for i.MX91 Guoniu Zhou
  2025-09-19  2:40 ` [PATCH v2 0/5] media: imx91: Add ISI support G.N. Zhou
  5 siblings, 1 reply; 21+ messages in thread
From: Guoniu Zhou @ 2025-09-05  6:56 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Frank Li
  Cc: linux-media, devicetree, imx, linux-arm-kernel, linux-kernel,
	Guoniu Zhou

Sort platform data in the order of compatible strings in of_match table
to make it more convenient to read.

No functions changed.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
---
 .../media/platform/nxp/imx8-isi/imx8-isi-core.c    | 44 +++++++++++-----------
 1 file changed, 22 insertions(+), 22 deletions(-)

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..0155c75983f02f33f7f0669e73188222ebb5e816 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
@@ -314,6 +314,28 @@ static const struct mxc_isi_plat_data mxc_imx8mp_data = {
 	.has_36bit_dma		= true,
 };
 
+static const struct mxc_isi_plat_data mxc_imx8qm_data = {
+	.model			= MXC_ISI_IMX8QM,
+	.num_ports		= 5,
+	.num_channels		= 8,
+	.reg_offset		= 0x10000,
+	.ier_reg		= &mxc_imx8_isi_ier_qm,
+	.set_thd		= &mxc_imx8_isi_thd_v1,
+	.buf_active_reverse	= true,
+	.has_36bit_dma		= false,
+};
+
+static const struct mxc_isi_plat_data mxc_imx8qxp_data = {
+	.model			= MXC_ISI_IMX8QXP,
+	.num_ports		= 5,
+	.num_channels		= 6,
+	.reg_offset		= 0x10000,
+	.ier_reg		= &mxc_imx8_isi_ier_v2,
+	.set_thd		= &mxc_imx8_isi_thd_v1,
+	.buf_active_reverse	= true,
+	.has_36bit_dma		= false,
+};
+
 static const struct mxc_isi_plat_data mxc_imx8ulp_data = {
 	.model			= MXC_ISI_IMX8ULP,
 	.num_ports		= 1,
@@ -337,28 +359,6 @@ static const struct mxc_isi_plat_data mxc_imx93_data = {
 	.has_36bit_dma		= false,
 };
 
-static const struct mxc_isi_plat_data mxc_imx8qm_data = {
-	.model			= MXC_ISI_IMX8QM,
-	.num_ports		= 5,
-	.num_channels		= 8,
-	.reg_offset		= 0x10000,
-	.ier_reg		= &mxc_imx8_isi_ier_qm,
-	.set_thd		= &mxc_imx8_isi_thd_v1,
-	.buf_active_reverse	= true,
-	.has_36bit_dma		= false,
-};
-
-static const struct mxc_isi_plat_data mxc_imx8qxp_data = {
-	.model			= MXC_ISI_IMX8QXP,
-	.num_ports		= 5,
-	.num_channels		= 6,
-	.reg_offset		= 0x10000,
-	.ier_reg		= &mxc_imx8_isi_ier_v2,
-	.set_thd		= &mxc_imx8_isi_thd_v1,
-	.buf_active_reverse	= true,
-	.has_36bit_dma		= false,
-};
-
 /* -----------------------------------------------------------------------------
  * Power management
  */

-- 
2.34.1


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

* [PATCH v2 5/5] media: nxp: imx8-isi: Add ISI support for i.MX91
  2025-09-05  6:55 [PATCH v2 0/5] media: imx91: Add ISI support Guoniu Zhou
                   ` (3 preceding siblings ...)
  2025-09-05  6:56 ` [PATCH v2 4/5] media: nxp: imx8-isi: Reorder the platform data Guoniu Zhou
@ 2025-09-05  6:56 ` Guoniu Zhou
  2025-09-21 22:27   ` Laurent Pinchart
  2025-09-19  2:40 ` [PATCH v2 0/5] media: imx91: Add ISI support G.N. Zhou
  5 siblings, 1 reply; 21+ messages in thread
From: Guoniu Zhou @ 2025-09-05  6:56 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Frank Li
  Cc: linux-media, devicetree, imx, linux-arm-kernel, linux-kernel,
	Guoniu Zhou

The ISI module on i.MX91 implements only one channel and one parallel
camera input. As no input source selection is required, gasket ops are
unnecessary.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
---
 drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 12 ++++++++++++
 drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h |  1 +
 2 files changed, 13 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 0155c75983f02f33f7f0669e73188222ebb5e816..c3d411ddf492eb27b372763ce5d344a90c6ec524 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
@@ -347,6 +347,17 @@ static const struct mxc_isi_plat_data mxc_imx8ulp_data = {
 	.has_36bit_dma		= false,
 };
 
+static const struct mxc_isi_plat_data mxc_imx91_data = {
+	.model			= MXC_ISI_IMX91,
+	.num_ports		= 1,
+	.num_channels		= 1,
+	.reg_offset		= 0,
+	.ier_reg		= &mxc_imx8_isi_ier_v2,
+	.set_thd		= &mxc_imx8_isi_thd_v1,
+	.buf_active_reverse	= true,
+	.has_36bit_dma		= false,
+};
+
 static const struct mxc_isi_plat_data mxc_imx93_data = {
 	.model			= MXC_ISI_IMX93,
 	.num_ports		= 1,
@@ -547,6 +558,7 @@ static const struct of_device_id mxc_isi_of_match[] = {
 	{ .compatible = "fsl,imx8qm-isi", .data = &mxc_imx8qm_data },
 	{ .compatible = "fsl,imx8qxp-isi", .data = &mxc_imx8qxp_data },
 	{ .compatible = "fsl,imx8ulp-isi", .data = &mxc_imx8ulp_data },
+	{ .compatible = "fsl,imx91-isi", .data = &mxc_imx91_data },
 	{ .compatible = "fsl,imx93-isi", .data = &mxc_imx93_data },
 	{ /* sentinel */ },
 };
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..3cbd35305af0f8026c4f76b5eb5d0864f8e36dc3 100644
--- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
+++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
@@ -160,6 +160,7 @@ enum model {
 	MXC_ISI_IMX8QM,
 	MXC_ISI_IMX8QXP,
 	MXC_ISI_IMX8ULP,
+	MXC_ISI_IMX91,
 	MXC_ISI_IMX93,
 };
 

-- 
2.34.1


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

* RE: [PATCH v2 0/5] media: imx91: Add ISI support
  2025-09-05  6:55 [PATCH v2 0/5] media: imx91: Add ISI support Guoniu Zhou
                   ` (4 preceding siblings ...)
  2025-09-05  6:56 ` [PATCH v2 5/5] media: nxp: imx8-isi: Add ISI support for i.MX91 Guoniu Zhou
@ 2025-09-19  2:40 ` G.N. Zhou
  2025-09-19 16:11   ` Frank Li
  5 siblings, 1 reply; 21+ messages in thread
From: G.N. Zhou @ 2025-09-19  2:40 UTC (permalink / raw)
  To: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, Frank Li
  Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Alice Yuan, Krzysztof Kozlowski

Hi,

Could you help to please review the patches which I have submitted some time back to linux media community and move forward driver part if possible.
Your feedback will be very appreciated. Thanks.

Best Regards
G.N Zhou

> -----Original Message-----
> From: G.N. Zhou <guoniu.zhou@nxp.com>
> Sent: Friday, September 5, 2025 2:56 PM
> To: 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>; Frank Li
> <frank.li@nxp.com>
> Cc: linux-media@vger.kernel.org; devicetree@vger.kernel.org;
> imx@lists.linux.dev; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org; G.N. Zhou <guoniu.zhou@nxp.com>; Alice Yuan
> <alice.yuan@nxp.com>; Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Subject: [PATCH v2 0/5] media: imx91: Add ISI support
> 
> Add ISI support for i.MX91 chip.
> 
> The bellow patch refine code, no functions changed.
>    media: nxp: imx8-isi: Simplify code by using helper macro
>    media: nxp: imx8-isi: Reorder the platform data
> 
> The bindings and driver patch for i.MX91 ISI.
>    media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
>    media: nxp: imx8-isi: Add ISI support for i.MX91
> 
> Add parallel camera input for i.MX93 ISI.
>    media: nxp: imx8-isi: Add parallel camera input support
> 
> Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> ---
> Changes in v2:
> - Update commit log in patch 5 to better describe why introduce it.
> - Include two header files in patch 2 since kernel test robot report build
>   issue when arch is riscv and compiler is clang-22.
>   #include <linux/bitfield.h>
>   #include <linux/bits.h>
> - Link to v1: https://lore.kernel.org/all/20250827-isi_imx93-v1-0-
> 83e6b4b50c4d@nxp.com
> 
> ---
> Alice Yuan (2):
>       media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
>       media: nxp: imx8-isi: Add parallel camera input support
> 
> Guoniu Zhou (3):
>       media: nxp: imx8-isi: Simplify code by using helper macro
>       media: nxp: imx8-isi: Reorder the platform data
>       media: nxp: imx8-isi: Add ISI support for i.MX91
> 
>  .../devicetree/bindings/media/nxp,imx8-isi.yaml    | 13 +++++-
>  .../media/platform/nxp/imx8-isi/imx8-isi-core.c    | 50 ++++++++++++++--------
>  .../media/platform/nxp/imx8-isi/imx8-isi-core.h    |  1 +
>  .../media/platform/nxp/imx8-isi/imx8-isi-gasket.c  | 18 ++++++--
>  4 files changed, 59 insertions(+), 23 deletions(-)
> ---
> base-commit: 603957ae903e81fb80d3788297c0f58a68802dfc
> change-id: 20250826-isi_imx93-4a59288b33e4
> 
> Best regards,
> --
> Guoniu Zhou <guoniu.zhou@nxp.com>


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

* Re: [PATCH v2 0/5] media: imx91: Add ISI support
  2025-09-19  2:40 ` [PATCH v2 0/5] media: imx91: Add ISI support G.N. Zhou
@ 2025-09-19 16:11   ` Frank Li
  2025-09-21 16:07     ` Laurent Pinchart
  0 siblings, 1 reply; 21+ messages in thread
From: Frank Li @ 2025-09-19 16:11 UTC (permalink / raw)
  To: G.N. Zhou
  Cc: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Alice Yuan, Krzysztof Kozlowski

On Fri, Sep 19, 2025 at 02:40:01AM +0000, G.N. Zhou wrote:
> Hi,
>
> Could you help to please review the patches which I have submitted some time back to linux media community and move forward driver part if possible.
> Your feedback will be very appreciated. Thanks.
>
> Best Regards
> G.N Zhou
>

Laurent Pinchart:

	Could you please consider pickup these patches? Consider these
related simple changes, is my Reviewed-by enough?

Frank

> >
> > Add ISI support for i.MX91 chip.
> >
> > The bellow patch refine code, no functions changed.
> >    media: nxp: imx8-isi: Simplify code by using helper macro
> >    media: nxp: imx8-isi: Reorder the platform data
> >
> > The bindings and driver patch for i.MX91 ISI.
> >    media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
> >    media: nxp: imx8-isi: Add ISI support for i.MX91
> >
> > Add parallel camera input for i.MX93 ISI.
> >    media: nxp: imx8-isi: Add parallel camera input support
> >
> > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > ---
> > Changes in v2:
> > - Update commit log in patch 5 to better describe why introduce it.
> > - Include two header files in patch 2 since kernel test robot report build
> >   issue when arch is riscv and compiler is clang-22.
> >   #include <linux/bitfield.h>
> >   #include <linux/bits.h>
> > - Link to v1: https://lore.kernel.org/all/20250827-isi_imx93-v1-0-
> > 83e6b4b50c4d@nxp.com
> >
> > ---
> > Alice Yuan (2):
> >       media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
> >       media: nxp: imx8-isi: Add parallel camera input support
> >
> > Guoniu Zhou (3):
> >       media: nxp: imx8-isi: Simplify code by using helper macro
> >       media: nxp: imx8-isi: Reorder the platform data
> >       media: nxp: imx8-isi: Add ISI support for i.MX91
> >
> >  .../devicetree/bindings/media/nxp,imx8-isi.yaml    | 13 +++++-
> >  .../media/platform/nxp/imx8-isi/imx8-isi-core.c    | 50 ++++++++++++++--------
> >  .../media/platform/nxp/imx8-isi/imx8-isi-core.h    |  1 +
> >  .../media/platform/nxp/imx8-isi/imx8-isi-gasket.c  | 18 ++++++--
> >  4 files changed, 59 insertions(+), 23 deletions(-)
> > ---
> > base-commit: 603957ae903e81fb80d3788297c0f58a68802dfc
> > change-id: 20250826-isi_imx93-4a59288b33e4
> >
> > Best regards,
> > --
> > Guoniu Zhou <guoniu.zhou@nxp.com>
>

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

* Re: [PATCH v2 0/5] media: imx91: Add ISI support
  2025-09-19 16:11   ` Frank Li
@ 2025-09-21 16:07     ` Laurent Pinchart
  2025-09-21 22:30       ` Laurent Pinchart
  0 siblings, 1 reply; 21+ messages in thread
From: Laurent Pinchart @ 2025-09-21 16:07 UTC (permalink / raw)
  To: Frank Li
  Cc: G.N. Zhou, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Alice Yuan, Krzysztof Kozlowski

Hi Frank,

On Fri, Sep 19, 2025 at 12:11:38PM -0400, Frank Li wrote:
> On Fri, Sep 19, 2025 at 02:40:01AM +0000, G.N. Zhou wrote:
> > Hi,
> >
> > Could you help to please review the patches which I have submitted
> > some time back to linux media community and move forward driver part
> > if possible.
> > 
> > Your feedback will be very appreciated. Thanks.
> >
> > Best Regards
> > G.N Zhou
> >
> 
> Laurent Pinchart:
> 
> 	Could you please consider pickup these patches? Consider these
> related simple changes, is my Reviewed-by enough?

I've completed a set of other reviews and will get to this patch series
in the upcoming week.

> > >
> > > Add ISI support for i.MX91 chip.
> > >
> > > The bellow patch refine code, no functions changed.
> > >    media: nxp: imx8-isi: Simplify code by using helper macro
> > >    media: nxp: imx8-isi: Reorder the platform data
> > >
> > > The bindings and driver patch for i.MX91 ISI.
> > >    media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
> > >    media: nxp: imx8-isi: Add ISI support for i.MX91
> > >
> > > Add parallel camera input for i.MX93 ISI.
> > >    media: nxp: imx8-isi: Add parallel camera input support
> > >
> > > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > > ---
> > > Changes in v2:
> > > - Update commit log in patch 5 to better describe why introduce it.
> > > - Include two header files in patch 2 since kernel test robot report build
> > >   issue when arch is riscv and compiler is clang-22.
> > >   #include <linux/bitfield.h>
> > >   #include <linux/bits.h>
> > > - Link to v1: https://lore.kernel.org/all/20250827-isi_imx93-v1-0-
> > > 83e6b4b50c4d@nxp.com
> > >
> > > ---
> > > Alice Yuan (2):
> > >       media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
> > >       media: nxp: imx8-isi: Add parallel camera input support
> > >
> > > Guoniu Zhou (3):
> > >       media: nxp: imx8-isi: Simplify code by using helper macro
> > >       media: nxp: imx8-isi: Reorder the platform data
> > >       media: nxp: imx8-isi: Add ISI support for i.MX91
> > >
> > >  .../devicetree/bindings/media/nxp,imx8-isi.yaml    | 13 +++++-
> > >  .../media/platform/nxp/imx8-isi/imx8-isi-core.c    | 50 ++++++++++++++--------
> > >  .../media/platform/nxp/imx8-isi/imx8-isi-core.h    |  1 +
> > >  .../media/platform/nxp/imx8-isi/imx8-isi-gasket.c  | 18 ++++++--
> > >  4 files changed, 59 insertions(+), 23 deletions(-)
> > > ---
> > > base-commit: 603957ae903e81fb80d3788297c0f58a68802dfc
> > > change-id: 20250826-isi_imx93-4a59288b33e4

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v2 1/5] media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
  2025-09-05  6:55 ` [PATCH v2 1/5] media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string Guoniu Zhou
@ 2025-09-21 22:10   ` Laurent Pinchart
  0 siblings, 0 replies; 21+ messages in thread
From: Laurent Pinchart @ 2025-09-21 22:10 UTC (permalink / raw)
  To: Guoniu Zhou
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Frank Li, linux-media, devicetree, imx,
	linux-arm-kernel, linux-kernel, Alice Yuan, Krzysztof Kozlowski

On Fri, Sep 05, 2025 at 02:55:58PM +0800, Guoniu Zhou wrote:
> From: Alice Yuan <alice.yuan@nxp.com>
> 
> The ISI module on i.MX91 is reused from i.MX93 and implements one channel
> and one camera input which only can be connected to parallel camera input.
> So needn't to select camera source like i.MX93 in gasket ops.
> 
> Signed-off-by: Alice Yuan <alice.yuan@nxp.com>
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>

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

> ---
>  Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml | 13 ++++++++++++-
>  1 file changed, 12 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> index f43b91984f0152fbbcf80db3b3bbad7e8ad6c11e..001a0d9b71e096db3f543adaad40b84af378d707 100644
> --- a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> +++ b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> @@ -22,6 +22,7 @@ properties:
>        - fsl,imx8mn-isi
>        - fsl,imx8mp-isi
>        - fsl,imx8ulp-isi
> +      - fsl,imx91-isi
>        - fsl,imx93-isi
>  
>    reg:
> @@ -66,7 +67,6 @@ required:
>    - interrupts
>    - clocks
>    - clock-names
> -  - fsl,blk-ctrl
>    - ports
>  
>  allOf:
> @@ -77,6 +77,7 @@ allOf:
>              enum:
>                - fsl,imx8mn-isi
>                - fsl,imx8ulp-isi
> +              - fsl,imx91-isi
>                - fsl,imx93-isi
>      then:
>        properties:
> @@ -109,6 +110,16 @@ allOf:
>              - port@0
>              - port@1
>  
> +  - if:
> +      properties:
> +        compatible:
> +          not:
> +            contains:
> +              const: fsl,imx91-isi
> +    then:
> +      required:
> +        - fsl,blk-ctrl
> +
>  additionalProperties: false
>  
>  examples:

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v2 2/5] media: nxp: imx8-isi: Simplify code by using helper macro
  2025-09-05  6:55 ` [PATCH v2 2/5] media: nxp: imx8-isi: Simplify code by using helper macro Guoniu Zhou
@ 2025-09-21 22:13   ` Laurent Pinchart
  2025-09-22  2:03     ` [EXT] " G.N. Zhou
  0 siblings, 1 reply; 21+ messages in thread
From: Laurent Pinchart @ 2025-09-21 22:13 UTC (permalink / raw)
  To: Guoniu Zhou
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Frank Li, linux-media, devicetree, imx,
	linux-arm-kernel, linux-kernel

Hi Guoniu,

Thank you for the patch.

On Fri, Sep 05, 2025 at 02:55:59PM +0800, Guoniu Zhou wrote:
> Simplify code by using helper macro FIELD_PREP() and GENMASK().

I'm not necessarily against this change, but how does it "simplify code"
? There's no change in the code beside the macros, and they don't look
particularly simpler.

> No functions changed.
> 
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> ---
>  drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c | 7 ++++---
>  1 file changed, 4 insertions(+), 3 deletions(-)
> 
> 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..2f5e7299b537d612fb1fe6688c1b75bfd2d6049b 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,8 @@
>   * Copyright 2019-2023 NXP
>   */
>  
> +#include <linux/bitfield.h>
> +#include <linux/bits.h>
>  #include <linux/regmap.h>
>  
>  #include <media/mipi-csi2.h>
> @@ -16,8 +18,7 @@
>  #define GASKET_BASE(n)				(0x0060 + (n) * 0x30)
>  
>  #define GASKET_CTRL				0x0000
> -#define GASKET_CTRL_DATA_TYPE(dt)		((dt) << 8)
> -#define GASKET_CTRL_DATA_TYPE_MASK		(0x3f << 8)
> +#define GASKET_CTRL_DATA_TYPE(dt)		FIELD_PREP(GENMASK(13, 8), (dt))

I think you can omit the parentheses around dt here, and around x below.

>  #define GASKET_CTRL_DUAL_COMP_ENABLE		BIT(1)
>  #define GASKET_CTRL_ENABLE			BIT(0)
>  
> @@ -58,7 +59,7 @@ const struct mxc_gasket_ops mxc_imx8_gasket_ops = {
>   */
>  
>  #define DISP_MIX_CAMERA_MUX                     0x30
> -#define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)        (((x) & 0x3f) << 3)
> +#define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)        FIELD_PREP(GENMASK(8, 3), (x))
>  #define DISP_MIX_CAMERA_MUX_GASKET_ENABLE       BIT(16)
>  
>  static void mxc_imx93_gasket_enable(struct mxc_isi_dev *isi,

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v2 3/5] media: nxp: imx8-isi: Add parallel camera input support
  2025-09-05  6:56 ` [PATCH v2 3/5] media: nxp: imx8-isi: Add parallel camera input support Guoniu Zhou
@ 2025-09-21 22:18   ` Laurent Pinchart
  2025-09-22  2:16     ` [EXT] " G.N. Zhou
  0 siblings, 1 reply; 21+ messages in thread
From: Laurent Pinchart @ 2025-09-21 22:18 UTC (permalink / raw)
  To: Guoniu Zhou
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Frank Li, linux-media, devicetree, imx,
	linux-arm-kernel, linux-kernel, Alice Yuan

Hi Guoniu,

Thank you for the patch.

The subject line should mention the i.MX93:

media: nxp: imx8-isi: Add parallel camera input support for i.MX93

On Fri, Sep 05, 2025 at 02:56:00PM +0800, Guoniu Zhou wrote:
> From: Alice Yuan <alice.yuan@nxp.com>
> 
> The ISI module on i.MX93 implements one camera input which can be
> connected to either of MIPI CSI-2 or parallel camera. The source
> type can be selected by setting camera mux control register.
> 
> Signed-off-by: Alice Yuan <alice.yuan@nxp.com>
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> ---
>  drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> 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 2f5e7299b537d612fb1fe6688c1b75bfd2d6049b..42b2ed2bbdf7259bc83d0678256343a3b606568a 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c
> @@ -61,6 +61,7 @@ const struct mxc_gasket_ops mxc_imx8_gasket_ops = {
>  #define DISP_MIX_CAMERA_MUX                     0x30
>  #define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)        FIELD_PREP(GENMASK(8, 3), (x))
>  #define DISP_MIX_CAMERA_MUX_GASKET_ENABLE       BIT(16)
> +#define DISP_MIX_CAMERA_MUX_GASKET_SRC          BIT(17)

Let's spell this out fully to match the reference manual:

#define DISP_MIX_CAMERA_MUX_GASKET_SOURCE_TYPE  BIT(17)

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

>  static void mxc_imx93_gasket_enable(struct mxc_isi_dev *isi,
>  				    const struct v4l2_mbus_frame_desc *fd,
> @@ -71,6 +72,16 @@ static void mxc_imx93_gasket_enable(struct mxc_isi_dev *isi,
>  
>  	val = DISP_MIX_CAMERA_MUX_DATA_TYPE(fd->entry[0].bus.csi2.dt);
>  	val |= DISP_MIX_CAMERA_MUX_GASKET_ENABLE;
> +
> +	/*
> +	 * CAMERA MUX
> +	 * - [17]:	Selects source input to gasket
> +	 *		0: Data from MIPI CSI
> +	 *		1: Data from parallel camera
> +	 */
> +	if (fd->type == V4L2_MBUS_FRAME_DESC_TYPE_PARALLEL)
> +		val |= DISP_MIX_CAMERA_MUX_GASKET_SRC;
> +
>  	regmap_write(isi->gasket, DISP_MIX_CAMERA_MUX, val);
>  }
>  

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v2 4/5] media: nxp: imx8-isi: Reorder the platform data
  2025-09-05  6:56 ` [PATCH v2 4/5] media: nxp: imx8-isi: Reorder the platform data Guoniu Zhou
@ 2025-09-21 22:20   ` Laurent Pinchart
  0 siblings, 0 replies; 21+ messages in thread
From: Laurent Pinchart @ 2025-09-21 22:20 UTC (permalink / raw)
  To: Guoniu Zhou
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Frank Li, linux-media, devicetree, imx,
	linux-arm-kernel, linux-kernel

Hi Guoniu,

Thank you for the patch.

On Fri, Sep 05, 2025 at 02:56:01PM +0800, Guoniu Zhou wrote:
> Sort platform data in the order of compatible strings in of_match table
> to make it more convenient to read.
> 
> No functions changed.
> 
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>

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

> ---
>  .../media/platform/nxp/imx8-isi/imx8-isi-core.c    | 44 +++++++++++-----------
>  1 file changed, 22 insertions(+), 22 deletions(-)
> 
> 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..0155c75983f02f33f7f0669e73188222ebb5e816 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
> @@ -314,6 +314,28 @@ static const struct mxc_isi_plat_data mxc_imx8mp_data = {
>  	.has_36bit_dma		= true,
>  };
>  
> +static const struct mxc_isi_plat_data mxc_imx8qm_data = {
> +	.model			= MXC_ISI_IMX8QM,
> +	.num_ports		= 5,
> +	.num_channels		= 8,
> +	.reg_offset		= 0x10000,
> +	.ier_reg		= &mxc_imx8_isi_ier_qm,
> +	.set_thd		= &mxc_imx8_isi_thd_v1,
> +	.buf_active_reverse	= true,
> +	.has_36bit_dma		= false,
> +};
> +
> +static const struct mxc_isi_plat_data mxc_imx8qxp_data = {
> +	.model			= MXC_ISI_IMX8QXP,
> +	.num_ports		= 5,
> +	.num_channels		= 6,
> +	.reg_offset		= 0x10000,
> +	.ier_reg		= &mxc_imx8_isi_ier_v2,
> +	.set_thd		= &mxc_imx8_isi_thd_v1,
> +	.buf_active_reverse	= true,
> +	.has_36bit_dma		= false,
> +};
> +
>  static const struct mxc_isi_plat_data mxc_imx8ulp_data = {
>  	.model			= MXC_ISI_IMX8ULP,
>  	.num_ports		= 1,
> @@ -337,28 +359,6 @@ static const struct mxc_isi_plat_data mxc_imx93_data = {
>  	.has_36bit_dma		= false,
>  };
>  
> -static const struct mxc_isi_plat_data mxc_imx8qm_data = {
> -	.model			= MXC_ISI_IMX8QM,
> -	.num_ports		= 5,
> -	.num_channels		= 8,
> -	.reg_offset		= 0x10000,
> -	.ier_reg		= &mxc_imx8_isi_ier_qm,
> -	.set_thd		= &mxc_imx8_isi_thd_v1,
> -	.buf_active_reverse	= true,
> -	.has_36bit_dma		= false,
> -};
> -
> -static const struct mxc_isi_plat_data mxc_imx8qxp_data = {
> -	.model			= MXC_ISI_IMX8QXP,
> -	.num_ports		= 5,
> -	.num_channels		= 6,
> -	.reg_offset		= 0x10000,
> -	.ier_reg		= &mxc_imx8_isi_ier_v2,
> -	.set_thd		= &mxc_imx8_isi_thd_v1,
> -	.buf_active_reverse	= true,
> -	.has_36bit_dma		= false,
> -};
> -
>  /* -----------------------------------------------------------------------------
>   * Power management
>   */

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v2 5/5] media: nxp: imx8-isi: Add ISI support for i.MX91
  2025-09-05  6:56 ` [PATCH v2 5/5] media: nxp: imx8-isi: Add ISI support for i.MX91 Guoniu Zhou
@ 2025-09-21 22:27   ` Laurent Pinchart
  2025-09-22  2:06     ` [EXT] " G.N. Zhou
  0 siblings, 1 reply; 21+ messages in thread
From: Laurent Pinchart @ 2025-09-21 22:27 UTC (permalink / raw)
  To: Guoniu Zhou
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Frank Li, linux-media, devicetree, imx,
	linux-arm-kernel, linux-kernel

Hi Guoniu,

Thank you for the patch.

On Fri, Sep 05, 2025 at 02:56:02PM +0800, Guoniu Zhou wrote:
> The ISI module on i.MX91 implements only one channel and one parallel
> camera input. As no input source selection is required, gasket ops are
> unnecessary.
> 
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> ---
>  drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 12 ++++++++++++
>  drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h |  1 +
>  2 files changed, 13 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 0155c75983f02f33f7f0669e73188222ebb5e816..c3d411ddf492eb27b372763ce5d344a90c6ec524 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
> @@ -347,6 +347,17 @@ static const struct mxc_isi_plat_data mxc_imx8ulp_data = {
>  	.has_36bit_dma		= false,
>  };
>  
> +static const struct mxc_isi_plat_data mxc_imx91_data = {
> +	.model			= MXC_ISI_IMX91,
> +	.num_ports		= 1,
> +	.num_channels		= 1,
> +	.reg_offset		= 0,
> +	.ier_reg		= &mxc_imx8_isi_ier_v2,
> +	.set_thd		= &mxc_imx8_isi_thd_v1,
> +	.buf_active_reverse	= true,
> +	.has_36bit_dma		= false,
> +};
> +
>  static const struct mxc_isi_plat_data mxc_imx93_data = {
>  	.model			= MXC_ISI_IMX93,
>  	.num_ports		= 1,
> @@ -547,6 +558,7 @@ static const struct of_device_id mxc_isi_of_match[] = {
>  	{ .compatible = "fsl,imx8qm-isi", .data = &mxc_imx8qm_data },
>  	{ .compatible = "fsl,imx8qxp-isi", .data = &mxc_imx8qxp_data },
>  	{ .compatible = "fsl,imx8ulp-isi", .data = &mxc_imx8ulp_data },
> +	{ .compatible = "fsl,imx91-isi", .data = &mxc_imx91_data },
>  	{ .compatible = "fsl,imx93-isi", .data = &mxc_imx93_data },
>  	{ /* sentinel */ },
>  };
> 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..3cbd35305af0f8026c4f76b5eb5d0864f8e36dc3 100644
> --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
> +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
> @@ -160,6 +160,7 @@ enum model {
>  	MXC_ISI_IMX8QM,
>  	MXC_ISI_IMX8QXP,
>  	MXC_ISI_IMX8ULP,
> +	MXC_ISI_IMX91,
>  	MXC_ISI_IMX93,
>  };

The model field is unused, should we drop it ? That's a candidate for a
separate patch, for this patch

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

>  

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH v2 0/5] media: imx91: Add ISI support
  2025-09-21 16:07     ` Laurent Pinchart
@ 2025-09-21 22:30       ` Laurent Pinchart
  2025-09-22  2:10         ` [EXT] " G.N. Zhou
  0 siblings, 1 reply; 21+ messages in thread
From: Laurent Pinchart @ 2025-09-21 22:30 UTC (permalink / raw)
  To: Frank Li
  Cc: G.N. Zhou, Mauro Carvalho Chehab, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam,
	linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Alice Yuan, Krzysztof Kozlowski

On Sun, Sep 21, 2025 at 07:07:06PM +0300, Laurent Pinchart wrote:
> On Fri, Sep 19, 2025 at 12:11:38PM -0400, Frank Li wrote:
> > On Fri, Sep 19, 2025 at 02:40:01AM +0000, G.N. Zhou wrote:
> > > Hi,
> > >
> > > Could you help to please review the patches which I have submitted
> > > some time back to linux media community and move forward driver part
> > > if possible.
> > > 
> > > Your feedback will be very appreciated. Thanks.
> > >
> > > Best Regards
> > > G.N Zhou
> > 
> > Laurent Pinchart:
> > 
> > 	Could you please consider pickup these patches? Consider these
> > related simple changes, is my Reviewed-by enough?
> 
> I've completed a set of other reviews and will get to this patch series
> in the upcoming week.

There's just an open question on 2/5. It's about the commit message, so
it shouldn't be a big deal. Once I get a reply to that, I can apply the
series with the small proposed changes, there's no need to submit a v3,
unless you prefer doing so.

> > > >
> > > > Add ISI support for i.MX91 chip.
> > > >
> > > > The bellow patch refine code, no functions changed.
> > > >    media: nxp: imx8-isi: Simplify code by using helper macro
> > > >    media: nxp: imx8-isi: Reorder the platform data
> > > >
> > > > The bindings and driver patch for i.MX91 ISI.
> > > >    media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
> > > >    media: nxp: imx8-isi: Add ISI support for i.MX91
> > > >
> > > > Add parallel camera input for i.MX93 ISI.
> > > >    media: nxp: imx8-isi: Add parallel camera input support
> > > >
> > > > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > > > ---
> > > > Changes in v2:
> > > > - Update commit log in patch 5 to better describe why introduce it.
> > > > - Include two header files in patch 2 since kernel test robot report build
> > > >   issue when arch is riscv and compiler is clang-22.
> > > >   #include <linux/bitfield.h>
> > > >   #include <linux/bits.h>
> > > > - Link to v1: https://lore.kernel.org/all/20250827-isi_imx93-v1-0-
> > > > 83e6b4b50c4d@nxp.com
> > > >
> > > > ---
> > > > Alice Yuan (2):
> > > >       media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
> > > >       media: nxp: imx8-isi: Add parallel camera input support
> > > >
> > > > Guoniu Zhou (3):
> > > >       media: nxp: imx8-isi: Simplify code by using helper macro
> > > >       media: nxp: imx8-isi: Reorder the platform data
> > > >       media: nxp: imx8-isi: Add ISI support for i.MX91
> > > >
> > > >  .../devicetree/bindings/media/nxp,imx8-isi.yaml    | 13 +++++-
> > > >  .../media/platform/nxp/imx8-isi/imx8-isi-core.c    | 50 ++++++++++++++--------
> > > >  .../media/platform/nxp/imx8-isi/imx8-isi-core.h    |  1 +
> > > >  .../media/platform/nxp/imx8-isi/imx8-isi-gasket.c  | 18 ++++++--
> > > >  4 files changed, 59 insertions(+), 23 deletions(-)
> > > > ---
> > > > base-commit: 603957ae903e81fb80d3788297c0f58a68802dfc
> > > > change-id: 20250826-isi_imx93-4a59288b33e4

-- 
Regards,

Laurent Pinchart

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

* RE: [EXT] Re: [PATCH v2 2/5] media: nxp: imx8-isi: Simplify code by using helper macro
  2025-09-21 22:13   ` Laurent Pinchart
@ 2025-09-22  2:03     ` G.N. Zhou
  2025-11-02 23:14       ` Laurent Pinchart
  0 siblings, 1 reply; 21+ messages in thread
From: G.N. Zhou @ 2025-09-22  2:03 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Frank Li, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

Hi Laurent,

Thanks for your reviewing.

> -----Original Message-----
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Sent: Monday, September 22, 2025 6:13 AM
> To: G.N. Zhou <guoniu.zhou@nxp.com>
> Cc: 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>; Frank Li
> <frank.li@nxp.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
> Subject: [EXT] Re: [PATCH v2 2/5] media: nxp: imx8-isi: Simplify code by using
> helper macro
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
> 
> 
> Hi Guoniu,
> 
> Thank you for the patch.
> 
> On Fri, Sep 05, 2025 at 02:55:59PM +0800, Guoniu Zhou wrote:
> > Simplify code by using helper macro FIELD_PREP() and GENMASK().
> 
> I'm not necessarily against this change, but how does it "simplify code"
> ? There's no change in the code beside the macros, and they don't look
> particularly simpler.

How about the message body change to " Make code more readable and easier to maintain by
using the FIELD_PREP and GENMASK(). macro" and title change to "Refine code by using helper macro"?
If you agree, I could apply it in next version.

> 
> > No functions changed.
> >
> > Reviewed-by: Frank Li <Frank.Li@nxp.com>
> > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > ---
> >  drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c | 7 ++++---
> >  1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > 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..2f5e7299b537d612fb1fe668
> 8c1b
> > 75bfd2d6049b 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,8 @@
> >   * Copyright 2019-2023 NXP
> >   */
> >
> > +#include <linux/bitfield.h>
> > +#include <linux/bits.h>
> >  #include <linux/regmap.h>
> >
> >  #include <media/mipi-csi2.h>
> > @@ -16,8 +18,7 @@
> >  #define GASKET_BASE(n)                               (0x0060 + (n) * 0x30)
> >
> >  #define GASKET_CTRL                          0x0000
> > -#define GASKET_CTRL_DATA_TYPE(dt)            ((dt) << 8)
> > -#define GASKET_CTRL_DATA_TYPE_MASK           (0x3f << 8)
> > +#define GASKET_CTRL_DATA_TYPE(dt)            FIELD_PREP(GENMASK(13, 8),
> (dt))
> 
> I think you can omit the parentheses around dt here, and around x below.

Ok, will apply in next version.

> 
> >  #define GASKET_CTRL_DUAL_COMP_ENABLE         BIT(1)
> >  #define GASKET_CTRL_ENABLE                   BIT(0)
> >
> > @@ -58,7 +59,7 @@ const struct mxc_gasket_ops mxc_imx8_gasket_ops = {
> >   */
> >
> >  #define DISP_MIX_CAMERA_MUX                     0x30
> > -#define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)        (((x) & 0x3f) << 3)
> > +#define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)
> FIELD_PREP(GENMASK(8, 3), (x))
> >  #define DISP_MIX_CAMERA_MUX_GASKET_ENABLE       BIT(16)
> >
> >  static void mxc_imx93_gasket_enable(struct mxc_isi_dev *isi,
> 
> --
> Regards,
> 
> Laurent Pinchart

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

* RE: [EXT] Re: [PATCH v2 5/5] media: nxp: imx8-isi: Add ISI support for i.MX91
  2025-09-21 22:27   ` Laurent Pinchart
@ 2025-09-22  2:06     ` G.N. Zhou
  0 siblings, 0 replies; 21+ messages in thread
From: G.N. Zhou @ 2025-09-22  2:06 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Frank Li, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

Hi Laurent,

Thanks for your review.

> -----Original Message-----
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Sent: Monday, September 22, 2025 6:28 AM
> To: G.N. Zhou <guoniu.zhou@nxp.com>
> Cc: 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>; Frank Li
> <frank.li@nxp.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
> Subject: [EXT] Re: [PATCH v2 5/5] media: nxp: imx8-isi: Add ISI support for
> i.MX91
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
> 
> 
> Hi Guoniu,
> 
> Thank you for the patch.
> 
> On Fri, Sep 05, 2025 at 02:56:02PM +0800, Guoniu Zhou wrote:
> > The ISI module on i.MX91 implements only one channel and one parallel
> > camera input. As no input source selection is required, gasket ops are
> > unnecessary.
> >
> > Reviewed-by: Frank Li <Frank.Li@nxp.com>
> > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > ---
> >  drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 12 ++++++++++++
> > drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h |  1 +
> >  2 files changed, 13 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
> >
> 0155c75983f02f33f7f0669e73188222ebb5e816..c3d411ddf492eb27b372763c
> e5d3
> > 44a90c6ec524 100644
> > --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
> > +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c
> > @@ -347,6 +347,17 @@ static const struct mxc_isi_plat_data
> mxc_imx8ulp_data = {
> >       .has_36bit_dma          = false,
> >  };
> >
> > +static const struct mxc_isi_plat_data mxc_imx91_data = {
> > +     .model                  = MXC_ISI_IMX91,
> > +     .num_ports              = 1,
> > +     .num_channels           = 1,
> > +     .reg_offset             = 0,
> > +     .ier_reg                = &mxc_imx8_isi_ier_v2,
> > +     .set_thd                = &mxc_imx8_isi_thd_v1,
> > +     .buf_active_reverse     = true,
> > +     .has_36bit_dma          = false,
> > +};
> > +
> >  static const struct mxc_isi_plat_data mxc_imx93_data = {
> >       .model                  = MXC_ISI_IMX93,
> >       .num_ports              = 1,
> > @@ -547,6 +558,7 @@ static const struct of_device_id mxc_isi_of_match[] =
> {
> >       { .compatible = "fsl,imx8qm-isi", .data = &mxc_imx8qm_data },
> >       { .compatible = "fsl,imx8qxp-isi", .data = &mxc_imx8qxp_data },
> >       { .compatible = "fsl,imx8ulp-isi", .data = &mxc_imx8ulp_data },
> > +     { .compatible = "fsl,imx91-isi", .data = &mxc_imx91_data },
> >       { .compatible = "fsl,imx93-isi", .data = &mxc_imx93_data },
> >       { /* sentinel */ },
> >  };
> > 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..3cbd35305af0f8026c4f76b5
> eb5d
> > 0864f8e36dc3 100644
> > --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
> > +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.h
> > @@ -160,6 +160,7 @@ enum model {
> >       MXC_ISI_IMX8QM,
> >       MXC_ISI_IMX8QXP,
> >       MXC_ISI_IMX8ULP,
> > +     MXC_ISI_IMX91,
> >       MXC_ISI_IMX93,
> >  };
> 
> The model field is unused, should we drop it ? That's a candidate for a separate
> patch, for this patch

Agree.

> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> >
> 
> --
> Regards,
> 
> Laurent Pinchart

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

* RE: [EXT] Re: [PATCH v2 0/5] media: imx91: Add ISI support
  2025-09-21 22:30       ` Laurent Pinchart
@ 2025-09-22  2:10         ` G.N. Zhou
  0 siblings, 0 replies; 21+ messages in thread
From: G.N. Zhou @ 2025-09-22  2:10 UTC (permalink / raw)
  To: Laurent Pinchart, Frank Li
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Alice Yuan, Krzysztof Kozlowski

Hi Laurent,

Many thanks for you reviews.

> -----Original Message-----
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Sent: Monday, September 22, 2025 6:31 AM
> To: Frank Li <frank.li@nxp.com>
> Cc: G.N. Zhou <guoniu.zhou@nxp.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; Alice Yuan
> <alice.yuan@nxp.com>; Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> Subject: [EXT] Re: [PATCH v2 0/5] media: imx91: Add ISI support
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
> 
> 
> On Sun, Sep 21, 2025 at 07:07:06PM +0300, Laurent Pinchart wrote:
> > On Fri, Sep 19, 2025 at 12:11:38PM -0400, Frank Li wrote:
> > > On Fri, Sep 19, 2025 at 02:40:01AM +0000, G.N. Zhou wrote:
> > > > Hi,
> > > >
> > > > Could you help to please review the patches which I have submitted
> > > > some time back to linux media community and move forward driver
> > > > part if possible.
> > > >
> > > > Your feedback will be very appreciated. Thanks.
> > > >
> > > > Best Regards
> > > > G.N Zhou
> > >
> > > Laurent Pinchart:
> > >
> > >     Could you please consider pickup these patches? Consider these
> > > related simple changes, is my Reviewed-by enough?
> >
> > I've completed a set of other reviews and will get to this patch
> > series in the upcoming week.
> 
> There's just an open question on 2/5. It's about the commit message, so it
> shouldn't be a big deal. Once I get a reply to that, I can apply the series with the
> small proposed changes, there's no need to submit a v3, unless you prefer
> doing so.

I'm very happy to follow your advices and apply on your side as you said. Thank you very much.

> 
> > > > >
> > > > > Add ISI support for i.MX91 chip.
> > > > >
> > > > > The bellow patch refine code, no functions changed.
> > > > >    media: nxp: imx8-isi: Simplify code by using helper macro
> > > > >    media: nxp: imx8-isi: Reorder the platform data
> > > > >
> > > > > The bindings and driver patch for i.MX91 ISI.
> > > > >    media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
> > > > >    media: nxp: imx8-isi: Add ISI support for i.MX91
> > > > >
> > > > > Add parallel camera input for i.MX93 ISI.
> > > > >    media: nxp: imx8-isi: Add parallel camera input support
> > > > >
> > > > > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > > > > ---
> > > > > Changes in v2:
> > > > > - Update commit log in patch 5 to better describe why introduce it.
> > > > > - Include two header files in patch 2 since kernel test robot report build
> > > > >   issue when arch is riscv and compiler is clang-22.
> > > > >   #include <linux/bitfield.h>
> > > > >   #include <linux/bits.h>
> > > > > - Link to v1:
> > > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%
> > > > > 2Flore.kernel.org%2Fall%2F20250827-isi_imx93-v1-0-
> &data=05%7C02%
> > > > >
> 7Cguoniu.zhou%40nxp.com%7C160464d861a24abf246e08ddf95e93bd%7C68
> 6
> > > > >
> ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C638940906787985916%7C
> Unk
> > > > >
> nown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCI
> sI
> > > > >
> lAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sda
> > > > >
> ta=MJUx0UV12LxPISHvimNpvs6Sfc8qxXr4Yrrix2N8%2BF8%3D&reserved=0
> > > > > 83e6b4b50c4d@nxp.com
> > > > >
> > > > > ---
> > > > > Alice Yuan (2):
> > > > >       media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string
> > > > >       media: nxp: imx8-isi: Add parallel camera input support
> > > > >
> > > > > Guoniu Zhou (3):
> > > > >       media: nxp: imx8-isi: Simplify code by using helper macro
> > > > >       media: nxp: imx8-isi: Reorder the platform data
> > > > >       media: nxp: imx8-isi: Add ISI support for i.MX91
> > > > >
> > > > >  .../devicetree/bindings/media/nxp,imx8-isi.yaml    | 13 +++++-
> > > > >  .../media/platform/nxp/imx8-isi/imx8-isi-core.c    | 50
> ++++++++++++++--------
> > > > >  .../media/platform/nxp/imx8-isi/imx8-isi-core.h    |  1 +
> > > > >  .../media/platform/nxp/imx8-isi/imx8-isi-gasket.c  | 18
> > > > > ++++++--
> > > > >  4 files changed, 59 insertions(+), 23 deletions(-)
> > > > > ---
> > > > > base-commit: 603957ae903e81fb80d3788297c0f58a68802dfc
> > > > > change-id: 20250826-isi_imx93-4a59288b33e4
> 
> --
> Regards,
> 
> Laurent Pinchart

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

* RE: [EXT] Re: [PATCH v2 3/5] media: nxp: imx8-isi: Add parallel camera input support
  2025-09-21 22:18   ` Laurent Pinchart
@ 2025-09-22  2:16     ` G.N. Zhou
  0 siblings, 0 replies; 21+ messages in thread
From: G.N. Zhou @ 2025-09-22  2:16 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Frank Li, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, Alice Yuan

Hi Laurent,

Thanks for your review.

> -----Original Message-----
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Sent: Monday, September 22, 2025 6:19 AM
> To: G.N. Zhou <guoniu.zhou@nxp.com>
> Cc: 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>; Frank Li
> <frank.li@nxp.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; Alice Yuan <alice.yuan@nxp.com>
> Subject: [EXT] Re: [PATCH v2 3/5] media: nxp: imx8-isi: Add parallel camera
> input support
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
> 
> 
> Hi Guoniu,
> 
> Thank you for the patch.
> 
> The subject line should mention the i.MX93:
> 
> media: nxp: imx8-isi: Add parallel camera input support for i.MX93

Okay.

> 
> On Fri, Sep 05, 2025 at 02:56:00PM +0800, Guoniu Zhou wrote:
> > From: Alice Yuan <alice.yuan@nxp.com>
> >
> > The ISI module on i.MX93 implements one camera input which can be
> > connected to either of MIPI CSI-2 or parallel camera. The source type
> > can be selected by setting camera mux control register.
> >
> > Signed-off-by: Alice Yuan <alice.yuan@nxp.com>
> > Reviewed-by: Frank Li <Frank.Li@nxp.com>
> > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > ---
> >  drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c | 11
> > +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> > 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
> >
> 2f5e7299b537d612fb1fe6688c1b75bfd2d6049b..42b2ed2bbdf7259bc83d0678
> 2563
> > 43a3b606568a 100644
> > --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c
> > +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c
> > @@ -61,6 +61,7 @@ const struct mxc_gasket_ops mxc_imx8_gasket_ops = {
> >  #define DISP_MIX_CAMERA_MUX                     0x30
> >  #define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)
> FIELD_PREP(GENMASK(8, 3), (x))
> >  #define DISP_MIX_CAMERA_MUX_GASKET_ENABLE       BIT(16)
> > +#define DISP_MIX_CAMERA_MUX_GASKET_SRC          BIT(17)
> 
> Let's spell this out fully to match the reference manual:
> 
> #define DISP_MIX_CAMERA_MUX_GASKET_SOURCE_TYPE  BIT(17)
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> >  static void mxc_imx93_gasket_enable(struct mxc_isi_dev *isi,
> >                                   const struct v4l2_mbus_frame_desc
> > *fd, @@ -71,6 +72,16 @@ static void mxc_imx93_gasket_enable(struct
> > mxc_isi_dev *isi,
> >
> >       val = DISP_MIX_CAMERA_MUX_DATA_TYPE(fd->entry[0].bus.csi2.dt);
> >       val |= DISP_MIX_CAMERA_MUX_GASKET_ENABLE;
> > +
> > +     /*
> > +      * CAMERA MUX
> > +      * - [17]:      Selects source input to gasket
> > +      *              0: Data from MIPI CSI
> > +      *              1: Data from parallel camera
> > +      */
> > +     if (fd->type == V4L2_MBUS_FRAME_DESC_TYPE_PARALLEL)
> > +             val |= DISP_MIX_CAMERA_MUX_GASKET_SRC;
> > +
> >       regmap_write(isi->gasket, DISP_MIX_CAMERA_MUX, val);  }
> >
> 
> --
> Regards,
> 
> Laurent Pinchart

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

* Re: [EXT] Re: [PATCH v2 2/5] media: nxp: imx8-isi: Simplify code by using helper macro
  2025-09-22  2:03     ` [EXT] " G.N. Zhou
@ 2025-11-02 23:14       ` Laurent Pinchart
  2025-11-03  2:03         ` G.N. Zhou
  0 siblings, 1 reply; 21+ messages in thread
From: Laurent Pinchart @ 2025-11-02 23:14 UTC (permalink / raw)
  To: G.N. Zhou
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Frank Li, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

On Mon, Sep 22, 2025 at 02:03:44AM +0000, G.N. Zhou wrote:
> On Monday, September 22, 2025 6:13 AM, Laurent Pinchart wrote:
> > On Fri, Sep 05, 2025 at 02:55:59PM +0800, Guoniu Zhou wrote:
> > > Simplify code by using helper macro FIELD_PREP() and GENMASK().
> > 
> > I'm not necessarily against this change, but how does it "simplify code"
> > ? There's no change in the code beside the macros, and they don't look
> > particularly simpler.
> 
> How about the message body change to " Make code more readable and easier to maintain by
> using the FIELD_PREP and GENMASK(). macro" and title change to "Refine code by using helper macro"?
> If you agree, I could apply it in next version.

No need to send a new version, I'll update the commit message myself.

> > > No functions changed.
> > >
> > > Reviewed-by: Frank Li <Frank.Li@nxp.com>
> > > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > > ---
> > >  drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c | 7 ++++---
> > >  1 file changed, 4 insertions(+), 3 deletions(-)
> > >
> > > 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..2f5e7299b537d612fb1fe668
> > 8c1b
> > > 75bfd2d6049b 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,8 @@
> > >   * Copyright 2019-2023 NXP
> > >   */
> > >
> > > +#include <linux/bitfield.h>
> > > +#include <linux/bits.h>
> > >  #include <linux/regmap.h>
> > >
> > >  #include <media/mipi-csi2.h>
> > > @@ -16,8 +18,7 @@
> > >  #define GASKET_BASE(n)                               (0x0060 + (n) * 0x30)
> > >
> > >  #define GASKET_CTRL                          0x0000
> > > -#define GASKET_CTRL_DATA_TYPE(dt)            ((dt) << 8)
> > > -#define GASKET_CTRL_DATA_TYPE_MASK           (0x3f << 8)
> > > +#define GASKET_CTRL_DATA_TYPE(dt)            FIELD_PREP(GENMASK(13, 8),
> > (dt))
> > 
> > I think you can omit the parentheses around dt here, and around x below.
> 
> Ok, will apply in next version.
> 
> > 
> > >  #define GASKET_CTRL_DUAL_COMP_ENABLE         BIT(1)
> > >  #define GASKET_CTRL_ENABLE                   BIT(0)
> > >
> > > @@ -58,7 +59,7 @@ const struct mxc_gasket_ops mxc_imx8_gasket_ops = {
> > >   */
> > >
> > >  #define DISP_MIX_CAMERA_MUX                     0x30
> > > -#define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)        (((x) & 0x3f) << 3)
> > > +#define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)
> > FIELD_PREP(GENMASK(8, 3), (x))
> > >  #define DISP_MIX_CAMERA_MUX_GASKET_ENABLE       BIT(16)
> > >
> > >  static void mxc_imx93_gasket_enable(struct mxc_isi_dev *isi,

-- 
Regards,

Laurent Pinchart

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

* RE: [EXT] Re: [PATCH v2 2/5] media: nxp: imx8-isi: Simplify code by using helper macro
  2025-11-02 23:14       ` Laurent Pinchart
@ 2025-11-03  2:03         ` G.N. Zhou
  0 siblings, 0 replies; 21+ messages in thread
From: G.N. Zhou @ 2025-11-03  2:03 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Mauro Carvalho Chehab, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, Frank Li, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, imx@lists.linux.dev,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org

Got it. Thanks.

Best Regards
G.N Zhou


> -----Original Message-----
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Sent: Monday, November 3, 2025 7:15 AM
> To: G.N. Zhou <guoniu.zhou@nxp.com>
> Cc: 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>; Frank Li
> <frank.li@nxp.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
> Subject: Re: [EXT] Re: [PATCH v2 2/5] media: nxp: imx8-isi: Simplify code by
> using helper macro
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
> 
> 
> On Mon, Sep 22, 2025 at 02:03:44AM +0000, G.N. Zhou wrote:
> > On Monday, September 22, 2025 6:13 AM, Laurent Pinchart wrote:
> > > On Fri, Sep 05, 2025 at 02:55:59PM +0800, Guoniu Zhou wrote:
> > > > Simplify code by using helper macro FIELD_PREP() and GENMASK().
> > >
> > > I'm not necessarily against this change, but how does it "simplify code"
> > > ? There's no change in the code beside the macros, and they don't
> > > look particularly simpler.
> >
> > How about the message body change to " Make code more readable and
> > easier to maintain by using the FIELD_PREP and GENMASK(). macro" and title
> change to "Refine code by using helper macro"?
> > If you agree, I could apply it in next version.
> 
> No need to send a new version, I'll update the commit message myself.
> 
> > > > No functions changed.
> > > >
> > > > Reviewed-by: Frank Li <Frank.Li@nxp.com>
> > > > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > > > ---
> > > >  drivers/media/platform/nxp/imx8-isi/imx8-isi-gasket.c | 7 ++++---
> > > >  1 file changed, 4 insertions(+), 3 deletions(-)
> > > >
> > > > 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..2f5e7299b537d612fb1fe668
> > > 8c1b
> > > > 75bfd2d6049b 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,8 @@
> > > >   * Copyright 2019-2023 NXP
> > > >   */
> > > >
> > > > +#include <linux/bitfield.h>
> > > > +#include <linux/bits.h>
> > > >  #include <linux/regmap.h>
> > > >
> > > >  #include <media/mipi-csi2.h>
> > > > @@ -16,8 +18,7 @@
> > > >  #define GASKET_BASE(n)                               (0x0060 + (n) * 0x30)
> > > >
> > > >  #define GASKET_CTRL                          0x0000
> > > > -#define GASKET_CTRL_DATA_TYPE(dt)            ((dt) << 8)
> > > > -#define GASKET_CTRL_DATA_TYPE_MASK           (0x3f << 8)
> > > > +#define GASKET_CTRL_DATA_TYPE(dt)            FIELD_PREP(GENMASK(13,
> 8),
> > > (dt))
> > >
> > > I think you can omit the parentheses around dt here, and around x below.
> >
> > Ok, will apply in next version.
> >
> > >
> > > >  #define GASKET_CTRL_DUAL_COMP_ENABLE         BIT(1)
> > > >  #define GASKET_CTRL_ENABLE                   BIT(0)
> > > >
> > > > @@ -58,7 +59,7 @@ const struct mxc_gasket_ops mxc_imx8_gasket_ops
> = {
> > > >   */
> > > >
> > > >  #define DISP_MIX_CAMERA_MUX                     0x30
> > > > -#define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)        (((x) & 0x3f) << 3)
> > > > +#define DISP_MIX_CAMERA_MUX_DATA_TYPE(x)
> > > FIELD_PREP(GENMASK(8, 3), (x))
> > > >  #define DISP_MIX_CAMERA_MUX_GASKET_ENABLE       BIT(16)
> > > >
> > > >  static void mxc_imx93_gasket_enable(struct mxc_isi_dev *isi,
> 
> --
> Regards,
> 
> Laurent Pinchart

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

end of thread, other threads:[~2025-11-03  2:03 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-05  6:55 [PATCH v2 0/5] media: imx91: Add ISI support Guoniu Zhou
2025-09-05  6:55 ` [PATCH v2 1/5] media: dt-bindings: nxp,imx8-isi: Add i.MX91 ISI compatible string Guoniu Zhou
2025-09-21 22:10   ` Laurent Pinchart
2025-09-05  6:55 ` [PATCH v2 2/5] media: nxp: imx8-isi: Simplify code by using helper macro Guoniu Zhou
2025-09-21 22:13   ` Laurent Pinchart
2025-09-22  2:03     ` [EXT] " G.N. Zhou
2025-11-02 23:14       ` Laurent Pinchart
2025-11-03  2:03         ` G.N. Zhou
2025-09-05  6:56 ` [PATCH v2 3/5] media: nxp: imx8-isi: Add parallel camera input support Guoniu Zhou
2025-09-21 22:18   ` Laurent Pinchart
2025-09-22  2:16     ` [EXT] " G.N. Zhou
2025-09-05  6:56 ` [PATCH v2 4/5] media: nxp: imx8-isi: Reorder the platform data Guoniu Zhou
2025-09-21 22:20   ` Laurent Pinchart
2025-09-05  6:56 ` [PATCH v2 5/5] media: nxp: imx8-isi: Add ISI support for i.MX91 Guoniu Zhou
2025-09-21 22:27   ` Laurent Pinchart
2025-09-22  2:06     ` [EXT] " G.N. Zhou
2025-09-19  2:40 ` [PATCH v2 0/5] media: imx91: Add ISI support G.N. Zhou
2025-09-19 16:11   ` Frank Li
2025-09-21 16:07     ` Laurent Pinchart
2025-09-21 22:30       ` Laurent Pinchart
2025-09-22  2:10         ` [EXT] " G.N. Zhou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).