All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] Usable clocks on Mobileye EyeQ5 & EyeQ6H
@ 2024-10-31 15:52 Théo Lebrun
  2024-10-31 15:52 ` [PATCH 01/13] dt-bindings: soc: mobileye: set `#clock-cells = <1>` for all compatibles Théo Lebrun
                   ` (12 more replies)
  0 siblings, 13 replies; 19+ messages in thread
From: Théo Lebrun @ 2024-10-31 15:52 UTC (permalink / raw)
  To: Vladimir Kondratiev, Grégory Clement, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Michael Turquette,
	Stephen Boyd, Thomas Bogendoerfer
  Cc: linux-mips, devicetree, linux-kernel, linux-clk, Thomas Petazzoni,
	Tawfik Bayouk, Théo Lebrun

Now that clk-eyeq is in the clk-next tree, we can add the small(-ish)
details required to make the platform work fully. The work is mostly
about updating devicetrees to rely on the system-controller nodes as
clock providers.

--

Things we do:

 - In EyeQ5 devicetrees, remove all fixed-factor clocks that are derived
   from clk-eyeq PLLs. We expose those directly from clk-eyeq (using
   match data info). This is simpler to reason about.

   [PATCH 02/13] dt-bindings: clock: eyeq: add Mobileye EyeQ5 core clocks
   [PATCH 03/13] dt-bindings: clock: eyeq: add Mobileye EyeQ5 peripheral clocks
   [PATCH 06/13] clk: fixed-factor: add clk_hw_register_fixed_factor_index() function
   [PATCH 08/13] clk: eyeq: add fixed factor clocks infrastructure
   [PATCH 09/13] clk: eyeq: add EyeQ5 fixed factor clocks
   [PATCH 12/13] MIPS: mobileye: eyeq5: use OLB as provider for fixed factor clocks

 - EyeQ6H devicetrees used fixed-clocks and didn't have
   system-controllers defined. Remove all that and define our syscons.

   [PATCH 04/13] dt-bindings: clock: eyeq: add Mobileye EyeQ6H central clocks
   [PATCH 05/13] dt-bindings: clock: eyeq: add Mobileye EyeQ6H west clocks
   [PATCH 10/13] clk: eyeq: add EyeQ6H central fixed factor clocks
   [PATCH 11/13] clk: eyeq: add EyeQ6H west fixed factor clocks
   [PATCH 13/13] MIPS: mobileye: eyeq6h: add OLB nodes OLB and remove fixed clocks

 - Our bindings used to say that some compatibles require a clock cell
   (those that expose multiple clocks) and others do not. Remove that
   subtlety and enforce a clock cell for everyone.

   The goal is to make it easier to add clocks to compatibles that
   previously exposed a single one. It happens for two compatibles in
   this patch series (EyeQ6H central and west).

   This is a "revert". I had been advised in the initial patch that the
   behavior was a bad idea. I 100% agree with those comments.

   [PATCH 01/13] dt-bindings: soc: mobileye: set `#clock-cells = <1>` for all compatibles
   [PATCH 07/13] clk: eyeq: require clock index with phandle in all cases

--

In which tree patches should go:

 - clk:
   [PATCH 02/13] dt-bindings: clock: eyeq: add Mobileye EyeQ5 core clocks
   [PATCH 03/13] dt-bindings: clock: eyeq: add Mobileye EyeQ5 peripheral clocks
   [PATCH 04/13] dt-bindings: clock: eyeq: add Mobileye EyeQ6H central clocks
   [PATCH 05/13] dt-bindings: clock: eyeq: add Mobileye EyeQ6H west clocks
   [PATCH 06/13] clk: fixed-factor: add clk_hw_register_fixed_factor_index() function
   [PATCH 07/13] clk: eyeq: require clock index with phandle in all cases
   [PATCH 08/13] clk: eyeq: add fixed factor clocks infrastructure
   [PATCH 09/13] clk: eyeq: add EyeQ5 fixed factor clocks
   [PATCH 10/13] clk: eyeq: add EyeQ6H central fixed factor clocks
   [PATCH 11/13] clk: eyeq: add EyeQ6H west fixed factor clocks

 - MIPS:
   [PATCH 01/13] dt-bindings: soc: mobileye: set `#clock-cells = <1>` for all compatibles
   [PATCH 12/13] MIPS: mobileye: eyeq5: use OLB as provider for fixed factor clocks
   [PATCH 13/13] MIPS: mobileye: eyeq6h: add OLB nodes OLB and remove fixed clocks

Reasoning: we need the clock indexes from dt-bindings headers to avoid
breaking the driver build, so patches 2-5 must go in clk-next.

Note about devicetree patches 12-13: other patches on the same
devicetrees are in the mailing-lists, with which I expect conflicts.
All should be straight-forward to resolve.

--

Question: I am a bit afraid about the process for clocks in the future.
Say we want to add I2C on EyeQ5 [0]. Steps will be:
 - The dt-bindings headers will get a new offset.
 - The clk-eyeq driver will get its private clocks indexes updated.
 - Then the clocks will be accessible from devicetree.

Those are somewhat unrelated to a series that is enabling I2C on a
platform. Should I expose the few clocks I already know we'll be
needing soon enough (I2C, SPI, EMMC)? The rest, I am unsure about the
structure and I'd prefer not exposing them.

Thanks,
Have a nice day,
Théo

[0]: https://lore.kernel.org/all/20241009-mbly-i2c-v3-0-e7fd13bcf1c4@bootlin.com/

Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
---
Théo Lebrun (13):
      dt-bindings: soc: mobileye: set `#clock-cells = <1>` for all compatibles
      dt-bindings: clock: eyeq: add Mobileye EyeQ5 core clocks
      dt-bindings: clock: eyeq: add Mobileye EyeQ5 peripheral clocks
      dt-bindings: clock: eyeq: add Mobileye EyeQ6H central clocks
      dt-bindings: clock: eyeq: add Mobileye EyeQ6H west clocks
      clk: fixed-factor: add clk_hw_register_fixed_factor_index() function
      clk: eyeq: require clock index with phandle in all cases
      clk: eyeq: add fixed factor clocks infrastructure
      clk: eyeq: add EyeQ5 fixed factor clocks
      clk: eyeq: add EyeQ6H central fixed factor clocks
      clk: eyeq: add EyeQ6H west fixed factor clocks
      MIPS: mobileye: eyeq5: use OLB as provider for fixed factor clocks
      MIPS: mobileye: eyeq6h: add OLB nodes OLB and remove fixed clocks

 .../bindings/soc/mobileye/mobileye,eyeq5-olb.yaml  |  24 +-
 arch/mips/boot/dts/mobileye/eyeq5-clocks.dtsi      | 270 ---------------------
 arch/mips/boot/dts/mobileye/eyeq5.dtsi             |  30 ++-
 .../boot/dts/mobileye/eyeq6h-fixed-clocks.dtsi     |  52 ----
 arch/mips/boot/dts/mobileye/eyeq6h.dtsi            |  73 +++++-
 drivers/clk/clk-eyeq.c                             | 204 ++++++++++++++--
 drivers/clk/clk-fixed-factor.c                     |  11 +
 include/dt-bindings/clock/mobileye,eyeq5-clk.h     |  17 ++
 include/linux/clk-provider.h                       |   3 +
 9 files changed, 307 insertions(+), 377 deletions(-)
---
base-commit: 11713909beb7debd3d466a6dc302a33d91298be0
change-id: 20241030-mbly-clk-a877f3793eb2

Best regards,
-- 
Théo Lebrun <theo.lebrun@bootlin.com>


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-11-05 13:33 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-31 15:52 [PATCH 00/13] Usable clocks on Mobileye EyeQ5 & EyeQ6H Théo Lebrun
2024-10-31 15:52 ` [PATCH 01/13] dt-bindings: soc: mobileye: set `#clock-cells = <1>` for all compatibles Théo Lebrun
2024-11-04 15:37   ` Rob Herring
2024-11-04 16:46     ` Théo Lebrun
2024-11-05 13:33       ` Rob Herring
2024-10-31 15:52 ` [PATCH 02/13] dt-bindings: clock: eyeq: add Mobileye EyeQ5 core clocks Théo Lebrun
2024-10-31 15:52 ` [PATCH 03/13] dt-bindings: clock: eyeq: add Mobileye EyeQ5 peripheral clocks Théo Lebrun
2024-10-31 15:52 ` [PATCH 04/13] dt-bindings: clock: eyeq: add Mobileye EyeQ6H central clocks Théo Lebrun
2024-11-01  7:48   ` Krzysztof Kozlowski
2024-11-04 16:16     ` Théo Lebrun
2024-10-31 15:52 ` [PATCH 05/13] dt-bindings: clock: eyeq: add Mobileye EyeQ6H west clocks Théo Lebrun
2024-10-31 15:52 ` [PATCH 06/13] clk: fixed-factor: add clk_hw_register_fixed_factor_index() function Théo Lebrun
2024-10-31 15:52 ` [PATCH 07/13] clk: eyeq: require clock index with phandle in all cases Théo Lebrun
2024-10-31 15:52 ` [PATCH 08/13] clk: eyeq: add fixed factor clocks infrastructure Théo Lebrun
2024-10-31 15:52 ` [PATCH 09/13] clk: eyeq: add EyeQ5 fixed factor clocks Théo Lebrun
2024-10-31 15:53 ` [PATCH 10/13] clk: eyeq: add EyeQ6H central " Théo Lebrun
2024-10-31 15:53 ` [PATCH 11/13] clk: eyeq: add EyeQ6H west " Théo Lebrun
2024-10-31 15:53 ` [PATCH 12/13] MIPS: mobileye: eyeq5: use OLB as provider for " Théo Lebrun
2024-10-31 15:53 ` [PATCH 13/13] MIPS: mobileye: eyeq6h: add OLB nodes OLB and remove fixed clocks Théo Lebrun

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.