From: "André Draszik" <andre.draszik@linaro.org>
To: Tudor Ambarus <tudor.ambarus@linaro.org>,
peter.griffin@linaro.org, krzysztof.kozlowski@linaro.org
Cc: alim.akhtar@samsung.com, linux-arm-kernel@lists.infradead.org,
linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
willmcvicker@google.com, kernel-team@android.com,
s.nawrocki@samsung.com, cw00.choi@samsung.com,
mturquette@baylibre.com, sboyd@kernel.org,
semen.protsenko@linaro.org, linux-clk@vger.kernel.org,
jaewon02.kim@samsung.com
Subject: Re: [PATCH v2 3/3] clk: samsung: gs101: propagate PERIC0 USI SPI clock rate
Date: Thu, 28 Mar 2024 11:25:53 +0000 [thread overview]
Message-ID: <3b9d28405f01c7bc23075492dbb501ebde0edbfa.camel@linaro.org> (raw)
In-Reply-To: <20240326172813.801470-4-tudor.ambarus@linaro.org>
On Tue, 2024-03-26 at 17:28 +0000, Tudor Ambarus wrote:
> When SPI transfer is being prepared, the spi-s3c64xx driver will call
> clk_set_rate() to change the rate of SPI source clock (IPCLK). But IPCLK
> is a gate (leaf) clock, so it must propagate the rate change up the
> clock tree, so that corresponding MUX/DIV clocks can actually change
> their values. Add CLK_SET_RATE_PARENT flag to corresponding clocks for
> all USI instances in GS101 PERIC0: USI{1-8, 14}. This change involves the
> following clocks:
>
> PERIC0 USI*:
>
> Clock Div range MUX Selection
> -------------------------------------------------------------------
> gout_peric0_peric0_top0_ipclk_* - -
> dout_peric0_usi*_usi /1..16 -
> mout_peric0_usi*_usi_user - {24.5 MHz, 400 MHz}
>
> With input clock of 400 MHz this scheme provides the following IPCLK
> rate range, for each USI block:
>
> PERIC0 USI*: 1.5 MHz ... 400 MHz
>
> Accounting for internal /4 divider in SPI blocks, and because the max
> SPI frequency is limited at 50 MHz, it gives us next SPI SCK rates:
>
> PERIC0 USI_SPI*: 384 KHz ... 49.9 MHz
>
> Which shall be fine for the applications of the SPI bus.
>
> Note that with this we allow the reparenting of the MUX_USIx clocks to
> OSCCLK. Each instance of the USI IP has its own MUX_USI clock, thus the
> reparenting of a MUX_USI clock corresponds to a single instance of the
> USI IP. The datasheet mentions OSCCLK just in the low-power mode
> context, but the downstream driver reparents too the MUX_USI clocks to
> OSCCLK. Follow the downstream driver and do the same.
>
> Fixes: 893f133a040b ("clk: samsung: gs101: add support for cmu_peric0")
> Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Acked-by: André Draszik <andre.draszik@linaro.org>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-03-28 11:26 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-26 17:28 [PATCH v2 0/3] clk: samsung: introduce nMUX to reparent MUX clocks Tudor Ambarus
2024-03-26 17:28 ` [PATCH v2 1/3] clk: samsung: introduce nMUX for MUX clks that can reparented Tudor Ambarus
2024-03-26 17:43 ` André Draszik
2024-03-27 8:09 ` Tudor Ambarus
2024-03-28 9:56 ` Krzysztof Kozlowski
2024-03-28 11:14 ` Tudor Ambarus
2024-03-26 17:28 ` [PATCH v2 2/3] clk: samsung: gs101: propagate PERIC1 USI SPI clock rate Tudor Ambarus
2024-03-28 11:25 ` André Draszik
2024-03-28 11:33 ` Peter Griffin
2024-03-26 17:28 ` [PATCH v2 3/3] clk: samsung: gs101: propagate PERIC0 " Tudor Ambarus
2024-03-28 11:25 ` André Draszik [this message]
2024-03-28 11:36 ` Peter Griffin
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=3b9d28405f01c7bc23075492dbb501ebde0edbfa.camel@linaro.org \
--to=andre.draszik@linaro.org \
--cc=alim.akhtar@samsung.com \
--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=mturquette@baylibre.com \
--cc=peter.griffin@linaro.org \
--cc=s.nawrocki@samsung.com \
--cc=sboyd@kernel.org \
--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