devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-RM9K5IK7kjKj5M59NBduVrNAH6kLmebB@public.gmane.org>
To: Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
	Devicetree Discuss
	<devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org>,
	U-Boot Mailing List
	<u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org>,
	Jerry Van Baren
	<vanbaren-He//nVnquyzQT0dZR+AlfA@public.gmane.org>,
	Tom Warren <twarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Subject: Re: [PATCH v3 06/18] tegra: fdt: Add LCD definitions for Tegra
Date: Tue, 31 Jul 2012 11:51:16 +0200	[thread overview]
Message-ID: <20120731095116.GA16155@avionic-0098.adnet.avionic-design.de> (raw)
In-Reply-To: <CAPnjgZ2SbVVKxUdW1cvLf_9rAWLWeiVr-y6S_sz-Uw5_O_AyQA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>


[-- Attachment #1.1: Type: text/plain, Size: 4953 bytes --]

On Tue, Jul 31, 2012 at 10:27:23AM +0100, Simon Glass wrote:
> +Thierry
> 
> Hi,
> 
> On Thu, Jul 12, 2012 at 4:25 PM, Simon Glass <sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> wrote:
> > Add LCD definitions and also a proposed binding for LCD displays.
> >
> > The PWM is as per what will likely be committed to linux-next soon.
> >
> > The displaymode binding comes from a proposal here:
> >
> > http://lists.freedesktop.org/archives/dri-devel/2012-July/024875.html
> >
> > The panel binding is new, and fills a need to specify the panel
> > timings and other tegra-specific information. Should a binding appear
> > that allows the pwm to handle this automatically, we can revisit
> > this.
> >
> 
> Any comments on this binding please? The main addition from Thierry's
> one posted on LMKL is the LCD resolution selection.

There's no such thing as the panel bindings on Linux. I think nobody's
done that before, there's also no suitable software abstraction, but I
suppose that should be irrelevant for this discussion.

> > +Optional properties (rgb):
> > + - nvidia,frame-buffer: address of frame buffer (if omitted it will be
> > +               calculated)
> > +       - This may be useful to share an address between U-Boot and Linux and
> > +               avoid boot-time corruption / flicker
> > +
> > +
> > +The panel node describes the panel itself.
> > +
> > +Required properties (panel) :
> > + - nvidia,pwm : pwm to use to set display contrast (see tegra20-pwm.txt)
> > + - nvidia,panel-timings: 4 cells containing required timings in ms:
> > +       * delay between panel_vdd-rise and data-rise
> > +       * delay between data-rise and backlight_vdd-rise
> > +       * delay between backlight_vdd and pwm-rise
> > +       * delay between pwm-rise and backlight_en-rise
> > +
> > +Optional GPIO properies all have (phandle, GPIO number, flags):
> > + - nvidia,backlight-enable-gpios: backlight enable GPIO
> > + - nvidia,lvds-shutdown-gpios: LVDS power shutdown GPIO
> > + - nvidia,backlight-vdd-gpios: backlight power GPIO
> > + - nvidia,panel-vdd-gpios: panel power GPIO
> > +
> > +Example:
> > +
> > +host1x {
> > +       compatible = "nvidia,tegra20-host1x", "simple-bus";
> > +       reg = <0x50000000 0x00024000>;
> > +       interrupts = <0 65 0x04   /* mpcore syncpt */
> > +                       0 67 0x04>; /* mpcore general */
> > +
> > +       #address-cells = <1>;
> > +       #size-cells = <1>;
> > +
> > +       ranges = <0x54000000 0x54000000 0x04000000>;
> > +
> > +       dc@54200000 {
> > +               compatible = "nvidia,tegra20-dc";
> > +               reg = <0x54200000 0x00040000>;
> > +               interrupts = <0 73 0x04>;
> > +
> > +               rgb {
> > +                       status = "okay";
> > +                       /* Seaboard has 1366x768 */
> > +                       clock = <70600000>;
> > +                       xres = <1366>;
> > +                       yres = <768>;
> > +                       left-margin = <58>;
> > +                       right-margin = <58>;
> > +                       hsync-len = <58>;
> > +                       lower-margin = <4>;
> > +                       upper-margin = <4>;
> > +                       vsync-len = <4>;
> > +                       hsync-active-high;
> > +                       nvidia,frame-buffer = <0x2f680000>;
> > +                       nvidia,bits-per-pixel = <16>;
> > +                       nvidia,panel = <&lcd_panel>;
> > +               };

Perhaps it would be useful to add an extra node for the mode definition,
if only to keep the data separate from that of the rgb node. I know that
there currently are no other properties, but the rgb node was supposed
to define the output or connector. If ever the same needs to be done for
any of the TVO or DSI outputs, more properties may be needed.

Furthermore the code to parse this would be more generic because you
could pass it any DT node. Of course the nvidia,-prefixed properties
wouldn't be part of that subnode because they don't define the mode as
such.

Thinking about it some more, maybe the mode information should really be
part of the panel description below.

> > +       };
> > +};
> > +
> > +lcd_panel: panel {
> > +       nvidia,pwm = <&pwm 2 0>;
> > +       nvidia,backlight-enable-gpios = <&gpio 28 0>;   /* PD4 */
> > +       nvidia,lvds-shutdown-gpios = <&gpio 10 0>;      /* PB2 */
> > +       nvidia,backlight-vdd-gpios = <&gpio 176 0>;     /* PW0 */
> > +       nvidia,panel-vdd-gpios = <&gpio 22 0>;          /* PC6 */
> > +       nvidia,panel-timings = <4 203 17 15>;
> > +};

If we can reach some kind of agreement on the power-sequencing code that
Alexandre (Cc'ed) is working on, then this can be replaced with a more
generic description. This also has the usual problem of being a non-
addressable top-level node...

Thierry

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

[-- Attachment #2: Type: text/plain, Size: 192 bytes --]

_______________________________________________
devicetree-discuss mailing list
devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org
https://lists.ozlabs.org/listinfo/devicetree-discuss

  parent reply	other threads:[~2012-07-31  9:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1342106718-3058-1-git-send-email-sjg@chromium.org>
2012-07-12 15:25 ` [PATCH v3 02/18] fdt: Add header guard to fdtdec.h Simon Glass
2012-07-19 13:49   ` Mike Frysinger
     [not found] ` <1342106718-3058-1-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-07-12 15:25   ` [PATCH v3 01/18] fdt: Tidy debugging, add to fdtdec_get_int/addr() Simon Glass
2012-07-12 15:25   ` [PATCH v3 05/18] tegra: fdt: Add pwm binding and node Simon Glass
2012-07-12 15:25   ` [PATCH v3 06/18] tegra: fdt: Add LCD definitions for Tegra Simon Glass
     [not found]     ` <1342106718-3058-7-git-send-email-sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2012-07-31  9:27       ` Simon Glass
     [not found]         ` <CAPnjgZ2SbVVKxUdW1cvLf_9rAWLWeiVr-y6S_sz-Uw5_O_AyQA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-07-31  9:51           ` Thierry Reding [this message]
     [not found]             ` <20120731095116.GA16155-RM9K5IK7kjIyiCvfTdI0JKcOhU4Rzj621B7CTYaBSLdn68oJJulU0Q@public.gmane.org>
2012-09-27 19:44               ` Simon Glass
2012-07-31 16:12           ` Stephen Warren
2012-09-27 13:58             ` Simon Glass
     [not found]               ` <CAPnjgZ2NAf4PF0_U9hQeJzpdL87ZNq+WpxsbFJQHbh4rY2MoEg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-27 15:49                 ` Stephen Warren
2012-09-27 20:27                   ` Simon Glass
     [not found]                     ` <CAPnjgZ2R=G=xmjdoP74JeAknwH9QGx8+mED7TQ8Kd_zEmcVwtQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-27 23:21                       ` Stephen Warren
2012-09-27 23:37                         ` Simon Glass
     [not found]                           ` <CAPnjgZ3JuE_jiSRGW6o3eCbp4cLCf1uenKz4kPCpfqLJ3Mdmjw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2012-09-28  5:42                             ` Thierry Reding
2012-07-12 15:25   ` [PATCH v3 16/18] tegra: fdt: Add LCD definitions for Seaboard Simon Glass

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=20120731095116.GA16155@avionic-0098.adnet.avionic-design.de \
    --to=thierry.reding-rm9k5ik7kjkj5m59nbduvrnah6klmebb@public.gmane.org \
    --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \
    --cc=sjg-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=twarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
    --cc=u-boot-0aAXYlwwYIKGBzrmiIFOJg@public.gmane.org \
    --cc=vanbaren-He//nVnquyzQT0dZR+AlfA@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).