devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
To: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Subject: Tegra DRM device tree bindings
Date: Tue, 26 Jun 2012 12:55:13 +0200	[thread overview]
Message-ID: <20120626105513.GA9552@avionic-0098.mockup.avionic-design.de> (raw)

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

Hi,

while I haven't got much time to work on the actual code right now, I
think it might still be useful if we could get the device tree binding
to a point where everybody is happy with it. That'll also save me some
time once I get to writing the code because I won't have to redo it over
again. =)

So here's the current proposal:

	host1x {
		compatible = "nvidia,tegra20-host1x", "simple-bus";
		reg = <0x50000000 0x00024000>;
		interrupts = <0 64 0x04   /* cop syncpt */
			      0 65 0x04   /* mpcore syncpt */
			      0 66 0x04   /* cop general */
			      0 67 0x04>; /* mpcore general */

		#address-cells = <1>;
		#size-cells = <1>;

		ranges = <0x54000000 0x54000000 0x04000000>;

		status = "disabled";

		gart = <&gart>;

		/* video-encoding/decoding */
		mpe {
			reg = <0x54040000 0x00040000>;
			interrupts = <0 68 0x04>;
			status = "disabled";
		};

		/* video input */
		vi {
			reg = <0x54080000 0x00040000>;
			interrupts = <0 69 0x04>;
			status = "disabled";
		};

		/* EPP */
		epp {
			reg = <0x540c0000 0x00040000>;
			interrupts = <0 70 0x04>;
			status = "disabled";
		};

		/* ISP */
		isp {
			reg = <0x54100000 0x00040000>;
			interrupts = <0 71 0x04>;
			status = "disabled";
		};

		/* 2D engine */
		gr2d {
			reg = <0x54140000 0x00040000>;
			interrupts = <0 72 0x04>;
			status = "disabled";
		};

		/* 3D engine */
		gr3d {
			reg = <0x54180000 0x00040000>;
			status = "disabled";
		};

		/* display controllers */
		dc1: dc@54200000 {
			compatible = "nvidia,tegra20-dc";
			reg = <0x54200000 0x00040000>;
			interrupts = <0 73 0x04>;
			status = "disabled";
		};

		dc2: dc@54240000 {
			compatible = "nvidia,tegra20-dc";
			reg = <0x54240000 0x00040000>;
			interrupts = <0 74 0x04>;
			status = "disabled";
		};

		/* outputs */
		rgb {
			compatible = "nvidia,tegra20-rgb";
			status = "disabled";
		};

		hdmi {
			compatible = "nvidia,tegra20-hdmi";
			reg = <0x54280000 0x00040000>;
			interrupts = <0 75 0x04>;
			status = "disabled";
		};

		tvo {
			compatible = "nvidia,tegra20-tvo";
			reg = <0x542c0000 0x00040000>;
			interrupts = <0 76 0x04>;
			status = "disabled";
		};

		dsi {
			compatible = "nvidia,tegra20-dsi";
			reg = <0x54300000 0x00040000>;
			status = "disabled";
		};
	};

This really isn't anything new but merely brings the Tegra DRM binding
in sync with other devices in tegra20.dtsi (disable devices by default,
leave out unit addresses for unique nodes). The only actual change is
that host1x clients are now children of the host1x node. The children
are instantiated by the initial call to of_platform_populate() since the
host1x node is also marked compatible with "simple-bus".

An alternative would be to call of_platform_populate() from the host1x
driver. This has the advantage that it could integrate better with the
host1x bus implementation that Terje is working on, but it also needs
additional code to tear down the devices when the host1x driver is
unloaded because a module reload would try to create duplicate devices
otherwise.

The rgb node is something that I don't quite know how to handle yet.
Since it is really part of the display controller and uses its register
space, it isn't quite correct to represent it as a separate device. But
we will need a separate node to make it available as a connector, which
will become more obvious below.

Perhaps the ranges property can also be used to remap the reg properties
of the child nodes so that they can be specified as an offset into the
host1x aperture instead of an address in the CPU address space. But
that's just a minor issue because the OF code should be able to handle
it transparently.

