All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert+renesas@glider.be>
To: linux-renesas-soc@vger.kernel.org
Cc: linux-spi@vger.kernel.org, linux-clk@vger.kernel.org,
	Geert Uytterhoeven <geert+renesas@glider.be>
Subject: [PATCH/PROTO 5/9 option 1] arm64: dts: salvator-x: Configure MSIOF parent clock
Date: Fri, 12 Aug 2016 18:38:41 +0200	[thread overview]
Message-ID: <1471019925-29083-6-git-send-email-geert+renesas@glider.be> (raw)
In-Reply-To: <1471019925-29083-1-git-send-email-geert+renesas@glider.be>

Add assigned-clocks and assigned-clock-rates DT properties to the cpg
device node, to configure the MSIOF parent clock for 20 MHz.

Not-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Not intended for upstream merge.

Note that these properties could also be added to an individual MSIOF
device node. As all MSIOF instances share the same parent clock, this
is not a good idea:
  - MSIOF instances initialized before the one with the properties will
    use the old (default) parent clock rate.
    When the MSIOF instances with the properties is initialized, the
    parent clock rate will change. In the absence of a clock notifier,
    no one will notice (at this point).
    All subsequent operations will use the new parent clock rate.
    As the MSIOF driver use clk_get_rate() before setting up each
    transfer, it will automatically adapt.
    However, spi_master.{min,max}_speed_hz are not updated (note that
    currently they are not set by the MSIOF driver anyway!).
  - If you add conflicting properties to multiple msiof nodes, they will
    still be used, but override each other, determined by probe order.

Cfr. Documentation/devicetree/bindings/clock/clock-bindings.txt

   "Configuring a clock's parent and rate through the device node that
    consumes the clock can be done only for clocks that have a single
    user. Specifying conflicting parent or rate configuration in
    multiple consumer nodes for a shared clock is forbidden."

and

   "Configuration of common clocks, which affect multiple consumer
    devices can be similarly specified in the clock provider node."
---
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 9040a691b8b61887..61c9f651adbdfcad 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -143,6 +143,11 @@
 	};
 };
 
+&cpg {
+	assigned-clocks = <&cpg CPG_CORE R8A7795_CLK_MSO>;
+	assigned-clock-rates = <20000000>;
+};
+
 &extal_clk {
 	clock-frequency = <16666666>;
 };
-- 
1.9.1

  parent reply	other threads:[~2016-08-12 16:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-12 16:38 [PATCH/PROTO 0/9] R-Car H3 MSIOF Parent Clock Control Prototype Geert Uytterhoeven
2016-08-12 16:38 ` [PATCH/PROTO 1/9 common] spi: sh-msiof: Add support for R-Car H3 Geert Uytterhoeven
2016-08-12 16:38 ` [PATCH/PROTO 2/9 common] spi: sh-msiof: Print max and transfer frequency Geert Uytterhoeven
2016-08-12 16:38 ` [PATCH/PROTO 3/9 common] arm64: dts: r8a7795: Add all MSIOF nodes Geert Uytterhoeven
2016-08-12 16:38 ` [PATCH/PROTO 4/9 common] arm64: dts: salvator-x: Add dummy MSIOF SPI slave devices Geert Uytterhoeven
2016-08-12 16:38   ` Geert Uytterhoeven
2016-08-12 16:38 ` Geert Uytterhoeven [this message]
2016-08-12 16:38 ` [PATCH/PROTO 6/9 option 2/3] spi: sh-msiof: Add clock notifier to enforce valid parent clock Geert Uytterhoeven
2016-08-12 16:38 ` [PATCH/PROTO 7/9 option 2] spi: sh-msiof: Configure MSIOF " Geert Uytterhoeven
2016-08-12 16:38   ` Geert Uytterhoeven
2016-08-12 16:38 ` [PATCH/PROTO 8/9 option 3] clk: divider: Add hack to support dummy clocks Geert Uytterhoeven
2016-08-12 16:38 ` [PATCH/PROTO 9/9 option 3] spi: sh-msiof: Configure MSIOF parent clock Geert Uytterhoeven
2016-08-12 16:38   ` Geert Uytterhoeven
2016-08-25  5:34 ` [PATCH/PROTO 0/9] R-Car H3 MSIOF Parent Clock Control Prototype Magnus Damm
2016-08-29 12:38   ` Geert Uytterhoeven

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=1471019925-29083-6-git-send-email-geert+renesas@glider.be \
    --to=geert+renesas@glider.be \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=linux-spi@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.