Thread (14 messages) 14 messages, 2 authors, 2025-09-03

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

From: Peng Fan <peng.fan@nxp.com>
Date: 2025-09-03 06:00:39
Also in: imx, linux-can, linux-devicetree, linux-phy, lkml

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

On Tue, Sep 02, 2025 at 02:24:49AM +0000, Peng Fan wrote:
quoted
Hi Conor,
quoted
Subject: Re: [PATCH v4 1/6] dt-bindings: phy: ti,tcan104x-can:
Document NXP TJA105X/1048

On Mon, Sep 01, 2025 at 07:54:01PM +0100, Conor Dooley wrote:
quoted
On Mon, Sep 01, 2025 at 11:18:11AM +0800, Peng Fan wrote:
quoted
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.
quoted
quoted
The TJA1048 is a dual high-speed CAN transceiver with sleep
mode
quoted
quoted
supported.
quoted
quoted
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
++++++++++++++++++++--
quoted
quoted
 1 file changed, 28 insertions(+), 2 deletions(-)

diff --git
a/Documentation/devicetree/bindings/phy/ti,tcan104x-
can.yaml
quoted
quoted
quoted
quoted
b/Documentation/devicetree/bindings/phy/ti,tcan104x-
can.yaml
quoted
quoted
quoted
quoted
index
4a8c3829d85d3c4a4963750d03567c1c345beb91..f8e0c24856a2ba83
quoted
quoted
b5c988b246
quoted
quoted
464f47e11a032f 100644
--- a/Documentation/devicetree/bindings/phy/ti,tcan104x-
can.yaml
quoted
quoted
quoted
quoted
+++ b/Documentation/devicetree/bindings/phy/ti,tcan104x-
can.yaml
quoted
quoted
@@ -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.
Yes. There are two standby pins.
quoted
quoted
Might be kinda obvious, but I think it should be mentioned.
I could update description as below.
"
description:
  gpio node to toggle standby signal on transceiver. For two Items,
  item 1 is for stbn1, item 2 is for stbn2.
Sure.
quoted
quoted
quoted
tja105{1,7} don't have a standby gpio, but they do have a silent
mode.
Right. Tja105{1,7} has a pin S for silent mode.
quoted
quoted
silent mode seems fundamentally different to standby, since the
receiver still works. Seems like that should be handled differently,
no?
quoted
quoted
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
quoted
quoted
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?
Thanks for looking into the details. I also read more into the
datasheet.
quoted
Tcan1043:
EN   nSTB
H       H    ---> normal mode
L        H   ---> slient mode
H       L    ---> standby mode
L        X    --->off mode

TJA1051
EN   S
H     L   --> normal mode
H     H  --> slient mode
L      X  --> off mode

Your analysis is correct. silent is different with standby, but we
only wanna to use normal and off mode
In addition, it looks like there are some tja1051 devices that don't even
have the enable pin? Of the 4 SKUs, there are 2 that use pin5 as Vio
and 1 that has it n/c. Only the T/E device has an enable there.
Thanks again for the detailed reading into datasheet.

Yes. But I would like to only keep one compatible
"nxp,tja1051" from a board design level, EN could be always tied to high
for TJA1051T/E. So to dt-binding, EN it is optional for all TJA1051
variants.

I am thinking to use below compatible in V4 for the devices added
in this patch. Does this look good to you?

      - items:                                                                                      
          - const: nxp,tja1057                                                                      
          - const: nxp,tja1051                                                                      
      - enum: 
          ....                                                                                      
          - nxp,tja1048                                                                             
          - nxp,tja1051                                                                             
          ....
quoted
If we need to handle differently, I need to add a new optional
property

silent-gpios:
  description:
    gpio node to toggle silent signal on transceiver
  minItems: 1
Ye, I think so. And probably add some if/then to use it instead of
standby on the relevant chips.
Yes. Agree.

Thanks,
Peng.

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help