Re: [PATCH v2 01/14] dt-bindings: phy: Document the Qualcomm IPQ5332 UNIPHY USB Super-speed PHY

[email protected]
Newsgroups org.infradead.lists.linux-phy,org.kernel.vger.linux-devicetree
Message-ID <[email protected]>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Missing `minItems: 3` constraint for IPQ5332 clocks in conditional block allows incomplete device trees to pass validation.
--

--- Patch [1]: [PATCH v2 01/14] dt-bindings: phy: Document the Qualcomm IPQ5332 UNIPHY USB Super-speed PHY ---
commit 0e89230ae30b325a8982291c9e629f57e5fde180
Author: Praveenkumar I <[email protected]>

dt-bindings: phy: Document the Qualcomm IPQ5332 UNIPHY USB Super-speed PHY

Document the Qualcomm USB3 22ull UNIPHY present in the IPQ5018 and
IPQ5332 SoCs.

> diff --git a/Documentation/devicetree/bindings/phy/qcom,ipq5332-uniphy-usb-ss-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,ipq5332-uniphy-usb-ss-phy.yaml
> new file mode 100644
> index 0000000000000..cc9eccac51ddb
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/phy/qcom,ipq5332-uniphy-usb-ss-phy.yaml

[ ... ]

> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,ipq5332-uniphy-usb-ss-phy
> +    then:
> +      properties:
> +        clocks:
> +          items:
> +            - description: Shared PCIe/USB3 PHY AHB clock
> +            - description: USB3 PHY CFG AHB clock
> +            - description: USB3 pipe clock

[Severity: Low]
Is a minItems: 3 constraint missing for the clocks in this conditional block?

Since the global clocks definition sets minItems: 2, device trees for IPQ5332
that incorrectly specify only 2 clocks will silently pass dt_binding_check
validation. The json-schema items list keyword only validates the elements
present up to the size of the instance array; it does not enforce array length
by itself.

Would it be better to add minItems: 3 alongside the items list to ensure all
three clocks are required when the qcom,ipq5332-uniphy-usb-ss-phy compatible
string is used?

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

-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.