linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <treding@nvidia.com>
To: Bryan Wu <pengw@nvidia.com>
Cc: <hansverk@cisco.com>, <linux-media@vger.kernel.org>,
	<ebrower@nvidia.com>, <jbang@nvidia.com>, <swarren@nvidia.com>,
	<davidw@nvidia.com>, <gfitzer@nvidia.com>, <bmurthyv@nvidia.com>
Subject: Re: [PATCH 2/3] ARM64: add tegra-vi support in T210 device-tree
Date: Tue, 22 Sep 2015 14:17:32 +0200	[thread overview]
Message-ID: <20150922121730.GC1417@ulmo.nvidia.com> (raw)
In-Reply-To: <1442861755-22743-3-git-send-email-pengw@nvidia.com>

[-- Attachment #1: Type: text/plain, Size: 4639 bytes --]

Hi Bryan,

This patchset really needs to be Cc'ed to linux-tegra@vger.kernel.org,
it's becoming impossible to track it otherwise.

On Mon, Sep 21, 2015 at 11:55:54AM -0700, Bryan Wu wrote:
[...]
> diff --git a/arch/arm64/boot/dts/nvidia/tegra210.dtsi b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
> index 1168bcd..3f6501f 100644
> --- a/arch/arm64/boot/dts/nvidia/tegra210.dtsi
> +++ b/arch/arm64/boot/dts/nvidia/tegra210.dtsi
> @@ -109,9 +109,181 @@
>  
>  		vi@0,54080000 {
>  			compatible = "nvidia,tegra210-vi";
> -			reg = <0x0 0x54080000 0x0 0x00040000>;
> +			reg = <0x0 0x54080000 0x0 0x800>;

This now no longer matches the address map in the TRM.

>  			interrupts = <GIC_SPI 69 IRQ_TYPE_LEVEL_HIGH>;
>  			status = "disabled";
> +			clocks = <&tegra_car TEGRA210_CLK_VI>,
> +				 <&tegra_car TEGRA210_CLK_CSI>,
> +				 <&tegra_car TEGRA210_CLK_PLL_C>;
> +			clock-names = "vi", "csi", "parent";
> +			resets = <&tegra_car 20>;
> +			reset-names = "vi";
> +
> +			power-domains = <&pmc TEGRA_POWERGATE_VENC>;

As an aside, this will currently prevent the driver from probing because
the generic power domain code will return -EPROBE_DEFER if this property
is encountered but the corresponding driver (for the PMC) hasn't
registered any power domains yet. So until the PMC driver changes have
been merged we can't add these power-domains properties.

That's not something for you to worry about, though. I'll make sure to
strip this out if it happens to get merged before the PMC driver changes
and add it back it afterwards.

> +
> +			iommus = <&mc TEGRA_SWGROUP_VI>;
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +
> +					vi_in0: endpoint {
> +						remote-endpoint = <&csi_out0>;
> +					};
> +				};
> +				port@1 {
> +					reg = <1>;
> +
> +					vi_in1: endpoint {
> +						remote-endpoint = <&csi_out1>;
> +					};
> +				};
> +				port@2 {
> +					reg = <2>;
> +
> +					vi_in2: endpoint {
> +						remote-endpoint = <&csi_out2>;
> +					};
> +				};
> +				port@3 {
> +					reg = <3>;
> +
> +					vi_in3: endpoint {
> +						remote-endpoint = <&csi_out3>;
> +					};
> +				};
> +				port@4 {
> +					reg = <4>;
> +
> +					vi_in4: endpoint {
> +						remote-endpoint = <&csi_out4>;
> +					};
> +				};
> +				port@5 {
> +					reg = <5>;
> +
> +					vi_in5: endpoint {
> +						remote-endpoint = <&csi_out5>;
> +					};
> +				};
> +
> +			};
> +		};
> +
> +		csi@0,54080838 {

I think this and its siblings should be children of the vi node. They
are within the same memory aperture according to the TRM and the fact
that the VI needs to reference the "CSI" clock indicates that the
coupling is tighter than this current DT layout makes it out to be.

> +			compatible = "nvidia,tegra210-csi";
> +			reg = <0x0 0x54080838 0x0 0x700>;

Some of the internal register documentation indicates that the register
range actually starts at an offset of 0x800, it just so happens that we
don't use any of the registers from 0x800 to 0x837. So I think this
needs to be adapted.

> +			clocks = <&tegra_car TEGRA210_CLK_CILAB>;
> +			clock-names = "cil";
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +					#address-cells = <1>;
> +					#size-cells = <0>;
> +					csi_in0: endpoint@0 {
> +						reg = <0x0>;
> +					};
> +					csi_out0: endpoint@1 {
> +						reg = <0x1>;
> +						remote-endpoint = <&vi_in0>;
> +					};
> +				};
> +				port@1 {
> +					reg = <1>;
> +					#address-cells = <1>;
> +					#size-cells = <0>;
> +					csi_in1: endpoint@0 {
> +						reg = <0>;
> +					};
> +					csi_out1: endpoint@1 {
> +						reg = <1>;
> +						remote-endpoint = <&vi_in1>;
> +					};
> +				};
> +			};

