Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1030551ybv; Thu, 20 Feb 2020 11:46:40 -0800 (PST) X-Google-Smtp-Source: APXvYqzsIDVnsDMVnYNdAq5//XhMsXJNCHV8UnE0u5q2s+R4ZBKmx0MnN0M7MGCLzDdfIkPhsrYR X-Received: by 2002:a05:6830:1294:: with SMTP id z20mr24284262otp.60.1582228000136; Thu, 20 Feb 2020 11:46:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582228000; cv=none; d=google.com; s=arc-20160816; b=Yp7dc6lStJ1qwkXJW79YPpvz0zkw01Of/cfc2+Sfdo1Gsas7CvXxmAXFN+wCH6wktM z1PVkZlBzphooNEmVBfDjoJtJWlrwRnWhD5ion31/tjHMRcLWhYkwSHfEPoHQ7hHn3x4 i6kOeKlngOeURj8bWt9jRDhYUNhqStQnLlP9Go8IYYfEt4lfYDfjISQjnvvIVlyYJ93H j35b4MdrzzRUsc4xD+giYfEPPaCYaoACXABS9qb7aKMmnwDO3AOYTcYy020A2tom8xNC xrp7dcbcCUQEHKJpaOYFfC/7uQIKk3u+uDV3tI18akzNTJND/+UVV9S7EVJVWsz8GrX7 U/8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=GNk2ptc1tRqFWQmzFajJt2UclEo36ASo1Mls7xShZB0=; b=wCjDzzDWNpaSdIJK9bp3tJw1oJLhMfrDrJ6AI2XE0bqlINSqc1gdZA0D388sCMcsq5 3Uf9WNfivPE3ql8dg5JbHlPsM4YpRgISB+gFsIySxKPfc7Lj236sZZXRKkaBZFAbzKW7 cO50EGSfcQKOMGSCd2aoQGHNe1h0yJMbBFoga1N+24InH+kCVIQjOBdglHnl/ais8kTO 50NH6pzjPsvqZ6cNBhzsODbjXLv2eyn02sPI5Kl+RvGhns20fMrY+IkbC+wRv2yoz9vz FJgxKY7wozuHzuXg4sTAnODSVbNHun8OfnFXOKlNwnKs3odQxeKHqeqHwPDV3MbtbRLs S2yw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rK4bxvA9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t7si213356otl.133.2020.02.20.11.46.28; Thu, 20 Feb 2020 11:46:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=rK4bxvA9; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728976AbgBTTqJ (ORCPT + 99 others); Thu, 20 Feb 2020 14:46:09 -0500 Received: from mail.kernel.org ([198.145.29.99]:43602 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728334AbgBTTqJ (ORCPT ); Thu, 20 Feb 2020 14:46:09 -0500 Received: from mail-qk1-f170.google.com (mail-qk1-f170.google.com [209.85.222.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E234324672; Thu, 20 Feb 2020 19:46:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1582227968; bh=8n/tGiChs7HK/SdTYqKi3okvm4Cg4Bv8EZZNVfm7Rl4=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=rK4bxvA9PtMY23VLjMSOMRUCge4roI7ZgaALYYOFedEP37YZyJVCGZz4qvNuwG2jL 7uiuFMvQlbhERXukI9wesmMP2DAJ3XQQv/yQR6GcalXZA+FKiXTXQGXwwOeTbX9MYg lytJ5qwTaDyn3KruD79UyF2pCyGco4GHouwww0Bw= Received: by mail-qk1-f170.google.com with SMTP id d11so4711935qko.8; Thu, 20 Feb 2020 11:46:07 -0800 (PST) X-Gm-Message-State: APjAAAUn/Rsc/4W49ampcgSP/PAvoadjYcqDnAKr9ZgYyJvqUvQJ7GP6 NrA/y161AlqtqXmSrr2WWgmUHl2mTni2/Ea1nQ== X-Received: by 2002:a37:6457:: with SMTP id y84mr30478394qkb.254.1582227966959; Thu, 20 Feb 2020 11:46:06 -0800 (PST) MIME-Version: 1.0 References: <1581704608-31219-1-git-send-email-skomatineni@nvidia.com> <1581704608-31219-4-git-send-email-skomatineni@nvidia.com> <20200218231503.GA19099@bogus> <5948bf42-9be2-8cf0-1c28-80f69b708c65@nvidia.com> In-Reply-To: <5948bf42-9be2-8cf0-1c28-80f69b708c65@nvidia.com> From: Rob Herring Date: Thu, 20 Feb 2020 13:45:56 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH v3 3/6] dt-binding: tegra: Add VI and CSI bindings To: Sowjanya Komatineni Cc: Thierry Reding , Jon Hunter , Frank Chen , Hans Verkuil , Helen Koike , Stephen Boyd , Linux Media Mailing List , devicetree@vger.kernel.org, linux-clk , linux-tegra , "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 18, 2020 at 9:28 PM Sowjanya Komatineni wrote: > > > On 2/18/20 3:15 PM, Rob Herring wrote: > > External email: Use caution opening links or attachments > > > > > > On Fri, Feb 14, 2020 at 10:23:25AM -0800, Sowjanya Komatineni wrote: > >> Tegra contains VI controller which can support up to 6 MIPI CSI > >> camera sensors. > >> > >> Each Tegra CSI port from CSI unit can be one-to-one mapper to > >> VI channel and can capture from an external camera sensor or > >> from built-in test pattern generator. > >> > >> This patch adds dt-bindings for Tegra VI and CSI. > >> > >> Signed-off-by: Sowjanya Komatineni > >> --- > >> .../display/tegra/nvidia,tegra20-host1x.txt | 55 ++++++++++++++++++---- > >> 1 file changed, 47 insertions(+), 8 deletions(-) > >> > >> diff --git a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt > >> index 9999255ac5b6..3d0ed540a646 100644 > >> --- a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt > >> +++ b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.txt > >> @@ -40,14 +40,24 @@ of the following host1x client modules: > >> > >> Required properties: > >> - compatible: "nvidia,tegra-vi" > >> - - reg: Physical base address and length of the controller's registers. > >> + - reg: Physical base address and length of the controller registers. > >> - interrupts: The interrupt outputs from the controller. > >> - - clocks: Must contain one entry, for the module clock. > >> + - clocks: Must contain an entry for the module clock "vi" > >> See ../clocks/clock-bindings.txt for details. > >> - resets: Must contain an entry for each entry in reset-names. > >> See ../reset/reset.txt for details. > >> - - reset-names: Must include the following entries: > >> - - vi > >> + - reset-names: Must include the entry "vi" > >> + > >> + Tegra210 has CSI part of VI sharing same host interface and register > >> + space. So, VI device node should have CSI child node. > >> + > >> + - csi: mipi csi interface to vi > >> + > >> + Required properties: > >> + - compatible: "nvidia,tegra-csi" > >> + - reg: Physical base address and length of the controller registers. > >> + - clocks: Must contain entries csi, cilab, cilcd, cile clocks. > >> + See ../clocks/clock-bindings.txt for details. > >> > >> - epp: encoder pre-processor > >> > >> @@ -310,12 +320,41 @@ Example: > >> }; > >> > >> vi { > >> - compatible = "nvidia,tegra20-vi"; > >> - reg = <0x54080000 0x00040000>; > >> + compatible = "nvidia,tegra210-vi"; > >> + reg = <0x0 0x54080000 0x0 0x700>; > >> interrupts = <0 69 0x04>; > >> - clocks = <&tegra_car TEGRA20_CLK_VI>; > >> - resets = <&tegra_car 100>; > >> + assigned-clocks = <&tegra_car TEGRA210_CLK_VI>; > >> + assigned-clock-parents = <&tegra_car TEGRA210_CLK_PLL_C4_OUT0>; > >> + clocks = <&tegra_car TEGRA210_CLK_VI>; > >> + clock-names = "vi"; > >> + resets = <&tegra_car 20>; > >> reset-names = "vi"; > >> + > >> + #address-cells = <2>; > >> + #size-cells = <2>; > >> + > >> + ranges = <0x0 0x54080808 0x0 0x54080808 0x0 0x2000>; > >> + > >> + csi@0x54080838 { > > Drop '0x' > Will fix in v4 > > > >> + compatible = "nvidia,tegra210-csi"; > >> + reg = <0x0 0x54080838 0x0 0x2000>; > > Kind of odd that this address and ranges address are not the same. And > > also wrong that the size here exceeds the bounds of ranges. > > > > Also, best practice is to make the child address 0 or relative to the > > parent. > > Actual CSI starts at offset 0x808 but we don't use couple of registers > at offset 0x808. > > Will update ranges in v4 to start from 0x838 offset and will make child > address relative to parent. Seems odd, but okay. And you will never, ever need to use those registers no matter what, and we can reject any DT change trying to change it later? Rob