i.MX8MP GPIO connected to ECSPI2 Chip Select Pin is not working

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8MP GPIO connected to ECSPI2 Chip Select Pin is not working

1,427 Views
shivani__p
Contributor II

Hello,

We have a i.MX8MPlus platform based custom base board. We have connected ADC [Part No. ADC108S022CIMTX] to ECSPI2.

A GPIO pin [MUX Control "SAI3_TXD"] is connected to CS (chip select) pin of ADC. We have configured this pin in device tree as below.

pinctrl_ecspi2: ecspi2grp {
fsl,pins = <
MX8MP_IOMUXC_ECSPI2_SCLK__ECSPI2_SCLK 0x82
MX8MP_IOMUXC_ECSPI2_MOSI__ECSPI2_MOSI 0x82
MX8MP_IOMUXC_ECSPI2_MISO__ECSPI2_MISO 0x82
>;
};

pinctrl_ecspi2_cs: ecspi2cs {
fsl,pins = <
MX8MP_IOMUXC_SAI3_TXD__GPIO5_IO01 0xd6 /* cs1 */
>;
};

&ecspi2 {
pinctrl-names = "default";
fsl,spi-num-chipselects = <1>;
pinctrl-0 = <&pinctrl_ecspi2 &pinctrl_ecspi2_cs>;
cs-gpios = <&gpio5 1 0>;
status = "okay";

/* The actual chip is a ADC102S022, 10bit 8-channel. Driver is for a 12-bit,
so the two MSBs will be 0 */
adc1025022: adc@0 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "ti,adc128s052";
reg = <0>;
vref-supply = <&reg_adc_vref_3v3>;
spi-max-frequency = <1000000>;
status = "okay";
};

};

 

But, Chip select pin MX8MP_IOMUXC_SAI3_TXD__GPIO5_IO01 is holding low only, it is not happening high. We have checked in UBoot as well. This pin is not used in U-boot.

It will be great if anyone can help on this.

Thanks,

Shivani

Labels (1)
0 Kudos
Reply
3 Replies

1,419 Views
igorpadykov
NXP Employee
NXP Employee

Hi Shivani

 

reason may be that signal is shorted to other or grounded, one can attach jtag debugger and try to toggle it. From software side one can check if SAI3_TXD is not used in dts, like pinctrl_sai3 :

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-evk.d...

 

Best regards
igor

0 Kudos
Reply

1,384 Views
shivani__p
Contributor II

Hi @igorpadykov ,

Thank you for the response.

"SAI3_TXD" is not used in dts as well as in Uboot.

Below some behavior we have seen with respect to this "SAI3_TXD__GPIO5_IO01" pin.

  • We are able to make this pin high and low from sysfs.
  • We are able to set this pin from uboot using below command but we are not able to reset this pin.
    • gpio set <gpio_num> [Worked]
    • gpio clear <gpio_num> [Not worked]
  • When we set this pin from Uboot using below command then it will become low when we start communication with ADC (connected to ECSPI2).
    •  gpio set <gpio_num>
  • When we give internal pull up to this pin by setting the PAD Control register pull up bits then this pin is set to high only and it is not happening low any how. Because of this behavior, the output of ADC is garbage.

Also we have seen above same observations on other i.MX8M Plus based custom board as well.

It will be very helpful if you give your inputs for this issue.

 

Thanks,

Shivani

0 Kudos
Reply

1,380 Views
igorpadykov
NXP Employee
NXP Employee

ecspi2  is used on i.MX8M Plus EVK and one can test it

 

1.jpg

Best regards
igor

0 Kudos
Reply