From: "Alim Akhtar" <alim.akhtar@samsung.com>
To: "'Tudor Ambarus'" <tudor.ambarus@linaro.org>,
"'Sylwester Nawrocki'" <s.nawrocki@samsung.com>,
"'Chanwoo Choi'" <cw00.choi@samsung.com>
Cc: "'Sam Protsenko'" <semen.protsenko@linaro.org>,
"'Krzysztof Kozlowski'" <krzysztof.kozlowski@linaro.org>,
linux-samsung-soc@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org,
'linux-arm-kernel' <linux-arm-kernel@lists.infradead.org>,
"'Peter Griffin'" <peter.griffin@linaro.org>,
"'André Draszik'" <andre.draszik@linaro.org>,
"'William McVicker'" <willmcvicker@google.com>,
kernel-team@android.com, jaewon02.kim@samsung.com
Subject: RE: samsung: clk: re-parent MUX to OSCCLK at run-time
Date: Thu, 7 Mar 2024 07:35:14 +0530 [thread overview]
Message-ID: <33e001da7033$e6a13ae0$b3e3b0a0$@samsung.com> (raw)
In-Reply-To: <9732478c-c371-4db6-b8f2-5623ac733a0c@linaro.org>
Hi Tudor
> -----Original Message-----
> From: Tudor Ambarus <tudor.ambarus@linaro.org>
> Sent: Wednesday, March 6, 2024 11:40 AM
> To: Alim Akhtar <alim.akhtar@samsung.com>; 'Sylwester Nawrocki'
> <s.nawrocki@samsung.com>; 'Chanwoo Choi' <cw00.choi@samsung.com>
> Cc: 'Sam Protsenko' <semen.protsenko@linaro.org>; 'Krzysztof Kozlowski'
> <krzysztof.kozlowski@linaro.org>; linux-samsung-soc@vger.kernel.org;
> linux-clk@vger.kernel.org; linux-kernel@vger.kernel.org; 'linux-arm-kernel'
> <linux-arm-kernel@lists.infradead.org>; 'Peter Griffin'
> <peter.griffin@linaro.org>; 'André Draszik' <andre.draszik@linaro.org>;
> 'William McVicker' <willmcvicker@google.com>; kernel-team@android.com;
> jaewon02.kim@samsung.com
> Subject: Re: samsung: clk: re-parent MUX to OSCCLK at run-time
>
>
>
> On 3/6/24 04:49, Alim Akhtar wrote:
> > Hi Tudor
>
> Hi!
>
> >
> >> -----Original Message-----
> >> From: Tudor Ambarus <tudor.ambarus@linaro.org>
> >> Sent: Wednesday, March 6, 2024 8:50 AM
> >> To: Sylwester Nawrocki <s.nawrocki@samsung.com>; Chanwoo Choi
> >> <cw00.choi@samsung.com>; Alim Akhtar <alim.akhtar@samsung.com>
> >> Cc: Sam Protsenko <semen.protsenko@linaro.org>; Krzysztof Kozlowski
> >> <krzysztof.kozlowski@linaro.org>; linux-samsung-soc@vger.kernel.org;
> >> linux-clk@vger.kernel.org; linux-kernel@vger.kernel.org;
> >> linux-arm-kernel <linux-arm-kernel@lists.infradead.org>; Peter
> >> Griffin <peter.griffin@linaro.org>; André Draszik
> >> <andre.draszik@linaro.org>; William McVicker
> >> <willmcvicker@google.com>; kernel-team@android.com
> >> Subject: samsung: clk: re-parent MUX to OSCCLK at run-time
> >>
> >> Hi,
> >>
> >> Trying to get some feedback from the samsung experts. Please consider
> >> the
> >> following:
> >>
> >> ---------------------------------------------
> >> | CMU_PERIC0 |
> >> | |
> >> | MUX_USI |
> >> | |
> >> | |\ |
> >> OSCCLK ---|->| \ |
> >> | | \ |
> >> | | M | |
> >> | | U |--> DIV_CLK_PERIC0_USI*_ --> GATE_USI |
> >> | | X | (1 ~ 16) |
> >> | | / |
> >> DIV_CLKCMU_PERIC0_IP ---|->| / |
> >> (1 ~ 16) | | |/ |
> >> | | |
> >> | | |
> >> | | MUX_I3C |
> >> | | |
> >> | | |\ |
> >> --|->| \ |
> >> | | \ |
> >> | | M | |
> >> | | U |--> DIV_CLK_PERIC0_I3C --> GATE_I3C |
> >> | | X | |
> >> | | / |
> >> OSCCLK ---|->| / |
> >> | |/ |
> >> | |
> >>
> >> ---------------------------------------------
> >>
> >> Is it fine to re-parent the MUX_USI from above to OSCCLK at run-time,
> >
> > I am not aware of the exact SOC/HW you are working on.
>
> I'm working with GS101. I'm interested in exynos850 as well.
>
> > It depends on the CMU design about how to achieve low power mode and
> clock gating for an IP/Block.
> >
> > In theory and looking at your clock diagram above, it is ok to switch to
> OSCCLK for MUX_USI.
> >
> > If you can just use GATE_USI clock to clock gate USI IP, you will have a low
> power for USI (of course there will be a leakage current still drawn).
> > Is that what you want to achieve (low power mode)? Or you are looking to
> get lowest possible operating clock for USI IP?
>
> I'm trying to get the lowest possible operating clock for the USI IP.
>
> >
> > You need to takecare about if that clock is being shared with any
> > other IP,
>
> It's not shared, the entire MUX USI, DIV, and GATE sequence is dedicated
> per IP. GS101 has 15 USI blocks, each with its dedicated MUX-DIV-GATE
> sequence of clocks.
>
> > so unless all the IPs which consume this clock, goes into idle state, you can
> avoid MUX_USI change to OSCCLK.
>
> Since the MUX USI is per IP, I guess I shouldn't be concerned about this,
> right?
Yes, that should be fine
>
> I'm trying to find out if it's OK to reparent the MUX to OSCCLK in normal
> operation mode (not low power mode), in order to get the lowest possible
> operating clock for the USI IP. Would be great if the decision is backed up by
> some info from datasheet. Unfortunately the datasheet that I have access to
> it's not explicit.
>
Unfortunately, I don't have access to either of the datasheets. So won't be able to provide input from datasheet.
Looking at your explanation above, like MUX USI is per IP, so it okay to switch to OSCCLK to get lowest possible clock for USI.
You need to do some more regression test with this change (I would still suggest to reach out to GS101 team to get the confirmation of any other side effect)
For me, it looks ok to use OSCCLK for USI
> Thanks for the help!
> ta
>
> >
next prev parent reply other threads:[~2024-03-07 2:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20240306032013epcas5p4932674432fbb49f586ed9d00f006a9e8@epcas5p4.samsung.com>
2024-03-06 3:20 ` samsung: clk: re-parent MUX to OSCCLK at run-time Tudor Ambarus
2024-03-06 4:49 ` Alim Akhtar
2024-03-06 6:09 ` Tudor Ambarus
2024-03-07 2:05 ` Alim Akhtar [this message]
2024-03-07 8:21 ` 김재원/JAEWON KIM
2024-03-22 9:17 ` Tudor Ambarus
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='33e001da7033$e6a13ae0$b3e3b0a0$@samsung.com' \
--to=alim.akhtar@samsung.com \
--cc=andre.draszik@linaro.org \
--cc=cw00.choi@samsung.com \
--cc=jaewon02.kim@samsung.com \
--cc=kernel-team@android.com \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-samsung-soc@vger.kernel.org \
--cc=peter.griffin@linaro.org \
--cc=s.nawrocki@samsung.com \
--cc=semen.protsenko@linaro.org \
--cc=tudor.ambarus@linaro.org \
--cc=willmcvicker@google.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