Sashiko discussions
 help / color / mirror / Atom feed
* Re: [PATCH v3 2/2] dt-bindings: mmc: st,sdhci: convert to DT schema
       [not found] ` <20260508222225.1E854C2BCB4@smtp.kernel.org>
@ 2026-05-10  7:11   ` Charan Pedumuru
  0 siblings, 0 replies; only message in thread
From: Charan Pedumuru @ 2026-05-10  7:11 UTC (permalink / raw)
  To: sashiko; +Cc: robh, devicetree, krzk+dt, conor+dt



On 09-05-2026 03:52, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] Missing `minItems: 1` for `clock-names` and `reg-names` restricts them to exactly two items, breaking schema validation for existing device trees.
> --
> 
> commit 66ec88f9e00b102af921864d0e0bf8b1b9e7f38d
> Author: Charan Pedumuru <charan.pedumuru@gmail.com>
> dt-bindings: mmc: st,sdhci: convert to DT schema
> 
> This commit converts the STMicroelectronics sdhci-st MMC/SD controller
> binding to DT schema. It updates the clock and register properties to
> support backward compatibility for single-item entries.
> 
>>     - In the legacy text binding, 'icn' was optional. Keep the clock list
>>       flexible to preserve compatibility, although all existing in-tree DTS
>>       files already provide both clocks.
>>     - Document the optional "top-mmc-delay" register region and corresponding
>>       reg-name in the YAML binding, as existing in-tree DTS files already use
>>       both "mmc" and "top-mmc-delay" entries.
> 
> Are these descriptions accurate regarding all existing in-tree DTS files?

Yes

> 
> In arch/arm/boot/dts/st/stih407-family.dtsi, the mmc1 node defines only a
> single register name (reg-names = "mmc"). Other device trees such as
> arch/powerpc/boot/dts/fsp2.dts also define a single clock and register.
> 
>> diff --git a/Documentation/devicetree/bindings/mmc/st,sdhci.yaml b/Documentation/devicetree/bindings/mmc/st,sdhci.yaml
>> new file mode 100644
>> index 0000000000000..10e0e1ee6d5cd
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/mmc/st,sdhci.yaml
> 
> [ ... ]
> 
>> +  reg:
>> +    minItems: 1
>> +    items:
>> +      - description: MMC controller registers
>> +      - description: MMC delay/auxiliary registers
>> +
>> +  reg-names:
>> +    items:
>> +      - const: mmc
>> +      - const: top-mmc-delay
> 
> Because items lists without an explicit minItems default to the length of
> the list, does this strictly require two items for reg-names?

Yes, but I can add minItems as 1 to accept the nodes that define only 1 reg-names. but the existing DTS uses both.

> 
> Will this cause make dtbs_check to fail for existing nodes like mmc1 that
> only provide "mmc"? Should minItems: 1 be added here to allow single entries?

Yes, I will add minItmes to allow singe entries.

> 
> [ ... ]
> 
>> +  clocks:
>> +    minItems: 1
>> +    items:
>> +      - description: Clock for the MMC controller
>> +      - description: Interconnect (ICN) clock
>> +
>> +  clock-names:
>> +    items:
>> +      - const: mmc
>> +      - const: icn
> 
> Similarly, does clock-names require minItems: 1 to match the flexibility
> added to the clocks property and prevent schema validation errors on
> single-clock configurations?

I can add minItmes as 1 if the node only requires 1 clock, but the current DTS uses both of them.

> 

-- 
Best Regards,
Charan.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-05-10  7:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260508-st-mmc-v3-2-81c329ed28e8@gmail.com>
     [not found] ` <20260508222225.1E854C2BCB4@smtp.kernel.org>
2026-05-10  7:11   ` [PATCH v3 2/2] dt-bindings: mmc: st,sdhci: convert to DT schema Charan Pedumuru

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox