[PATCH 1/2] dt-bindings: clock: anlogic,dr1v90-cru: make external clocks optional

Junhui Liu junhui.liu at pigmoral.tech
Fri Oct 2 08:55:38 PDT 2026


Hi Conor,

On Fri Oct 2, 2026 at 3:17 PM CST, Conor Dooley wrote:
> On Fri, Oct 02, 2026 at 02:07:00PM +0800, Junhui Liu wrote:
>> The external CAN and WDT clocks are optional inputs routed from the
>> board; the main oscillator is the only required clock. The binding
>> currently requires all three clocks, which forces device trees to add
>> stub fixed-clock nodes without a clock-frequency to satisfy it.
>> 
>> Allow the clocks and clock-names properties to contain just "osc",
>> optionally followed by either or both of "can_ext" and "wdt_ext".
>> 
>> Fixes: 155d900e4c7d ("dt-bindings: clock: add Anlogic DR1V90 CRU")
>> Signed-off-by: Junhui Liu <junhui.liu at pigmoral.tech>
>> ---
>>  .../bindings/clock/anlogic,dr1v90-cru.yaml         | 24 +++++++++++++++-------
>>  1 file changed, 17 insertions(+), 7 deletions(-)
>> 
>> diff --git a/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml b/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml
>> index 11a92588e494..8bd7b78a58d8 100644
>> --- a/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml
>> +++ b/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml
>> @@ -17,16 +17,26 @@ properties:
>>      maxItems: 1
>>  
>>    clocks:
>> -    items:
>> -      - description: Main oscillator
>> -      - description: External CAN clock
>> -      - description: External WDT clock
>> +    minItems: 1
>> +    maxItems: 3
>> +    description:
>> +      The main oscillator is always required. An external CAN clock and an
>> +      external WDT clock may additionally be provided if the board routes these
>> +      clocks to the SoC.
>>  
>>    clock-names:
>> -    items:
>> +    oneOf:
>>        - const: osc
>> -      - const: can_ext
>> -      - const: wdt_ext
>> +      - items:
>> +          - const: osc
>> +          - const: can_ext
>> +      - items:
>> +          - const: osc
>> +          - const: wdt_ext
>> +      - items:
>> +          - const: osc
>> +          - const: can_ext
>> +          - const: wdt_ext
>
> This need not be so complicated. The following should do the trick:
>
> clock-names:
>   minItems: 1
>   items:
>     - const: osc
>     - enum: [can_ext, wdt_ext]
>     - const: wdt_ext

Thanks for showing me the simpler way to express this. I will update it
in v2.

>
> pwbot: changes-requested
>
>>  
>>    "#clock-cells":
>>      const: 1
>> 
>> -- 
>> 2.55.0
>> 

-- 
Best regards,
Junhui Liu



More information about the linux-riscv mailing list