Skip to contentSkip to conversation

reset: imx7: Correct polarity of MIPI CSI resets on i.MX8MQ

PATCH In review Robby Cai 3 participants 5 messages Apr 17 – Jun 19

Subsystems (2)
lore
Share & tools
lore

Robby Cai

author
#0 lore raw

PATCH v2 1/1 reset: imx7: Correct polarity of MIPI CSI resets on i.MX8MQ

On i.MX8MQ, the MIPI CSI reset lines are active-low and not self-clearing. Writing '0' asserts reset and it remains asserted until explicitly deasserted by software.

This driver previously treated the MIPI CSI reset signals as active-high, which led to incorrect reset assert/deassert sequencing. This issue was exposed by commit 6d79bb8fd2aa ("media: imx8mq-mipi-csi2: Explicitly release reset").

Fix this by reflecting the correct reset polarity and ensuring proper reset handling.

Fixes c979dbf59987 ("reset: imx7: Add support for i.MX8MQ IP block variant")

---

Changes in v2:
- Drop the naming change in response to feedback from Krzysztof Kozlowski
- Refine the patch subject and commit message

Link to v1: https://lore.kernel.org/imx/[email protected]/

---
 drivers/reset/reset-imx7.c | 6 ++++++
 1 file changed, 6 insertions(+)
drivers/reset/reset-imx7.c +6 -0
index dd01fe11c5cb..a3cb8244d76a 100644
@@ -236,6 +236,12 @@ static int imx8mq_reset_set(struct reset_controller_dev *rcdev,
 
 	case IMX8MQ_RESET_PCIE_CTRL_APPS_EN:
 	case IMX8MQ_RESET_PCIE2_CTRL_APPS_EN:
+	case IMX8MQ_RESET_MIPI_CSI1_CORE_RESET:
+	case IMX8MQ_RESET_MIPI_CSI1_PHY_REF_RESET:
+	case IMX8MQ_RESET_MIPI_CSI1_ESC_RESET:
+	case IMX8MQ_RESET_MIPI_CSI2_CORE_RESET:
+	case IMX8MQ_RESET_MIPI_CSI2_PHY_REF_RESET:
+	case IMX8MQ_RESET_MIPI_CSI2_ESC_RESET:
 	case IMX8MQ_RESET_MIPI_DSI_PCLK_RESET_N:
 	case IMX8MQ_RESET_MIPI_DSI_ESC_RESET_N:
 	case IMX8MQ_RESET_MIPI_DSI_DPI_RESET_N:
Signature · 1 line
2.37.1
maintainer Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Robby Cai

On i.MX8MQ, the MIPI CSI reset lines are active-low and not self-clearing. Writing '0' asserts reset and it remains asserted until explicitly deasserted by software.

This driver previously treated the MIPI CSI reset signals as active-high, which led to incorrect reset assert/deassert sequencing. This issue was exposed by commit 6d79bb8fd2aa ("media: imx8mq-mipi-csi2: Explicitly release reset").

If this patch is backported without 6d79bb8fd2aa, or the other way around, will that break MIPI CSI-2 on older kernels? That would warrant a Cc: stable tag.

Otherwise,

regards
Philipp

author
#2 lore raw
Quoted 5 lines · Philipp Zabel
Quoted 4 lines · Robby Cai

On i.MX8MQ, the MIPI CSI reset lines are active-low and not self-clearing. Writing '0' asserts reset and it remains asserted until explicitly deasserted by software.

Quoted 9 lines
Quoted 4 lines

This driver previously treated the MIPI CSI reset signals as active-high, which led to incorrect reset assert/deassert sequencing. This issue was exposed by commit 6d79bb8fd2aa ("media: imx8mq-mipi-csi2: Explicitly release reset").

If this patch is backported without 6d79bb8fd2aa, or the other way around, will that break MIPI CSI-2 on older kernels? That would warrant a Cc: stable tag.

Yes, will break.
These two patches should be backported as a pair to ensure correct behavior.

Regards,
Robby

maintainer Reviewed-by
#3 lore raw
Quoted 11 lines · Robby Cai
Quoted 10 lines · Philipp Zabel
Quoted 8 lines · Robby Cai

On i.MX8MQ, the MIPI CSI reset lines are active-low and not self-clearing. Writing '0' asserts reset and it remains asserted until explicitly deasserted by software.

This driver previously treated the MIPI CSI reset signals as active-high, which led to incorrect reset assert/deassert sequencing. This issue was exposed by commit 6d79bb8fd2aa ("media: imx8mq-mipi-csi2: Explicitly release reset").

Quoted 7 lines
Quoted 4 lines

If this patch is backported without 6d79bb8fd2aa, or the other way around, will that break MIPI CSI-2 on older kernels? That would warrant a Cc: stable tag.

Yes, will break.
These two patches should be backported as a pair to ensure correct behavior.

Can you please resend with

Cc <[email protected]> # 6d79bb8fd2aa: media: imx8mq-mipi-csi2: Explicitly release reset

regards
Philipp

#4 lore raw
Quoted 17 lines · Philipp Zabel
Quoted 16 lines · Robby Cai
Quoted 14 lines · Philipp Zabel
Quoted 8 lines · Robby Cai

On i.MX8MQ, the MIPI CSI reset lines are active-low and not self-clearing. Writing '0' asserts reset and it remains asserted until explicitly deasserted by software.

This driver previously treated the MIPI CSI reset signals as active-high, which led to incorrect reset assert/deassert sequencing. This issue was exposed by commit 6d79bb8fd2aa ("media: imx8mq-mipi-csi2: Explicitly release reset").

If this patch is backported without 6d79bb8fd2aa, or the other way around, will that break MIPI CSI-2 on older kernels? That would warrant a Cc: stable tag.

Quoted 8 lines
Quoted 2 lines

Yes, will break.
These two patches should be backported as a pair to ensure correct behavior.

Can you please resend with

Cc <[email protected]> # 6d79bb8fd2aa: media: imx8mq-mipi-csi2: Explicitly release reset

Sure, will do. Thanks.

Regards,
Robby

Quoted 3 lines

regards
Philipp