[PATCH] arm64: dts: imx91-9x9-qsb: add CAN support overlay file

haibo.chen@oss.nxp.com posted 1 patch 2 weeks, 1 day ago
arch/arm64/boot/dts/freescale/Makefile             |  2 +
.../boot/dts/freescale/imx91-9x9-qsb-can1.dtso     | 48 ++++++++++++++++++++++
2 files changed, 50 insertions(+)
[PATCH] arm64: dts: imx91-9x9-qsb: add CAN support overlay file
Posted by haibo.chen@oss.nxp.com 2 weeks, 1 day ago
From: Haibo Chen <haibo.chen@nxp.com>

On the i.MX91 9x9 QSB, CAN1 and MICFIL share pins. A TMUX1574RSVR
analog mux controls the routing: when SEL is driven high, CAN1 is
selected; when SEL is driven low, MICFIL is selected. By default,
SEL is kept low.

To enable CAN1, SEL must be driven high. This is done via the can_fun
function defined in the pinctrl-gpiomux node. CAN1 uses the
TJA1057GT/3 PHY.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
This patch is based on the following patch set:
https://lore.kernel.org/imx/20260710024204.3462444-1-chancel.liu@oss.nxp.com/T/#t
---
 arch/arm64/boot/dts/freescale/Makefile             |  2 +
 .../boot/dts/freescale/imx91-9x9-qsb-can1.dtso     | 48 ++++++++++++++++++++++
 2 files changed, 50 insertions(+)

diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index 01d4ddfde0989a2f1ae0ac33d236fe1e2b1c970d..37d158c2de88572e2753ccf9ec518d27cbe8d492 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -577,7 +577,9 @@ dtb-$(CONFIG_ARCH_MXC) += imx91-11x11-frdm.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx91-11x11-frdm-s.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx91-phyboard-segin.dtb
 
+imx91-9x9-qsb-can1-dtbs += imx91-9x9-qsb.dtb imx91-9x9-qsb-can1.dtbo
 imx91-phyboard-segin-peb-av-18-dtbs += imx91-phyboard-segin.dtb imx91-phyboard-segin-peb-av-18.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx91-9x9-qsb-can1.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx91-phyboard-segin-peb-av-18.dtb
 
 dtb-$(CONFIG_ARCH_MXC) += imx91-tqma9131-mba91xxca.dtb
diff --git a/arch/arm64/boot/dts/freescale/imx91-9x9-qsb-can1.dtso b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb-can1.dtso
new file mode 100644
index 0000000000000000000000000000000000000000..b8343d653e511244c838a2a7add8a8d74398f8a2
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb-can1.dtso
@@ -0,0 +1,48 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2026 NXP
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include "imx91-pinfunc.h"
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+	flexcan_phy: can-phy {
+		compatible = "nxp,tja1057";
+		#phy-cells = <0>;
+		max-bitrate = <5000000>;
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_flexcan_phy>;
+		silent-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+	};
+};
+
+&flexcan1 {
+	phys = <&flexcan_phy>;
+	pinctrl-names = "default";
+	pinctrl-0 = <&pinctrl_flexcan1>, <&can_fun>;
+	status = "okay";
+};
+
+&iomuxc {
+	pinctrl_flexcan_phy: flexcanphygrp {
+		fsl,pins = <
+			MX91_PAD_PDM_BIT_STREAM1__GPIO1_IO10	0x31e
+		>;
+	};
+
+	pinctrl_flexcan1: flexcan1grp {
+		fsl,pins = <
+			MX91_PAD_PDM_CLK__CAN1_TX		0x139e
+			MX91_PAD_PDM_BIT_STREAM0__CAN1_RX	0x139e
+		>;
+	};
+};
+
+/* micfil uses PDM port A pins, conflicts with can1 */
+&micfil {
+	status = "disabled";
+};

---
base-commit: b9fff21cbd480f47f04debbce6c14f48dd715f0a
change-id: 20260710-dts-imx91-can1-b755fdc11de1

Best regards,
-- 
Haibo Chen <haibo.chen@nxp.com>
Re: [PATCH] arm64: dts: imx91-9x9-qsb: add CAN support overlay file
Posted by Frank.Li@oss.nxp.com 1 week, 1 day ago
From: Frank Li <Frank.Li@nxp.com>


On Fri, 10 Jul 2026 18:12:20 +0800, haibo.chen@oss.nxp.com wrote:
> On the i.MX91 9x9 QSB, CAN1 and MICFIL share pins. A TMUX1574RSVR
> analog mux controls the routing: when SEL is driven high, CAN1 is
> selected; when SEL is driven low, MICFIL is selected. By default,
> SEL is kept low.
> 
> To enable CAN1, SEL must be driven high. This is done via the can_fun
> function defined in the pinctrl-gpiomux node. CAN1 uses the
> TJA1057GT/3 PHY.
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: imx91-9x9-qsb: add CAN support overlay file
      commit: 356894c37aa1f8ab430cef5d69176123b0ec98b3

Best regards,
-- 
Frank Li <Frank.Li@nxp.com>