All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] sunxi: video: Configure only LVDS pins instead of all LCD pins when LVDS interface selected
Date: Wed, 16 Mar 2016 15:16:06 +0100	[thread overview]
Message-ID: <56E96AA6.3060901@redhat.com> (raw)
In-Reply-To: <1457111336-4035-1-git-send-email-lyu@micile.com>

Hi,

On 04-03-16 18:08, Lawrence Yu wrote:
> The behavior before this patch would attempt to configure the mux
> setting for pins 0 to 27 on PORTD to all be setting 3 for LVDS.  The
> LVDS interface actually only uses pins 18 to 27 and not pins 0 to 27
> as in the parallel LCD interface.  This patch restricts the
> configuration to only the relevant pins 18 to 27 on PORTD.
>
> This was tested on a sun8i A33 tablet with an LVDS screen.  MMC1 has
> the capability to use pins 2 to 7 on PORTD and the mux on those pins
> was being inadvertently set to setting 3 for MMC functionality which
> this patch corrects.
>
> Signed-off-by: Lawrence Yu <lyu@micile.com>

Thanks for the patch, the lvds using pins 18 - 27 is only true
on A23/A33 on e.g. A10 it uses pins 0-19. So I've changed the
condition to:

#if defined CONFIG_MACH_SUN8I && defined CONFIG_VIDEO_LCD_IF_LVDS

and merged the patch with that change.

Regards,

Hans


> ---
>
>   drivers/video/sunxi_display.c | 4 ++++
>   1 file changed, 4 insertions(+)
>
> diff --git a/drivers/video/sunxi_display.c b/drivers/video/sunxi_display.c
> index 9fee66a..3674ae1 100644
> --- a/drivers/video/sunxi_display.c
> +++ b/drivers/video/sunxi_display.c
> @@ -767,7 +767,11 @@ static void sunxi_lcdc_tcon0_mode_set(const struct ctfb_res_modes *mode,
>   		(struct sunxi_lcdc_reg *)SUNXI_LCD0_BASE;
>   	int bp, clk_delay, clk_div, clk_double, pin, total, val;
>
> +#ifdef CONFIG_VIDEO_LCD_IF_LVDS
> +	for (pin = SUNXI_GPD(18); pin <= SUNXI_GPD(27); pin++) {
> +#else
>   	for (pin = SUNXI_GPD(0); pin <= SUNXI_GPD(27); pin++) {
> +#endif
>   #ifdef CONFIG_VIDEO_LCD_IF_PARALLEL
>   		sunxi_gpio_set_cfgpin(pin, SUNXI_GPD_LCD0);
>   #endif
>

      reply	other threads:[~2016-03-16 14:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-04 17:08 [U-Boot] [PATCH] sunxi: video: Configure only LVDS pins instead of all LCD pins when LVDS interface selected Lawrence Yu
2016-03-16 14:16 ` Hans de Goede [this message]

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=56E96AA6.3060901@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.