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: 22228 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp90475wrr; Fri, 18 Nov 2022 01:44:00 -0800 (PST) X-Google-Smtp-Source: AA0mqf4RwVp1RhfJ0E4fNJ0ieF9Eq4/mmDKdEAEDbh+752AowT2RxQZ1TPWDMutpOD03S5u96vV6 X-Received: by 2002:a17:90a:7402:b0:209:853d:ec6 with SMTP id a2-20020a17090a740200b00209853d0ec6mr7248516pjg.29.1668764639977; Fri, 18 Nov 2022 01:43:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668764639; cv=none; d=google.com; s=arc-20160816; b=w4ppBZQAp1XxDb+4BjW5G+9MvBZg/Ab7Alq87xt34zkbCIz/cfLNBZIfk4mmHaZnpd zk+tev8gT9gUQy17Sn+8FckohbJzd972LCxgM7QPa5a06mZPjgDxc4Fs8puMCYl03zP6 EsVjvuHuHoaW7ixCNMlcjDo9N/3qktp3gLC+HEGo5ngU+vdSFjdPgHZ+cZ7qK9unJBgf Q0PUachvm7BXJ5WBlrhzzAF80HFhJWD1BkmeCXp8B7jNO1grVNwWj4p987FIbfrJQIsQ 8HpcojZBWyKio+cdLg7RRTX/R4gB/L76CR5mqphmKjWtCKP+g+YjdFymD/XX49V8C1sN XaNw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u13-20020a170902e80d00b0017f6a4fd6fbsi3722106plg.123.2022.11.18.01.43.46; Fri, 18 Nov 2022 01:43:59 -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 + 99 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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749826551185640003?= X-GMAIL-MSGID: =?utf-8?q?1749826551185640003?= 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 {