Board DTS files could then extend this with board-specific requirements
and connectors. The following describes the Medcom Wide:

	host1x {
		carveout = <0x0e000000 0x02000000>;
		display-controllers = <&dc1>;
		status = "okay";

		dc@54200000 {
			status = "okay";
		};

		lvds: rgb {
			status = "okay";
		};
	};

	connectors {
		#address-cells = <1>;
		#size-cells = <0>;

		connector@0 {
			reg = <0>;
			edid = /incbin/("tegra-medcom.edid");
			output = <&lvds>;
		};
	};

Basically this turns on the first display controller and the RGB/LVDS
output and hooks up a static EDID block with the LVDS output. There is
also a carveout property which might be a better replacement for the
"crippled" GART on Tegra20. Alternatively the CMA might work just as
well instead.

The Plutux can be described like this:

	host1x {
		carveout = <0x0e000000 0x02000000>;
		display-controllers = <&dc1 &dc2>;
		status = "okay";

		dc@54200000 {
			status = "okay";
		};

		hdmi: hdmi {
			vdd-supply = <&ldo7_reg>;
			pll-supply = <&ldo8_reg>;
			status = "okay";

		};
	};

	connectors {
		#address-cells = <1>;
		#size-cells = <0>;

		connector@0 {
			reg = <0>;
			output = <&hdmi>;
			ddc = <&ddc>;

			hpd-gpio = <&gpio 111 0>; /* PN7 */
		};
	};

Which is similar to the Medcom Wide, only it uses the HDMI output and
hooks it up with one of the Tegra's I2C controllers to do EDID probing
via DDC. Additionally it can detect whether an HDMI cable is connected
using the GPIO specified by the hpd-gpio property.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

             reply	other threads:[~2012-06-26 10:55 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26 10:55 Thierry Reding [this message]
     [not found] ` <20120626105513.GA9552-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-06-26 12:47   ` Tegra DRM device tree bindings Lucas Stach
2012-06-26 13:57     ` Thierry Reding
2012-06-26 13:01   ` Terje Bergström
     [not found]     ` <4FE9B291.2020305-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-26 13:41       ` Thierry Reding
     [not found]         ` <20120626134122.GA1115-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-06-26 14:02           ` Terje Bergström
     [not found]             ` <4FE9C0E9.7060301-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-26 17:41               ` Stephen Warren
     [not found]                 ` <4FE9F457.6090104-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-26 19:27                   ` Thierry Reding
     [not found]                     ` <20120626192712.GA5247-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-06-26 19:38                       ` Stephen Warren
     [not found]                         ` <4FEA0F99.3080603-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-27  5:10                           ` Terje Bergström
2012-06-26 17:43           ` Stephen Warren
     [not found]             ` <4FE9F4CA.10907-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-26 19:31               ` Thierry Reding
     [not found]                 ` <20120626193145.GB5247-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-06-26 19:39                   ` Stephen Warren
2012-06-27  5:24                   ` Terje Bergström
2012-06-26 17:46       ` Stephen Warren
     [not found]         ` <4FE9F582.6010805-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-26 19:39           ` Thierry Reding
2012-06-27  6:13           ` Terje Bergström
     [not found]             ` <4FEAA4A0.3060407-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-27  6:37               ` Thierry Reding
2012-06-26 13:02   ` Hiroshi Doyu
     [not found]     ` <20120626160224.40ba10a26e3dd3a56b1f312c-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-26 14:00       ` Thierry Reding
     [not found]         ` <20120626140033.GC1115-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-06-27  1:46           ` Mark Zhang
     [not found]             ` <23B010BBA481A74B98487467C29BA57BF2361DA3AA-Q4EWCATADntDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-06-27  2:20               ` Stephen Warren
     [not found]                 ` <4FEA6E09.30800-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-27  2:32                   ` Mark Zhang
     [not found]                     ` <23B010BBA481A74B98487467C29BA57BF2361DA3C4-Q4EWCATADntDw2glCA4ptUEOCMrvLtNR@public.gmane.org>
2012-06-27  2:48                       ` Stephen Warren
     [not found]                         ` <4FEA7472.7050201-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-27  5:14                           ` Thierry Reding
     [not found]                             ` <20120627051418.GB7177-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-06-27  5:28                               ` Mark Zhang
2012-06-27  8:13                               ` Lucas Stach
2012-06-30 17:54                                 ` Thierry Reding
2012-06-27 12:59                               ` Hiroshi Doyu
     [not found]                                 ` <20120627155907.871b2a506374b7db14c202c4-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-27 14:08                                   ` Thierry Reding
     [not found]                                     ` <20120627140809.GD19319-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-06-27 14:29                                       ` Hiroshi Doyu
     [not found]                                         ` <20120627172914.30a2ccfd1344161ca7724722-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-27 14:44                                           ` Thierry Reding
     [not found]                                             ` <20120627144414.GA20681-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-06-27 15:59                                               ` Lucas Stach
2012-06-28  6:06                                                 ` Hiroshi Doyu
     [not found]                                                   ` <20120628090650.b915ad756c91d62d658eb53a-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-28  8:11                                                     ` Lucas Stach
2012-06-28 11:12                                                 ` Thierry Reding
     [not found]                                                   ` <20120628111253.GC15137-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-06-28 16:51                                                     ` Stephen Warren
     [not found]                                                       ` <4FEC8B91.6010107-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-28 17:19                                                         ` Lucas Stach
2012-06-28 17:33                                                           ` Stephen Warren
     [not found]                                                             ` <4FEC9584.4080100-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-28 18:19                                                               ` Thierry Reding
2012-06-29  1:17                                                           ` Mark Zhang
2012-06-29  5:57                                                           ` Mark Zhang
2012-06-29 13:20                                                           ` Terje Bergström
     [not found]                                                             ` <4FEDAB9F.5040406-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-30 18:01                                                               ` Thierry Reding
     [not found]                                                                 ` <20120630180143.GA23990-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-07-01 17:06                                                                   ` Lucas Stach
2012-07-01 17:00                                                               ` Lucas Stach
2012-06-28 17:01                                                     ` Lucas Stach
2012-06-28  6:18                                               ` Hiroshi Doyu
     [not found]                                                 ` <20120628091853.d4c3d85749f9d41a5dfafd28-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-28 16:46                                                   ` Stephen Warren
     [not found]                                                     ` <4FEC8A82.9090202-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-30 18:04                                                       ` Thierry Reding
2012-06-27 17:56                                           ` Stephen Warren
     [not found]                                             ` <4FEB4953.7060508-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-28  6:24                                               ` Hiroshi Doyu
2012-06-27  5:52                           ` Thierry Reding
2012-06-27 12:50                           ` Hiroshi Doyu
2012-06-27 12:46                       ` Hiroshi Doyu
2012-06-27 12:44           ` Hiroshi Doyu
     [not found]             ` <20120627154400.d9d7db67128404079d98ab39-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2012-06-27 18:02               ` Stephen Warren
     [not found]                 ` <4FEB4AC6.2060909-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-28  6:37                   ` Hiroshi Doyu
2012-06-28 11:58                   ` Thierry Reding
2012-06-26 18:10   ` Stephen Warren
     [not found]     ` <4FE9FB22.1090902-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-26 19:51       ` Thierry Reding
     [not found]         ` <20120626195108.GB5308-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-06-26 22:48           ` Stephen Warren
     [not found]             ` <4FEA3C2E.3030109-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-27  5:07               ` Thierry Reding
     [not found]                 ` <20120627050733.GA7177-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-06-27 17:49                   ` Stephen Warren
     [not found]                     ` <4FEB47B7.4080104-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-06-28 12:07                       ` Thierry Reding
2012-07-05 12:15   ` Thierry Reding
     [not found]     ` <20120705121506.GA23732-RM9K5IK7kjIQXX3q8xo1gnVAuStQJXxyR5q1nwbD4aMs9pC9oP6+/A@public.gmane.org>
2012-07-06  5:29       ` Mark Zhang
2012-07-06 19:59       ` Stephen Warren
     [not found]         ` <4FF74391.5040004-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
2012-07-08  5:53           ` Thierry Reding

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=20120626105513.GA9552@avionic-0098.mockup.avionic-design.de \
    --to=thierry.reding-rm9k5ik7kjkj5m59nbduvrnah6klmebb@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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).