Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/3] arm64: dts: imx95-15x15-frdm: support CAN transceivers sharing a silent GPIO
@ 2026-07-30  4:33 haibo.chen
  2026-07-30  4:33 ` [PATCH 1/3] phy: phy-can-transceiver: default silent GPIO to high during probe haibo.chen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: haibo.chen @ 2026-07-30  4:33 UTC (permalink / raw)
  To: Marc Kleine-Budde, Vincent Mailhol, Vinod Koul, Neil Armstrong,
	Catalin Marinas, Will Deacon, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam
  Cc: linux-can, linux-phy, linux-kernel, linux-arm-kernel, devicetree,
	imx, Haibo Chen, qijian.guo

On the i.MX95 15x15 FRDM board the two CAN transceivers (attached to
flexcan2 and flexcan5) share a single "silent" control pin, which is
routed through the on-board PCAL6524 GPIO expander. Both transceiver PHY
nodes therefore reference the same GPIO line for their silent-gpios
property.

This series makes that sharing work correctly and puts the transceivers
into the proper default state:

- The silent pin is active high: asserting it places the transceiver in
  silent (listen-only) mode with the transmitter disabled. At probe time
  and before the PHY is powered on, the transceiver should default to
  silent mode. This is both the functionally correct and the lower-power
  state, so the silent GPIO is now requested as GPIOD_OUT_HIGH instead of
  GPIOD_OUT_LOW.

- Because the same physical GPIO is shared by two independent PHY
  devices, it is requested through the GPIO shared proxy. ARCH_MXC now
  selects HAVE_SHARED_GPIOS so that this mechanism is available on i.MX
  platforms.

- The two CAN transceiver PHY device tree nodes previously used the same
  node name "can-phy", causing a node name collision. They are renamed to
  "can-phy0" and "can-phy1" to make them unique; both continue to point
  at the shared silent GPIO.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
Haibo Chen (3):
      phy: phy-can-transceiver: default silent GPIO to high during probe
      arm64: select HAVE_SHARED_GPIOS for ARCH_MXC
      arm64: dts: imx95-15x15-frdm: fix duplicated can-phy node names

 arch/arm64/Kconfig.platforms                       | 1 +
 arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts | 4 ++--
 drivers/phy/phy-can-transceiver.c                  | 2 +-
 3 files changed, 4 insertions(+), 3 deletions(-)
---
base-commit: 78bc8af4affb9a732504eb22eeac7d1e50883853
change-id: 20260730-can-share-silent-5c89a5dfd308

Best regards,
-- 
Haibo Chen <haibo.chen@nxp.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/3] phy: phy-can-transceiver: default silent GPIO to high during probe
  2026-07-30  4:33 [PATCH 0/3] arm64: dts: imx95-15x15-frdm: support CAN transceivers sharing a silent GPIO haibo.chen
@ 2026-07-30  4:33 ` haibo.chen
  2026-07-30  6:12   ` Marc Kleine-Budde
  2026-07-30 14:47   ` Frank Li
  2026-07-30  4:33 ` [PATCH 2/3] arm64: select HAVE_SHARED_GPIOS for ARCH_MXC haibo.chen
  2026-07-30  4:33 ` [PATCH 3/3] arm64: dts: imx95-15x15-frdm: fix duplicated can-phy node names haibo.chen
  2 siblings, 2 replies; 7+ messages in thread
From: haibo.chen @ 2026-07-30  4:33 UTC (permalink / raw)
  To: Marc Kleine-Budde, Vincent Mailhol, Vinod Koul, Neil Armstrong,
	Catalin Marinas, Will Deacon, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam
  Cc: linux-can, linux-phy, linux-kernel, linux-arm-kernel, devicetree,
	imx, Haibo Chen, qijian.guo

From: Haibo Chen <haibo.chen@nxp.com>

The silent pin of the CAN transceiver is active high, asserting it puts
the transceiver into silent (listen-only) mode where the transmitter is
disabled.

At probe time, and before the PHY is powered on, the transceiver should
default to silent mode. This is the correct and lower-power state: the
transceiver should not actively drive the CAN bus until the PHY is
explicitly powered on. Requesting the silent GPIO as GPIOD_OUT_LOW leaves
the transceiver in normal mode by default, which is both incorrect and
wastes power.

