[PATCH v4 1/6] dt-bindings: phy: ti,tcan104x-can: Document NXP TJA105X/1048

Peng Fan posted 6 patches 1 month ago
There is a newer version of this series
[PATCH v4 1/6] dt-bindings: phy: ti,tcan104x-can: Document NXP TJA105X/1048
Posted by Peng Fan 1 month ago
The TJA105[1,7] is a high-speed CAN transceiver which is a pin-compatible
alternative for TI TCAN1043 with sleep mode supported, and has a compatible
programming model, therefore use ti,tcan1043 as fallback compatible.

The TJA1048 is a dual high-speed CAN transceiver with sleep mode supported.

Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 .../devicetree/bindings/phy/ti,tcan104x-can.yaml   | 30 ++++++++++++++++++++--
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml b/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
index 4a8c3829d85d3c4a4963750d03567c1c345beb91..f8e0c24856a2ba83b5c988b246464f47e11a032f 100644
--- a/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
+++ b/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
@@ -19,18 +19,25 @@ properties:
           - enum:
               - microchip,ata6561
           - const: ti,tcan1042
+      - items:
+          - enum:
+              - nxp,tja1051
+              - nxp,tja1057
+          - const: ti,tcan1043
       - enum:
           - ti,tcan1042
           - ti,tcan1043
+          - nxp,tja1048
           - nxp,tjr1443
 
   '#phy-cells':
-    const: 0
+    enum: [0, 1]
 
   standby-gpios:
     description:
       gpio node to toggle standby signal on transceiver
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
 
   enable-gpios:
     description:
@@ -53,6 +60,25 @@ required:
   - compatible
   - '#phy-cells'
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: nxp,tja1048
+    then:
+      properties:
+        '#phy-cells':
+          const: 1
+        standby-gpios:
+          minItems: 2
+    else:
+      properties:
+        '#phy-cells':
+          const: 0
+        standby-gpios:
+          maxItems: 1
+
 additionalProperties: false
 
 examples:

-- 
2.37.1
Re: [PATCH v4 1/6] dt-bindings: phy: ti,tcan104x-can: Document NXP TJA105X/1048
Posted by Conor Dooley 1 month ago
On Mon, Sep 01, 2025 at 11:18:11AM +0800, Peng Fan wrote:
> The TJA105[1,7] is a high-speed CAN transceiver which is a pin-compatible
> alternative for TI TCAN1043 with sleep mode supported, and has a compatible
> programming model, therefore use ti,tcan1043 as fallback compatible.
> 
> The TJA1048 is a dual high-speed CAN transceiver with sleep mode supported.
> 
> Reviewed-by: Frank Li <Frank.Li@nxp.com>
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
>  .../devicetree/bindings/phy/ti,tcan104x-can.yaml   | 30 ++++++++++++++++++++--
>  1 file changed, 28 insertions(+), 2 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml b/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
> index 4a8c3829d85d3c4a4963750d03567c1c345beb91..f8e0c24856a2ba83b5c988b246464f47e11a032f 100644
> --- a/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
> +++ b/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
> @@ -19,18 +19,25 @@ properties:
>            - enum:
>                - microchip,ata6561
>            - const: ti,tcan1042
> +      - items:
> +          - enum:
> +              - nxp,tja1051
> +              - nxp,tja1057
> +          - const: ti,tcan1043
>        - enum:
>            - ti,tcan1042
>            - ti,tcan1043
> +          - nxp,tja1048
>            - nxp,tjr1443
>  
>    '#phy-cells':
> -    const: 0
> +    enum: [0, 1]
>  
>    standby-gpios:
>      description:
>        gpio node to toggle standby signal on transceiver
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 2

You're adding a second standby gpio, which one is which?
I assume you mean that item 1 is stbn1 and item 2 is stbn 2 for tja1048.
Might be kinda obvious, but I think it should be mentioned.

tja105{1,7} don't have a standby gpio, but they do have a silent mode.
silent mode seems fundamentally different to standby, since the receiver
still works. Seems like that should be handled differently, no?

