From patchwork Fri Feb 11 18:02:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 12743707 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C51AC433EF for ; Fri, 11 Feb 2022 18:01:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352448AbiBKSBe (ORCPT ); Fri, 11 Feb 2022 13:01:34 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352458AbiBKSBc (ORCPT ); Fri, 11 Feb 2022 13:01:32 -0500 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57852D4C for ; Fri, 11 Feb 2022 10:01:29 -0800 (PST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 23D2524000B; Fri, 11 Feb 2022 18:01:24 +0000 (UTC) From: Jacopo Mondi To: slongerbeam@gmail.com, p.zabel@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, martin.kepplinger@puri.sm, rmfrfs@gmail.com, xavier.roumegue@oss.nxp.com Cc: kernel@pengutronix.de, linux-imx@nxp.com, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Jacopo Mondi Subject: [PATCH 1/3] media: imx: De-stage imx7-mipi-csis Date: Fri, 11 Feb 2022 19:02:14 +0100 Message-Id: <20220211180216.290133-2-jacopo@jmondi.org> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220211180216.290133-1-jacopo@jmondi.org> References: <20220211180216.290133-1-jacopo@jmondi.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The imx7-mipi-csis driver is in a good state and can be staged. Move the imx7-mipi-csis.c driver to the newly created drivers/media/platform/imx directory and plumb the related options in Kconfig and in Makefile. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- MAINTAINERS | 2 +- drivers/media/platform/Kconfig | 1 + drivers/media/platform/Makefile | 1 + drivers/media/platform/imx/Kconfig | 23 +++++++++++++++++++ drivers/media/platform/imx/Makefile | 1 + .../platform}/imx/imx7-mipi-csis.c | 0 drivers/staging/media/imx/Makefile | 1 - 7 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 drivers/media/platform/imx/Kconfig create mode 100644 drivers/media/platform/imx/Makefile rename drivers/{staging/media => media/platform}/imx/imx7-mipi-csis.c (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 83d27b57016f..5bdb8c881b0b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11891,8 +11891,8 @@ T: git git://linuxtv.org/media_tree.git F: Documentation/admin-guide/media/imx7.rst F: Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml F: Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml +F: drivers/media/platform/imx/imx7-mipi-csis.c F: drivers/staging/media/imx/imx7-media-csi.c -F: drivers/staging/media/imx/imx7-mipi-csis.c MEDIA DRIVERS FOR HELENE M: Abylay Ospan diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 9fbdba0fd1e7..d9eeccffea69 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -171,6 +171,7 @@ source "drivers/media/platform/xilinx/Kconfig" source "drivers/media/platform/rcar-vin/Kconfig" source "drivers/media/platform/atmel/Kconfig" source "drivers/media/platform/sunxi/Kconfig" +source "drivers/media/platform/imx/Kconfig" config VIDEO_TI_CAL tristate "TI CAL (Camera Adaptation Layer) driver" diff --git a/drivers/media/platform/Makefile b/drivers/media/platform/Makefile index 28eb4aadbf45..a9466c854610 100644 --- a/drivers/media/platform/Makefile +++ b/drivers/media/platform/Makefile @@ -20,6 +20,7 @@ obj-y += ti-vpe/ obj-$(CONFIG_VIDEO_MX2_EMMAPRP) += mx2_emmaprp.o obj-$(CONFIG_VIDEO_CODA) += coda/ +obj-$(CONFIG_VIDEO_IMX) += imx/ obj-$(CONFIG_VIDEO_IMX_PXP) += imx-pxp.o obj-$(CONFIG_VIDEO_IMX8_JPEG) += imx-jpeg/ diff --git a/drivers/media/platform/imx/Kconfig b/drivers/media/platform/imx/Kconfig new file mode 100644 index 000000000000..0cf35733040c --- /dev/null +++ b/drivers/media/platform/imx/Kconfig @@ -0,0 +1,23 @@ +# SPDX-License-Identifier: GPL-2.0-only + +menuconfig VIDEO_IMX + bool "V4L2 capture drivers for NXP i.MX devices" + depends on VIDEO_DEV && VIDEO_V4L2 && (ARCH_MXC || COMPILE_TEST) + help + Say yes here to enable support for capture drivers on i.MX SoCs. + Support for the single SoC features are selectable in the sub-menu + options. + +if VIDEO_IMX + +config VIDEO_IMX_MIPI_CSIS + tristate "MIPI CSI-2 CSIS receiver found on i.MX7 and i.MX8 models" + select MEDIA_CONTROLLER + select V4L2_FWNODE + select VIDEO_V4L2_SUBDEV_API + default n + help + Video4Linux2 sub-device driver for the MIPI CSI-2 CSIS receiver + v3.3/v3.6 found on some i.MX7 and i.MX8 SoCs. + +endif # VIDEO_IMX diff --git a/drivers/media/platform/imx/Makefile b/drivers/media/platform/imx/Makefile new file mode 100644 index 000000000000..ee272234c8d7 --- /dev/null +++ b/drivers/media/platform/imx/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_VIDEO_IMX_MIPI_CSIS) += imx7-mipi-csis.o diff --git a/drivers/staging/media/imx/imx7-mipi-csis.c b/drivers/media/platform/imx/imx7-mipi-csis.c similarity index 100% rename from drivers/staging/media/imx/imx7-mipi-csis.c rename to drivers/media/platform/imx/imx7-mipi-csis.c diff --git a/drivers/staging/media/imx/Makefile b/drivers/staging/media/imx/Makefile index 19c2fc54d424..d82be898145b 100644 --- a/drivers/staging/media/imx/Makefile +++ b/drivers/staging/media/imx/Makefile @@ -15,5 +15,4 @@ obj-$(CONFIG_VIDEO_IMX_CSI) += imx6-media-csi.o obj-$(CONFIG_VIDEO_IMX_CSI) += imx6-mipi-csi2.o obj-$(CONFIG_VIDEO_IMX7_CSI) += imx7-media-csi.o -obj-$(CONFIG_VIDEO_IMX7_CSI) += imx7-mipi-csis.o obj-$(CONFIG_VIDEO_IMX7_CSI) += imx8mq-mipi-csi2.o From patchwork Fri Feb 11 18:02:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 12743708 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5498CC433F5 for ; Fri, 11 Feb 2022 18:01:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352456AbiBKSBg (ORCPT ); Fri, 11 Feb 2022 13:01:36 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352443AbiBKSBf (ORCPT ); Fri, 11 Feb 2022 13:01:35 -0500 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6D7642C9 for ; Fri, 11 Feb 2022 10:01:34 -0800 (PST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 1351F240002; Fri, 11 Feb 2022 18:01:28 +0000 (UTC) From: Jacopo Mondi To: slongerbeam@gmail.com, p.zabel@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, martin.kepplinger@puri.sm, rmfrfs@gmail.com, xavier.roumegue@oss.nxp.com Cc: kernel@pengutronix.de, linux-imx@nxp.com, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Jacopo Mondi Subject: [PATCH 2/3] media: imx: Rename imx7-mipi-csis.c to imx-mipi-csis.c Date: Fri, 11 Feb 2022 19:02:15 +0100 Message-Id: <20220211180216.290133-3-jacopo@jmondi.org> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220211180216.290133-1-jacopo@jmondi.org> References: <20220211180216.290133-1-jacopo@jmondi.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Rename the imx7-mipi-csis.c driver to remove the reference to i.MX7. The driver is for an IP core found on i.MX7 and i.MX8 SoC so do not specify a SoC version number in the driver name. Signed-off-by: Jacopo Mondi Reported-by: kernel test robot Reported-by: kernel test robot --- MAINTAINERS | 2 +- .../media/platform/imx/{imx7-mipi-csis.c => imx-mipi-csis.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename drivers/media/platform/imx/{imx7-mipi-csis.c => imx-mipi-csis.c} (100%) diff --git a/MAINTAINERS b/MAINTAINERS index 5bdb8c881b0b..7def3b7d56bc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11891,7 +11891,7 @@ T: git git://linuxtv.org/media_tree.git F: Documentation/admin-guide/media/imx7.rst F: Documentation/devicetree/bindings/media/nxp,imx7-csi.yaml F: Documentation/devicetree/bindings/media/nxp,imx7-mipi-csi2.yaml -F: drivers/media/platform/imx/imx7-mipi-csis.c +F: drivers/media/platform/imx/imx-mipi-csis.c F: drivers/staging/media/imx/imx7-media-csi.c MEDIA DRIVERS FOR HELENE diff --git a/drivers/media/platform/imx/imx7-mipi-csis.c b/drivers/media/platform/imx/imx-mipi-csis.c similarity index 100% rename from drivers/media/platform/imx/imx7-mipi-csis.c rename to drivers/media/platform/imx/imx-mipi-csis.c From patchwork Fri Feb 11 18:02:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 12743709 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DABDAC433EF for ; Fri, 11 Feb 2022 18:01:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352458AbiBKSBk (ORCPT ); Fri, 11 Feb 2022 13:01:40 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:49846 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352443AbiBKSBj (ORCPT ); Fri, 11 Feb 2022 13:01:39 -0500 Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A487B2C9 for ; Fri, 11 Feb 2022 10:01:38 -0800 (PST) Received: (Authenticated sender: jacopo@jmondi.org) by mail.gandi.net (Postfix) with ESMTPSA id 8023524000E; Fri, 11 Feb 2022 18:01:33 +0000 (UTC) From: Jacopo Mondi To: slongerbeam@gmail.com, p.zabel@pengutronix.de, shawnguo@kernel.org, s.hauer@pengutronix.de, festevam@gmail.com, mchehab@kernel.org, hverkuil-cisco@xs4all.nl, laurent.pinchart@ideasonboard.com, martin.kepplinger@puri.sm, rmfrfs@gmail.com, xavier.roumegue@oss.nxp.com Cc: kernel@pengutronix.de, linux-imx@nxp.com, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Jacopo Mondi Subject: [PATCH 3/3] media: imx: Remove reference to i.MX7 from driver Date: Fri, 11 Feb 2022 19:02:16 +0100 Message-Id: <20220211180216.290133-4-jacopo@jmondi.org> X-Mailer: git-send-email 2.35.0 In-Reply-To: <20220211180216.290133-1-jacopo@jmondi.org> References: <20220211180216.290133-1-jacopo@jmondi.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Remove the references to the i.MX7 in the driver description and expand it with more information about the IP core the driver controls. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart --- drivers/media/platform/imx/imx-mipi-csis.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/imx/imx-mipi-csis.c b/drivers/media/platform/imx/imx-mipi-csis.c index a22d0e6b3d44..59f4485bbe70 100644 --- a/drivers/media/platform/imx/imx-mipi-csis.c +++ b/drivers/media/platform/imx/imx-mipi-csis.c @@ -1,6 +1,10 @@ // SPDX-License-Identifier: GPL-2.0 /* - * Freescale i.MX7 SoC series MIPI-CSI V3.3 receiver driver + * CSIS MIPI CSI-2 receiver driver. + * + * CSIS is an IP core originating from Samsung found in NXP i.MX7 and i.MX8 + * SoC series. i.MX7 features version 3.3 of the IP, while i.MX8 features + * version 3.6.3 * * Copyright (C) 2019 Linaro Ltd * Copyright (C) 2015-2016 Freescale Semiconductor, Inc. All Rights Reserved. @@ -31,7 +35,7 @@ #include #include -#define CSIS_DRIVER_NAME "imx7-mipi-csis" +#define CSIS_DRIVER_NAME "imx-mipi-csis" #define CSIS_PAD_SINK 0 #define CSIS_PAD_SOURCE 1 @@ -1515,4 +1519,4 @@ module_platform_driver(mipi_csis_driver); MODULE_DESCRIPTION("i.MX7 & i.MX8 MIPI CSI-2 receiver driver"); MODULE_LICENSE("GPL v2"); -MODULE_ALIAS("platform:imx7-mipi-csi2"); +MODULE_ALIAS("platform:imx-mipi-csi2");