Re: Re: [PATCH v14 2/5] dt-bindings: pwm: dwc: Add eswin compatible

"Xuyang Dong" <[email protected]> Fri, 31 Jul 2026 14:41:00 +0800 (GMT+08:00)
Newsgroups dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel,org.kernel.vger.linux-pwm
Message-ID <[email protected]>
> 
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Medium] The conditional schema for `eswin,eic7700-pwm` fails to constrain the `resets` property to a maximum of 1 item.
> --
> 
> --- Patch [2]: [PATCH v14 2/5] dt-bindings: pwm: dwc: Add eswin compatible ---
> commit 804c34afffe86d4a3ff253201b6470e700f1af47
> Author: Xuyang Dong <[email protected]>
> 
> dt-bindings: pwm: dwc: Add eswin compatible
> 
> This commit adds the eswin,eic7700-pwm compatible string to the
> snps,dw-apb-timers-pwm2 binding. The EIC7700 integrates this IP but requires
> exactly one combined reset line instead of up to two independent lines.
> 
> > diff --git a/Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml b/Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml
> > index 1f9d72f9f3590..87a56ffed09d9 100644
> > --- a/Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml
> > +++ b/Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml
> [ ... ]
> > @@ -64,6 +64,29 @@ required:
> >    - clocks
> >    - clock-names
> >  
> > +allOf:
> > +  - $ref: pwm.yaml#
> > +
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: eswin,eic7700-pwm
> > +    then:
> > +      properties:
> > +        resets:
> > +          items:
> > +            - description: Combined APB interface and timer logic reset
> 
> [Severity: Medium]
> Is it possible for a device tree to pass validation with two resets for this
> compatible, despite the intention in the commit message?
> 

Hi Sashiko,

Because we added an example for one reset.
If you add two resets for eswin,eic7700-pwm in a device tree, running 
"make dtbs_check" will report that the resets property is too long.

> Because the top-level resets property implicitly allows up to 2 items,
> overriding the items list here with a single element doesn't automatically
> reduce the maximum allowed items.
> 
> Should maxItems: 1 be added explicitly in this block alongside items?
> 

If we add "maxItems: 1", running "make dt_binding_check" will report that 
maxItems is not needed when an items list is already present.

Best regards,
Xuyang Dong

> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2