Devicetree
 help / color / mirror / Atom feed
From: Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
To: mkl@pengutronix.de, mani@kernel.org, thomas.kopp@microchip.com,
	mailhol@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, andersson@kernel.org,
	konradybcio@kernel.org, linusw@kernel.org, brgl@kernel.org,
	linux-can@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	linux-gpio@vger.kernel.org
Cc: mukesh.savaliya@oss.qualcomm.com, anup.kulkarni@oss.qualcomm.com,
	Viken Dadhaniya <viken.dadhaniya@oss.qualcomm.com>
Subject: [PATCH v3 0/2] can: mcp251xfd: add XSTBYEN transceiver standby control
Date: Sat, 21 Mar 2026 19:20:29 +0530	[thread overview]
Message-ID: <20260321135031.3107408-1-viken.dadhaniya@oss.qualcomm.com> (raw)

The MCP251xFD provides a dedicated transceiver standby control function
via the INT0/GPIO0/XSTBY pin, controlled by the XSTBYEN bit in IOCON.
When enabled, the hardware automatically drives the pin low while the
controller is active and high when it enters Sleep mode, allowing
automatic standby control of an external CAN transceiver without
software intervention.

This series adds driver support for the XSTBYEN-based transceiver
standby control feature.

Tested on QCS6490 RB3 Gen2 with a PCAN-USB FD adapter: the transceiver is
active in normal mode, CAN communication works correctly, and the pin is
automatically managed across sleep and wake transitions.
---
v2 -> v3:

- Dropped device Tree change from this series.
- Configure xstbyen pin before bringing the controller into normal mode.
- Add a check in mcp251xfd_gpio_request() to ensure that GPIO0 cannot be
  used when xstbyen is enabled.

v2 Link: https://lore.kernel.org/all/20260316131950.859748-1-viken.dadhaniya@oss.qualcomm.com/

v1 -> v2:

- Drop the gpio-hog approach as suggested by Dmitry.
- Enable hardware‑managed transceiver standby control via the appropriate
  Device Tree property.

v1 Link: https://lore.kernel.org/all/20260108125200.2803112-1-viken.dadhaniya@oss.qualcomm.com/
---
Viken Dadhaniya (2):
  dt-bindings: can: mcp251xfd: add microchip,xstbyen property
  can: mcp251xfd: add support for XSTBYEN transceiver standby control

 .../bindings/net/can/microchip,mcp251xfd.yaml |  8 ++++
 .../net/can/spi/mcp251xfd/mcp251xfd-core.c    | 37 +++++++++++++++++++
 drivers/net/can/spi/mcp251xfd/mcp251xfd.h     |  1 +
 3 files changed, 46 insertions(+)

-- 
2.34.1


             reply	other threads:[~2026-03-21 13:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-21 13:50 Viken Dadhaniya [this message]
2026-03-21 13:50 ` [PATCH v3 1/2] dt-bindings: can: mcp251xfd: add microchip,xstbyen property Viken Dadhaniya
2026-03-23 10:41   ` Marc Kleine-Budde
2026-03-23 19:30   ` Conor Dooley
2026-03-23 20:37     ` Marc Kleine-Budde
2026-03-23 21:30       ` Conor Dooley
2026-03-31  6:45         ` Viken Dadhaniya
2026-03-31  7:10           ` Marc Kleine-Budde
2026-03-21 13:50 ` [PATCH v3 2/2] can: mcp251xfd: add support for XSTBYEN transceiver standby control Viken Dadhaniya

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=20260321135031.3107408-1-viken.dadhaniya@oss.qualcomm.com \
    --to=viken.dadhaniya@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=anup.kulkarni@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mailhol@kernel.org \
    --cc=mani@kernel.org \
    --cc=mkl@pengutronix.de \
    --cc=mukesh.savaliya@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=thomas.kopp@microchip.com \
    /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