Re: [PATCH v5 05/25] dt-bindings: clock: mediatek: regroup MT8188 dt-bindings into MT8186
Rob Herring <[email protected]> Mon, 3 Aug 2026 09:24:35 -0500
| Newsgroups | dev.linux.lists.sashiko-reviews,org.kernel.vger.linux-devicetree |
|---|---|
| Message-ID | <[email protected]> |
On Sun, Aug 02, 2026 at 11:22:32AM +0000, [email protected] wrote: > Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: > - [Medium] The `allOf` conditional block incorrectly uses `enum` instead of `contains: enum` to match `compatible` strings, breaking schema validation for MT8188 nodes that require `#reset-cells`. > -- > > --- Patch [5]: [PATCH v5 05/25] dt-bindings: clock: mediatek: regroup MT8188 dt-bindings into MT8186 --- > commit 504c0ed21eb6420741b43bf9c5aae33308e93b7b > Author: Louis-Alexis Eyraud <[email protected]> > > dt-bindings: clock: mediatek: regroup MT8188 dt-bindings into MT8186 > > This commit merges the MT8188 clock and system clock device tree bindings > into the existing MT8186 schema files. It aims to ease maintainability by > having common files for SoCs with similar clock controller designs. > > > diff --git a/Documentation/devicetree/bindings/clock/mediatek,mt8186-clock.yaml b/Documentation/devicetree/bindings/clock/mediatek,mt8186-clock.yaml > > --- a/Documentation/devicetree/bindings/clock/mediatek,mt8186-clock.yaml > > +++ b/Documentation/devicetree/bindings/clock/mediatek,mt8186-clock.yaml > > [ ... ] > > > @@ -42,11 +65,36 @@ properties: > > '#clock-cells': > > const: 1 > > > > + '#reset-cells': > > + const: 1 > > + > > required: > > - compatible > > - reg > > - '#clock-cells' > > > > +allOf: > > + - if: > > + properties: > > + compatible: > > + enum: > > [Severity: Medium] > Does this compatible match logic need a "contains:" keyword? > > Since the compatible property is evaluated as a string array, matching a list > of scalar strings directly against it without "contains:" will always evaluate > to false. > > Without "contains:", does this mean the schema will skip the "then" branch > and incorrectly apply the "else" branch ('#reset-cells': false) to all MT8188 > nodes, causing correct device trees to fail dtbs_check and allowing incomplete > ones to pass? The tools will fix this up to be a list, so that's not an issue. However, using "contains" here is preferred so the match will work if one of the compatible strings becomes a fallback. IOW, the position and number of compatibles should not matter. Rob