All of lore.kernel.org
 help / color / mirror / Atom feed
From: Nikolay Petukhov <nikolaypetukhov@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Enable HDMI on i.MX6 without VPU
Date: Thu, 2 Nov 2017 13:00:02 +0500	[thread overview]
Message-ID: <CAHDRk==x+zXdmb0Uov_Pc8V3SENnLcrKFr7gd8=XY4Ew7oG5dw@mail.gmail.com> (raw)
In-Reply-To: <45e1cceb-9a97-bc18-c072-a4937c2e2919@denx.de>

Hi Stefano,

On i.MX6 SoCs without VPU(MCIMX6Q4AVT10AD) the HDMI is not working.
That's because hdmi_isfr's parent clock, video_27m, is not correctly
ungated.

The video_27m clock is gated by CCM_CCGR3[CG8] - mipi_core_cfg_clk_enable.

On i.MX6 SoCs with VPU, the HDMI is working thanks to the
CCM_CMEOR[mod_en_ov_vpu] bit which makes the video_27m ungated whatever
is in CCM_CCGR3[CG8].

This patch make the HDMI to work in every case by gating the mipi_core_cfg
clock.

Signed-off-by: Nikolay Petukhov <nikolaypetukhov@gmail.com>
Cc: Stefano Babic sbabic at denx.de
---
 arch/arm/mach-imx/mx6/soc.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c
index b724668..8b976f7 100644
--- a/arch/arm/mach-imx/mx6/soc.c
+++ b/arch/arm/mach-imx/mx6/soc.c
@@ -655,6 +655,11 @@ void imx_setup_hdmi(void)
     int reg, count;
     u8 val;

+    /* Turn on MIPI core cfg clock */
+    reg = readl(&mxc_ccm->CCGR3);
+    reg |= MXC_CCM_CCGR3_MIPI_CORE_CFG_MASK;
+    writel(reg, &mxc_ccm->CCGR3);
+
     /* Turn on HDMI PHY clock */
     reg = readl(&mxc_ccm->CCGR2);
     reg |=  MXC_CCM_CCGR2_HDMI_TX_IAHBCLK_MASK|
-- 
2.7.4





2017-10-31 15:33 GMT+05:00 Stefano Babic <sbabic@denx.de>:

> Hi Nikolay,
>
> On 10/10/2017 16:27, Nikolay Petukhov wrote:
> > Hi, all
> >
> > This patch enables HDMI on CPU without VPU.
> > A similar patch for the mainline
> > kernel:https://patchwork.kernel.org/patch/9874831/
> > Tested on MCIMX6Q4AVT10AD.
> >
>
> This is stored in the commit message if I apply. Please rewrite the
> commit message to be suitable for inclusion.
>
> >
> > Signed-off-by: Nikolay Petukhov <nikolaypetukhov@gmail.com
> > <mailto:nikolaypetukhov@gmail.com>>
> > Cc: Stefano Babic sbabic at denx.de <mailto:sbabic@denx.de>
> > ---
> >  arch/arm/mach-imx/mx6/soc.c | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/arch/arm/mach-imx/mx6/soc.c b/arch/arm/mach-imx/mx6/soc.c
> > index b724668..8b976f7 100644
> > --- a/arch/arm/mach-imx/mx6/soc.c
> > +++ b/arch/arm/mach-imx/mx6/soc.c
> > @@ -655,6 +655,11 @@ void imx_setup_hdmi(void)
> >      int reg, count;
> >      u8 val;
> >
> > +    /* Turn on MIPI core cfg clock */
> > +    reg = readl(&mxc_ccm->CCGR3);
> > +    reg |= MXC_CCM_CCGR3_MIPI_CORE_CFG_MASK;
> > +    writel(reg, &mxc_ccm->CCGR3);
> > +
> >      /* Turn on HDMI PHY clock */
> >      reg = readl(&mxc_ccm->CCGR2);
> >      reg |=  MXC_CCM_CCGR2_HDMI_TX_IAHBCLK_MASK|
> > --
> > 2.7.4
> >
> >
>
> 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
> =====================================================================
>



-- 
Nikolay

      reply	other threads:[~2017-11-02  8:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-10 14:27 [U-Boot] [PATCH] Enable HDMI on i.MX6 without VPU Nikolay Petukhov
2017-10-31 10:33 ` Stefano Babic
2017-11-02  8:00   ` Nikolay Petukhov [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='CAHDRk==x+zXdmb0Uov_Pc8V3SENnLcrKFr7gd8=XY4Ew7oG5dw@mail.gmail.com' \
    --to=nikolaypetukhov@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.