[PATCH v5 0/7] clk: Add support for clock nexus

Miquel Raynal (Schneider Electric) posted 7 patches 1 month, 3 weeks ago
.../bindings/clock/clock-nexus-node.yaml           |  30 +++++
drivers/clk/Makefile                               |   1 +
drivers/clk/clk-conf.c                             |  12 +-
drivers/clk/clk.c                                  |  15 ++-
drivers/clk/clk_kunit_helpers.c                    |  31 +++++
drivers/clk/clk_test.c                             | 139 +++++++++++++++++++++
drivers/clk/kunit_clk_parse_clkspec.dtso           |  31 +++++
include/kunit/clk.h                                |   2 +
8 files changed, 249 insertions(+), 12 deletions(-)
[PATCH v5 0/7] clk: Add support for clock nexus
Posted by Miquel Raynal (Schneider Electric) 1 month, 3 weeks ago
Adding support for clock nexus had some prerequisites requested by
Stephen, such as adding new selftests, the initial discussions come
from:

Link: https://lore.kernel.org/linux-clk/20260129201003.288605-1-miquel.raynal@bootlin.com/

Signed-off-by: Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>
---
Changes in v5:
- Collected tags.
- Added the of_ prefix on the new kunit helper.
- Reworded a commit message.
- All remaining points raised by Sashiko do not seem relevant.
- Link to v4: https://lore.kernel.org/r/20260717-schneider-v7-2-rc1-eip201-upstream-v4-0-751547e160e5@bootlin.com

Changes in v4:
- Fixed the kernel doc of of_find_node_by_name_kunit() which was lacking
  the fact that it could return NULL upon lookup failure. Also improved
  the commit message by mentioning the addition of that helper.
- All other Sashiko reports have either been disregarded because they
  were way too unrelated or just not relevant enough in my opinion.
- Link to v3: https://lore.kernel.org/r/20260716-schneider-v7-2-rc1-eip201-upstream-v3-0-98454e83845c@bootlin.com

Changes in v3:
- Prevent out-of-bounds clock-ranges fallback in of_parse_clkspec()
- tests: Check of_clk_add_hw_provider_kunit() return value and fix node
  ref leaks
- Link to v2: https://lore.kernel.org/r/20260710-schneider-v7-2-rc1-eip201-upstream-v2-0-b4680787377e@bootlin.com

Changes in v2:
- Collected tags.
- Rebased on top of v7.2-rc1
- Exported (test) clock symbols using the _IF_KUNIT() variant, and
  imported the NS in the test file.
- Fixed a leaking node reported by Brian in the tests. Also used
  existing helpers to simplify the test implementation as he wisely
  suggested.
- Reworded the nexus node binding description as suggested by Stephen.
- Dropped redundant and non restraining properties from the Nexus
  node as suggested by Rob.
- Assigned clock/clock-rate properties now traverse Nexus nodes.
- Rename helpers following Stephen proposals.
- Rework tests following Stephen hints.
- Link to v1: https://lore.kernel.org/r/20260327-schneider-v7-0-rc1-crypto-v1-0-5e6ff7853994@bootlin.com

---
Miquel Raynal (Schneider Electric) (7):
      dt-bindings: clock: Introduce nexus nodes
      clk: tests: Add clk_parse_clkspec() Kunit testing
      clk: tests: Add Kunit testing for of_clk_get_parent_name()
      clk: Improve a couple of comments
      clk: Use the generic OF phandle parsing in only one place
      clk: Add support for clock nexus dt bindings
      clk: tests: Add Kunit testing for nexus nodes

 .../bindings/clock/clock-nexus-node.yaml           |  30 +++++
 drivers/clk/Makefile                               |   1 +
 drivers/clk/clk-conf.c                             |  12 +-
 drivers/clk/clk.c                                  |  15 ++-
 drivers/clk/clk_kunit_helpers.c                    |  31 +++++
 drivers/clk/clk_test.c                             | 139 +++++++++++++++++++++
 drivers/clk/kunit_clk_parse_clkspec.dtso           |  31 +++++
 include/kunit/clk.h                                |   2 +
 8 files changed, 249 insertions(+), 12 deletions(-)
---
base-commit: 7f26e010764df304602f33912a0550dcf46e72c2
change-id: 20260710-schneider-v7-2-rc1-eip201-upstream-a470e5eab92d

Best regards,
-- 
Miquel Raynal (Schneider Electric) <miquel.raynal@bootlin.com>
Re: [PATCH v5 0/7] clk: Add support for clock nexus
Posted by Brian Masney 3 weeks, 4 days ago
On Fri, 07 Aug 2026 17:24:01 +0200, Miquel Raynal (Schneider Electric) wrote:
> clk: Add support for clock nexus
> 
> Adding support for clock nexus had some prerequisites requested by
> Stephen, such as adding new selftests, the initial discussions come
> from:
> 
> Link: https://lore.kernel.org/linux-clk/20260129201003.288605-1-miquel.raynal@bootlin.com/
> 
> [...]

Applied, thanks!

[1/7] dt-bindings: clock: Introduce nexus nodes
      commit: e0be7b4eedd3b7c6d1a3db0dd76babc35ff89bc6
[2/7] clk: tests: Add clk_parse_clkspec() Kunit testing
      commit: d0a15b827251de65bd39ce0555d656d5563c41dc
[3/7] clk: tests: Add Kunit testing for of_clk_get_parent_name()
      commit: 32d4598a48d63003e732f2de3608fcd184aa8061
[4/7] clk: Improve a couple of comments
      commit: 4ee1e9e1d614a6b3a6264bac5b070c67a89ce19a
[5/7] clk: Use the generic OF phandle parsing in only one place
      commit: 57d728b4ab15a8af890013bb0f302e7733f7c1c6
[6/7] clk: Add support for clock nexus dt bindings
      commit: aacc54c67869effe89c92c0d54bea40148c53475
[7/7] clk: tests: Add Kunit testing for nexus nodes
      commit: 91b1b8d437abe0cd83210d8f257b785a63047aa9

Best regards,
-- 
Brian Masney <bmasney@redhat.com>
Re: [PATCH v5 0/7] clk: Add support for clock nexus
Posted by Miquel Raynal 3 weeks, 5 days ago
Hello,

On 07/08/2026 at 17:24:01 +02, "Miquel Raynal (Schneider Electric)" <miquel.raynal@bootlin.com> wrote:

> Adding support for clock nexus had some prerequisites requested by
> Stephen, such as adding new selftests, the initial discussions come
> from:
>
> Link: https://lore.kernel.org/linux-clk/20260129201003.288605-1-miquel.raynal@bootlin.com/

I know Stephen had less availability to dedicate to clock matters
recently and Brian offered to help. Brian already made feedback on it
(thank you very much!), so in case there is no more debate, I hope it
will be a good candidate for early adoption since -rc1 is now out! For
the record, I already answered (several times) the various points
Sashiko raised.

Thanks,
Miquèl