All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Opaniuk <igor.opaniuk@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/2] imx: mx6ul_14x14_evk: convert to DM_VIDEO
Date: Fri, 2 Aug 2019 15:05:11 +0300	[thread overview]
Message-ID: <CAByghJYAkqbB9sWybU3q8ai9UonwdX7fj=MXyuJnSThsCU0xEw@mail.gmail.com> (raw)
In-Reply-To: <20190801061818.23585-2-peng.fan@nxp.com>

Hi Peng,

On Thu, Aug 1, 2019 at 9:03 AM Peng Fan <peng.fan@nxp.com> wrote:
>
> To support DM_VIDEO,
>  Add display node for lcdif
>  Drop board iomuxc settings.
>  Enable DM_VIDEO
>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>
> V1:
>  This patch could be applied directly, but it needs
>  https://patchwork.ozlabs.org/patch/1133224/ patchset work let
>  DM VIDEO work.
>
>  arch/arm/dts/imx6ul-14x14-evk-u-boot.dtsi         | 49 ++++++++++++++++++-
>  board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c | 57 ++++++++---------------
>  configs/mx6ul_14x14_evk_defconfig                 |  2 +-
>  include/configs/mx6ul_14x14_evk.h                 |  2 +-
>  4 files changed, 70 insertions(+), 40 deletions(-)
>
> diff --git a/arch/arm/dts/imx6ul-14x14-evk-u-boot.dtsi b/arch/arm/dts/imx6ul-14x14-evk-u-boot.dtsi
> index 77cb461a21..e9efdb9831 100644
> --- a/arch/arm/dts/imx6ul-14x14-evk-u-boot.dtsi
> +++ b/arch/arm/dts/imx6ul-14x14-evk-u-boot.dtsi
> @@ -3,8 +3,55 @@
>   * Copyright 2018 NXP
>   */
>
> +&{/aliases} {
> +       u-boot,dm-pre-reloc;
> +       display0 = &lcdif;
> +};
> +
>  &qspi {
>         flash0: n25q256a at 0 {
>                 compatible = "jedec,spi-nor";
>         };
> -};
> \ No newline at end of file
> +};
> +
> +&{/soc} {
> +       u-boot,dm-pre-reloc;
> +};
> +
> +&aips2 {
> +       u-boot,dm-pre-reloc;
> +};
> +
> +&iomuxc {
> +       u-boot,dm-pre-reloc;
> +};
> +
> +&lcdif {
> +       display = <&display0>;
> +       u-boot,dm-pre-reloc;
> +
> +       display0: display at 0 {
> +               bits-per-pixel = <16>;
> +               bus-width = <24>;
> +
> +               display-timings {
> +                       native-mode = <&timing0>;
> +
> +                       timing0: timing0 {
> +                               clock-frequency = <9200000>;
> +                               hactive = <480>;
> +                               vactive = <272>;
> +                               hfront-porch = <8>;
> +                               hback-porch = <4>;
> +                               hsync-len = <41>;
> +                               vback-porch = <2>;
> +                               vfront-porch = <4>;
> +                               vsync-len = <10>;
> +                               hsync-active = <0>;
> +                               vsync-active = <0>;
> +                               de-active = <1>;
> +                               pixelclk-active = <0>;
> +                       };
> +               };
> +       };
> +};
> diff --git a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> index af5af4d50a..126a805163 100644
> --- a/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> +++ b/board/freescale/mx6ul_14x14_evk/mx6ul_14x14_evk.c
> @@ -27,6 +27,10 @@
>  #include "../common/pfuze.h"
>  #include <usb.h>
>  #include <usb/ehci-ci.h>
> +#ifdef CONFIG_DM_VIDEO
> +#include <bmp_logo_data.h>
> +#include <video.h>
> +#endif
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> @@ -420,40 +424,8 @@ int board_phy_config(struct phy_device *phydev)
>  }
>  #endif
>
> -#ifdef CONFIG_VIDEO_MXS
> +#ifdef CONFIG_DM_VIDEO
>  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),
>  };
> @@ -504,10 +476,6 @@ int board_init(void)
>         board_qspi_init();
>  #endif
>
> -#ifdef CONFIG_VIDEO_MXS
> -       setup_lcd();
> -#endif
> -
>         return 0;
>  }
>
> @@ -536,6 +504,21 @@ int board_late_init(void)
>                 env_set("board_rev", "14X14");
>  #endif
>
> +#if defined(CONFIG_DM_VIDEO)
> +       struct udevice *dev;
> +       int ret;
> +
> +       ret = uclass_get_device(UCLASS_VIDEO, 0, &dev);
> +       if (ret)
> +               return ret;
> +
> +       setup_lcd();
> +
> +       ret = video_bmp_display(dev, (ulong)bmp_logo_bitmap, 0, 0, true);
> +       if (ret)
> +               return ret;
> +#endif
> +
What about this approach [1] for showing boot logo? Now it also works
for DM_VIDEO=y setups.

