[PATCH V3 2/3] dt-bindings: phy: ti,tcan104x-can: Document Microchip MCP2542

sashiko-bot at kernel.org sashiko-bot at kernel.org
Wed Sep 2 06:35:24 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The newly added `microchip,mcp2542` compatible string bypasses schema validation hardware constraints because its fallback conditional block uses a strict `enum` match rather than `contains`.
--

commit c5426cb50d1b23a21e92a69a5197ccb523f72e8b
Author: Stefan Wahren <wahrenst at gmx.net>

dt-bindings: phy: ti,tcan104x-can: Document Microchip MCP2542
    
The Microchip MCP2542 High-speed CAN transceiver with Sleep mode is a
pin-compatible alternative for the TI TCAN1042.

> diff --git a/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml b/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
> index 9f5c37ca6496a..3ed4ce2191201 100644
> --- a/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
> +++ b/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
> @@ -18,6 +18,7 @@ properties:
>        - items:
>            - enum:
>                - microchip,ata6561
> +              - microchip,mcp2542

[Severity: Medium]
Will this newly added compatible string bypass the hardware constraints enforced
later in the schema?

When a device tree defines compatible = "microchip,mcp2542", "ti,tcan1042", the
schema parses it as a string array. However, the allOf conditional block further
down in the file checks for ti,tcan1042 using a strict scalar enum match:

allOf:
  - if:
      properties:
        compatible:
          enum:
            - nxp,tjr1443
            - ti,tcan1042
            - ti,tcan1043
    then:

Since the array fails the strict enum match, the then constraints are skipped,
which allows a microchip,mcp2542 device node with an invalid configuration to
silently pass dt_binding_check.

Should the allOf block be updated to use contains instead of enum, or should
microchip,mcp2542 be explicitly added to the enum list, to ensure these devices
are properly validated?

>                - ti,tcan1051
>            - const: ti,tcan1042
>        - items:

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260902132801.22056-1-wahrenst@gmx.net?part=2



More information about the linux-phy mailing list