Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1234048pxv; Fri, 23 Jul 2021 03:25:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxT6j0aJ5jpoQDfWOdMhjEhuWODGosP9DBQ1S7l6ns9hZ9AjL+BFntq3FKlKEx1PhaBj4AD X-Received: by 2002:a05:6402:2317:: with SMTP id l23mr4670500eda.265.1627035935234; Fri, 23 Jul 2021 03:25:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627035935; cv=none; d=google.com; s=arc-20160816; b=o9VMYqliUGVLtVnnBgcKx7VTciaswp27s9lUYW1KJ+MdvJQbs5gVVq5fEpY7fWQbLC xlAyb6z2SPvW2x7xm/4YyFH1YTi56J6s2ZiXqH2SNz6aMa5jEV+5aFsU+S01MdPjAuEe S2KNceJta6j9RgQ6AMiv/ioJa+yrXvDXqrq9m+bCBgsc9JJJhMVfORApTo7sS8Ezc/tw lxXaYEDZC8AEoc2giBSYnA2PRX9wO5rB+qH9dEi8q0qCe+qfAq8e+qDHlHFQbX7YhvLF TkrWDgbV6t/Ds59RsgL/D3vn1hbHO9scJyr0pz9Vgezb4GU7cNo3SAHlLTJrOgJhPPtD Z8dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id:date :subject:cc:to:from; bh=wq+5LMfVILSdWa64KGgVb9PmPxBA+Q2Qc+zfgEwG18A=; b=YmrT+GjfoTXg8nZhEeUi3uYlSTxZWiyGW5jNVwajrfd0bNw8o0p+vF3MQbbjw67knC GH5X6Is9gizS05gE+DJzB1FS/WDsmCi8o3XOyzyI6rA4Hn5Zed34VB0CYUa70zzMxTYX hAnPQQs+2UHeuledJD5knQAfC774/CckWkrsMJVtMDw6yeoy9D5Vjmy5NWykHazBmoW9 /Y4kzyRJumdyl85Ch+fj1+ckepWbd1+fohUFFlZna1ynTsGnEm2ogx7PyPpAYFFUQxqM lRpgU6NMnW8mLDbKKQYSSBu1nxrOUKK+ieTR/bQ2Fgb1KQ2ey/pFdbUtVkLExv1fHE8L Slgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si23396507eja.572.2021.07.23.03.25.11; Fri, 23 Jul 2021 03:25:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231732AbhGWJnW (ORCPT + 99 others); Fri, 23 Jul 2021 05:43:22 -0400 Received: from comms.puri.sm ([159.203.221.185]:34922 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230238AbhGWJnV (ORCPT ); Fri, 23 Jul 2021 05:43:21 -0400 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id 28BBDDFDE5; Fri, 23 Jul 2021 03:23:55 -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 oK8xjK8x_jat; Fri, 23 Jul 2021 03:23:54 -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 v8 0/3] media: imx: add support for imx8mq MIPI RX Date: Fri, 23 Jul 2021 12:12:14 +0200 Message-Id: <20210723101217.1954805-1-martin.kepplinger@puri.sm> Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 ---------------- v8: (thank you Laurent) * calculate hs_settle for any clk rate and mode * add reviewed-by tag 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 | 979 ++++++++++++++++++ 4 files changed, 1258 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