Skip to content

Add Cix Sky1 AUDSS clock and reset support

[email protected] linux-arm-kernel linux-clk linux-devicetree lkml 13 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v11 Latest4 patches 4 repliesIn review
  2. v104 patches 6 repliesSuperseded
  3. v94 patches 3 repliesSuperseded
Earlier versions · 10
VersionPostedPatchesRepliesStatus
v84 patches2 repliesSuperseded
v74 patches2 repliesSuperseded
v64 patches3 repliesSuperseded
v54 patches4 repliesSuperseded
v4 posting 2/25 patches3 repliesSuperseded
v4 posting 1/25 patches8 repliesSuperseded
v3 posting 2/25 patches4 repliesSuperseded
v3 posting 1/25 patches1 replySuperseded
v25 patches12 repliesSuperseded
v17 patches16 repliesSuperseded

Changes in v11 from the cover letter

* clk driver:
* Kconfig: spell out menu title as "Cixtech Audio Subsystem Clock Driver"
* rpm cleanup: only call pm_runtime_force_suspend() (it already disables runtime PM)
* reset driver:
* drop unused linux/of.h
* use fsleep() with a single SKY1_RESET_SLEEP_US define
* use regmap_assign_bits() for active-low SW reset bits
* move the post-write delay into sky1_audss_reset_set()

Patches in v11 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4dt-bindings: soc: cix: add sky1 audss cru controllerDocumentation/devicetree/bindings/soc/cix/cix,sky1-audss-cru.yaml include/dt-bindings/clock/cix,sky1-audss-cru.h include/dt-bindings/reset/cix,sky1-audss-cru.h+177 -00 replies
2/4clk: cix: add sky1 audss clock controllerdrivers/clk/Kconfig drivers/clk/Makefile drivers/clk/cix/Kconfig +2 more+1227 -03 replies
3/4reset: cix: add sky1 audss auxiliary reset driverdrivers/reset/Kconfig drivers/reset/Makefile drivers/reset/reset-sky1-audss.c+141 -01 reply
4/4arm64: dts: cix: sky1: add audss cruarch/arm64/boot/dts/cix/sky1.dtsi+18 -00 replies

Reviews trailers per patch

3 of 4 patches have a Reviewed-by or Acked-by.

PatchKrzysztof KozlowskiPhilipp ZabelBrian Masney
1/4R-b
2/4R-b
3/4R-b A-b
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v11 thread

Cover letter [PATCH v11 0/4] Add Cix Sky1 AUDSS clock and reset support

From: Joakim Zhang <[email protected]>

The Cix Sky1 Audio Subsystem (AUDSS) groups audio-related blocks such as HDA, I2S, DSP, DMA, mailboxes, watchdog and timer behind one Clock and Reset Unit (CRU). The CRU is a single MMIO register block that provides clock muxing, gating and block-level software reset lines for those peripherals.

Clock and reset support are submitted in one series because they belong to the same hardware block and share one devicetree node (cix,sky1-audss-cru). The binding, clock indices and reset indices are defined together; the clock driver maps the CRU and instantiates the reset controller as an auxiliary driver on that node. Splitting clk and reset across separate series would leave neither side self-contained: the DTS node needs both providers, and the reset driver has no standalone probe path without the clock driver.

---
ChangeLogs:
v10->v11:
* clk driver:
* Kconfig: spell out menu title as "Cixtech Audio Subsystem Clock Driver"
* rpm cleanup: only call pm_runtime_force_suspend() (it already disables runtime PM)
* reset driver:
* drop unused linux/of.h
* use fsleep() with a single SKY1_RESET_SLEEP_US define
* use regmap_assign_bits() for active-low SW reset bits
* move the post-write delay into sky1_audss_reset_set()

v9->v10:
* clk driver:
* drop unused linux/of_device.h
* enable parent clocks before NOC deassert; assert NOC before disabling clocks on suspend (and reverse on resume)
* enable runtime PM only after parent clocks are on; collapse probe error paths into a single fail_pm label
* move runtime PM teardown to devm_add_action_or_reset() and drop remove(), so the OF provider is unbound before force_suspend

