From: Stefano Babic <sbabic@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2 08/14] imx: mx6ul_14x14_evk: support lcdif display
Date: Tue, 20 Oct 2015 15:41:58 +0200 [thread overview]
Message-ID: <562644A6.10302@denx.de> (raw)
In-Reply-To: <1445341184-22272-9-git-send-email-Peng.Fan@freescale.com>
Hi Peng,
On 20/10/2015 13:39, Peng Fan wrote:
> Support lcdif display:
> 1. Add pinmux and pad settings for LCDIF
> 2. Introduce setup_lcd to do the settings for LCDIF
> 3. Enable VIDEO related macros in board header files
> 4. Add a new env videomode which is needed by mxsfb.c. The
> settings for videomode in this patch is for TFT43AB.
> 5. Tested on mx6ul 14x14/9x9 evk.
>
> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
>
> V2:
> Rebased to Latest U-Boot, resolve conflicts.
>
> board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 63 +++++++++++++++++++++++
> include/configs/mx6ul_14x14_evk.h | 18 +++++++
> 2 files changed, 81 insertions(+)
>
> diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> index 8650f35..287a421 100644
> --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> @@ -52,6 +52,9 @@ DECLARE_GLOBAL_DATA_PTR;
> PAD_CTL_SPEED_HIGH | \
> PAD_CTL_DSE_48ohm | PAD_CTL_SRE_FAST)
>
> +#define LCD_PAD_CTRL (PAD_CTL_HYS | PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \
> + PAD_CTL_PKE | PAD_CTL_SPEED_MED | PAD_CTL_DSE_40ohm)
> +
> #define MDIO_PAD_CTRL (PAD_CTL_PUS_100K_UP | PAD_CTL_PUE | \
> PAD_CTL_DSE_48ohm | PAD_CTL_SRE_FAST | PAD_CTL_ODE)
>
> @@ -568,6 +571,62 @@ int board_phy_config(struct phy_device *phydev)
> }
> #endif
>
> +#ifdef CONFIG_VIDEO_MXS
> +static iomux_v3_cfg_t const lcd_pads[] = {
> + MX6_PAD_LCD_CLK__LCDIF_CLK | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_ENABLE__LCDIF_ENABLE | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_HSYNC__LCDIF_HSYNC | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_VSYNC__LCDIF_VSYNC | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA00__LCDIF_DATA00 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA01__LCDIF_DATA01 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA02__LCDIF_DATA02 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA03__LCDIF_DATA03 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA04__LCDIF_DATA04 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA05__LCDIF_DATA05 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA06__LCDIF_DATA06 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA07__LCDIF_DATA07 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA08__LCDIF_DATA08 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA09__LCDIF_DATA09 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA10__LCDIF_DATA10 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA11__LCDIF_DATA11 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA12__LCDIF_DATA12 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA13__LCDIF_DATA13 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA14__LCDIF_DATA14 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA15__LCDIF_DATA15 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA16__LCDIF_DATA16 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA17__LCDIF_DATA17 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA18__LCDIF_DATA18 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA19__LCDIF_DATA19 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA20__LCDIF_DATA20 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA21__LCDIF_DATA21 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA22__LCDIF_DATA22 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> + MX6_PAD_LCD_DATA23__LCDIF_DATA23 | MUX_PAD_CTRL(LCD_PAD_CTRL),
> +
> + /* LCD_RST */
> + MX6_PAD_SNVS_TAMPER9__GPIO5_IO09 | MUX_PAD_CTRL(NO_PAD_CTRL),
> +
> + /* Use GPIO for Brightness adjustment, duty cycle = period. */
> + MX6_PAD_GPIO1_IO08__GPIO1_IO08 | MUX_PAD_CTRL(NO_PAD_CTRL),
> +};
> +
> +static int setup_lcd(void)
> +{
> + enable_lcdif_clock(0);
> +
> + imx_iomux_v3_setup_multiple_pads(lcd_pads, ARRAY_SIZE(lcd_pads));
> +
> + /* Reset the LCD */
> + gpio_direction_output(IMX_GPIO_NR(5, 9) , 0);
> + udelay(500);
> + gpio_direction_output(IMX_GPIO_NR(5, 9) , 1);
> +
Just a curiosity: a display reset ? Why is this needed ?
> + /* Set Brightness to high */
> + gpio_direction_output(IMX_GPIO_NR(1, 8) , 1);
> +
> + return 0;
> +}
> +#endif
> +
> int board_early_init_f(void)
> {
> setup_iomux_uart();
> @@ -600,6 +659,10 @@ int board_init(void)
> board_qspi_init();
> #endif
>
> +#ifdef CONFIG_VIDEO_MXS
> + setup_lcd();
> +#endif
> +
> return 0;
> }
>
> diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h
> index d5faae6..5779632 100644
> --- a/include/configs/mx6ul_14x14_evk.h
> +++ b/include/configs/mx6ul_14x14_evk.h
> @@ -77,6 +77,7 @@
> "fdt_addr=0x83000000\0" \
> "boot_fdt=try\0" \
> "ip_dyn=yes\0" \
> + "videomode=video=ctfb:x:480,y:272,depth:24,pclk:108695,le:8,ri:4,up:2,lo:4,hs:41,vs:10,sync:0,vmode:0\0" \
Why this ? Setup is in device tree, we should not need it, do we ?
> "mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
> "mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
> "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
> @@ -242,4 +243,21 @@
>
> #define CONFIG_IMX_THERMAL
>
> +#define CONFIG_VIDEO
> +#ifdef CONFIG_VIDEO
> +#define CONFIG_CFB_CONSOLE
> +#define CONFIG_VIDEO_MXS
> +#define CONFIG_VIDEO_LOGO
> +#define CONFIG_VIDEO_SW_CURSOR
> +#define CONFIG_VGA_AS_SINGLE_DEVICE
> +#define CONFIG_SYS_CONSOLE_IS_IN_ENV
> +#define CONFIG_SPLASH_SCREEN
> +#define CONFIG_SPLASH_SCREEN_ALIGN
> +#define CONFIG_CMD_BMP
> +#define CONFIG_BMP_16BPP
> +#define CONFIG_VIDEO_BMP_RLE8
> +#define CONFIG_VIDEO_BMP_LOGO
> +#define MXS_LCDIF_BASE MX6UL_LCDIF1_BASE_ADDR
> +#endif
> +
> #endif
>
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
next prev parent reply other threads:[~2015-10-20 13:41 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-20 11:39 [U-Boot] [PATCH V2 00/14] imx: mx6/7: support lcdif Peng Fan
2015-10-20 11:39 ` [U-Boot] [PATCH V2 01/14] mxs: add parameter base_addr for mxs_set_lcdclk Peng Fan
2015-10-20 13:05 ` Stefano Babic
2015-10-26 2:57 ` Peng Fan
2015-10-26 15:52 ` Stefano Babic
2015-10-27 5:28 ` Peng Fan
2015-10-20 11:39 ` [U-Boot] [PATCH V2 02/14] sandisk: sfp: correct function name Peng Fan
2015-10-20 13:09 ` Stefano Babic
2015-10-20 11:39 ` [U-Boot] [PATCH V2 03/14] xfi3: " Peng Fan
2015-10-20 13:10 ` Stefano Babic
2015-10-26 3:00 ` Peng Fan
2015-10-20 11:39 ` [U-Boot] [PATCH V2 04/14] imx: imx-common: move lcdif structure and macro definition to imx-common Peng Fan
2015-10-20 13:15 ` Stefano Babic
2015-10-26 3:06 ` Peng Fan
2015-10-20 11:39 ` [U-Boot] [PATCH V2 05/14] imx: mx6: fix register address Peng Fan
2015-10-20 11:39 ` [U-Boot] [PATCH V2 06/14] imx: mx6: crm_reg: add LCDIF related macros Peng Fan
2015-10-20 13:19 ` Stefano Babic
2015-10-20 11:39 ` [U-Boot] [PATCH V2 07/14] imx: mx6: add clock api for lcdif Peng Fan
2015-10-20 13:39 ` Stefano Babic
2015-10-26 3:13 ` Peng Fan
2015-10-27 7:36 ` Peng Fan
2015-10-20 11:39 ` [U-Boot] [PATCH V2 08/14] imx: mx6ul_14x14_evk: support lcdif display Peng Fan
2015-10-20 13:41 ` Stefano Babic [this message]
2015-10-26 3:18 ` Peng Fan
2015-10-20 11:39 ` [U-Boot] [PATCH V2 09/14] video: mxsfb: introduce lcdif_power_down Peng Fan
2015-10-20 13:59 ` Stefano Babic
2015-10-26 3:24 ` Peng Fan
2015-10-20 11:39 ` [U-Boot] [PATCH V2 10/14] imx: mx6: implement reset_misc Peng Fan
2015-10-20 11:39 ` [U-Boot] [PATCH V2 11/14] imx: imx-common: power down lcdif before boot os Peng Fan
2015-10-20 11:39 ` [U-Boot] [PATCH V2 12/14] imx: mx7: compile misc.c for mx7 Peng Fan
2015-10-20 11:39 ` [U-Boot] [PATCH V2 13/14] imx: mx7 use the common lcdif register structure Peng Fan
2015-10-20 11:39 ` [U-Boot] [PATCH V2 14/14] imx: mx7dsabresd: support lcdif Peng Fan
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=562644A6.10302@denx.de \
--to=sbabic@denx.de \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox