linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* About 1-Wire driver of OMAP4
@ 2012-12-10  1:54 herman516
  2012-12-17 23:21 ` Paul Walmsley
  0 siblings, 1 reply; 3+ messages in thread
From: herman516 @ 2012-12-10  1:54 UTC (permalink / raw)
  To: linux-omap

Hi,

I implemented gas gauge driver by 1-Wire interface in OMAP4 CPU, the
driver we used is a GPIO pin to simulate 1-Wire bus but it sometimes can't
work well of timing issue. So we want to use HDQ/1Wire controller in OMAP4,
does anyone have experience of OMAP4 1-Wire driver of using its controller?
Our gas gauge is DS2780 and we use "android-omap-3.0" kernel branch. I
tried to do below steps but it still can't work. Or do you have any
suggestion? Thanks.

1. Add hwmod of hdq1w in omap_hwmod_44xx_data.c file
2. Use omap_hdq.c file
3. Select "CONFIG_HDQ_MASTER_OMAP", "CONFIG_W1", "CONFIG_HDQ_MASTER_OMAP"
and "CONFIG_BATTERY_DS2780" in menuconfig.


Regards,
Herman

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: About 1-Wire driver of OMAP4
  2012-12-10  1:54 About 1-Wire driver of OMAP4 herman516
@ 2012-12-17 23:21 ` Paul Walmsley
  2012-12-18 13:47   ` HermanMao(毛宏仁)
  0 siblings, 1 reply; 3+ messages in thread
From: Paul Walmsley @ 2012-12-17 23:21 UTC (permalink / raw)
  To: herman516; +Cc: linux-omap, NeilBrown

Hi

On Mon, 10 Dec 2012, herman516@totalbb.net.tw wrote:

> I implemented gas gauge driver by 1-Wire interface in OMAP4 CPU, the
> driver we used is a GPIO pin to simulate 1-Wire bus but it sometimes can't
> work well of timing issue. So we want to use HDQ/1Wire controller in OMAP4,
> does anyone have experience of OMAP4 1-Wire driver of using its controller?
> Our gas gauge is DS2780 and we use "android-omap-3.0" kernel branch. I
> tried to do below steps but it still can't work. Or do you have any
> suggestion? Thanks.
> 
> 1. Add hwmod of hdq1w in omap_hwmod_44xx_data.c file
> 2. Use omap_hdq.c file
> 3. Select "CONFIG_HDQ_MASTER_OMAP", "CONFIG_W1", "CONFIG_HDQ_MASTER_OMAP"
> and "CONFIG_BATTERY_DS2780" in menuconfig.

HDQ1W should work on OMAP3 in mainline if the 

hdq_experimental_idle_fix_3.5

branch of

git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-devel.git

is added in.  (Of course, it will have to be forward-ported to take 
account of the recent common clock framework changes.)

But that branch won't help the OMAP4 situation, since it doesn't have 
explicit interface clock autoidle control.  The question here is whether 
the OMAP4 has the same hardware idle handling bug that the OMAP3 did.  If 
so, you might have to enable another IP block in the L4_PER clockdomain 
while the HDQ is active :-( It might also be possible to keep the L4_PER 
clockdomain in software-supervised mode; not sure.

So.  You might want to try backporting the HDQ driver in current mainline, 
along with the relevant hwmod integration data and any associated hwmod 
code, to the 3.0 Android kernel you're using.  Then if that doesn't help, 
maybe try the l4_per hacks mentioned above.

With regards to OMAP3, we still need to plug in a more permanent fix for 
mainline.  Unfortunately it's fallen down the priority ladder :-(


- Paul

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: About 1-Wire driver of OMAP4
  2012-12-17 23:21 ` Paul Walmsley
@ 2012-12-18 13:47   ` HermanMao(毛宏仁)
  0 siblings, 0 replies; 3+ messages in thread
From: HermanMao(毛宏仁) @ 2012-12-18 13:47 UTC (permalink / raw)
  To: 'Paul Walmsley'; +Cc: linux-omap, 'NeilBrown'

Hi Paul,

Thanks your suggestion, I will take a look.

Regards,
Herman

-----Original Message-----
From: Paul Walmsley [mailto:paul@pwsan.com] 
Sent: Tuesday, December 18, 2012 7:21 AM
To: herman516@totalbb.net.tw
Cc: linux-omap@vger.kernel.org; NeilBrown
Subject: Re: About 1-Wire driver of OMAP4

Hi

On Mon, 10 Dec 2012, herman516@totalbb.net.tw wrote:

> I implemented gas gauge driver by 1-Wire interface in OMAP4 CPU, the
> driver we used is a GPIO pin to simulate 1-Wire bus but it sometimes can't
> work well of timing issue. So we want to use HDQ/1Wire controller in
OMAP4,
> does anyone have experience of OMAP4 1-Wire driver of using its
controller?
> Our gas gauge is DS2780 and we use "android-omap-3.0" kernel branch. I
> tried to do below steps but it still can't work. Or do you have any
> suggestion? Thanks.
> 
> 1. Add hwmod of hdq1w in omap_hwmod_44xx_data.c file
> 2. Use omap_hdq.c file
> 3. Select "CONFIG_HDQ_MASTER_OMAP", "CONFIG_W1", "CONFIG_HDQ_MASTER_OMAP"
> and "CONFIG_BATTERY_DS2780" in menuconfig.

HDQ1W should work on OMAP3 in mainline if the 

hdq_experimental_idle_fix_3.5

branch of

git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-devel.git

is added in.  (Of course, it will have to be forward-ported to take 
account of the recent common clock framework changes.)

But that branch won't help the OMAP4 situation, since it doesn't have 
explicit interface clock autoidle control.  The question here is whether 
the OMAP4 has the same hardware idle handling bug that the OMAP3 did.  If 
so, you might have to enable another IP block in the L4_PER clockdomain 
while the HDQ is active :-( It might also be possible to keep the L4_PER 
clockdomain in software-supervised mode; not sure.

So.  You might want to try backporting the HDQ driver in current mainline, 
along with the relevant hwmod integration data and any associated hwmod 
code, to the 3.0 Android kernel you're using.  Then if that doesn't help, 
maybe try the l4_per hacks mentioned above.

With regards to OMAP3, we still need to plug in a more permanent fix for 
mainline.  Unfortunately it's fallen down the priority ladder :-(


- Paul


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-12-18 13:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-10  1:54 About 1-Wire driver of OMAP4 herman516
2012-12-17 23:21 ` Paul Walmsley
2012-12-18 13:47   ` HermanMao(毛宏仁)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).