[PATCH v3] dt-bindings: mfd: rk808: Convert bindings to yaml
Robin Murphy
robin.murphy at arm.com
Fri Feb 25 02:44:55 PST 2022
On 2022-02-24 19:30, Rob Herring wrote:
[...]
>>> +required:
>>> + - compatible
>>> + - reg
>>> + - interrupts
>>> + - "#clock-cells"
>>
>> Is this actually required (ditto elsewhere)? Technically it's only necessary
>> if there are any clock consumers targeting this node, so arguably it should
>> be the clock binding's responsibility to validate that.
>>
>> It wouldn't make much sense for a dedicated clock controller to omit
>> #clock-cells such that it couldn't have any consumers, but given that these
>> things are primarily PMICs I think it's reasonable to allow a board not to
>> care about the clocks at all if it doesn't use them. I know that the
>> original binding claimed it was required, but if we're already relaxing that
>> for RK805 here then we may as well relax it entirely.
>
> Fair enough. However, if the consumer could be in an overlay, then I
> think we want it to be required and not make the overlay add the
> property. Properties just appearing within nodes at runtime is likely
> not well supported in OSs.
Ah yes, that's an angle I hadn't considered, and I reckon it clearly
answers my original question in the affirmative :)
Indeed these clock outputs are often hooked up to SDIO WiFi modules, and
I'm sure I *have* seen boards which put such modules on pluggable
daughterboards in a manner which could reasonably use overlays, so in
principle it does seem like a realistic concern. I'm happy with setting
a general principle that if a clock output is exposed on a physical pin,
then at the DTS level we can't know for sure that it *won't* be consumed
(even if the original board design didn't intend it), therefore the
device is always a potential clock controller and "#clock-cells" should
be required. In that case, the consistency argument would fall the other
way, to enforcing it for RK805 as well.
Cheers,
Robin.
More information about the Linux-rockchip
mailing list