From patchwork Thu Jan 5 13:47:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Tretter X-Patchwork-Id: 13090506 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 AB774C3DA7A for ; Thu, 5 Jan 2023 21:33:31 +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:MIME-Version: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=DtAlC43UkEBvqWcaGcvN2/yqhsCAHeMC43zzeGUx/IM=; b=GXOgiWGTbHjs4T DEwNpmawTHBGtpftSdaPZD/SYZFhicWZX5TFPrisGryPlKPMSO5uAyJBtMJG+iUFren0GB5KV91aR sY3DjrPUA5oWUVX74GVErhvQ4GEgNKDBjpPFonBzwRKxkAGW6ns/Ju7hr+1MsMmfjRO1ylvOLK2Na EBsyMgsAZbeDN9Lp8TWJ0vea0StaF6ST6b3b8GzkCMhxscBMcOILj8xUBsqjh6GUaBQw5lxCBdQWH 4axmXAwoSuPrTHslCdxMqPFX+X4rNJW1lZu6MM+YMVH5t1Wi1KI8LNIIouQScCsMtId3fgyeA0NwK /PTA6BXuX7G5n80F3vlQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDXqa-00F8Ob-O1; Thu, 05 Jan 2023 21:32:26 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pDUyR-00DabI-U8 for linux-arm-kernel@bombadil.infradead.org; Thu, 05 Jan 2023 18:28:19 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type:Content-ID: Content-Description:In-Reply-To:References; bh=suwinijf8lEA3VVLYdw94NDJODr8cbKd0VMsuSA8vPY=; b=OXOPQ9Vj7yLTyPihqePDNVGDkh rdl+grF0UFSYED2cMxdoPW13nzxHOYU6+stPX8maWhgbbBOsevJ4Hei78qUOwhqDrM7sKctQJXMLo 8tXbKQWwzASG3WFoIPi04d306RTGf0x5zkSJTINgJNWCTJmjFVXtLa3k3pKpKueZZEwAVV+9BbZ4f UzVCgtWl9T4G8KLZ1i06WHIsaUXVA2kpQWaJCgBHnPERYe6dRW5qW/KPwj2VkUVo3+7n+ZCPFk/yB rxF1kGTXWuuZSMdNs/OrRHojs2qPfyr+o75CJwG+PtK9SRNBTLj7itTDXAmOB2tnoNHCdk70Rtwzl e+nXHNWg==; Received: from metis.ext.pengutronix.de ([2001:67c:670:201:290:27ff:fe1d:cc33]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pDQap-001M6m-0U for linux-arm-kernel@lists.infradead.org; Thu, 05 Jan 2023 13:47:43 +0000 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pDQai-0003Ql-07; Thu, 05 Jan 2023 14:47:32 +0100 Received: from [2a0a:edc0:0:900:1d::48] (helo=litschi) by drehscheibe.grey.stw.pengutronix.de with esmtp (Exim 4.94.2) (envelope-from ) id 1pDQag-0040LM-86; Thu, 05 Jan 2023 14:47:30 +0100 Received: from mtr by litschi with local (Exim 4.94.2) (envelope-from ) id 1pDQaf-000FV7-2O; Thu, 05 Jan 2023 14:47:29 +0100 From: Michael Tretter To: linux-media@vger.kernel.org, devicetree@vger.kernel.org, Philipp Zabel Cc: Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Fabio Estevam , Laurent Pinchart , kernel@pengutronix.de, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, Michael Tretter Subject: [PATCH 0/8] media: imx-pxp: add support for i.MX7D Date: Thu, 5 Jan 2023 14:47:21 +0100 Message-Id: <20230105134729.59542-1-m.tretter@pengutronix.de> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2a0a:edc0:0:c01:1d::a2 X-SA-Exim-Mail-From: mtr@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-20230105_134739_409964_6087B13D X-CRM114-Status: GOOD ( 21.33 ) 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 series adds 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. 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. Michael [0] https://lore.kernel.org/linux-media/20200510223100.11641-1-laurent.pinchart@ideasonboard.com/ Michael Tretter (8): media: 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 .../bindings/media/fsl,imx6ull-pxp.yaml | 62 ++++++++ .../devicetree/bindings/media/fsl-pxp.txt | 26 --- arch/arm/boot/dts/imx7d.dtsi | 9 ++ drivers/media/platform/nxp/imx-pxp.c | 148 +++++++++++++++--- 4 files changed, 197 insertions(+), 48 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/fsl,imx6ull-pxp.yaml delete mode 100644 Documentation/devicetree/bindings/media/fsl-pxp.txt