From: Drew Fustini <drew@pdp7.com>
To: Icenowy Zheng <uwu@icenowy.me>,
Emil Renner Berthing <emil.renner.berthing@canonical.com>
Cc: Stephen Boyd <sboyd@kernel.org>,
Albert Ou <aou@eecs.berkeley.edu>,
Conor Dooley <conor+dt@kernel.org>,
Drew Fustini <dfustini@tenstorrent.com>, Fu Wei <wefu@redhat.com>,
Guo Ren <guoren@kernel.org>, Jisheng Zhang <jszhang@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Palmer Dabbelt <palmer@dabbelt.com>,
Paul Walmsley <paul.walmsley@sifive.com>,
Rob Herring <robh@kernel.org>,
Thomas Bonnefille <thomas.bonnefille@bootlin.com>,
Yangtao Li <frank.li@vivo.com>,
linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Conor Dooley <conor.dooley@microchip.com>
Subject: Re: [PATCH v2 1/7] dt-bindings: clock: Document T-Head TH1520 AP_SUBSYS controller
Date: Tue, 30 Jul 2024 16:05:02 -0700 [thread overview]
Message-ID: <ZqlxnlKH60KXi8P0@x1> (raw)
In-Reply-To: <2375ff5fb664d8de9627e76788bd40b5d8eabf35.camel@icenowy.me>
On Sat, Jul 27, 2024 at 01:21:39PM +0800, Icenowy Zheng wrote:
> 在 2024-07-26星期五的 09:38 -0700,Drew Fustini写道:
> > On Fri, Jul 26, 2024 at 03:45:36AM -0500, Emil Renner Berthing wrote:
> > > Stephen Boyd wrote:
> > > > Quoting Drew Fustini (2024-06-23 19:12:31)
> > > > > Document bindings for the T-Head TH1520 AP sub-system clock
> > > > > controller.
> > > > >
> > > > > Link:
> > > > > https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf
> > > > > Co-developed-by: Yangtao Li <frank.li@vivo.com>
> > > > > Signed-off-by: Yangtao Li <frank.li@vivo.com>
> > > > > Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
> > > > > Signed-off-by: Drew Fustini <dfustini@tenstorrent.com>
> > > > > ---
> > > >
> > > > Applied to clk-next
> > >
> > > Thanks, but this driver seems a bit incomplete. With this applied
> > > the Lichee Pi
> > > 4A no longer boots without the clk_ignore_unused kernel parameter.
> > >
> > > /Emil
> >
> > Is this the case when you apply the dts patches from this series?
> >
> > The dts patches won't go in until 6.12 so I don't think the presence
> > of
> > the clk-th1520-ap.c itself in 6.11 would break existing systems.
> >
> > That said, I have been using clk_ignore_unused. I had been thinking
> > that
> > made sense because the full set of clock controller drivers like
> > AON_SUBSYS (always on), AUDIO_SUBSYS, DSP_SUBSYS, etc, are not
> > present
> > yet in mainline. However, the T-Head vendor kernel does have drivers
> > for
> > all those clock controllers and I was suprised to see that the vendor
> > kernel fails to boot when I just tested removing clk_ignore_unused.
> >
> > As for clk-th1520-ap.c in mainline, I'll investigate further which
> > clk
> > disables seem to causing the boot failure when using the dts from
> > this
> > series. I suspect I may need to add nodes that will cause the
> > necessary
> > clks to be enabled by their respective drivers.
>
> If disabling the clock just leads to system hang, setting
> CLK_IS_CRITICAL should be useful (and needed) here.
Thank you for the suggestion about CLK_IS_CRITICAL.
I have found through process of elimination that the "emmc-sdio" clock
(CLK_EMMC_SDIO) fails to work after the "vp-axi" clock (CLK_VP_AXI) is
disabled. I added the CLK_IGNORE_UNUSED flag to "vp-axi" and the system
is able to boot correctly. I think in that case CLK_IS_CRITICAL is not
needed.
I've been reviewing the TH1520 System User Manual [1] and I am uncertain
why the state of "vp-axi" would affect "emmc-sdio":
- EMMC_SDIO_REF_CLK_EN is bit 30 in PERI_CLK_CFG (offset 0x204).
- VPSYS_AXI_ACLK_EN is bit 15 in VPSYS_CLK_CFG (offsset 0x1e0).
I don't see any linkage between them in the public documentation.
Regardless, the addition of the CLK_IGNORE_UNUSED flag to "vp-axi" fixes
the boot failure, so I will post a patch to that effect.
Thanks,
Drew
[1] https://openbeagle.org/beaglev-ahead/beaglev-ahead/-/blob/main/docs/TH1520%20System%20User%20Manual.pdf
next prev parent reply other threads:[~2024-07-30 23:05 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-24 2:12 [PATCH v2 0/7] clk: thead: Add support for TH1520 AP_SUBSYS clock controller Drew Fustini
2024-06-24 2:12 ` [PATCH v2 1/7] dt-bindings: clock: Document T-Head TH1520 AP_SUBSYS controller Drew Fustini
2024-07-10 23:17 ` Stephen Boyd
2024-07-26 8:45 ` Emil Renner Berthing
2024-07-26 16:38 ` Drew Fustini
2024-07-27 5:21 ` Icenowy Zheng
2024-07-30 23:05 ` Drew Fustini [this message]
2024-06-24 2:12 ` [PATCH v2 2/7] clk: thead: Add support for T-Head TH1520 AP_SUBSYS clocks Drew Fustini
2024-07-10 23:17 ` Stephen Boyd
2024-07-11 6:55 ` Drew Fustini
2024-06-24 2:12 ` [PATCH v2 3/7] riscv: dts: thead: Add TH1520 AP_SUBSYS clock controller Drew Fustini
2024-06-24 2:12 ` [PATCH v2 4/7] riscv: dts: thead: change TH1520 uart nodes to use " Drew Fustini
2024-06-24 2:12 ` [PATCH v2 5/7] riscv: dts: thead: change TH1520 mmc " Drew Fustini
2024-06-24 2:12 ` [PATCH v2 6/7] riscv: dts: thead: update TH1520 dma and timer " Drew Fustini
2024-06-24 2:12 ` [PATCH v2 7/7] riscv: dts: thead: add clock to TH1520 gpio nodes Drew Fustini
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=ZqlxnlKH60KXi8P0@x1 \
--to=drew@pdp7.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=conor.dooley@microchip.com \
--cc=devicetree@vger.kernel.org \
--cc=dfustini@tenstorrent.com \
--cc=emil.renner.berthing@canonical.com \
--cc=frank.li@vivo.com \
--cc=guoren@kernel.org \
--cc=jszhang@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=thomas.bonnefille@bootlin.com \
--cc=uwu@icenowy.me \
--cc=wefu@redhat.com \
/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).