mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: gianluca <gianlucarenzi@eurekelettronica.it>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: Using LVDS in a iMX6Q/D from Barebox
Date: Tue, 14 Feb 2017 11:32:44 +0100	[thread overview]
Message-ID: <e2e3ab47-9cbd-0437-d889-a98704459d1b@eurekelettronica.it> (raw)
In-Reply-To: <20170210073541.73bsfjhk3fu7nnwm@pengutronix.de>

On 02/10/2017 08:35 AM, Sascha Hauer wrote:
> Hi Gianluca,
>
> On Thu, Feb 09, 2017 at 03:37:41PM +0100, gianluca wrote:
>> Hello,
>> I would like to know if there is a clear way on using the lvds pins to drive
>> a LVDS display in a custom made board, based on iMX6Q (in the near future
>> the iMX6Dual).
>
> I think what you are looking for is of_device_enable_and_register() or
> of_device_enable_and_register_by_name(). You can call it on either the
> lvds device node or the hdmi device node, depending on whether you found
> an EEPROM or not.
>

I think this is not necessary as during boot I can see clearly:

> imx-ipuv3 2400000.ipu: IPUv3H probed
> imx-ipuv3 2800000.ipu: IPUv3H probed
> imx-ldb ldb.10: probe failed: Invalid argument
> imx-hdmi 120000.hdmi: Detected HDMI controller 0x13:0xa:0xa0:0xc1

So barebox is trying to bring-up the imx-ldb but fails.

So I suppose something is wrong in my device tree structure.

The LVDS port is connected to LVDS0_... pins of the iMX6Q SoC.

Here is the snippet of .dts file:

> &ldb {
> 	status = "okay";
>
> 	lvds0: lvds-channel@0 {
> 		fsl,data-mapping = "spwg";
> 		fsl,data-width = <16>;
> 		status = "okay";
>
> 		display-timings {
> 			native-mode = <&am128080n3tz>;
> 			/* DISPLAY 1280x800 AMPIRE AM1280800N3TZ */
> 			am128080n3tz: am1280800n3tz {
> 				clock-frequency = <71000000>;
> 				hactive = <1280>;
> 				vactive = <800>;
> 				hback-porch = <50>;
> 				hfront-porch = <50>;
> 				vback-porch = <5>;
> 				vfront-porch = <5>;
> 				hsync-len = <60>;
> 				vsync-len = <13>;
> 				hsync-active = <0>;
> 				vsync-active = <0>;
> 				de-active = <1>;
> 				pixelclk-active = <1>;
> 			};
> 			/* DISPLAY 1024x600 AMPIRE AM-1024600LTM LVDS */
> 			am1024600l: am1024600l {
> 				clock-frequency = <51200000>;
> 				hactive = <1024>;
> 				vactive = <600>;
> 				hback-porch = <0>;
> 				hfront-porch = <320>;
> 				vback-porch = <0>;
> 				vfront-porch = <35>;
> 				hsync-len = <1>;
> 				vsync-len = <1>;
> 				hsync-active = <0>;
> 				vsync-active = <0>;
> 				de-active = <1>;
> 				pixelclk-active = <0>;
> 			};
> 			/* DISPLAY 800x480 */
> 			ph800480t013: ph800480t013 {
> 				clock-frequency = <33300000>;
> 				hactive = <800>;
> 				vactive = <480>;
> 				hback-porch = <46>;
> 				hfront-porch = <210>;
> 				vback-porch = <23>;
> 				vfront-porch = <22>;
> 				hsync-len = <1>;
> 				vsync-len = <1>;
> 				hsync-active = <0>;
> 				vsync-active = <0>;
> 				de-active = <1>;
> 				pixelclk-active = <0>;
> 			};
> 		};
>
> 		port@4 {
> 			reg = <4>;
> 			lvds0_out: endpoint {
> 				remote-endpoint = <&panel_in_lvds0>;
> 			};
> 		};
>
> 	};
> };
>

I was thinking of changing the node 'native-mode' in the init scripts 
depending on the data read from a special eeprom (like EDID stuff).
Is this correct?

Here is the panel section:

> 	panel_lvds0 {
> 		backlight = <&backlight_lvds>;
> 		port {
> 			panel_in_lvds0: endpoint {
> 				remote-endpoint = <&lvds0_out>;
> 			};
> 		};
> 	};

And finally the backlight_lvds section:

> 	backlight_lvds: backlight-lvds {
> 		pinctrl-names = "default";
> 		pinctrl-0 = <&pinctrl_backlight>;
> 		compatible = "pwm-backlight";
> 		pwms = <&pwm1 0 5000000>;
> 		brightness-levels = <0 4 8 16 32 64 128 255>;
> 		default-brightness-level = <6>;
> 		power-supply = <&reg_3p3v>;
> 		status = "okay";
> 	};

With the pinctrl_backlight defined as:

> 		pinctrl_backlight: backlightgrp {
> 			fsl,pins = <
> 				MX6QDL_PAD_SD1_DAT3__PWM1_OUT			0x80000000
> 			>;
> 		};

How to proceed further? I would like to have some useful debug 
information (if any) on device driver probing...

Best Regards,
-- 
Eurek s.r.l.                          |
Electronic Engineering                | http://www.eurek.it
via Celletta 8/B, 40026 Imola, Italy  | Phone: +39-(0)542-609120
p.iva 00690621206 - c.f. 04020030377  | Fax:   +39-(0)542-609212

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2017-02-14 10:33 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09 14:37 gianluca
2017-02-10  7:35 ` Sascha Hauer
2017-02-14 10:32   ` gianluca [this message]
2017-02-14 10:59     ` gianluca
2017-02-15 10:07       ` gianluca
2017-02-15 11:51     ` Sascha Hauer
2017-02-15 14:34       ` gianluca
2017-02-16  7:28         ` Sascha Hauer
2017-02-16  9:07           ` gianluca
2017-02-16 14:43           ` gianluca
2017-02-16 15:50             ` Lucas Stach
2017-02-17 15:38               ` gianluca
2017-02-22  8:00                 ` Sascha Hauer
2017-02-22  8:26                   ` gianluca
2017-02-22  9:05                     ` gianluca
2017-02-22  9:40                     ` Sascha Hauer
2017-02-23 12:10                       ` gianluca

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=e2e3ab47-9cbd-0437-d889-a98704459d1b@eurekelettronica.it \
    --to=gianlucarenzi@eurekelettronica.it \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.de \
    /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