From patchwork Fri Nov 18 09:39:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 13047938 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 1DE6BC4332F for ; Fri, 18 Nov 2022 09:42:11 +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:References:In-Reply-To: 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: List-Owner; bh=u3W0h12lWBh0FfeSxDLfpxBoY/k1fe65ZDnyGs0toCk=; b=HuWKiSRGy6hJOS afhBxyRq9xpYu9yx+V2ozV2hJpYyS95IgePfxgrvNwRB8bpXscl1Z+1LJJ1tFjINM3QGxRDgOTbER ao1RJWV/ZctcdREZ5YNMPBfIe6YJYGA1eHYW+UX8ea7yoktI6so10jEbhjbxC0YfGStI2jEV/8i/P PwdaUNJCCPVND6GBW0B8YfnTL/1zEpMWfclCJF582CxEjaZi3ss+LHGsizq/ompgywj6yrR/8pE1d ONuyZG/YZPmTzvQKB8idPijMEw+KUc7X/yWjSMbCDPSgTYUcaMTrdzc9F1cxl0Ysk0oihEWJ0Zzg7 RBtQZ+xkfpXGh+HobxUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovxrt-0039T9-Rh; Fri, 18 Nov 2022 09:41:05 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ovxqp-0038mH-LO; Fri, 18 Nov 2022 09:40:01 +0000 Received: from pyrite.tail37cf.ts.net (h175-177-042-159.catv02.itscom.jp [175.177.42.159]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 90F19AF4; Fri, 18 Nov 2022 10:39:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1668764398; bh=nUxnPd7tUXCluDGgb+LAmiI7wmmrZmGT+0dg1C/r0tw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qcy9VLDqA4VVQajEKAh6BhrCG65l2SQqea6cE9fwyUpZrZE70M+e28zuWupLnLn4e FubLjPijmBj8Y14wXmmu0PVZaQ+hciaTIBnTJeH83RIKoaSGEP7gHMpI5En/8cV8H2 /r849HmTq2z9CgGu7EJmX0PrfjN+6ZhP8BIlWyaU= From: Paul Elder To: linux-media@vger.kernel.org Cc: Paul Elder , Dafna Hirschfeld , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Heiko Stuebner , Helen Koike , Laurent Pinchart , linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Rob Herring Subject: [PATCH v3 04/14] media: rkisp1: Add match data for i.MX8MP ISP Date: Fri, 18 Nov 2022 18:39:21 +0900 Message-Id: <20221118093931.1284465-5-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20221118093931.1284465-1-paul.elder@ideasonboard.com> References: <20221118093931.1284465-1-paul.elder@ideasonboard.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221118_013959_912888_5CF5B8CD X-CRM114-Status: GOOD ( 15.94 ) 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 Add match data to the rkisp1 driver to match the i.MX8MP ISP. Although the new version number isn't very precise, it ought to be fine as the other version numbers aren't precise either, and we have separate feature flags for important version-specific features. Despite this version number being seemingly unimportant, it is added to distinguish it from the ISP versions integrated in rockchip SoCs. Signed-off-by: Paul Elder Reviewed-by: Rob Herring --- Changes in v3: - Remove todo for improving the version number - Expand the commit message to address the version number --- .../platform/rockchip/rkisp1/rkisp1-dev.c | 22 +++++++++++++++++++ include/uapi/linux/rkisp1-config.h | 2 ++ 2 files changed, 24 insertions(+) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c index e348d8c86861..69464ce91d59 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c @@ -496,6 +496,24 @@ static const struct rkisp1_info rk3399_isp_info = { .features = RKISP1_FEATURE_MIPI_CSI2, }; +static const char * const imx8mp_isp_clks[] = { + "isp", + "hclk", + "aclk", +}; + +static const struct rkisp1_isr_data imx8mp_isp_isrs[] = { + { NULL, rkisp1_isr }, +}; + +static const struct rkisp1_info imx8mp_isp_info = { + .clks = imx8mp_isp_clks, + .clk_size = ARRAY_SIZE(imx8mp_isp_clks), + .isrs = imx8mp_isp_isrs, + .isr_size = ARRAY_SIZE(imx8mp_isp_isrs), + .isp_ver = IMX8MP_V10, +}; + static const struct of_device_id rkisp1_of_match[] = { { .compatible = "rockchip,px30-cif-isp", @@ -505,6 +523,10 @@ static const struct of_device_id rkisp1_of_match[] = { .compatible = "rockchip,rk3399-cif-isp", .data = &rk3399_isp_info, }, + { + .compatible = "fsl,imx8mp-isp", + .data = &imx8mp_isp_info, + }, {}, }; MODULE_DEVICE_TABLE(of, rkisp1_of_match); diff --git a/include/uapi/linux/rkisp1-config.h b/include/uapi/linux/rkisp1-config.h index 730673ecc63d..f602442c2018 100644 --- a/include/uapi/linux/rkisp1-config.h +++ b/include/uapi/linux/rkisp1-config.h @@ -179,12 +179,14 @@ * @RKISP1_V11: declared in the original vendor code, but not used * @RKISP1_V12: used at least in rk3326 and px30 * @RKISP1_V13: used at least in rk1808 + * @IMX8MP_V10: used in at least imx8mp */ enum rkisp1_cif_isp_version { RKISP1_V10 = 10, RKISP1_V11, RKISP1_V12, RKISP1_V13, + IMX8MP_V10, }; enum rkisp1_cif_isp_histogram_mode {