[PATCH v5 00/15] R-Car X5H Ironhide CPG/MDLC SCMI remapping support
Clément Le Goffic
clegoffic at baylibre.com
Fri Nov 20 06:33:11 PST 2026
Hi Wolfram,
Thank you for the rewording, it is clear
On 11/20/26 12:10 PM, Wolfram Sang wrote:
> In the past, we wanted to support all kinds of firmware. Sadly, each new
> firmware introduced different IDs here and there. So, we came up with
> some stable IDs ourselves and mapped them to the IDs per firmware. This
> is a n:1-mapping of firmware IDs to our stable IDs.
Sure, that is part of firmware development.
I know several SDK versions exist, and supporting several of them is work for a vendor tree.
As Geert's cover says, "While upstream Linux must only support sufficiently mature firmware versions, vendor trees (e.g. renesas-lts) may still want to support development firmware versions".
Each SDK version can then have its own DT there.
> The support for <n> firmware versions got serious opposition from
> upstream. We concluded that supporting only the latest firmware will
> make most controversial discussion points vanish. So, we now have a
> 1:1-mapping of (the latest) firmware IDs to our stable IDs.
Agreed, supporting several numbering upstream for the same chip only brings confusion.
But then, why can't that one mapping be one DT?
> I guess this is what Geert means with IDs becoming "stable". <n>
> firmware versions might return <n> IDs, but supporting only one firmware
> we get the same "stable" ID from it.
>
> Sadly, of course, with the next firmware update, we still might get a
> different ID all the time. So, not stable in that regard and we still
> need the mapping :(
When the firmware can be updated, I think an id change should be fixed there first.
That is what I would do in the open-source SCMI server firmware I am writing for this chip.
> Yes, this means the driver is then tied to a specific firmware version
> because it only has this mapping. Not nice for a user. But we didn't see
> another way moving things forward for now.
I think the DT is that other way.
With the SCMI ids in DT, only the DT is tied to a firmware version, not the drivers.
If a release that changes ids is already out, it needs a new DT, or a quirk for that one release when the DT cannot be updated.
The hardware stays described
The CPG and MDLC belong to the SCMI server, so the DT should mark them status = "reserved", and the consumers use the SCMI clock, power domain and reset providers.
The Devicetree Specification v0.4 define "reserved" for this case (section 2.3.4, Table 2.4):
"Typically this is used for devices that are controlled by another software component, such as platform firmware."
Zephyr also uses SCMI on this chip, and it already keeps the SCMI ids in its X5H DT
Juno and STM32MP15 handle their firmware differences the same way, with separate -scmi DT variants that simply include the board DT and an SCMI .dtsi.
If the number of variants grows, tools such as Lopper, which I mentioned before, can help manage them.
Best regards,
Clément
More information about the linux-arm-kernel
mailing list