[Letux-kernel] uart idling kills hdq on gta04 / dm3730, iclk issues

Andreas Kemnade andreas at kemnade.info
Wed Sep 26 07:38:27 CEST 2018


on my gta04 I experiment with idling uarts, so that they
runtime-suspend and suspequently some clocks are turned off.
To measure my success, I check the results via a bq27000 fuel gauge
connected to omap_hdq.

Unfortunately that does not work properly. I might get a single
byte written but nothing more.
So there is probably some clock problem.

Things checked:
I forced runtime on by
echo on >power/control for the omap_hdq device

Then I checked by accessing /dev/mem:
CM_FCLKEN1_CORE: mostly unset bits, bit 22 behaves ok
it is 1 when omap_hdq is runtime-active and 0 if not.

So ICLK remains the most interesting:
After some experiments I find the following:
clearing CM_AUTOIDLE1_CORE.AUTO_HDQ (something sets it) and
checking that CM_ICLKEN1_CORE.EN_HDQ is set
makes things work. 

Doing RTFM reveals the following:
 SPRUGN4R: AM/DM37x Multimedia Device
Silicon Revision 1.x TRM (p.2866):
> AUTO_HDQ bit PRCM.CM_AUTOIDLE1_CORE[22] is set. In this case, the
> software must verify that all HDQ/1-Wire transfers are complete
> before enabling the L4 interconnect clock domain idle mode.
>  Otherwise, the HDQ/1-Wire has no way to prevent the clock from being
> cut, because no hardware mechanism exists. The steps listed in this
> section must be verified before putting the L4 clock domain into idle
> state.

So I guess that clearing That AUTO_HDQ bit is actually a good idea,
at least while hdq is used.
But then the next question arises: where is the code which accesses
I only find:
in cm3xxx.c:
        omap2_cm_write_mod_reg(cm_context.core_cm_autoidle1, CORE_MOD,

Maybe I am a bit blind today, can someone enlighten me?

Thanks in advance for any ideas.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.goldelico.com/pipermail/letux-kernel/attachments/20180926/a2be26aa/attachment.asc>

More information about the Letux-kernel mailing list