This, and the ports subnode of the vi node, is *a lot* of lines to
describe what's effectively a hard-coded association. Nothing in here
can be configured, so I doubt that it is necessary to describe the VI
to this extent in DT.

It's quite difficult to judge because we don't have an actual use-case
yet where real sensors need to be hooked up. Do we have some internal
boards that we can use to prototype this from a DT point of view? What
we'd need is just something that has any sensor connected to one of the
CSI ports so we can see what we really need to fully describe such a
setup.

I'm reluctant to apply something like this, or the corresponding
binding, without at least having attempted to describe a real user.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-09-22 12:17 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-21 18:55 [PATCH 0/3 RFC v3] media: platform: add NVIDIA Tegra VI driver Bryan Wu
2015-09-21 18:55 ` [PATCH 1/3] [media] v4l: tegra: Add " Bryan Wu
2015-09-22  8:52   ` Hans Verkuil
2015-09-22 18:56     ` Bryan Wu
2015-09-22 11:47   ` Thierry Reding
2015-09-22 19:05     ` Bryan Wu
2015-09-21 18:55 ` [PATCH 2/3] ARM64: add tegra-vi support in T210 device-tree Bryan Wu
2015-09-22 12:17   ` Thierry Reding [this message]
2015-09-23  1:26     ` Bryan Wu
2015-09-21 18:55 ` [PATCH 3/3] Documentation: DT bindings: add VI and CSI bindings Bryan Wu
2015-09-22 12:20   ` Thierry Reding
2015-09-22 12:22   ` Thierry Reding
  -- strict thread matches above, loose matches on Subject: below --
2015-11-11 19:50 [PATCH 0/3 RFC v5] media: platform: add NVIDIA Tegra VI driver Bryan Wu
2015-11-11 19:50 ` [PATCH 2/3] ARM64: add tegra-vi support in T210 device-tree Bryan Wu
2015-09-23  1:30 [PATCH 0/3 RFC v3] media: platform: add NVIDIA Tegra VI driver Bryan Wu
2015-09-23  1:30 ` [PATCH 2/3] ARM64: add tegra-vi support in T210 device-tree Bryan Wu
2015-09-16  1:35 [PATCH 0/3 RFC v2] media: platform: add NVIDIA Tegra VI driver Bryan Wu
2015-09-16  1:35 ` [PATCH 2/3] ARM64: add tegra-vi support in T210 device-tree Bryan Wu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150922121730.GC1417@ulmo.nvidia.com \
    --to=treding@nvidia.com \
    --cc=bmurthyv@nvidia.com \
    --cc=davidw@nvidia.com \
    --cc=ebrower@nvidia.com \
    --cc=gfitzer@nvidia.com \
    --cc=hansverk@cisco.com \
    --cc=jbang@nvidia.com \
    --cc=linux-media@vger.kernel.org \
    --cc=pengw@nvidia.com \
    --cc=swarren@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).