From patchwork Fri Nov 18 09:39:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Elder X-Patchwork-Id: 22237 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp90957wrr; Fri, 18 Nov 2022 01:45:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf7jFA8lzoka38pNHA3of+arLSgX3O9iyDAUS8xp7RSBE9i9yWRfoeEAb85k01NU0ZHO8OoY X-Received: by 2002:a63:e644:0:b0:45f:702a:aec2 with SMTP id p4-20020a63e644000000b0045f702aaec2mr6006316pgj.450.1668764734638; Fri, 18 Nov 2022 01:45:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668764734; cv=none; d=google.com; s=arc-20160816; b=VJ4AWb7+ewwCFHxDospIopbNUjCTUfisenUTGPp7JpMlKu3AAScx5yB9HJZvNor09U F6a3ZvyXO8p6nENrZtlPLfixmtXM16sxenUDhwgc4pY3RR164BaUJ6rAZaTS06mqzw/Z 5oHgRICAJ1cl7Cs6pn9BPvRlQXPydHc9UeVYivMB5Ow2pKa4MIaYH3sqGLlAQjz0MlPV 94u82ysetcfbGAU/satXFmVLQma2ItW8IyRPEDgFV0LG1QHQOvz0XgzIL2MooOH8B5wa xZNNgB2bYgQgoDaulKPCWJu1fakZJZtpueptBwpmuKMglCyZN/AXwKO9Ws9AG/p+KURv 4anA== 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=HV2OG7mNLEBmYjjfEtF6tX+H7nstQXAfzXw10FiJQvg=; b=JO6iE/6VMujKXpOLQKtltditWbvxZfI6ZEZm0+hh2ac7gX4OLk8ki727Rn1t407BCA ZOyddsoqW/rOAXqb+HX7v30QRZhC4jB8Afik18hvlUQ9fyiikphQURPmaGRG43MxsVG9 uj+rvGwcFWL4OPkqhgmNLelfPhHbTOwijnpRFLMbFdxMGhhzz3ulTPpZYt1IxOi8pvMB uP2DwEX6LFj9xjbRg/eoiunw5kIyeVfX4R4vKPqjQ7NhL5MTFEwTM8nXxjF7kudVES5C wTUHPBTIV5e4XSQgipmhumhKCQRbHZG9fEDKdlbH/acKyA3W7+CFFLv+F37Wxdkg02VY lljQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass (test mode) header.i=@ideasonboard.com header.s=mail header.b=lR4JJyUn; 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 f10-20020a63de0a000000b0046ebb90e5bdsi3484155pgg.337.2022.11.18.01.45.22; Fri, 18 Nov 2022 01:45:34 -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=lR4JJyUn; 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 S242093AbiKRJlf (ORCPT + 99 others); Fri, 18 Nov 2022 04:41:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242062AbiKRJkz (ORCPT ); Fri, 18 Nov 2022 04:40:55 -0500 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2472CAF0AB; Fri, 18 Nov 2022 01:40:24 -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 475BBCE1; Fri, 18 Nov 2022 10:40:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1668764422; bh=FPCiCOCNyslyynz0t5SREsW5aFZwSGxK0F1dxJKpOLs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lR4JJyUnTy4uK10+TOuXm4Hmqtnt418b9D44q/EjUwCFc/cD6LYCvGBGbhEme/zR/ oVzlb+yX9jmuhEITImQs+gYinbF3cCmjDwfChABh3kCQznNobhzW62eCnZnmFmaNSo PYGA2haBQ3klxQjI72ygNH/CgSdjtv5TGS7byqoo= 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 Subject: [PATCH v3 10/14] media: rkisp1: Add register definitions for the test pattern generator Date: Fri, 18 Nov 2022 18:39:27 +0900 Message-Id: <20221118093931.1284465-11-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, UPPERCASE_50_75 autolearn=no 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?1749826650227907358?= X-GMAIL-MSGID: =?utf-8?q?1749826650227907358?= Add register definitions and value macros for the test pattern generator block in the ISP. Signed-off-by: Paul Elder Reviewed-by: Dafna Hirschfeld --- .../platform/rockchip/rkisp1/rkisp1-regs.h | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-regs.h b/drivers/media/platform/rockchip/rkisp1/rkisp1-regs.h index 6597c563f892..3dd1bfec288f 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-regs.h +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-regs.h @@ -718,6 +718,27 @@ #define RKISP1_CIF_ISP_DPF_SPATIAL_COEFF_MAX 0x1F #define RKISP1_CIF_ISP_DPF_NLL_COEFF_N_MAX 0x3FF +/* TPG */ +#define RKISP1_CIF_ISP_TPG_CTRL_ENA BIT(0) +#define RKISP1_CIF_ISP_TPG_CTRL_IMG_3X3_COLOR_BLOCK (0 << 1) +#define RKISP1_CIF_ISP_TPG_CTRL_IMG_COLOR_BAR (1 << 1) +#define RKISP1_CIF_ISP_TPG_CTRL_IMG_GRAY_BAR (2 << 1) +#define RKISP1_CIF_ISP_TPG_CTRL_IMG_HIGHLIGHT_GRID (3 << 1) +#define RKISP1_CIF_ISP_TPG_CTRL_IMG_RAND (4 << 1) +#define RKISP1_CIF_ISP_TPG_CTRL_CFA_RGGB (0 << 4) +#define RKISP1_CIF_ISP_TPG_CTRL_CFA_GRBG (1 << 4) +#define RKISP1_CIF_ISP_TPG_CTRL_CFA_GBRB (2 << 4) +#define RKISP1_CIF_ISP_TPG_CTRL_CFA_BGGR (3 << 4) +#define RKISP1_CIF_ISP_TPG_CTRL_DEPTH_8 (0 << 6) +#define RKISP1_CIF_ISP_TPG_CTRL_DEPTH_10 (1 << 6) +#define RKISP1_CIF_ISP_TPG_CTRL_DEPTH_12 (2 << 6) +#define RKISP1_CIF_ISP_TPG_CTRL_DEF_SYNC BIT(8) +#define RKISP1_CIF_ISP_TPG_CTRL_MAX_SYNC BIT(9) +#define RKISP1_CIF_ISP_TPG_CTRL_SOL_1080P (0 << 10) +#define RKISP1_CIF_ISP_TPG_CTRL_SOL_720P (1 << 10) +#define RKISP1_CIF_ISP_TPG_CTRL_SOL_4K (2 << 10) +#define RKISP1_CIF_ISP_TPG_CTRL_SOL_USER_DEFINED (3 << 10) + /* =================================================================== */ /* CIF Registers */ /* =================================================================== */ @@ -913,6 +934,17 @@ #define RKISP1_CIF_ISP_SH_DELAY (RKISP1_CIF_ISP_SH_BASE + 0x00000008) #define RKISP1_CIF_ISP_SH_TIME (RKISP1_CIF_ISP_SH_BASE + 0x0000000C) +#define RKISP1_CIF_ISP_TPG_BASE 0x00000700 +#define RKISP1_CIF_ISP_TPG_CTRL (RKISP1_CIF_ISP_TPG_BASE + 0x00000000) +#define RKISP1_CIF_ISP_TPG_TOTAL_IN (RKISP1_CIF_ISP_TPG_BASE + 0x00000004) +#define RKISP1_CIF_ISP_TPG_ACT_IN (RKISP1_CIF_ISP_TPG_BASE + 0x00000008) +#define RKISP1_CIF_ISP_TPG_FP_IN (RKISP1_CIF_ISP_TPG_BASE + 0x0000000C) +#define RKISP1_CIF_ISP_TPG_BP_IN (RKISP1_CIF_ISP_TPG_BASE + 0x00000010) +#define RKISP1_CIF_ISP_TPG_W_IN (RKISP1_CIF_ISP_TPG_BASE + 0x00000014) +#define RKISP1_CIF_ISP_TPG_GAP_IN (RKISP1_CIF_ISP_TPG_BASE + 0x00000018) +#define RKISP1_CIF_ISP_TPG_GAP_STD_IN (RKISP1_CIF_ISP_TPG_BASE + 0x0000001C) +#define RKISP1_CIF_ISP_TPG_RANDOM_SEED_IN (RKISP1_CIF_ISP_TPG_BASE + 0x00000020) + #define RKISP1_CIF_C_PROC_BASE 0x00000800 #define RKISP1_CIF_C_PROC_CTRL (RKISP1_CIF_C_PROC_BASE + 0x00000000) #define RKISP1_CIF_C_PROC_CONTRAST (RKISP1_CIF_C_PROC_BASE + 0x00000004)