]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: imx93-9x9-qsb: add CAN support overlay file
authorHaibo Chen <haibo.chen@nxp.com>
Tue, 2 Dec 2025 06:04:33 +0000 (14:04 +0800)
committerShawn Guo <shawnguo@kernel.org>
Tue, 30 Dec 2025 02:26:48 +0000 (10:26 +0800)
CAN1 and Micfil share pins on imx93-9x9-qsb board, use TMUX1574RSVR
to control the connection: put sel to high, select CAN1, put sel to
low, select Micfil. In default, sel keep low.

To support CAN1, need to put the sel to high. Besides, CAN1 use phy
TJA1057GT/3.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Shawn Guo <shawnguo@kernel.org>
arch/arm64/boot/dts/freescale/Makefile
arch/arm64/boot/dts/freescale/imx93-9x9-qsb-can1.dtso [new file with mode: 0644]

index 862788fb3ea4889afd6e9453346afabe87cc22b3..f25bebabf5587bf2c3a5cf2f321c1b67ef311c43 100644 (file)
@@ -382,7 +382,9 @@ dtb-$(CONFIG_ARCH_MXC) += imx91-phyboard-segin.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx91-tqma9131-mba91xxca.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-9x9-qsb.dtb
 
+imx93-9x9-qsb-can1-dtbs += imx93-9x9-qsb.dtb imx93-9x9-qsb-can1.dtbo
 imx93-9x9-qsb-i3c-dtbs += imx93-9x9-qsb.dtb imx93-9x9-qsb-i3c.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx93-9x9-qsb-can1.dtb
 dtb-$(CONFIG_ARCH_MXC) += imx93-9x9-qsb-i3c.dtb
 
 dtb-$(CONFIG_ARCH_MXC) += imx93-11x11-evk.dtb
diff --git a/arch/arm64/boot/dts/freescale/imx93-9x9-qsb-can1.dtso b/arch/arm64/boot/dts/freescale/imx93-9x9-qsb-can1.dtso
new file mode 100644 (file)
index 0000000..0bf1e9d
--- /dev/null
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright 2025 NXP
+ */
+
+#include <dt-bindings/gpio/gpio.h>
+#include "imx93-pinfunc.h"
+
+/dts-v1/;
+/plugin/;
+
+&{/} {
+       flexcan_phy: can-phy {
+               compatible = "nxp,tja1057";
+               #phy-cells = <0>;
+               max-bitrate = <5000000>;
+               silent-gpios = <&pcal6524 23 GPIO_ACTIVE_HIGH>;
+       };
+};
+
+&flexcan1 {
+       phys = <&flexcan_phy>;
+       pinctrl-names = "default";
+       pinctrl-0 = <&pinctrl_flexcan1>;
+       status = "okay";
+};
+
+&iomuxc {
+       pinctrl_flexcan1: flexcan1grp {
+               fsl,pins = <
+                       MX93_PAD_PDM_CLK__CAN1_TX               0x139e
+                       MX93_PAD_PDM_BIT_STREAM0__CAN1_RX       0x139e
+               >;
+       };
+};
+
+/* micfi1 use the A port, conflict with can1 */
+&micfil {
+       status = "disabled";
+};
+
+&pcal6524 {
+       /*
+        * mic-can-sel-hog have property 'output-low', dt overlay don't
+        * support /delete-property/. Both 'output-low' and 'output-high'
+        * will be exist under hog nodes if overlay file set 'output-high'.
+        * Workaround is disable this hog and create new hog with
+        * 'output-high'.
+        */
+       mic-can-sel-hog {
+               status = "disabled";
+       };
+
+       /*
+        * Config the MIC/CAN_SEL to high, chose B
+        * port, connect to CAN.
+        */
+       mic-can-high-sel-hog {
+               gpio-hog;
+               gpios = <0x11 0x00>;
+               output-high;
+       };
+};