Request the silent GPIO as GPIOD_OUT_HIGH so the transceiver starts in
silent mode, and let the power_on/power_off callbacks manage the mode
afterwards.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 drivers/phy/phy-can-transceiver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/phy/phy-can-transceiver.c b/drivers/phy/phy-can-transceiver.c
index 75dc49e75ca0e0e90a1b1b140dcaf8033ec02c50..9aa30662105f063fb6d0e60fd04a95c8d635a515 100644
--- a/drivers/phy/phy-can-transceiver.c
+++ b/drivers/phy/phy-can-transceiver.c
@@ -198,7 +198,7 @@ static int can_transceiver_phy_probe(struct platform_device *pdev)
 
 		if (drvdata->flags & CAN_TRANSCEIVER_SILENT_PRESENT) {
 			silent_gpio = devm_gpiod_get_index_optional(dev, "silent", i,
-								    GPIOD_OUT_LOW);
+								    GPIOD_OUT_HIGH);
 			if (IS_ERR(silent_gpio))
 				return PTR_ERR(silent_gpio);
 			can_transceiver_phy->silent_gpio = silent_gpio;

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] arm64: select HAVE_SHARED_GPIOS for ARCH_MXC
  2026-07-30  4:33 [PATCH 0/3] arm64: dts: imx95-15x15-frdm: support CAN transceivers sharing a silent GPIO haibo.chen
  2026-07-30  4:33 ` [PATCH 1/3] phy: phy-can-transceiver: default silent GPIO to high during probe haibo.chen
@ 2026-07-30  4:33 ` haibo.chen
  2026-07-30  4:33 ` [PATCH 3/3] arm64: dts: imx95-15x15-frdm: fix duplicated can-phy node names haibo.chen
  2 siblings, 0 replies; 7+ messages in thread
From: haibo.chen @ 2026-07-30  4:33 UTC (permalink / raw)
  To: Marc Kleine-Budde, Vincent Mailhol, Vinod Koul, Neil Armstrong,
	Catalin Marinas, Will Deacon, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam
  Cc: linux-can, linux-phy, linux-kernel, linux-arm-kernel, devicetree,
	imx, Haibo Chen, qijian.guo

From: Haibo Chen <haibo.chen@nxp.com>

Some NXP platforms use shared GPIOs. Enable support for them by
selecting the Kconfig switch provided by GPIOLIB.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 arch/arm64/Kconfig.platforms | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms
index d2acfac7300372dcb023ac419f5723b9b32b900a..dde2d72525e0ec15c05f437a727c7e8a1c0c80bf 100644
--- a/arch/arm64/Kconfig.platforms
+++ b/arch/arm64/Kconfig.platforms
@@ -277,6 +277,7 @@ config ARCH_MXC
 	select ARM64_ERRATUM_845719 if COMPAT
 	select IMX_GPCV2
 	select IMX_GPCV2_PM_DOMAINS
+	select HAVE_SHARED_GPIOS
 	select PM
 	select PM_GENERIC_DOMAINS
 	select SOC_BUS

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] arm64: dts: imx95-15x15-frdm: fix duplicated can-phy node names
  2026-07-30  4:33 [PATCH 0/3] arm64: dts: imx95-15x15-frdm: support CAN transceivers sharing a silent GPIO haibo.chen
  2026-07-30  4:33 ` [PATCH 1/3] phy: phy-can-transceiver: default silent GPIO to high during probe haibo.chen
  2026-07-30  4:33 ` [PATCH 2/3] arm64: select HAVE_SHARED_GPIOS for ARCH_MXC haibo.chen
@ 2026-07-30  4:33 ` haibo.chen
  2026-07-30  5:17   ` Bough Chen
  2 siblings, 1 reply; 7+ messages in thread
From: haibo.chen @ 2026-07-30  4:33 UTC (permalink / raw)
  To: Marc Kleine-Budde, Vincent Mailhol, Vinod Koul, Neil Armstrong,
	Catalin Marinas, Will Deacon, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam
  Cc: linux-can, linux-phy, linux-kernel, linux-arm-kernel, devicetree,
	imx, Haibo Chen, qijian.guo

From: Haibo Chen <haibo.chen@nxp.com>

Both the flexcan2 and flexcan5 CAN transceiver PHY nodes use the same
node name "can-phy", which results in a node name collision. Distinguish
them by using unit-less unique names "can-phy0" and "can-phy1".

These two CAN PHYs share their silent pin, this shared GPIO can be
handled by GPIO shared proxy.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
 arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts b/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts
index 0f43e3be70589532763f65f1699f31dd361cc841..7ed9ff978432edeff4198f189247a154fc1016b5 100644
--- a/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts
+++ b/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts
@@ -56,7 +56,7 @@ dmic: dmic {
 		num-channels = <2>;
 	};
 
-	flexcan2_phy: can-phy {
+	flexcan2_phy: can-phy0 {
 		compatible = "nxp,tja1051";
 		#phy-cells = <0>;
 		max-bitrate = <5000000>;
@@ -67,7 +67,7 @@ flexcan2_phy: can-phy {
 		silent-gpios = <&pcal6524 7 GPIO_ACTIVE_HIGH>;
 	};
 
-	flexcan5_phy: can-phy {
+	flexcan5_phy: can-phy1 {
 		compatible = "nxp,tja1051";
 		#phy-cells = <0>;
 		max-bitrate = <5000000>;

-- 
2.34.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* RE: [PATCH 3/3] arm64: dts: imx95-15x15-frdm: fix duplicated can-phy node names
  2026-07-30  4:33 ` [PATCH 3/3] arm64: dts: imx95-15x15-frdm: fix duplicated can-phy node names haibo.chen
@ 2026-07-30  5:17   ` Bough Chen
  0 siblings, 0 replies; 7+ messages in thread
From: Bough Chen @ 2026-07-30  5:17 UTC (permalink / raw)
  To: Bough Chen (OSS), Marc Kleine-Budde, Vincent Mailhol, Vinod Koul,
	Neil Armstrong, Catalin Marinas, Will Deacon, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Frank Li, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam
  Cc: linux-can@vger.kernel.org, linux-phy@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org,
	imx@lists.linux.dev, Joseph Guo

> -----Original Message-----
> From: Bough Chen (OSS) <haibo.chen@oss.nxp.com>
> Sent: 2026年7月30日 12:33
> To: Marc Kleine-Budde <mkl@pengutronix.de>; Vincent Mailhol
> <mailhol@kernel.org>; Vinod Koul <vkoul@kernel.org>; Neil Armstrong
> <neil.armstrong@linaro.org>; Catalin Marinas <catalin.marinas@arm.com>;
> Will Deacon <will@kernel.org>; Rob Herring <robh@kernel.org>; Krzysztof
> Kozlowski <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>;
> Frank Li <frank.li@nxp.com>; Sascha Hauer <s.hauer@pengutronix.de>;
> Pengutronix Kernel Team <kernel@pengutronix.de>; Fabio Estevam
> <festevam@gmail.com>
> Cc: linux-can@vger.kernel.org; linux-phy@lists.infradead.org;
> linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> devicetree@vger.kernel.org; imx@lists.linux.dev; Bough Chen
> <haibo.chen@nxp.com>; Joseph Guo <qijian.guo@nxp.com>
> Subject: [PATCH 3/3] arm64: dts: imx95-15x15-frdm: fix duplicated can-phy
> node names
> 
> From: Haibo Chen <haibo.chen@nxp.com>
> 
> Both the flexcan2 and flexcan5 CAN transceiver PHY nodes use the same
> node name "can-phy", which results in a node name collision. Distinguish
> them by using unit-less unique names "can-phy0" and "can-phy1".
> 
> These two CAN PHYs share their silent pin, this shared GPIO can be handled
> by GPIO shared proxy.

Sorry, forget to add the fix tag:

Fixes: 9bdfeed989b1 ("arm64: dts: freescale: imx95: Add support for i.MX95 15x15 FRDM board")


Regards
Haibo Chen
> 
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> ---
>  arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts
> b/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts
> index
> 0f43e3be70589532763f65f1699f31dd361cc841..7ed9ff978432edeff4198f1
> 89247a154fc1016b5 100644
> --- a/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts
> +++ b/arch/arm64/boot/dts/freescale/imx95-15x15-frdm.dts
> @@ -56,7 +56,7 @@ dmic: dmic {
>  		num-channels = <2>;
>  	};
> 
> -	flexcan2_phy: can-phy {
> +	flexcan2_phy: can-phy0 {
>  		compatible = "nxp,tja1051";
>  		#phy-cells = <0>;
>  		max-bitrate = <5000000>;
> @@ -67,7 +67,7 @@ flexcan2_phy: can-phy {
>  		silent-gpios = <&pcal6524 7 GPIO_ACTIVE_HIGH>;
>  	};
> 
> -	flexcan5_phy: can-phy {
> +	flexcan5_phy: can-phy1 {
>  		compatible = "nxp,tja1051";
>  		#phy-cells = <0>;
>  		max-bitrate = <5000000>;
> 
> --
> 2.34.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] phy: phy-can-transceiver: default silent GPIO to high during probe
  2026-07-30  4:33 ` [PATCH 1/3] phy: phy-can-transceiver: default silent GPIO to high during probe haibo.chen
@ 2026-07-30  6:12   ` Marc Kleine-Budde
  2026-07-30 14:47   ` Frank Li
  1 sibling, 0 replies; 7+ messages in thread
