Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1101595ybz; Wed, 29 Apr 2020 15:06:16 -0700 (PDT) X-Google-Smtp-Source: APiQypJb8g0XclIqqFlo339+FX82zn1L/Pyhz3nl5diHZ2Qh5VKhSF5CUHumCK/xq+b+Xqk5zE2w X-Received: by 2002:a05:6402:22a6:: with SMTP id cx6mr81662edb.277.1588197976092; Wed, 29 Apr 2020 15:06:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588197976; cv=none; d=google.com; s=arc-20160816; b=wU3fIKpKd0SCwc/HS+f5yUx/4gxY0pyl+CcsxjnodasG+x39hWGhkoI4sGPQa6tGTV Vy5rQO25Y8ULVQkvEDA26zPPymQiQt5rsTSZLeykhlrs3so38lSdkfEjpc+9oagPJN8F MW8rj9iBaH9nFMxcdyYrYDbAK6TpjZDr5Ez/0LGd/PIl0RnM49QiWZHC4MM/0ni6tvCq tJweGoPpn4THPK/uNbThGATMXhSows/x6BTyJINzV8NBIiXjGzuHozDoKy9x3DeKoMr0 djxdeWbeldTm8rMX10Sw4gWabY5LylRQOoK1RfIYNd90JpSJr5OUAgbki9ZkN/Y3ryvO rIBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from; bh=/06MYnopqzjyrf2N0nRAUhGBnkcd6r/kBjlHyehzo9I=; b=f68libwYoprKMXMupktwZu2Wui0UtLaeFGsqmMEW3MYunZ3fZoYAr6EZQx1VKk1jy1 mtDHEbP/TW7ExzZX0gaxz6pEBkDYVxuU9TuIuZmXzpwj3s92MpzPAFl9hyXmkLkykz9/ iwcOj0JkkSYpnlVYCODNjMPt8T8QyiwH99jsTsLGQVMCA47Dw/3OyfsjhfQC301Nd1J6 rX65uNKACVZHTn0GEwW7sNifXk8UGFoRtFYtKeN+i8Th6J7XtyXeu3h/zDE99h6E7xAI t1/n+w+axlfT5aypotGC1zLGkVwebG50UFlGqWGlqSXh5qvxspvJO4CKy49AokVxzrr0 egug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=OnTh7Lnf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dk23si4025083edb.282.2020.04.29.15.05.52; Wed, 29 Apr 2020 15:06:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=OnTh7Lnf; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728241AbgD2WCB (ORCPT + 99 others); Wed, 29 Apr 2020 18:02:01 -0400 Received: from hqnvemgate25.nvidia.com ([216.228.121.64]:14834 "EHLO hqnvemgate25.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727865AbgD2WB2 (ORCPT ); Wed, 29 Apr 2020 18:01:28 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate25.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 29 Apr 2020 15:00:22 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 29 Apr 2020 15:01:28 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 29 Apr 2020 15:01:28 -0700 Received: from HQMAIL111.nvidia.com (172.20.187.18) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 29 Apr 2020 22:01:28 +0000 Received: from rnnvemgw01.nvidia.com (10.128.109.123) by HQMAIL111.nvidia.com (172.20.187.18) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 29 Apr 2020 22:01:28 +0000 Received: from skomatineni-linux.nvidia.com (Not Verified[10.2.165.152]) by rnnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Wed, 29 Apr 2020 15:01:27 -0700 From: Sowjanya Komatineni To: , , , , , , CC: , , , , , , Subject: [RFC PATCH v11 4/9] clk: tegra: Add Tegra210 CSI TPG clock gate Date: Wed, 29 Apr 2020 15:00:01 -0700 Message-ID: <1588197606-32124-5-git-send-email-skomatineni@nvidia.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1588197606-32124-1-git-send-email-skomatineni@nvidia.com> References: <1588197606-32124-1-git-send-email-skomatineni@nvidia.com> X-NVConfidentiality: public MIME-Version: 1.0 Content-Type: text/plain DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1588197622; bh=/06MYnopqzjyrf2N0nRAUhGBnkcd6r/kBjlHyehzo9I=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=OnTh7Lnf95pn1pC0KGnA28A2MYXevs7uvk/iXDD0/bw00Ud5gRMk9YnkptmxeRRuW DmOlMgdoAE6uzgnql1AH+fm0sYBP6/SPlMyUWZuNpT2+bvprKSELYwu3Thq/z3khLC sp2jcDXeBh3y1IDeHCdNY4+Opng0LFI6R1CnHy8+2R5NV4n4+NtvMfNYqcNRmQxPGm gLgZs2GNjEqgbwzx8ky+f3tcGF6M3m5edeBu7b8wwh4ABcBLz6ZHrmX39VHCT8jdu/ AvZbMW2FcGqXz+8b18/BF116HcAatcF5ZDo6ZVZYuXFXNUsri/z5rk2q80acG+Pjjj S7tmAdQpkaosw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tegra210 CSI hardware internally uses PLLD for internal test pattern generator logic. PLLD_BASE register in CAR has a bit CSI_CLK_SOURCE to enable PLLD out to CSI during TPG mode. This patch adds this CSI TPG clock gate to Tegra210 clock driver to allow Tegra video driver to ungate CSI TPG clock during TPG mode and gate during non TPG mode. Acked-by: Stephen Boyd Signed-off-by: Sowjanya Komatineni --- drivers/clk/tegra/clk-tegra210.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/clk/tegra/clk-tegra210.c b/drivers/clk/tegra/clk-tegra210.c index defe3b7..81a879b 100644 --- a/drivers/clk/tegra/clk-tegra210.c +++ b/drivers/clk/tegra/clk-tegra210.c @@ -3035,6 +3035,13 @@ static __init void tegra210_periph_clk_init(void __iomem *clk_base, periph_clk_enb_refcnt); clks[TEGRA210_CLK_DSIB] = clk; + /* csi_tpg */ + clk = clk_register_gate(NULL, "csi_tpg", "pll_d", + CLK_SET_RATE_PARENT, clk_base + PLLD_BASE, + 23, 0, &pll_d_lock); + clk_register_clkdev(clk, "csi_tpg", NULL); + clks[TEGRA210_CLK_CSI_TPG] = clk; + /* la */ clk = tegra_clk_register_periph("la", la_parents, ARRAY_SIZE(la_parents), &tegra210_la, clk_base, -- 2.7.4