Re: [PATCH 0/3] move gpt per clk parent for ipg_per to OSC

3 messages, 3 authors, 2014-09-05 · open the first message on its own page

Re: [PATCH 0/3] move gpt per clk parent for ipg_per to OSC

From: Fabio Estevam <hidden>
Date: 2014-09-04 22:50:35

On Wed, Sep 3, 2014 at 4:36 AM, Anson Huang [off-list ref] wrote:
Currently, gpt timer's clock is from ipg_per, and ipg_per clock is from ipg
on most of i.MX6 series SOCs, but ipg's rate may be scaled when system enters
low bus mode for saving power, then gpt timer's clock rate will be scaled as
well, as system timer should be kept stable and NOT drift, better to keep gpt
timer's clk at fixed rate, on i.MX6Q TO > 1.0, i.MX6DL and i.MX6SX, there is
OSC clk available for gpt timer, we should enable this feature, the hardware
design is as below:

i.MX6Q TO > 1.0: GPT_CR_CLKSRC, 3b'101 selects fix clock
    of OSC / 8 for gpt per clk;
i.MX6DL and i.MX6SX: GPT_CR_CLKSRC, 3b'101 selects OSC
    for gpt per clk, and we must enable GPT_CR_24MEM to
    enable OSC clk source for gpt per, GPT_PR_PRESCALER24M
    is for pre-scaling of this OSC clk, here set it to 8
    to make gpt per clk is 3MHz;
i.MX6SL: ipg_per can be from OSC directly, so no need to
    implement this new clk source for gpt per.

Anson Huang (3):
  ARM: imx: add gpt_3m clk for i.mx6qdl
  ARM: dts: imx6: change gpt per clk to gpt_3m on i.mx6qdl and i.mx6sx
  ARM: imx: source gpt per clk from OSC for system timer
This patch series works fine if we use the new dtb and new kernel.

However, booting a kernel with these series applied and using an old
dtb we get a system with broken timer.

'sleep 1' takes something like 20 seconds in this case.

Re: [PATCH 0/3] move gpt per clk parent for ipg_per to OSC

From: Shawn Guo <hidden>
Date: 2014-09-05 00:35:25

On Thu, Sep 04, 2014 at 07:50:35PM -0300, Fabio Estevam wrote:
This patch series works fine if we use the new dtb and new kernel.

However, booting a kernel with these series applied and using an old
dtb we get a system with broken timer.

'sleep 1' takes something like 20 seconds in this case.
Oh, yes.  It breaks the compatibility with existing DTB.  Dropped the
patches for now.

Anson,

We may need to query the clock rate and then decide how to set up those
register bits?

Shawn

RE: [PATCH 0/3] move gpt per clk parent for ipg_per to OSC

From: Anson.Huang@freescale.com <hidden>
Date: 2014-09-05 03:32:14

Hi, Shawn and Fabio
	Thanks for advice, I have sent out V2 patch, please help review.

Best regards!
Anson Huang


-----Original Message-----
From: Shawn Guo [mailto:shawn.guo at freescale.com] 
Sent: 2014-09-05 8:35 AM
To: Fabio Estevam
Cc: Huang Yongcai-B20788; Sascha Hauer; devicetree at vger.kernel.org; linux-arm-kernel at lists.infradead.org
Subject: Re: [PATCH 0/3] move gpt per clk parent for ipg_per to OSC

On Thu, Sep 04, 2014 at 07:50:35PM -0300, Fabio Estevam wrote:
This patch series works fine if we use the new dtb and new kernel.

However, booting a kernel with these series applied and using an old 
dtb we get a system with broken timer.

'sleep 1' takes something like 20 seconds in this case.
Oh, yes.  It breaks the compatibility with existing DTB.  Dropped the patches for now.

Anson,

We may need to query the clock rate and then decide how to set up those register bits?

Shawn
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help