>         return 0;
>  }
>
> diff --git a/configs/mx6ul_14x14_evk_defconfig b/configs/mx6ul_14x14_evk_defconfig
> index 1d777b5fb2..10fb07dd2c 100644
> --- a/configs/mx6ul_14x14_evk_defconfig
> +++ b/configs/mx6ul_14x14_evk_defconfig
> @@ -67,4 +67,4 @@ CONFIG_FSL_QSPI=y
>  CONFIG_USB=y
>  CONFIG_DM_USB=y
>  CONFIG_USB_STORAGE=y
> -CONFIG_VIDEO=y
> +CONFIG_DM_VIDEO=y
> diff --git a/include/configs/mx6ul_14x14_evk.h b/include/configs/mx6ul_14x14_evk.h
> index 42e511591c..f8a5fd30f3 100644
> --- a/include/configs/mx6ul_14x14_evk.h
> +++ b/include/configs/mx6ul_14x14_evk.h
> @@ -196,7 +196,7 @@
>  #define CONFIG_IMX_THERMAL
>
>  #ifndef CONFIG_SPL_BUILD
> -#ifdef CONFIG_VIDEO
> +#if defined(CONFIG_DM_VIDEO)
>  #define CONFIG_VIDEO_MXS
>  #define CONFIG_VIDEO_LOGO
>  #define CONFIG_SPLASH_SCREEN
> --
> 2.16.4
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> https://lists.denx.de/listinfo/u-boot

[1] https://patchwork.ozlabs.org/patch/1106985/

-- 
Best regards - Freundliche Grüsse - Meilleures salutations

Igor Opaniuk

mailto: igor.opaniuk at gmail.com
skype: igor.opanyuk
+380 (93) 836 40 67
http://ua.linkedin.com/in/iopaniuk

  parent reply	other threads:[~2019-08-02 12:05 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-01  6:02 [U-Boot] [PATCH 1/2] imx: mx6ul_14x14_evk: Fix SPL boot Peng Fan
2019-08-01  6:02 ` [U-Boot] [PATCH 2/2] imx: mx6ul_14x14_evk: convert to DM_VIDEO Peng Fan
2019-08-01 14:06   ` Fabio Estevam
2019-08-02  6:35     ` Peng Fan
2019-08-02  6:39       ` Jagan Teki
2019-08-02  6:42         ` Peng Fan
2019-08-02  7:23           ` Peng Fan
2019-08-05 13:11       ` Anatolij Gustschin
2019-08-02 12:05   ` Igor Opaniuk [this message]
2019-08-05  2:08     ` Peng Fan
2019-08-05  9:28   ` Peng Fan
2019-08-05 13:15     ` Anatolij Gustschin
2019-08-06  1:11       ` Peng Fan
2019-08-05 13:01   ` Anatolij Gustschin
2019-08-13  8:24   ` Peng Fan
2019-08-01 13:59 ` [U-Boot] [PATCH 1/2] imx: mx6ul_14x14_evk: Fix SPL boot Fabio Estevam
2019-08-13  8:22 ` 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='CAByghJYAkqbB9sWybU3q8ai9UonwdX7fj=MXyuJnSThsCU0xEw@mail.gmail.com' \
    --to=igor.opaniuk@gmail.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.