Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1099144ybz; Wed, 29 Apr 2020 15:03:44 -0700 (PDT) X-Google-Smtp-Source: APiQypKocNsLVZp4d19Ta8VLifq+lnKWcNwSev+pxndbMnzxP+zGS/pOatKVoAvj3XC6MIQ0rTwM X-Received: by 2002:a17:906:1d4c:: with SMTP id o12mr1246217ejh.357.1588197823862; Wed, 29 Apr 2020 15:03:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588197823; cv=none; d=google.com; s=arc-20160816; b=e1Uo6/U/PsPbW4NFndfuaoAR4+4otmughQnE95CJXkJFQoDgT9nR96zzrSiaAx6e+u Vzr+6zyYWFgG/J7CGnOMLOBgJ3hPQtdpGK9WPRwD6G9Twl74kLOf/BNxKjfZySc7f6Mf qLx6iyqBxa6mCounxE1LeRggV5Zek5Wr25cpkw3wcybR6FKtVjTLgLKp+P3i1bfXkYL+ y97E0JC8tbEggyWzT1z3qvazJQjFmIy2bBKOIImaXfFd3DwOxfMReghixGUKdeaX1Cdb e5EbsixSIFxyNrcTrPzZZAFJJNa5kfcngEe4bqMuRVVstg78DBzuv04PaGKVA1/GQ95d Edaw== 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=yB3b29VbNFtTvMcPZCMVxLppaVECoZp9WEY70dWiuUY=; b=EmqUZFJIR88xptq9GcdVUh1dViAfr884ErUijYlqPR+IF/XkcpuFNLO910+XPM2eK7 quXAcqFkvTsRXsjTY+5sCabi30GgRgG8jLzjV3vKpsWaUTalqPoO77a2bJLP111wvK1u dLN0Tx7MWqmMUUZwL3Hw0pdlGG5ShdWJhKVsKlhRtHZLlBVm244LwUd4U3ovBHEPTw+Z BlQjX7arzLgN6S8vgcEeN+LEgTj3Kc3ezEn/PCDw7lEfd6nTiXdnkVNpo4LjzPOHiuK0 rI0qQfne9owcRznQaYXMxLB53HbWrHrMa0f8nQXbJS8KYSOZfvxnHdXkNRzXWf33vbh2 QJbw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b=WWqEtXHc; 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 b26si4602135edr.228.2020.04.29.15.03.20; Wed, 29 Apr 2020 15:03:43 -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=WWqEtXHc; 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 S1728097AbgD2WBk (ORCPT + 99 others); Wed, 29 Apr 2020 18:01:40 -0400 Received: from hqnvemgate26.nvidia.com ([216.228.121.65]:16530 "EHLO hqnvemgate26.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728029AbgD2WBf (ORCPT ); Wed, 29 Apr 2020 18:01:35 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate26.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 29 Apr 2020 15:01:22 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 29 Apr 2020 15:01:34 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 29 Apr 2020 15:01:34 -0700 Received: from HQMAIL107.nvidia.com (172.20.187.13) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 29 Apr 2020 22:01:34 +0000 Received: from rnnvemgw01.nvidia.com (10.128.109.123) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 29 Apr 2020 22:01:34 +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:33 -0700 From: Sowjanya Komatineni To: , , , , , , CC: , , , , , , Subject: [RFC PATCH v11 9/9] arm64: tegra: Add Tegra VI CSI support in device tree Date: Wed, 29 Apr 2020 15:00:06 -0700 Message-ID: <1588197606-32124-10-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=1588197682; bh=yB3b29VbNFtTvMcPZCMVxLppaVECoZp9WEY70dWiuUY=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:X-NVConfidentiality:MIME-Version: Content-Type; b=WWqEtXHco5uQE38Ey3Mm+uqDeDUTE8ZPPSivPe5O07hcioXeoOFQQJB4WElY6zzZF L4sZsJBWUwhesUz2l/tknIuJdFFtEXMXWknPeyhjLtCMcjSGovox5cbl88NVXbfU3+ rfhrwVKyWpTQAjHQ5K++YKwsUpnT1SFJ3ufkSA48JSFPCB6TRnhmu/xmM6rZjMBcDr cefzOQogIMoC3O1Qr61A9Cvjq2BK1w4t4iykxDV/aS53CojqyUWCUI8gohConRcAT2 GVDpxY0WQi0ccaexHTBZhJtd4NvzF/1Zdakoisug1qtYxM3oxoiCpyclqeOZAYHgGn m6bY7xlcG+JnQ== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Tegra210 contains VI controller for video input capture from MIPI CSI camera sensors and also supports built-in test pattern generator. CSI ports can be one-to-one mapped to VI channels for capturing from an external sensor or from built-in test pattern generator. This patch adds support for VI and CSI and enables them in Tegra210 device tree. Signed-off-by: Sowjanya Komatineni --- arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 10 ++++++ arch/arm64/boot/dts/nvidia/tegra210.dtsi | 46 +++++++++++++++++++++++++- 2 files changed, 55 insertions(+), 1 deletion(-) diff --git a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi index 313a4c2..b57d837 100644 --- a/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi @@ -14,6 +14,16 @@ status = "okay"; }; + vi@54080000 { + status = "okay"; + + avdd-dsi-csi-supply = <&vdd_dsi_csi>; + + csi@838 { + status = "okay"; + }; + }; + sor@54580000 { status = "okay"; diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi index 5b1dfd8..cad42a7 100644 --- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi +++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi @@ -137,9 +137,44 @@ vi@54080000 { compatible = "nvidia,tegra210-vi"; - reg = <0x0 0x54080000 0x0 0x00040000>; + reg = <0x0 0x54080000 0x0 0x700>; interrupts = ; status = "disabled"; + assigned-clocks = <&tegra_car TEGRA210_CLK_VI>; + assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>; + + clocks = <&tegra_car TEGRA210_CLK_VI>; + power-domains = <&pd_venc>; + + #address-cells = <1>; + #size-cells = <1>; + + ranges = <0x0 0x0 0x54080000 0x2000>; + + csi@838 { + compatible = "nvidia,tegra210-csi"; + reg = <0x838 0x1300>; + status = "disabled"; + assigned-clocks = <&tegra_car TEGRA210_CLK_CILAB>, + <&tegra_car TEGRA210_CLK_CILCD>, + <&tegra_car TEGRA210_CLK_CILE>, + <&tegra_car TEGRA210_CLK_CSI_TPG>; + assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_P>, + <&tegra_car TEGRA210_CLK_PLL_P>, + <&tegra_car TEGRA210_CLK_PLL_P>; + assigned-clock-rates = <102000000>, + <102000000>, + <102000000>, + <972000000>; + + clocks = <&tegra_car TEGRA210_CLK_CSI>, + <&tegra_car TEGRA210_CLK_CILAB>, + <&tegra_car TEGRA210_CLK_CILCD>, + <&tegra_car TEGRA210_CLK_CILE>, + <&tegra_car TEGRA210_CLK_CSI_TPG>; + clock-names = "csi", "cilab", "cilcd", "cile", "csi_tpg"; + power-domains = <&pd_sor>; + }; }; tsec@54100000 { @@ -839,6 +874,15 @@ reset-names = "vic"; #power-domain-cells = <0>; }; + + pd_venc: venc { + clocks = <&tegra_car TEGRA210_CLK_VI>, + <&tegra_car TEGRA210_CLK_CSI>; + resets = <&mc TEGRA210_MC_RESET_VI>, + <&tegra_car TEGRA210_RST_VI>, + <&tegra_car TEGRA210_CLK_CSI>; + #power-domain-cells = <0>; + }; }; sdmmc1_3v3: sdmmc1-3v3 { -- 2.7.4