diff mbox series

[03/23] media: imx: imx7_mipi_csis: Update ISP_CONFIG macros for quad pixel mode

Message ID 20210413023014.28797-4-laurent.pinchart@ideasonboard.com (mailing list archive)
State New
Headers show
Series media: imx: imx7-mipi-csis: Add i.MX8MM support | expand

Commit Message

Laurent Pinchart April 13, 2021, 2:29 a.m. UTC
The i.MX8MM expands the DOUBLE_CMPNT bit in the ISP_CONFIG register into
a two bits field that support quad pixel mode in addition to the single
and double modes. Update the ISP_CONFIG register macros to support this.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/staging/media/imx/imx7-mipi-csis.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

Frieder Schrempf April 26, 2021, 11:41 a.m. UTC | #1
On 13.04.21 04:29, Laurent Pinchart wrote:
> The i.MX8MM expands the DOUBLE_CMPNT bit in the ISP_CONFIG register into
> a two bits field that support quad pixel mode in addition to the single
> and double modes. Update the ISP_CONFIG register macros to support this.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Frieder Schrempf <frieder.schrempf@kontron.de>

> ---
>   drivers/staging/media/imx/imx7-mipi-csis.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
> index 67911eb8761f..f7c8b6d67e1c 100644
> --- a/drivers/staging/media/imx/imx7-mipi-csis.c
> +++ b/drivers/staging/media/imx/imx7-mipi-csis.c
> @@ -166,7 +166,9 @@
>   #define MIPI_CSIS_ISP_CONFIG_CH(n)		(0x40 + (n) * 0x10)
>   #define MIPI_CSIS_ISPCFG_MEM_FULL_GAP_MSK	(0xff << 24)
>   #define MIPI_CSIS_ISPCFG_MEM_FULL_GAP(x)	((x) << 24)
> -#define MIPI_CSIS_ISPCFG_DOUBLE_CMPNT		BIT(12)
> +#define MIPI_CSIS_ISPCFG_PIXEL_MODE_SINGLE	(0 << 12)
> +#define MIPI_CSIS_ISPCFG_PIXEL_MODE_DUAL	(1 << 12)
> +#define MIPI_CSIS_ISPCFG_PIXEL_MODE_QUAD	(2 << 12)	/* i.MX8M[MNP] only */
>   #define MIPI_CSIS_ISPCFG_ALIGN_32BIT		BIT(11)
>   #define MIPI_CSIS_ISPCFG_FMT_YCBCR422_8BIT	(0x1e << 2)
>   #define MIPI_CSIS_ISPCFG_FMT_RAW8		(0x2a << 2)
>
diff mbox series

Patch

diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/staging/media/imx/imx7-mipi-csis.c
index 67911eb8761f..f7c8b6d67e1c 100644
--- a/drivers/staging/media/imx/imx7-mipi-csis.c
+++ b/drivers/staging/media/imx/imx7-mipi-csis.c
@@ -166,7 +166,9 @@ 
 #define MIPI_CSIS_ISP_CONFIG_CH(n)		(0x40 + (n) * 0x10)
 #define MIPI_CSIS_ISPCFG_MEM_FULL_GAP_MSK	(0xff << 24)
 #define MIPI_CSIS_ISPCFG_MEM_FULL_GAP(x)	((x) << 24)
-#define MIPI_CSIS_ISPCFG_DOUBLE_CMPNT		BIT(12)
+#define MIPI_CSIS_ISPCFG_PIXEL_MODE_SINGLE	(0 << 12)
+#define MIPI_CSIS_ISPCFG_PIXEL_MODE_DUAL	(1 << 12)
+#define MIPI_CSIS_ISPCFG_PIXEL_MODE_QUAD	(2 << 12)	/* i.MX8M[MNP] only */
 #define MIPI_CSIS_ISPCFG_ALIGN_32BIT		BIT(11)
 #define MIPI_CSIS_ISPCFG_FMT_YCBCR422_8BIT	(0x1e << 2)
 #define MIPI_CSIS_ISPCFG_FMT_RAW8		(0x2a << 2)