From patchwork Fri Jan 13 09:54:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tretter X-Patchwork-Id: 13100410 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 25179C54EBD for ; Fri, 13 Jan 2023 09:56:50 +0000 (UTC) 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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject: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=FXoMoTJ3eSid4eGYgSDHduDBMSPBcqaigNSy3WEaefg=; b=EwrSwIuXzypVp1 JhF/qiR6R5XnHW40RuIU8jqB5+SkcdkJDO2fJMoUcifC1Aa07h8+j0Iw4aT07HcvD5jKgHX+3USaj 4AHl2V012jnf5AqU5+hJdyEXiKtK8ZOgaLIxAdmPx8y/GAPHeE9p0uzcc1ytevZb3+LodL7Ak9DDc RIwNDC2sjuNCwG/YrsmMmn/T3AQl4j1LyB6DvH1aMsZ53jnsJ2+3+9JAIw+pbG8D6QegpSApXr8lM jHxdfZgrJ4LI/g1HmHJ3GwfZAI5BLkn3pUwniuQPJrnuyXrcQ5R5q/T0AKzRBRUI/8v2t9pKRt+z7 Ssdsa3tn36opeou68x3g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGGml-001aPt-I4; Fri, 13 Jan 2023 09:55:43 +0000 Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pGGlV-001ZoG-PK for linux-arm-kernel@lists.infradead.org; Fri, 13 Jan 2023 09:54:29 +0000 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by metis.ext.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1pGGlG-0003cp-3C; Fri, 13 Jan 2023 10:54:10 +0100 From: Michael Tretter Subject: [PATCH v2 00/16] media: imx-pxp: add support for i.MX7D Date: Fri, 13 Jan 2023 10:54:07 +0100 Message-Id: <20230112-imx-pxp-v2-0-e2281da1db55@pengutronix.de> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAD8qwWMC/y3NQQqDMBCF4avIrDt0kiCKVyldJHGsszAJSZGAe PfG4vLnffAOKJyFC0zdAZl3KRJDC/3owK82fBhlbg2atCGlNMpWMdWENBii0Rk/9gM07WxhdNkG v17+G5P4542vPWVepP6fXu/z/AEXfxSkeQAAAA== To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, Philipp Zabel , Laurent Pinchart Cc: Michael Tretter , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Fabio Estevam , Alexander Stein , kernel@pengutronix.de, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org X-Mailer: b4 0.11.2 X-SA-Exim-Connect-IP: 2a0a:edc0:0:1101:1d::54 X-SA-Exim-Mail-From: m.tretter@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-arm-kernel@lists.infradead.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230113_015425_879595_539721C0 X-CRM114-Status: GOOD ( 22.90 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This is v2 of the series to add support for the PXP found on the i.MX7D to the imx-pxp driver. The PXP on the i.MX7D has a few differences compared to the one on the i.MX6ULL. Especially, it has more processing blocks and slightly different multiplexers to route the data between the blocks. Therefore, the driver must configure a different data path depending on the platform. While the PXP has a version register, the reported version is the same on the i.MX6ULL and the i.MX7D. Therefore, we cannot use the version register to change the driver behavior, but have to use the device tree compatible. The driver still prints the found version to the log to help bringing up the PXP on further platforms. The patches are inspired by some earlier patches [0] by Laurent to add PXP support to the i.MX7d. Compared to the earlier patches, these patches add different behavior depending on the platform. Furthermore, the patches disable only the LUT block, but keep the rotator block enabled, as it may now be configured via the V4L2 rotate control. In v2, I included Laurent's patch series [1], which was based on this series anyway and added regmap support. Patch 1 converts the dt-binding to yaml. Patches 2 to 5 cleanup and refactor the driver in preparation of handling different PXP versions. Patches 6 and 7 add the handling of different platforms and the i.MX7d specific configuration. Patch 8 adds the device tree node for the PXP to the i.MX7d device tree. Patches 9 to 15 are the cleanup and enhancement patches to add media controller support, implement enum_framesizes, and add pxp_read/pxp_write helpers. Patch 16 adds regmap support to the driver. Michael [0] https://lore.kernel.org/linux-media/20200510223100.11641-1-laurent.pinchart@ideasonboard.com/ [1] https://lore.kernel.org/linux-media/20230112172507.30579-1-laurent.pinchart@ideasonboard.com --- Changelog v2: - fix device tree binding - reduce log level of PXP version to debug - drop fallback for missing pdata - add cleanup and enhancement patches to series - convert driver to regmap Signed-off-by: Michael Tretter To: linux-media@vger.kernel.org To: devicetree@vger.kernel.org To: Philipp Zabel To: Laurent Pinchart Cc: Mauro Carvalho Chehab Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Fabio Estevam Cc: Alexander Stein Cc: kernel@pengutronix.de Cc: linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org Cc: Michael Tretter --- Laurent Pinchart (7): media: imx-pxp: Sort headers alphabetically media: imx-pxp: Don't set bus_info manually in .querycap() media: imx-pxp: Add media controller support media: imx-pxp: Pass pixel format value to find_format() media: imx-pxp: Implement frame size enumeration media: imx-pxp: Introduce pxp_read() and pxp_write() wrappers media: imx-pxp: Use non-threaded IRQ Michael Tretter (9): dt-bindings: media: fsl-pxp: convert to yaml media: imx-pxp: detect PXP version media: imx-pxp: extract helper function to setup data path media: imx-pxp: explicitly disable unused blocks media: imx-pxp: disable LUT block media: imx-pxp: make data_path_ctrl0 platform dependent media: imx-pxp: add support for i.MX7D ARM: dts: imx7d: add node for PXP media: imx-pxp: convert to regmap .../devicetree/bindings/media/fsl,imx6ull-pxp.yaml | 82 +++++ .../devicetree/bindings/media/fsl-pxp.txt | 26 -- arch/arm/boot/dts/imx7d.dtsi | 9 + drivers/media/platform/nxp/imx-pxp.c | 359 +++++++++++++++------ 4 files changed, 355 insertions(+), 121 deletions(-) --- base-commit: b7bfaa761d760e72a969d116517eaa12e404c262 change-id: 20230112-imx-pxp-073008b3c857 Best regards,