From ec5c75673cb9d4c9a2a55a70d54a6ccb254f4ba4 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Mon, 4 May 2026 19:54:40 -0400 Subject: [PATCH] arm64: dts: imx8mp-evk: add board-level mux for CAN2 and MICFIL The board integrates an on-board mux to route shared signals to either CAN2 or PDM (MICFIL). The mux is controlled by a GPIO. Add a pinctrl-based multiplexer node to describe this routing and ensure proper probe ordering of the dependent devices. Previously, MICFIL operation implicitly depended on the default level of PCA6416 GPIO3. After adding the pinctrl-multiplexer, make the dependency explicit. Reviewed-by: Ahmad Fatoum Signed-off-by: Frank Li --- arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 23 ++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts index a7f3acdc36d1..2e092b0b52d9 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts @@ -50,6 +50,25 @@ }; }; + can_mux: mux-controller-0 { + compatible = "gpio-mux"; + #mux-control-cells = <0>; + #mux-state-cells = <1>; + mux-gpios = <&pca6416 3 GPIO_ACTIVE_HIGH>; + }; + + can_mux_pinctrl: pinctrl-gpiomux { + compatible = "pinctrl-multiplexer"; + + can_fun: can-grp { + mux-states = <&can_mux 1>; + }; + + pdm_fun: pdm-grp { + mux-states = <&can_mux 0>; + }; + }; + memory@40000000 { device_type = "memory"; reg = <0x0 0x40000000 0 0xc0000000>, @@ -453,7 +472,7 @@ &flexcan2 { pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_flexcan2>; + pinctrl-0 = <&pinctrl_flexcan2>, <&can_fun>; phys = <&flexcan_phy 1>; status = "disabled";/* can2 pin conflict with pdm */ }; @@ -720,7 +739,7 @@ &micfil { #sound-dai-cells = <0>; pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_pdm>; + pinctrl-0 = <&pinctrl_pdm>, <&pdm_fun>; assigned-clocks = <&clk IMX8MP_CLK_PDM>; assigned-clock-parents = <&clk IMX8MP_AUDIO_PLL1_OUT>; assigned-clock-rates = <196608000>;