public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Eric Nelson <eric.nelson@boundarydevices.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] imx: mx6q_4x_mt41j128.cfg: Setup CCM_CCOSR register
Date: Wed, 17 Apr 2013 11:57:45 -0700	[thread overview]
Message-ID: <516EF0A9.8060507@boundarydevices.com> (raw)
In-Reply-To: <1366223610-29127-1-git-send-email-festevam@gmail.com>

Thanks Fabio,

On 04/17/2013 11:33 AM, Fabio Estevam wrote:
> From: Fabio Estevam <fabio.estevam@freescale.com>
>
> Setup CCM_CCOSR register to provide a CKO1 clock frequency of 16.5 MHz.
>
> CKO1 drives sgtl5000 codec clock on mx6qsabrelite and doing this setup in the
> bootloader will allow us to remove a lot of code in arch/arm/mach-imx/mach-imx6q.c
> from the mainline kernel.
>

More importantly than eliminating code in the mainline kernel,
enabling the clock will remove squeal after an ungraceful
reboot (watchdog) if hooked up to speakers. I believe you
can see this under Android by issuing a 'reboot' command.

We've been meaning to push a patch for this for a while.

We did it in two parts.

1.) Add routine to enable the clock:
	https://github.com/boundarydevices/u-boot-imx6/commit/7087d645ea1ad476825ea96a1b6f3747f5980028

2.) Enable it on each of SABRE Lite, Nitrogen6X and one of our custom
boards.
	https://github.com/boundarydevices/u-boot-imx6/commit/44b1015f69b52c0a7d7b930b0607af7a724e29bb

> mx6q_4x_mt41j128.cfg is also used by mx6qsabresd, and it is safe to use it for
> this board as well.
>

Does wandboard also use SGTL5000 connected up to CKO1?

> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
> ---
>   board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg |   11 +++++++++++
>   1 file changed, 11 insertions(+)
>
> diff --git a/board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg b/board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
> index f4cae5e..4661775 100644
> --- a/board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
> +++ b/board/freescale/imx/ddr/mx6q_4x_mt41j128.cfg
> @@ -172,3 +172,14 @@ DATA 4 0x020e0010 0xF00000CF
>   /* set IPU AXI-id0 Qos=0xf(bypass) AXI-id1 Qos=0x7 */
>   DATA 4 0x020e0018 0x007F007F
>   DATA 4 0x020e001c 0x007F007F
> +
> +/*
> + * Setup CCM_CCOSR register as follows:
> + *
> + * cko1_en  = 1	   --> CKO1 enabled
> + * cko1_div = 111  --> divide by 8
> + * cko1_sel = 1011 --> ahb_clk_root
> + *
> + * This sets CKO1 at ahb_clk_root/8 = 132/8 = 16.5 MHz
> + */
> +DATA 4 0x020c4060 0x000000fb
>

  reply	other threads:[~2013-04-17 18:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-17 18:33 [U-Boot] [PATCH] imx: mx6q_4x_mt41j128.cfg: Setup CCM_CCOSR register Fabio Estevam
2013-04-17 18:57 ` Eric Nelson [this message]
2013-04-17 19:22   ` Fabio Estevam
2013-04-18  5:27     ` prem s
2013-04-18 15:56       ` Fabio Estevam
2013-04-25 19:15 ` Stefano Babic

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=516EF0A9.8060507@boundarydevices.com \
    --to=eric.nelson@boundarydevices.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox