From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from comms.puri.sm (comms.puri.sm [159.203.221.185]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CF4DA70 for ; Mon, 26 Jul 2021 08:21:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 3E325DF782; Mon, 26 Jul 2021 01:21:35 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X7OlS0NrIxet; Mon, 26 Jul 2021 01:21:34 -0700 (PDT) From: Martin Kepplinger To: laurent.pinchart@ideasonboard.com, shawnguo@kernel.org Cc: devicetree@vger.kernel.org, festevam@gmail.com, kernel@pengutronix.de, kernel@puri.sm, krzk@kernel.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, m.felsch@pengutronix.de, mchehab@kernel.org, phone-devel@vger.kernel.org, robh@kernel.org, slongerbeam@gmail.com, Martin Kepplinger Subject: [PATCH v9 0/3] media: imx: add support for imx8mq MIPI RX Date: Mon, 26 Jul 2021 10:21:14 +0200 Message-Id: <20210726082117.2423597-1-martin.kepplinger@puri.sm> Content-Transfer-Encoding: 8bit Precedence: bulk X-Mailing-List: linux-staging@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: hi, This patch series adds a driver for the i.MX8MQ CSI MIPI receiver / controller. It includes the driver, the dt-bindings and the DT addition to the SoC dtsi. I test it using libcamera. Thanks to Laurent who helped a lot. I'm happy for any feedback, martin revision history ---------------- v9: (thank you Laurent) * improve getting the esc clock rate for hs_settle v8: (thank you Laurent) * calculate hs_settle for any clk rate and mode * add reviewed-by tag https://lore.kernel.org/linux-media/20210723101217.1954805-1-martin.kepplinger@puri.sm/T/ v7: (thank you Laurent and Rob) * fix the binding example (include the reset driver) * use pm_runtime_resume_and_get() * fix some logic in init_cfg() * add some useful code comments and fix minor bits found by Laurent in v6 https://lore.kernel.org/linux-media/20210716102244.581182-1-martin.kepplinger@puri.sm/T/#t v6: (thank you Laurent and Rob) * add reviewed-by tag to binding * statically allocate clk_bulk_data * fix how the hs_settle value is applied * remove s_power calls * remove the link_setup() callback implementation and make the link immutable * more cleanups according to Laurents' review from v5 https://lore.kernel.org/linux-media/20210714111931.324485-1-martin.kepplinger@puri.sm/ v5: (thank you Laurent) * fix reset usage by using the already supported reset controller driver * remove clko2 (totally unrelated clock / had been included by accident) * rename pxl clock to ui https://lore.kernel.org/linux-media/20210618095753.114557-1-martin.kepplinger@puri.sm/ v4: (thank you Rob and Marco) * create fsl,mipi-phy-gpr custom dt property instead of confusing "phy" * add imx8mq-specific compatibile to imx8mq.dtsi for future use https://lore.kernel.org/linux-media/20210614121522.2944593-1-martin.kepplinger@puri.sm/ v3: (thank you, Rob and Laurent) among minor other things according to v2 review, changes include: * better describe the clocks * rename DT property "phy-reset" to "reset" and "phy-gpr" to "phy" https://lore.kernel.org/linux-media/20210608104128.1616028-1-martin.kepplinger@puri.sm/T/#t v2: (thank you, Dan and Guido) among fixes according to v1 reviews, changes include: * remove status property from dt-bindings example * define a few bits in order to have less magic values * use "imx8mq_mipi_csi_" as local function prefix * read DT properties only during probe() * remove dead code (log_status) * add imx8mq_mipi_csi_release_icc() * fix imx8mq_mipi_csi_init_icc() https://lore.kernel.org/linux-media/20210531112326.90094-1-martin.kepplinger@puri.sm/ v1: https://lore.kernel.org/linux-media/20210527075407.3180744-1-martin.kepplinger@puri.sm/T/#t Martin Kepplinger (3): dt-bindings: media: document the nxp,imx8mq-mipi-csi2 receiver phy and controller media: imx: add a driver for i.MX8MQ mipi csi rx phy and controller arm64: dts: imx8mq: add mipi csi phy and csi bridge descriptions .../bindings/media/nxp,imx8mq-mipi-csi2.yaml | 174 ++++ arch/arm64/boot/dts/freescale/imx8mq.dtsi | 104 ++ drivers/staging/media/imx/Makefile | 1 + drivers/staging/media/imx/imx8mq-mipi-csi2.c | 976 ++++++++++++++++++ 4 files changed, 1255 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/nxp,imx8mq-mipi-csi2.yaml create mode 100644 drivers/staging/media/imx/imx8mq-mipi-csi2.c -- 2.30.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9C928C4338F for ; Mon, 26 Jul 2021 08:37:50 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5E1146024A for ; Mon, 26 Jul 2021 08:37:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 5E1146024A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=puri.sm Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=2hSZoWkU+9S/hOUyru8HxSiWsDpXKe5e5V1OAQgCiRM=; b=Hv5zIF0JDLrGRK dcKfRStBvq7iiE911dGdLn5CLUJOJoKW2goeAvvhPTWZJSVJuhGDZqHFGLqFiSl4tktabtWcjWykf JjWy6cd9K0c1NmvMw5jdH6TL5W+guOlzoOruYQbH//QfFwJDWkkQavhTTGiIRGfl5JxiqMaOiC6vx K63Tcb3XrfAUa3KrX481miA+GWCfowAA0wH7rUamqIF7HFuSPvUBBJmyvOGr3UIvBG1AfQYiThlLL V0yfwOqPatYkW6pdxMHVlVJPy/cpLKlojnMj9eQZeEFfIj0CkGSWz5X7/QxyVY04L/4uTOwH2e6w3 kxxpylm1McAXEOJ3oLVw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7vrr-00AAPN-Gy; Mon, 26 Jul 2021 08:21:43 +0000 Received: from comms.puri.sm ([159.203.221.185]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1m7vrm-00AANL-O9 for linux-arm-kernel@lists.infradead.org; Mon, 26 Jul 2021 08:21:40 +0000 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 3E325DF782; Mon, 26 Jul 2021 01:21:35 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X7OlS0NrIxet; Mon, 26 Jul 2021 01:21:34 -0700 (PDT) From: Martin Kepplinger To: laurent.pinchart@ideasonboard.com, shawnguo@kernel.org Cc: devicetree@vger.kernel.org, festevam@gmail.com, kernel@pengutronix.de, kernel@puri.sm, krzk@kernel.org, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, linux-staging@lists.linux.dev, m.felsch@pengutronix.de, mchehab@kernel.org, phone-devel@vger.kernel.org, robh@kernel.org, slongerbeam@gmail.com, Martin Kepplinger Subject: [PATCH v9 0/3] media: imx: add support for imx8mq MIPI RX Date: Mon, 26 Jul 2021 10:21:14 +0200 Message-Id: <20210726082117.2423597-1-martin.kepplinger@puri.sm> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210726_012138_819565_AAA54FE8 X-CRM114-Status: GOOD ( 15.39 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org hi, This patch series adds a driver for the i.MX8MQ CSI MIPI receiver / controller. It includes the driver, the dt-bindings and the DT addition to the SoC dtsi. I test it using libcamera. Thanks to Laurent who helped a lot. I'm happy for any feedback, martin revision history ---------------- v9: (thank you Laurent) * improve getting the esc clock rate for hs_settle v8: (thank you Laurent) * calculate hs_settle for any clk rate and mode * add reviewed-by tag https://lore.kernel.org/linux-media/20210723101217.1954805-1-martin.kepplinger@puri.sm/T/ v7: (thank you Laurent and Rob) * fix the binding example (include the reset driver) * use pm_runtime_resume_and_get() * fix some logic in init_cfg() * add some useful code comments and fix minor bits found by Laurent in v6 https://lore.kernel.org/linux-media/20210716102244.581182-1-martin.kepplinger@puri.sm/T/#t v6: (thank you Laurent and Rob) * add reviewed-by tag to binding * statically allocate clk_bulk_data * fix how the hs_settle value is applied * remove s_power calls * remove the link_setup() callback implementation and make the link immutable * more cleanups according to Laurents' review from v5 https://lore.kernel.org/linux-media/20210714111931.324485-1-martin.kepplinger@puri.sm/ v5: (thank you Laurent) * fix reset usage by using the already supported reset controller driver * remove clko2 (totally unrelated clock / had been included by accident) * rename pxl clock to ui https://lore.kernel.org/linux-media/20210618095753.114557-1-martin.kepplinger@puri.sm/ v4: (thank you Rob and Marco) * create fsl,mipi-phy-gpr custom dt property instead of confusing "phy" * add imx8mq-specific compatibile to imx8mq.dtsi for future use https://lore.kernel.org/linux-media/20210614121522.2944593-1-martin.kepplinger@puri.sm/ v3: (thank you, Rob and Laurent) among minor other things according to v2 review, changes include: * better describe the clocks * rename DT property "phy-reset" to "reset" and "phy-gpr" to "phy" https://lore.kernel.org/linux-media/20210608104128.1616028-1-martin.kepplinger@puri.sm/T/#t v2: (thank you, Dan and Guido) among fixes according to v1 reviews, changes include: * remove status property from dt-bindings example * define a few bits in order to have less magic values * use "imx8mq_mipi_csi_" as local function prefix * read DT properties only during probe() * remove dead code (log_status) * add imx8mq_mipi_csi_release_icc() * fix imx8mq_mipi_csi_init_icc() https://lore.kernel.org/linux-media/20210531112326.90094-1-martin.kepplinger@puri.sm/ v1: https://lore.kernel.org/linux-media/20210527075407.3180744-1-martin.kepplinger@puri.sm/T/#t Martin Kepplinger (3): dt-bindings: media: document the nxp,imx8mq-mipi-csi2 receiver phy and controller media: imx: add a driver for i.MX8MQ mipi csi rx phy and controller arm64: dts: imx8mq: add mipi csi phy and csi bridge descriptions .../bindings/media/nxp,imx8mq-mipi-csi2.yaml | 174 ++++ arch/arm64/boot/dts/freescale/imx8mq.dtsi | 104 ++ drivers/staging/media/imx/Makefile | 1 + drivers/staging/media/imx/imx8mq-mipi-csi2.c | 976 ++++++++++++++++++ 4 files changed, 1255 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/nxp,imx8mq-mipi-csi2.yaml create mode 100644 drivers/staging/media/imx/imx8mq-mipi-csi2.c -- 2.30.2 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel