From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: Alexandre Belloni <alexandre.belloni@bootlin.com>
Cc: linux-clk@vger.kernel.org, linux-rtc@vger.kernel.org,
Alessandro Zummo <a.zummo@towertech.it>,
Russell King <linux@armlinux.org.uk>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-kernel@vger.kernel.org, kernel@collabora.com
Subject: Re: [RFCv1] rtc: m41t80: disable clock provider support
Date: Fri, 8 Nov 2019 23:34:15 +0100 [thread overview]
Message-ID: <20191108223415.dio3pwkf24jfs5o4@earth.universe> (raw)
In-Reply-To: <20191108175329.GH216543@piout.net>
[-- Attachment #1: Type: text/plain, Size: 1784 bytes --]
Hi,
On Fri, Nov 08, 2019 at 06:53:29PM +0100, Alexandre Belloni wrote:
> On 08/11/2019 18:01:35+0100, Sebastian Reichel wrote:
> > Congatec's QMX6 system on module (SoM) uses a m41t62 as RTC. The
> > modules SQW clock output defaults to 32768 Hz. This behaviour is
> > used to provide the i.MX6 CKIL clock. Once the RTC driver is probed,
> > the clock is disabled and all i.MX6 functionality depending on
> > the 32 KHz clock have undefined behaviour (e.g. the hardware watchdog
> > run to fast or slow).
> >
> > The normal solution would be to properly describe the clock tree
> > in DT, but from the kernel's perspective this is a chicken-and-egg
> > problem: CKIL is required very early, but the clock is only provided
> > after the I2C RTC has been probed.
> >
> > Technically everything is fine by not touching anything, so this
> > works around the issue by disabling the clock handling from the
> > RTC driver. I guess the proper solution would be to simply mark the
> > clock as always-enabled, but this does not seem to be supported by
> > the clock framework.
> >
>
> You need to have a consumer so this clock is not disabled by the CCF
> after seeing nobody uses it.
That's why I was wondering if we can have something like regulator's
always-enabled for clocks.
> If you need it early, you can have a look at rtc-sun6i.c but I
> would like that to not become a recurrent pattern, especially for
> discrete RTCs.
I don't just need it early. The issue is, that CKIL is the 32khz
low frequency clock fed into the i.MX6. It is initialized by the
clock manager, so I need it before any of the SoC clocks are
registered. Without the SoC clocks, the I2C bus cannot be probed
and thus the RTC driver cannot be probed.
-- Sebastian
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2019-11-08 22:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-08 17:01 [RFCv1] rtc: m41t80: disable clock provider support Sebastian Reichel
2019-11-08 17:53 ` Alexandre Belloni
2019-11-08 22:34 ` Sebastian Reichel [this message]
2019-11-09 0:24 ` Stephen Boyd
2019-11-09 1:41 ` Sebastian Reichel
2019-11-09 6:53 ` Stephen Boyd
2019-11-12 15:15 ` Sebastian Reichel
2019-11-12 22:20 ` Stephen Boyd
2019-11-13 22:27 ` Sebastian Reichel
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=20191108223415.dio3pwkf24jfs5o4@earth.universe \
--to=sebastian.reichel@collabora.com \
--cc=a.zummo@towertech.it \
--cc=alexandre.belloni@bootlin.com \
--cc=kernel@collabora.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).