From patchwork Thu Jan 11 11:48:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 187321 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2411:b0:101:2151:f287 with SMTP id m17csp1388695dyi; Thu, 11 Jan 2024 03:50:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IFXXg9tSPk7CCG5REr7VND6oaUqsIlkN4Qw2X/rEvU2HEfwUzIwEnfKYmsvuUyLtUpQ5AwP X-Received: by 2002:a81:4806:0:b0:5e8:7677:f244 with SMTP id v6-20020a814806000000b005e87677f244mr396393ywa.43.1704973856603; Thu, 11 Jan 2024 03:50:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704973856; cv=none; d=google.com; s=arc-20160816; b=k/sKZZwlpRWO6VfZRVjcFZuhpYxUXssaIQHAEdqzyhdcNJB3zIBWG9QJC3MHDGdpc2 cYjZZGvv60deaMCdZ6nTFmNb41MzhpJcSDQ7odwbZeeQ+X+3ICq54BqboeLLkZPin/yB 9S2ktmG/hS6KVmKQYY2WIbVbsbZbJuDrHzG5kz1hgWCf+mFPNnlWFOzWUlB5yIEMhmo8 UwRpjiDkyvdSWSC8BQnVooXct12kYmI7cNCjmqnebbEhimK79c9Cdwdz7qQ+o0u05ESH syKTpVD6qAIEXs3tJHS0McUStCJ9qDr1HpnUa53ooZ+ArDqFx4e1dgR5pjJ33vDgdrEA qF6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ZLi9UN9wu2sMtd1wu8U235dbPxo1eNdrT/g6tDhghjM=; fh=xDMKQ+1BNi1UtGo3kM0bUs3bKDAdyTN939W944OQMQQ=; b=WT6QNlBVlYx967DUjvHl+IM3pWJ117G5wZ/9edqZIcXHVt3IfPkH7XfMqhsu5gwDTB RPArJQ3i1FziCSR9tl/IsmaiX+XAZnOY/dji3CaEnykIuF1JeePme+9EiPGpfHMjFovO wb9nF5k5CzsPtfsSMWpcO6Bg4L1nh82vm9c56w494V8kvRRY1WC5ZcdOTMr1Z9l8mZRw 8gLYiD0nJnJMGmYwYg8v+o6QFQvOCYH2IdxlXQRkReXlnUxy5+4qQHU1XqB4y/WQHurg Gzh7B17Jn+skdWSUhx+jdM8+5xaPfRfy8Urq2lEFvhVNRUSKYK0rvEGvY5hltP+WWNGM AM8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Z1cqkIHf; spf=pass (google.com: domain of linux-kernel+bounces-23515-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23515-ouuuleilei=gmail.com@vger.kernel.org" Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p2-20020a05622a00c200b004283d6f312csi769075qtw.235.2024.01.11.03.50.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Jan 2024 03:50:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-23515-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=Z1cqkIHf; spf=pass (google.com: domain of linux-kernel+bounces-23515-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-23515-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 4E2081C268F4 for ; Thu, 11 Jan 2024 11:50:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E454116407; Thu, 11 Jan 2024 11:49:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="Z1cqkIHf" Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8B6A15EB0; Thu, 11 Jan 2024 11:49:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ideasonboard.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ideasonboard.com Received: from pyrite.hamster-moth.ts.net (h175-177-049-156.catv02.itscom.jp [175.177.49.156]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BD1BC3DEE; Thu, 11 Jan 2024 12:48:13 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1704973699; bh=5ZPbRJ9kHgFWIlMZiMuKCf+qLu+qB2DLgZCl7DZfSqY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z1cqkIHfMLZYmRW/lTIEwCbpG7nQRqV3mlk83UpZBKZWAFfSMNH25ceZMjASgAzav 4QdVRS3Ly526fbnazL8dOru7G597ZvpsGB33mSis344ma29O/xh/xTzUTsHHOHmdiK MCzujBuiEceHM+tDAmDnPYFU6okD/bvmhtu0DMWY= From: Paul Elder To: linux-media@vger.kernel.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org Cc: kieran.bingham@ideasonboard.com, tomi.valkeinen@ideasonboard.com, umang.jain@ideasonboard.com, aford173@gmail.com, Paul Elder , Rob Herring , Alexander Stein , Dafna Hirschfeld , Laurent Pinchart , Mauro Carvalho Chehab , Heiko Stuebner , linux-arm-kernel@lists.infradead.org (moderated list:ARM/Rockchip SoC support), linux-kernel@vger.kernel.org (open list) Subject: [PATCH v6 06/11] media: rkisp1: Add match data for i.MX8MP ISP Date: Thu, 11 Jan 2024 20:48:26 +0900 Message-Id: <20240111114831.656736-7-paul.elder@ideasonboard.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240111114831.656736-1-paul.elder@ideasonboard.com> References: <20240111114831.656736-1-paul.elder@ideasonboard.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787794666655748946 X-GMAIL-MSGID: 1787794666655748946 Add match data to the rkisp1 driver to match the i.MX8MP ISP. Signed-off-by: Paul Elder Reviewed-by: Rob Herring Tested-by: Alexander Stein Tested-by: Adam Ford Reviewed-by: Tomi Valkeinen --- .../platform/rockchip/rkisp1/rkisp1-dev.c | 23 +++++++++++++++++++ include/uapi/linux/rkisp1-config.h | 2 ++ 2 files changed, 25 insertions(+) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c index 2e40c376cab5..e4aac0234178 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c @@ -532,6 +532,25 @@ static const struct rkisp1_info rk3399_isp_info = { | RKISP1_FEATURE_DUAL_CROP, }; +static const char * const imx8mp_isp_clks[] = { + "isp", + "hclk", + "aclk", +}; + +static const struct rkisp1_isr_data imx8mp_isp_isrs[] = { + { NULL, rkisp1_isr, BIT(RKISP1_IRQ_ISP) | BIT(RKISP1_IRQ_MI) }, +}; + +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, + .features = RKISP1_FEATURE_MAIN_STRIDE, +}; + static const struct of_device_id rkisp1_of_match[] = { { .compatible = "rockchip,px30-cif-isp", @@ -541,6 +560,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 {