linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Conor Dooley <conor@kernel.org>
Cc: Prabhakar <prabhakar.csengg@gmail.com>,
	 Vincent Mailhol <mailhol@kernel.org>,
	Vinod Koul <vkoul@kernel.org>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	Rob Herring <robh@kernel.org>,
	 Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	 Aswath Govindraju <a-govindraju@ti.com>,
	Frank Li <Frank.li@nxp.com>,
	linux-can@vger.kernel.org,  linux-phy@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	 linux-renesas-soc@vger.kernel.org,
	Biju Das <biju.das.jz@bp.renesas.com>,
	 Fabrizio Castro <fabrizio.castro.jz@renesas.com>,
	Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Subject: Re: [PATCH v2] dt-bindings: phy: ti,tcan104x-can: Document TI TCAN1046
Date: Fri, 12 Dec 2025 12:21:03 +0100	[thread overview]
Message-ID: <20251211-wonderful-singing-eel-4e2293-mkl@pengutronix.de> (raw)
In-Reply-To: <20251210-persuaded-rewire-8ac93b0cc039@spud>


[-- Attachment #1.1: Type: text/plain, Size: 2215 bytes --]

On 10.12.2025 18:21:34, Conor Dooley wrote:
> On Wed, Dec 10, 2025 at 08:52:58AM +0100, Marc Kleine-Budde wrote:
> > On 09.12.2025 16:21:19, Prabhakar wrote:
> > > From: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > >
> > > Document the TI TCAN1046 automotive CAN transceiver. The TCAN1046 is a
> > > dual high-speed CAN transceiver with sleep-mode support and no EN pin,
> > > mirroring the behaviour of the NXP TJA1048, which also provides dual
> > > channels and STB1/2 sleep-control lines.
> > >
> > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > ---
> > > TCAN 1046, https://www.ti.com/lit/ds/symlink/tcan1046v-q1.pdf?ts=1765297159307&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FTCAN1046V-Q1
> > > NXP TJA1048, https://www.nxp.com/docs/en/data-sheet/TJA1048.pdf
> >
> > The polarity of the standby line of the chips is different.
> >
> > You must set the correct active high/low property for the GPIO, as the
> > driver uses logical levels.
> >
> > Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de>
>
> What you're saying seems to contradict the tag you've given, is a
> fallback really suitable if the standby polarity is not the same?

The driver uses _logical_ levels to switch the GPIOs. For example to
power on the PHY, it disables the standby GPIO by setting the value to
"0".

| static int can_transceiver_phy_power_on(struct phy *phy)
| {
[...]
|         gpiod_set_value_cansleep(can_transceiver_phy->standby_gpio, 0);
[...]
| }

You have to use GPIO_ACTIVE_HIGH/GPIO_ACTIVE_LOW in the DT to configure
the actual level of the GPIO.

If you connect the PHY's standby input directly to the SoC's GPIO....

| TJA1048: HIGH = Normal mode, LOW = Standby mode
| TCAN1046: High = Standby mode, Low = Normal Mode

...for the TJA1048 you would use GPIO_ACTIVE_LOW, while for the
TCAN1046 you would use GPIO_ACTIVE_HIGH.

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 112 bytes --]

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  parent reply	other threads:[~2025-12-12 11:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-09 16:21 [PATCH v2] dt-bindings: phy: ti,tcan104x-can: Document TI TCAN1046 Prabhakar
2025-12-10  7:52 ` Marc Kleine-Budde
2025-12-10 18:21   ` Conor Dooley
2025-12-12 10:58     ` Lad, Prabhakar
2025-12-12 11:21     ` Marc Kleine-Budde [this message]
2025-12-12 18:00       ` Conor Dooley
2025-12-17  8:15       ` Geert Uytterhoeven
2025-12-23 17:44 ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251211-wonderful-singing-eel-4e2293-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=Frank.li@nxp.com \
    --cc=a-govindraju@ti.com \
    --cc=biju.das.jz@bp.renesas.com \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fabrizio.castro.jz@renesas.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=prabhakar.csengg@gmail.com \
    --cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).