Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp343719rwb; Fri, 18 Nov 2022 02:11:38 -0800 (PST) X-Google-Smtp-Source: AA0mqf6X/9zgdHBbYSVwOqCLruEsXFZ4WuyuW4m4Sya0crXVrigY2DRgwsRq30bH99iz0ENkIufF X-Received: by 2002:a63:f4f:0:b0:476:a62d:386e with SMTP id 15-20020a630f4f000000b00476a62d386emr5837057pgp.501.1668766297807; Fri, 18 Nov 2022 02:11:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668766297; cv=none; d=google.com; s=arc-20160816; b=D69lR9AzTAdFFUGBaBePCe2sJmV2yeH5hWbBgkyPJ/Ad4zSOAopWLXyMw7j+VbaHcb fHnHokzoCX02UzKcMLnQVFXGZeVR4QzF9DS6sESMQ2xDtd+3tgPy/BKJYeHIgvugre+X Sw0gRbAY5dOrzaB9t+Ppw08EDZ9M+T/HAifoSjiSa6+HyFyY/PIPYKLoCa5R2zYn1/yN X/JgJHVr+0OYTeO7gdyH0LhZ6B6edRRFTLfT/L7yi8u/6RMv5ZdkeqwcmYXEFk5gYibh hywVmADWqcN9DzK4GwHki2EOrwXIaagbl2RTKVHADvX/8RlVQFz53Xmt97SmLMpuG8h/ pjjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JCAO4ex4Qoc2ItwG/eqszDzW4hpyE8X87Nx1G6ABZQI=; b=VYZ6kvI63sfFHuHqOvovZ8pAtCLXLIY8uGt1SmXuojM+CVcYVglSanuQLuuTDLsTkT X+dRGGhcX8Dbn40qgSzvfZg8mKuqjD4iYI/0wq6Dt26BHuiPKRFRZtQx0YwZRouAfC6d p9CWWxvsj/MMD5HRqi/pnJW+F2YOYqBl56gnN9+xkUd/2RW6JUMsZWC2X+XbrQo8SAi9 MN7NFl/BLNo912avK5beWAaFjMLRRIcC7UCmZMoEQwWjQ1yguJqFVTr+Y91QeXgzZwEU 6kTSz0odOWGdHYXNxHZL9bycK5q5z7ZVERYQnbHJNpNmKrlUjrb+74bwAhY1ylWG8BZf qU1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Qcy9VLDq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z9-20020a170903018900b00184c33ddeb8si3760818plg.23.2022.11.18.02.11.26; Fri, 18 Nov 2022 02:11:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Qcy9VLDq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242023AbiKRJkM (ORCPT + 91 others); Fri, 18 Nov 2022 04:40:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241990AbiKRJkA (ORCPT ); Fri, 18 Nov 2022 04:40:00 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DC9CF56; Fri, 18 Nov 2022 01:39:59 -0800 (PST) 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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 { -- 2.35.1