Tool/software: Linux
Hi TI Experts,
I want to test the SPI interface for the AM5728 IDK board, I have configured the spidev driver and can get the spi device.
Details is as bellow:
In am57xx-beagle-x15.dts:
spi3_pins_default: spi3_pins_default {
pinctrl-single,pins = <
0x2d4 (PIN_INPUT | MUX_MODE3) /*mcspi3_sclk spi3_sclk.gpio6_30 */
0x2d8 (PIN_INPUT | MUX_MODE3) /* mcspi3_miso spi3_d1.gpio6_31*/
0x2dc (PIN_OUTPUT | MUX_MODE3) /*mcspi3_mosi spi3_d0.gpio7_0*/
0x2e0 (PIN_OUTPUT | MUX_MODE3) /*mcspi3_cs0 spi3_cs0.gpio7_1*/
>;
};
&mcspi3 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&spi3_pins_default>;
/*ti,pindir-do-out-d1-in=<1>;*/
spidev@0 {
compatible ="rohm,dh2228fv";
spi-max-frequency =<24000000>;
reg = <0>;
};
};
Config:
# # SPI Protocol Masters # CONFIG_SPI_SPIDEV=m # CONFIG_SPI_TLE62X0 is not set # CONFIG_SPMI is not set # CONFIG_HSI is not set
During the test :
root@am57xx-evm:~/temp# ./spidev_test -D /dev/spidev1.0 [ 85.502933] Nemo spidev_open [ 85.505842] Nemo spidev_ioctl: cmd SPI_IOC_WR_MODE [ 85.510893] Nemo spidev_ioctl: cmd SPI_IOC_RD_MODE32 [ 85.515892] Nemo spidev_ioctl: cmd SPI_IOC_RD_BITS_PER_WORD [ 85.521618] Nemo spidev_ioctl: cmd SPI_IOC_WR_MAX_SPEED_HZ [ 85.527132] Nemo spidev_ioctl: cmd SPI_IOC_RD_MAX_SPEED_HZ spi mode: 0x0 bits per word: 8 max speed: 500000 Hz (500 KHz) [ 85.532895] Nemo spidev_message [ 85.541795] Nemo spidev tx_buffer: [ 85.545297] Nemo spidev rx_buffer: [ 85.548800] Nemo xfer len 32 rx tx 8bits 0 usec 500000Hz RX | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................[ 85e
I have connect the mcspi3_miso and mcspi3_mosi, and use the spidev_test to test the spidev driver. It is not get any data from the spidev driver from the up test result.
What is the problem? Can you give some suggestion in here?
Many Thanks!
Nemo