public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: David Lechner <david@lechnology.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] davinci: omapl138_lcdk: fix PLL0 frequency
Date: Thu, 15 Mar 2018 09:32:47 -0500	[thread overview]
Message-ID: <1ec2acb6-15c0-90e5-ade5-e45fbbaafb62@lechnology.com> (raw)
In-Reply-To: <25797151-dd92-411e-7d20-c2af0c16a294@ti.com>

On 03/15/2018 07:34 AM, Sekhar Nori wrote:
> Hi David,
> 
> On Thursday 15 March 2018 07:06 AM, David Lechner wrote:
>> commit 1601dd97edc6 ("davinci: omapl138_lcdk: increase PLL0 frequency")
>> changed the PLL0 frequency to 456MHz, which is needed for the LCDC IP
>> block. However, in doing so, it caused the PLLOUT clock to be outside
>> of the allowable specifications given in the OMAP-L138 data sheet. (It
>> says PLLOUT must be 600MHz max). It also uses a PLLM value outside of
>> the range given in the TRM (it says PLLM must in the range 0 to 0x1f).
>>
>> So here is what we have currently:
>>
>> PLLOUT = 24 / (0 + 1) * (37 + 1) = 912MHz (out of spec)
>>           ^     ^         ^
>>         CLKIN PREDIV    PLLM (out of spec)
>>
>> input to PLLDIVn = 912 / (1 + 1) = 456MHz (desired result)
>>                      ^     ^
>>                   PLLOUT POSTDIV
>>
>> This changes the PLLM value to 18 and the POSTDIV value to 0 so that
>> PLLOUT is now within specification but we still get the desired
>> result.
>>
>> PLLOUT = 24 / (0 + 1) * (18 + 1) = 456MHz (within spec)
>>           ^     ^         ^
>>         CLKIN PREDIV     PLLM
>>
>> input to PLLDIVn = 456 / (0 + 1) = 456MHz (desired result)
>>                      ^     ^
>>                   PLLOUT POSTDIV
>>
>> Fixes: 1601dd97edc6 ("davinci: omapl138_lcdk: increase PLL0 frequency")
>> Signed-off-by: David Lechner <david@lechnology.com>
> 
> Thanks for the patch and great description. It looks correct to me.
> Hopefully I can provide some testing feedback too soon.
> 
>> ---
>>
>> FYI, I haven't been able to test this patch yet. The changes affect the SPL
>> image, which has to be flashed to SPI. I am having trouble with the flash
>> utility[1] running on Linux. It gets stuck at:
>>
>>     0% [ ------------------------------------------------------------ ]
>>                  Programming application into flash...
>>
>> So, if anyone has some advice on how to make it work or can test the patch,
>> that would be helpful.
> 
> The easiest thing to do would be to shift to MMC/SD boot so you can
> easily update images.
> 
> Before starting though, I would take note of out-of-the-box boot switch
> settings and also take a disk image backup of the SD card. Or better
> yet, just use another SD card.
> 
> Setup the SW1 dip switch thus:
> http://processors.wiki.ti.com/index.php/How_to_boot_OMAP-L138_LCDK_from_SD_card#Settings_DIP_switches_to_SD.2FMMC_boot_mode
> 
> Prepare an SD card for boot:
> 
> $ sudo dd if=u-boot.ais of=/dev/sd<N> seek=117 bs=512 conv=fsync

Thanks for the tips. I've actually done exactly that (using my own SD card).

However, these changes affect the u-boot SPL image only. I was able to put
the regular u-boot.ais on the SD card, but I'm having troubling figuring
out how to install the SPL image.

  parent reply	other threads:[~2018-03-15 14:32 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-15  1:36 [U-Boot] [PATCH] davinci: omapl138_lcdk: fix PLL0 frequency David Lechner
2018-03-15 10:39 ` Peter Howard
2018-03-15 12:34 ` Sekhar Nori
2018-03-15 13:42   ` Sekhar Nori
2018-03-15 14:31     ` Sekhar Nori
2018-03-15 14:56       ` Tom Rini
2018-03-15 15:02         ` David Lechner
2018-03-16  8:04           ` Sekhar Nori
2018-03-15 15:01       ` Lokesh Vutla
2018-03-16  7:51         ` Sekhar Nori
2018-03-15 14:32   ` David Lechner [this message]
2018-03-16  9:26     ` Sekhar Nori
2018-03-16 15:45       ` David Lechner
2018-03-18  4:21         ` Peter Howard
2018-03-18  4:22         ` Peter Howard
2018-03-16  6:26 ` Mike Looijmans
2018-03-16 15:56   ` David Lechner
2018-03-18 18:26     ` Mike Looijmans
2018-03-18  4:12 ` Peter Howard
2018-03-22 20:35 ` [U-Boot] " Tom Rini

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=1ec2acb6-15c0-90e5-ade5-e45fbbaafb62@lechnology.com \
    --to=david@lechnology.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