v8->v9:
* Reverse Christmas tree order
* use devm_clk_hw_register_composite_pdata()
* assert reset if clks enabled failed
* add pm_ptr

v7->v8:
* reset Kconfig: drop select REGMAP_MMIO

v6->v7:
* reset driver:
* propagate regmap errors in assert/deassert ops
* drop .reset and .status ops (no consumer uses them)
* remove regmap fallback path; use parent regmap only
* use dev->of_node for rcdev.of_node
* drop of_reset_n_cells and dev_set_drvdata()
* dt-binding:
* Reviewed-by: Krzysztof Kozlowski <[email protected]>

v5->v6:
* rename dt-bindings headers to cix,sky1-audss-cru.h to match compatible
* drop status = "okay" from audss_cru node in sky1.dtsi

v4->v5:
* refactor the driver, using platform_driver for clk and auxiliary_driver for reset.

v3->v4:
* move both power domain and resets into parset node (audss_cru)
* remove "simple-mfd", and change to populate the child node
* cix,sky1-audss.h -> cix,sky1-audss-clock.h

v2->v3:
* clk part:
* devm_reset_control_get()->devm_reset_control_get_exclusive()
* assert noc reset from suspend
* clock parents changes from 6 to 4, and rename the clock names, explain more about this: confirm with our designer, In fact, there are 6 clock sources going into the audio subsystem. audio_clk1 and audio_clk3 are redundant in design and are not actually needed in practice, so they are not shown here.
* refine clocks and clock-names property
* add detailed description of clocks
* drop parent node from clk binding
* drop define AUDSS_MAX_CLKS
* reset part:
* rename reset signal macro, remove _N
* drop SKY1_AUDSS_SW_RESET_NUM
* switching to compatible-style of defining subnodes in parent schema

v1->v2:
* remove audss_rst device node since it doesn't has resource, and move to reset-sky1.c driver.
* remove hda related which would be sent after this patch set accepted
* soc componnet is okay by default from dtsi
* fix for audss clk driver:
* remove "comment "Clock options for Cixtech audss:""
* add select MFD_SYSCON
* move lock and clk_data into struct sky1_audss_clks_priv
* const char *name -> const char * const * name
* remove CLK_GET_RATE_NOCACHE
* divicer -> divider
* Reverse Christmas tree order
* return reg ? 1 : 0; -> return !!reg;
* return ERR_CAST(hw); -> return hw;
* of_device_get_match_data(dev) -> device_get_match_data()
* add lock from runtime_suspend/resume
* loop to more mailing lists

Joakim Zhang (4):
dt-bindings: soc: cix: add sky1 audss cru controller
clk: cix: add sky1 audss clock controller
reset: cix: add sky1 audss auxiliary reset driver
arm64: dts: cix: sky1: add audss cru

 .../bindings/soc/cix/cix,sky1-audss-cru.yaml  |   92 ++
 arch/arm64/boot/dts/cix/sky1.dtsi             |   18 +
 drivers/clk/Kconfig                           |    1 +
 drivers/clk/Makefile                          |    1 +
 drivers/clk/cix/Kconfig                       |   16 +
 drivers/clk/cix/Makefile                      |    3 +
 drivers/clk/cix/clk-sky1-audss.c              | 1206 +++++++++++++++++
 drivers/reset/Kconfig                         |   13 +
 drivers/reset/Makefile                        |    1 +
 drivers/reset/reset-sky1-audss.c              |  127 ++
 .../dt-bindings/clock/cix,sky1-audss-cru.h    |   60 +
 .../dt-bindings/reset/cix,sky1-audss-cru.h    |   25 +
 12 files changed, 1563 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/cix/cix,sky1-audss-cru.yaml
 create mode 100644 drivers/clk/cix/Kconfig
 create mode 100644 drivers/clk/cix/Makefile
 create mode 100644 drivers/clk/cix/clk-sky1-audss.c
 create mode 100644 drivers/reset/reset-sky1-audss.c
 create mode 100644 include/dt-bindings/clock/cix,sky1-audss-cru.h
 create mode 100644 include/dt-bindings/reset/cix,sky1-audss-cru.h
Signature · 1 line
2.50.1