LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: Chen-Yu Tsai <wens@csie.org>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>,
	Icenowy Zheng <icenowy@aosc.io>,
	devicetree <devicetree@vger.kernel.org>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-sunxi@googlegroups.com, Jagan Teki <jagan@openedev.com>
Subject: Re: [PATCH 5/7] arm64: allwinner: h6: Add RTC node
Date: Thu, 1 Nov 2018 14:32:34 +0530	[thread overview]
Message-ID: <CAMty3ZBJiDrr0hqgzMMQ76R7=+agsHyjYQGTrebH=_q5Ax2xXA@mail.gmail.com> (raw)
In-Reply-To: <CAGb2v67WZmG7qPqf_UoR4v=Zm2AbS8pcOQsWJPRVHr-i2NvRPA@mail.gmail.com>

On Thu, Nov 1, 2018 at 1:23 PM Chen-Yu Tsai <wens@csie.org> wrote:
>
> On Thu, Nov 1, 2018 at 3:33 PM Jagan Teki <jagan@amarulasolutions.com> wrote:
> >
> > On Thu, Nov 1, 2018 at 8:25 AM Chen-Yu Tsai <wens@csie.org> wrote:
> > >
> > > On Thu, Nov 1, 2018 at 2:37 AM Jagan Teki <jagan@amarulasolutions.com> wrote:
> > > >
> > > > From: Jagan Teki <jagan@openedev.com>
> > > >
> > > > RTC controller is similar to A31, so use the same compatible
> > > > for H6 and update interrupt numbers as per manual.
> > >
> > > No. Unfortunately they are not that compatible. The A31 does not have
> > > the RTC clock output. So everyone got it wrong. :( Plus the clock rate
> > > of the internal RC oscillator varies between SoCs. I'm working on a
> > > series of patches to correct this. Stay tuned.
> >
> > 4 bit, EXT_LOSC_EN of LOSC_CTRL_REG (0x00) seem available in H6. I can
> > see external clock working with WIFI for A31 compatible.
>
> That bit turns on the external crystal, i.e. X32KIN and X32KOUT pins.

This is what I confused, the same signal pins available there in A64
schematics but no bit to enable external OSC in LOSC_CTRL_REG.

But the X32KFOUT pin which is 0x60 , BIT(0) is enabled in A64, H6 w/o
this LOSC_CTRL_REG which I don't know exactly or may be feed it by
default not sure.

>
> I'm talking about the X32KFOUT pin, which feeds the WiFi module the
> LPO clock in typical Allwinner designs. That is controlled by register
> 0x60, and is not present on the A31. That is the clock you say is
> working. You have the two confused.
>
> The clock tree looks like this:
>
> IOSC -----------------------------\
>                                    SUN6I_LOSC_CTRL_EXT_OSC mux ---->
> LOSC --> (to CCU)
> 32k crystal --> EXT_LOSC_EN gate -/                              \
>                                                                   \
>                                                                   /
>       (to WiFi) <-- X32KFOUT pin <-- LOSC_OUT_GATING_EN gate <---/

Yes, I understand this. But for A33, A64 there is no EXT_LOSC_EN which
is directly feed to WIFI from LOSC as per manual but from schematic
signals X32KI and X32KO were present.

>
> The bottom part does not exist in the A31. Meanwhile we've been claiming that
> all later RTC modules that actually have that part are compatible with the A31.
> Also the IOSC part has different clock rates for different chips.
>
> Do you see the problem?

From external crystal point of view, between A33, A64 vs H6 I only see
the difference in EXT_LOSC_EN external oscillator enable bit only
available in H6 manual.

Regarding, rtc-sun6i. we can manage the external clock stuff via
"clock-output-names" with rtc->ext_losc and mentioning external
oscillator outputs on DTSI. since A31, don't have external clock to
wifi then we can skip those properties.

What do you think?

  reply	other threads:[~2018-11-01  9:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-31 18:36 [PATCH 1/7] clk: sunxi-ng: sun50i: h6: Fix MMC clock mux width Jagan Teki
2018-10-31 18:36 ` [PATCH 2/7] arm64: allwinner: h6: Add common orangepi nodes into dtsi Jagan Teki
2018-11-01  2:53   ` Chen-Yu Tsai
2018-11-01  7:13     ` Jagan Teki
2018-11-01  7:20       ` Chen-Yu Tsai
2018-10-31 18:36 ` [PATCH 3/7] arm64: allwinner: h6: Add OrangePi Lite2 initial support Jagan Teki
2018-10-31 18:36 ` [PATCH 4/7] arm64: allwinner: h6: Add MMC1 pinmux Jagan Teki
2018-10-31 18:36 ` [PATCH 5/7] arm64: allwinner: h6: Add RTC node Jagan Teki
2018-11-01  2:55   ` Chen-Yu Tsai
2018-11-01  7:33     ` Jagan Teki
2018-11-01  7:53       ` Chen-Yu Tsai
2018-11-01  9:02         ` Jagan Teki [this message]
2018-11-01  9:35           ` Chen-Yu Tsai
2018-10-31 18:36 ` [PATCH 6/7] arm64: allwinner: h6: Add RTC clock to phandle 32kHz external oscillator Jagan Teki
2018-11-01  2:57   ` Chen-Yu Tsai
2018-10-31 18:36 ` [RFC PATCH 7/7] arm64: allwinner: h6: orangepi-liet2: Enable AP6356S WiFi support Jagan Teki
2018-11-01  7:35   ` Jagan Teki
2018-11-01  7:58     ` Chen-Yu Tsai
2018-11-01  9:08       ` Jagan Teki
2018-11-01  9:49         ` Chen-Yu Tsai
2018-11-05  8:41 ` [PATCH 1/7] clk: sunxi-ng: sun50i: h6: Fix MMC clock mux width Maxime Ripard

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='CAMty3ZBJiDrr0hqgzMMQ76R7=+agsHyjYQGTrebH=_q5Ax2xXA@mail.gmail.com' \
    --to=jagan@amarulasolutions.com \
    --cc=devicetree@vger.kernel.org \
    --cc=icenowy@aosc.io \
    --cc=jagan@openedev.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@bootlin.com \
    --cc=wens@csie.org \
    --subject='Re: [PATCH 5/7] arm64: allwinner: h6: Add RTC node' \
    /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

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).