Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: imx91-9x9-qsb: add CAN support overlay file
@ 2026-07-10 10:12 haibo.chen
  2026-07-10 10:16 ` sashiko-bot
  0 siblings, 1 reply; 3+ messages in thread
From: haibo.chen @ 2026-07-10 10:12 UTC (permalink / raw)
  To: Frank Li, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: imx, linux-arm-kernel, devicetree, linux-kernel, Haibo Chen

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>


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

* Re: [PATCH] arm64: dts: imx91-9x9-qsb: add CAN support overlay file
  2026-07-10 10:12 [PATCH] arm64: dts: imx91-9x9-qsb: add CAN support overlay file haibo.chen
@ 2026-07-10 10:16 ` sashiko-bot
  2026-07-10 10:52   ` Bough Chen
  0 siblings, 1 reply; 3+ messages in thread
From: sashiko-bot @ 2026-07-10 10:16 UTC (permalink / raw)
  To: haibo.chen; +Cc: Frank.Li, devicetree, robh, conor+dt, imx

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The device tree overlay references an undefined phandle `<&can_fun>` and omits the `pinctrl-gpiomux` node described in the commit message, causing a build failure.
--

--- Patch [1]: [PATCH] arm64: dts: imx91-9x9-qsb: add CAN support overlay file ---
commit ba3a1378093445c34dbdd034a8296e7aaebdd0da
Author: Haibo Chen <haibo.chen@nxp.com>

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

This commit adds a device tree overlay to enable CAN1 support on the
i.MX91 9x9 QSB board. It configures the TJA1057GT/3 PHY and sets up
the CAN1 pins.

> 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 0000000000000..b8343d653e511
> --- /dev/null
> +++ b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb-can1.dtso

[ ... ]

> +&flexcan1 {
> +	phys = <&flexcan_phy>;
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pinctrl_flexcan1>, <&can_fun>;

[Severity: Low]
Does this overlay build successfully? The device tree overlay references
the can_fun phandle, but it does not appear to be defined here or in the
base device tree.

The commit message mentions a pinctrl-gpiomux node for can_fun, but it seems
to be missing from the patch. When the Makefile applies this overlay, will
fdtoverlay fail due to the unresolved reference?

> +	status = "okay";
> +};

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260710-dts-imx91-can1-v1-1-c78c9c378e8d@nxp.com?part=1

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

* RE: [PATCH] arm64: dts: imx91-9x9-qsb: add CAN support overlay file
  2026-07-10 10:16 ` sashiko-bot
@ 2026-07-10 10:52   ` Bough Chen
  0 siblings, 0 replies; 3+ messages in thread
From: Bough Chen @ 2026-07-10 10:52 UTC (permalink / raw)
  To: sashiko-reviews@lists.linux.dev, Bough Chen (OSS)
  Cc: Frank.Li@kernel.org, devicetree@vger.kernel.org, robh@kernel.org,
	conor+dt@kernel.org, imx@lists.linux.dev

> -----Original Message-----
> From: sashiko-bot@kernel.org <sashiko-bot@kernel.org>
> Sent: 2026年7月10日 18:16
> To: Bough Chen (OSS) <haibo.chen@oss.nxp.com>
> Cc: Frank.Li@kernel.org; devicetree@vger.kernel.org; robh@kernel.org;
> conor+dt@kernel.org; imx@lists.linux.dev
> Subject: Re: [PATCH] arm64: dts: imx91-9x9-qsb: add CAN support overlay
> file
> 
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s)
> to consider:
> - [Low] The device tree overlay references an undefined phandle
> `<&can_fun>` and omits the `pinctrl-gpiomux` node described in the commit
> message, causing a build failure.
> --
> 
> --- Patch [1]: [PATCH] arm64: dts: imx91-9x9-qsb: add CAN support overlay
> file --- commit ba3a1378093445c34dbdd034a8296e7aaebdd0da
> Author: Haibo Chen <haibo.chen@nxp.com>
> 
> arm64: dts: imx91-9x9-qsb: add CAN support overlay file
> 
> This commit adds a device tree overlay to enable CAN1 support on the
> i.MX91 9x9 QSB board. It configures the TJA1057GT/3 PHY and sets up the
> CAN1 pins.
> 
> > 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 0000000000000..b8343d653e511
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/freescale/imx91-9x9-qsb-can1.dtso
> 
> [ ... ]
> 
> > +&flexcan1 {
> > +	phys = <&flexcan_phy>;
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&pinctrl_flexcan1>, <&can_fun>;
> 
> [Severity: Low]
> Does this overlay build successfully? The device tree overlay references the
> can_fun phandle, but it does not appear to be defined here or in the base
> device tree.
> 
> The commit message mentions a pinctrl-gpiomux node for can_fun, but it
> seems to be missing from the patch. When the Makefile applies this overlay,
> will fdtoverlay fail due to the unresolved reference?

This patch is based on the following patch set:
https://lore.kernel.org/imx/20260710024204.3462444-1-chancel.liu@oss.nxp.com/T/#t

Regards
Haibo Chen
> 
> > +	status = "okay";
> > +};
> 
> --
> Sashiko AI
> review ・ https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F
> %2Fsashiko.dev%2F%23%2Fpatchset%2F20260710-dts-imx91-can1-v1-1-c78
> c9c378e8d%40nxp.com%3Fpart%3D1&data=05%7C02%7Chaibo.chen%40nx
> p.com%7C00c09a1daab147c3077608dede6c5fe4%7C686ea1d3bc2b4c6fa92
> cd99c5c301635%7C0%7C0%7C639192754210833934%7CUnknown%7CTW
> FpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW
> 4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=74dI6l4
> XaHsLg9qwfjO05X284oq3%2Fl11K0eKljKPsjw%3D&reserved=0


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

end of thread, other threads:[~2026-07-10 10:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-10 10:12 [PATCH] arm64: dts: imx91-9x9-qsb: add CAN support overlay file haibo.chen
2026-07-10 10:16 ` sashiko-bot
2026-07-10 10:52   ` Bough Chen

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