From: Marc Kleine-Budde @ 2026-07-30  6:12 UTC (permalink / raw)
  To: haibo.chen
  Cc: Vincent Mailhol, Vinod Koul, Neil Armstrong, Catalin Marinas,
	Will Deacon, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	linux-can, linux-phy, linux-kernel, linux-arm-kernel, devicetree,
	imx, Haibo Chen, qijian.guo

[-- Attachment #1: Type: text/plain, Size: 1211 bytes --]

On 30.07.2026 12:33:26, haibo.chen@oss.nxp.com wrote:
> From: Haibo Chen <haibo.chen@nxp.com>
>
> The silent pin of the CAN transceiver is active high, asserting it puts
> the transceiver into silent (listen-only) mode where the transmitter is
> disabled.
>
> At probe time, and before the PHY is powered on, the transceiver should
> default to silent mode. This is the correct and lower-power state: the
> transceiver should not actively drive the CAN bus until the PHY is
> explicitly powered on. Requesting the silent GPIO as GPIOD_OUT_LOW leaves
> the transceiver in normal mode by default, which is both incorrect and
> wastes power.
>
> Request the silent GPIO as GPIOD_OUT_HIGH so the transceiver starts in
> silent mode, and let the power_on/power_off callbacks manage the mode
> afterwards.
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>

Reviewed-by: Marc Kleine-Budde <mkl@pengutronix.de>

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] phy: phy-can-transceiver: default silent GPIO to high during probe
  2026-07-30  4:33 ` [PATCH 1/3] phy: phy-can-transceiver: default silent GPIO to high during probe haibo.chen
  2026-07-30  6:12   ` Marc Kleine-Budde
@ 2026-07-30 14:47   ` Frank Li
  1 sibling, 0 replies; 7+ messages in thread
From: Frank Li @ 2026-07-30 14:47 UTC (permalink / raw)
  To: haibo.chen
  Cc: Marc Kleine-Budde, Vincent Mailhol, Vinod Koul, Neil Armstrong,
	Catalin Marinas, Will Deacon, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, linux-can, linux-phy, linux-kernel,
	linux-arm-kernel, devicetree, imx, Haibo Chen, qijian.guo

On Thu, Jul 30, 2026 at 12:33:26PM +0800, haibo.chen@oss.nxp.com wrote:
> From: Haibo Chen <haibo.chen@nxp.com>
>
> The silent pin of the CAN transceiver is active high, asserting it puts
> the transceiver into silent (listen-only) mode where the transmitter is
> disabled.
>
> At probe time, and before the PHY is powered on, the transceiver should
> default to silent mode. This is the correct and lower-power state: the
> transceiver should not actively drive the CAN bus until the PHY is
> explicitly powered on. Requesting the silent GPIO as GPIOD_OUT_LOW leaves
> the transceiver in normal mode by default, which is both incorrect and
> wastes power.
>
> Request the silent GPIO as GPIOD_OUT_HIGH so the transceiver starts in
> silent mode, and let the power_on/power_off callbacks manage the mode
> afterwards.
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  drivers/phy/phy-can-transceiver.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/phy/phy-can-transceiver.c b/drivers/phy/phy-can-transceiver.c
> index 75dc49e75ca0e0e90a1b1b140dcaf8033ec02c50..9aa30662105f063fb6d0e60fd04a95c8d635a515 100644
> --- a/drivers/phy/phy-can-transceiver.c
> +++ b/drivers/phy/phy-can-transceiver.c
> @@ -198,7 +198,7 @@ static int can_transceiver_phy_probe(struct platform_device *pdev)
>
>  		if (drvdata->flags & CAN_TRANSCEIVER_SILENT_PRESENT) {
>  			silent_gpio = devm_gpiod_get_index_optional(dev, "silent", i,
> -								    GPIOD_OUT_LOW);
> +								    GPIOD_OUT_HIGH);
>  			if (IS_ERR(silent_gpio))
>  				return PTR_ERR(silent_gpio);
>  			can_transceiver_phy->silent_gpio = silent_gpio;
>
> --
> 2.34.1
>
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-07-30 14:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30  4:33 [PATCH 0/3] arm64: dts: imx95-15x15-frdm: support CAN transceivers sharing a silent GPIO haibo.chen
2026-07-30  4:33 ` [PATCH 1/3] phy: phy-can-transceiver: default silent GPIO to high during probe haibo.chen
2026-07-30  6:12   ` Marc Kleine-Budde
2026-07-30 14:47   ` Frank Li
2026-07-30  4:33 ` [PATCH 2/3] arm64: select HAVE_SHARED_GPIOS for ARCH_MXC haibo.chen
2026-07-30  4:33 ` [PATCH 3/3] arm64: dts: imx95-15x15-frdm: fix duplicated can-phy node names haibo.chen
2026-07-30  5:17   ` Bough Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox