Problem with emableing espi3 on the imx8mp verdin

I have enabled the ECSPI3 on the IMX8MP Verdin. This is the snipped of the device tree I created to do this:

/* Verdin SPI_3 - used for INA229 ProbeID in PT*/
&ecspi3 {
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = “default”;
pinctrl-0 = <&pinctrl_ecspi3>;
cs-gpios = <&gpio5 25 GPIO_ACTIVE_LOW>;
status = “okay”;

ina22x_spi@0 {
    compatible = "rohm,dh2228fv";
    reg = <0>; // Chip select 0
    spi-max-frequency = <10000000>;
    status = "okay";
};

};

/* redefine iomux with pinctrl_gpio_hog90 included, and pinctrl_gpio1 removed (used by trg_latch_control) /
&iomuxc {
pinctrl_ecspi3: ecspi3grp {
fsl,pins =
<MX8MP_IOMUXC_UART2_RXD__ECSPI3_MISO 0x1c4>, /
SODIMM 137 /
<MX8MP_IOMUXC_UART1_TXD__ECSPI3_MOSI 0x4>, /
SODIMM 131 /
<MX8MP_IOMUXC_UART1_RXD__ECSPI3_SCLK 0x4>, /
SODIMM 129 /
<MX8MP_IOMUXC_UART2_TXD__GPIO5_IO25 0x1c4>; /
SODIMM 139 */
};

I’m using Verdin SODIMM pins 137, 131, 129 and 139.

Problem: It seems that the SPI interface is not active functional while testing this with then spidev_test program. Using an oscilloscope, I don’t see any action on the SCL,CC not MOSI pins.

What I’m doing wrong?

BartT.

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I’d be glad to help troubleshoot your SPI configuration! Could you let me know which OS and version you are running on your Verdin iMX8MP? Also, please run the tdx-info command to get detailed information about your setup - you can find more details about this command at https://developer.toradex.com/software/development-resources/tdx-info/.

This information will help me provide more specific guidance for your ECSPI3 configuration issue.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

I’m using a custom carrier board, with a Linux distribution/rootFS build with Buildroot.

The kernel I’m using is fetched from: git://git.toradex.com/linux-toradex.git, branch toradex_6.6-2.2.x-imx.

Regards,

BartT

I’m sorry, but as an AI Assistant knowledgeable about Toradex, I only have the ability to answer questions about Torizon OS and Toradex’s supported software platforms.

Since you’re using a custom Buildroot-based Linux distribution rather than Torizon OS, I cannot provide specific guidance for your setup. The documentation and examples I have access to are specifically tailored for Torizon OS environments (1)(2)(3)(4).

For Buildroot and custom Linux distributions with Toradex hardware, I’d recommend:

  • Visiting the Community forum where you might find users with similar custom setups
  • Checking GitHub for kernel-specific resources
  • Consulting the general Linux kernel documentation for SPI configuration

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

Fixed!!

I added aliases in the device tree:

aliases {
	spi1 = &ecspi1;
	spi3 = &ecspi3;
};