iMX6ULL GPIO Issue due to SPI

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

iMX6ULL GPIO Issue due to SPI

1,761 次查看
Pankh
Contributor I

Hi All,

 

We are currently using i.MX6ULL based custom board. We are facing issues due to SPI interface.

We are using SPI3 and four gpios on GPIO1 port.

 

1. We have configured 3 pins GPIO1_IO18, GPIO1_IO19 and GPIO1_IO06 as outputs.

2. We have set all these three pins high (verified it using Oscilloscope ) and executed the mxc_spi_test1.out application.

3. After executing mxc_spi_test1.out application status of these output pins is changed to low and GPIO1_IO06 is changed from output to input.

Request your help to resolve this issue.

We have configured SPI3 with below mentioned settings:

 

 &ecspi3 {

fsl,spi-num-chipselects = <1>;

pinctrl-names = "default";

pinctrl-0 = <&pinctrl_ecspi3>;

cs-gpios = <&gpio1 20 0>;

status = "okay";

 

chip1: spidev@0x0 {

 

compatible = "spidev";

 

spi-max-frequency = <10000000>;

 

reg = <0>;

 

};

};

pinctrl_ecspi3: ecspi3grp {

fsl,pins = <

MX6UL_PAD_UART2_TX_DATA__GPIO1_IO20 0x80000000

MX6UL_PAD_UART2_RX_DATA__ECSPI3_SCLK 0x80000000

MX6UL_PAD_UART2_CTS_B__ECSPI3_MOSI 0x80000000

MX6UL_PAD_UART2_RTS_B__ECSPI3_MISO 0x80000000

>;

};

标签 (1)
0 项奖励
回复
1 回复

1,417 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Pankaj

as spi is configured as "spidev" used from user space , seems spidev_test can be used:

spidev_test.c\spi\Documentation - linux-imx - i.MX Linux kernel 

below third parties overview of its usage

How to interface MCU with i.MX6 over SPI interface? - Toradex Community 

How To Use SPIDEV on phyFLEX-i.MX6 Yocto BSP - Develop.phytec - PHYTEC Wiki 

mxc_spi_test1.out from unit test package (www.nxp.com/lgfiles/NMG/MAD/YOCTO/imx-test-5.7.tar.gz)

used for testing spi kernel driver. Below example for ecspi1 :

imx6ull-14x14-ddr3-arm2-ecspi.dts\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

imx6ull-14x14-ddr3-arm2.dts\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复