>  
>    enable-gpios:
>      description:
> @@ -53,6 +60,25 @@ required:
>    - compatible
>    - '#phy-cells'
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: nxp,tja1048
> +    then:
> +      properties:
> +        '#phy-cells':
> +          const: 1
> +        standby-gpios:
> +          minItems: 2
> +    else:
> +      properties:
> +        '#phy-cells':
> +          const: 0
> +        standby-gpios:
> +          maxItems: 1
> +
>  additionalProperties: false
>  
>  examples:
> 
> -- 
> 2.37.1
> 
Re: [PATCH v4 1/6] dt-bindings: phy: ti,tcan104x-can: Document NXP TJA105X/1048
Posted by Conor Dooley 1 month ago
On Mon, Sep 01, 2025 at 07:54:01PM +0100, Conor Dooley wrote:
> On Mon, Sep 01, 2025 at 11:18:11AM +0800, Peng Fan wrote:
> > The TJA105[1,7] is a high-speed CAN transceiver which is a pin-compatible
> > alternative for TI TCAN1043 with sleep mode supported, and has a compatible
> > programming model, therefore use ti,tcan1043 as fallback compatible.
> > 
> > The TJA1048 is a dual high-speed CAN transceiver with sleep mode supported.
> > 
> > Reviewed-by: Frank Li <Frank.Li@nxp.com>
> > Signed-off-by: Peng Fan <peng.fan@nxp.com>
> > ---
> >  .../devicetree/bindings/phy/ti,tcan104x-can.yaml   | 30 ++++++++++++++++++++--
> >  1 file changed, 28 insertions(+), 2 deletions(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml b/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
> > index 4a8c3829d85d3c4a4963750d03567c1c345beb91..f8e0c24856a2ba83b5c988b246464f47e11a032f 100644
> > --- a/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
> > +++ b/Documentation/devicetree/bindings/phy/ti,tcan104x-can.yaml
> > @@ -19,18 +19,25 @@ properties:
> >            - enum:
> >                - microchip,ata6561
> >            - const: ti,tcan1042
> > +      - items:
> > +          - enum:
> > +              - nxp,tja1051
> > +              - nxp,tja1057
> > +          - const: ti,tcan1043
> >        - enum:
> >            - ti,tcan1042
> >            - ti,tcan1043
> > +          - nxp,tja1048
> >            - nxp,tjr1443
> >  
> >    '#phy-cells':
> > -    const: 0
> > +    enum: [0, 1]
> >  
> >    standby-gpios:
> >      description:
> >        gpio node to toggle standby signal on transceiver
> > -    maxItems: 1
> > +    minItems: 1
> > +    maxItems: 2
> 
> You're adding a second standby gpio, which one is which?
> I assume you mean that item 1 is stbn1 and item 2 is stbn 2 for tja1048.
> Might be kinda obvious, but I think it should be mentioned.
> 
> tja105{1,7} don't have a standby gpio, but they do have a silent mode.
> silent mode seems fundamentally different to standby, since the receiver
> still works. Seems like that should be handled differently, no?

The docs for standby mode for the tcan1043 don't match with the tja1051,
"Standby mode is a low power mode where the driver and receiver are
disabled," so does the fallback compatible even make sense? Seems like a
combination of enable and standby gpios are used to put the tcan device
into silent mode but the tja1051 has a pin for that alone and seemingly
does not support standby at all?

> 
> >  
> >    enable-gpios:
> >      description:
> > @@ -53,6 +60,25 @@ required:
> >    - compatible
> >    - '#phy-cells'
> >  
> > +allOf:
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: nxp,tja1048
> > +    then:
> > +      properties:
> > +        '#phy-cells':
> > +          const: 1
> > +        standby-gpios:
> > +          minItems: 2
> > +    else:
> > +      properties:
> > +        '#phy-cells':
> > +          const: 0
> > +        standby-gpios:
> > +          maxItems: 1
> > +
> >  additionalProperties: false
> >  
> >  examples:
> > 
> > -- 
> > 2.37.1
> >