summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMarek Vasut <[email protected]>2026-05-08 01:23:28 +0200
committerMarek Vasut <[email protected]>2026-05-21 21:48:05 +0200
commit24039ffefbc1d2a0848af216f655af416ede79b5 (patch)
tree6a091495447f2cc19dd663ea3b9686544e3721d9 /include
parent3e24519d6f7ed84581d159d501b973b9ada74588 (diff)
clk: renesas: Add Renesas R-Car R8A78000 X5H CPG clock driver
Add Renesas R-Car R8A78000 X5H CPG clock driver, which serves as a remap driver between DT clock IDs and SCMI clock IDs in case U-Boot runs on the Cortex-A, and as a trivial clock driver for RSIP. The R-Car X5H SCP firmware uses different SCMI clock IDs in different versions of the SCP firmware, which makes this remapping necessary. The SCMI base protocol version is updated for each new SCP firmware version, it is therefore possible to determine which SCP firmware version is running on the platform from the base protocol and then determine which remapping table to use for DT clock ID to SCMI clock ID remapping. Currently supported versions are SCP 4.28, 4.31, 4.32 . The DT clock ID to SCMI clock ID remap and call mechanism is a bit complex. The driver looks up the SCMI clock protocol device on probe and stores pointer to it in private data. On each clock request which has to be remapped, the device sequence ID of this SCMI clock protocol device is incremented by the remapped SCMI clock ID + 1 and used to look up matching clock device by sequence number. If the device is found, it is converted to clock, which can be used in regular clock operations. This look up has to be done because the SCMI clock driver registers a subdevice for each clock, and this look up is the only way to find the correct SCMI clock subdevice. Since the SCMI device and the clock subdevices are registered in the same function, we can depend on the device sequence numbers to be monotonically incrementing, with SCMI clock protocol device being sequence number N, the first SCMI clock subdevice being sequence number N+1 and so on. In case of RSIP, all clocks are already enabled by BootROM or early SoC initialization code, the driver therefore only acts as a stub. Signed-off-by: Marek Vasut <[email protected]>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions