I'm trying to bring up two external MCP2515 CAN controllers (Waveshare 2‑CH CAN HAT, confirmed working on a genuine Raspberry Pi) on the FRDM‑IMX93 board's P11 EXPI header, using LPSPI3 on GPIO_IO08‑11 (the pins that match the Raspberry‑Pi‑compatible header positions per UM12181 Table 21).
After fixing every device‑tree‑level issue I could find (power, pinmux, chip‑select, pinctrl‑assert‑gpios), the SPI clock (SCK) never toggles on the physical header pin, and a direct register read of the LPSPI3 block causes a Bus error. A different, known‑working peripheral (LPUART1) reads back fine from the same address space. This points to a resource/bus access restriction (RDC or similar) rather than anything fixable from the Linux device tree.
With CS0/CS1, MISO, MOSI, SCK probed on the physical P11 pins (multimeter, then a logic analyzer at 10–20 MSa/s triggered on CS0 falling edge) while continuously retrying a transfer (spidev_test in a loop, and separately by repeatedly forcing mcp251x re‑probe via echo spi2.0 > /sys/bus/spi/drivers/mcp251x/bind):
# clk_enable_count AND clk_prepare_count are both 0, despite the controller
# actively being used in a continuous retry loop
$ cat /sys/kernel/debug/clk/clk_summary | grep -i lpspi3
lpspi3_root 0 0 0 50000000 0 0 50000 N deviceless no_connection_id
lpspi3 0 0 0 50000000 0 0 50000 N 42550000.spi per
$ cat /sys/kernel/debug/clk/lpspi3/clk_prepare_count
0lpspi3's functional (per) clock shows clk_enable_count=0 and clk_prepare_count=0 even while 42550000.spi (the real, bound consumer) is actively attempting transfers in a loop (spidev_test loop, and separately by repeatedly forcing mcp251x re‑probe via echo spi2.0 > /sys/bus/spi/drivers/mcp251x/bind). clk_prepare() is the step before clk_enable() — the fact that it's never even called suggests the driver's transfer path (or a pm_runtime_get() in front of it) never reaches its own clock‑management code for this device, rather than the clock being requested and then failing to gate on.
I don't have kernel build tooling to add tracepoints, so I can't yet tell whether this is a pm_runtime resume that silently no‑ops, a missing dependency (e.g. a power-domains reference this board's lpspi3 node needs but doesn't have), or something else in spi-fsl-lpspi.c for this specific kernel build.
The decisive register‑level test — direct devmem read:
$ devmem 0x44380000 32 # LPUART1 base — known-good peripheral 0x04040007 $ devmem 0x42550000 32 # LPSPI3 base (VERID register) Bus error (core dumped)
A completely unrelated, working peripheral (LPUART1, used for the debug console) reads back fine from the same CPU/bus context; LPSPI3's base address faults on a plain 32‑bit read. I initially suspected a Resource Domain Controller (RDC) style access restriction specific to this board, but several NXP Community threads (i.MX25/i.MX6ULL "devmem return bus error", i.MX8MP I2C‑from‑DSP thread) point to the same symptom being the normal, expected result of touching an AIPS‑bus peripheral whose clock is gated off — not necessarily a security/domain restriction. That's consistent with clk_enable_count=0 above and makes me now think this is a clock‑enablement bug in the driver/PM path for this device, not (necessarily) an RDC block — though I can't fully rule out RDC without lower‑level tooling.
For context: a separate NXP Community thread ([iMX93AUTO EVK] SPI Configuration for QCA7006AQ, community.nxp.com/t5/i-MX-Processors/iMX93AUTO-EVK-SPI-Configuration-for-QCA7006AQ-with-imx93AUTO-EVK/m-p/1839847) shows someone successfully driving an external SPI device over LPSPI3 on the same GPIO_IO08‑11 pins on the i.MX93‑11x11‑EVK (same SoC), using:
&lpspi3 {
compatible = "fsl,imx93-spi", "fsl,lpspi";
cs-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
status = "okay";
...
};
&iomuxc {
pinctrl_lpspi3_qca: lpspi3grp {
fsl,pins = <
MX93_PAD_GPIO_IO11__LPSPI3_SCK 0x3fe
MX93_PAD_GPIO_IO10__LPSPI3_SOUT 0x3fe
MX93_PAD_GPIO_IO09__LPSPI3_SIN 0x3fe
MX93_PAD_GPIO_IO08__LPSPI3_PCS0 0x3fe /* native PCS0, not plain GPIO */
>;
};
};I tried this exact variant (native LPSPI3_PCS0/LPSPI3_PCS1 instead of plain GPIO2_IO08/GPIO2_IO07, plus the explicit compatible override) on the FRDM board — no change, devmem 0x42550000 32 still faults, clk_enable_count/clk_prepare_count still 0. This rules out pinmux/compatible‑string choice as the cause on this board, and — combined with the EVK success — makes me suspect something FRDM‑board‑specific (either in imx93-11x11-frdm.dts's handling of lpspi3, or in this board's U‑Boot/ATF‑level RDC/power‑domain setup) rather than a general i.MX93 SoC or mainline‑driver limitation.
echo spidev > /sys/bus/spi/devices/spi2.0/driver_override echo spi2.0 > /sys/bus/spi/drivers/spidev/bind
Happy to provide the full overlay source, dmesg, and clk_summary/gpio dumps if useful.