Tool/software:
Hello, Ti.
I set the MCU_SPI1_* pins as SPI Master and connected to SPI sensors to test out SPI functions.
I used spidev_test command to read sensor(ADXL345) ID (which should be 0xE0).
I checked MISO line with oscilloscope and the sensor replied with 0xE0.
But the result shows it received 0x00.
Here is device tree I use for testing (only partial)
&wkup_pmx2 { bootph-all; fpga_card_spi_pins: fpga-card-spi-pins { bootph-all; pinctrl-single,pins = < J784S4_WKUP_IOPAD(0x058, PIN_INPUT, 0) /* (H38) WKUP_GPIO0_0.MCU_SPI1_CLK */ /* CARD_SPI_CLK */ J784S4_WKUP_IOPAD(0x064, PIN_INPUT, 0) /* (J36) WKUP_GPIO0_3.MCU_SPI1_CS0 */ /* CARD_SPI_CS0 */ J784S4_WKUP_IOPAD(0x094, PIN_INPUT, 1) /* (K37) WKUP_GPIO0_15.MCU_SPI1_CS2 */ /* CARD_SPI_CS1 */ J784S4_WKUP_IOPAD(0x05c, PIN_INPUT, 0) /* (J34) WKUP_GPIO0_1.MCU_SPI1_D0 */ /* CARD_SPI_AP_OUT */ J784S4_WKUP_IOPAD(0x060, PIN_INPUT, 0) /* (J35) WKUP_GPIO0_2.MCU_SPI1_D1 */ /* CARD_SPI_AP_IN */ >; }; }; &mcu_spi1 { status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&fpga_card_spi_pins>; spi-max-frequency = <50000000>; ti,pindir-d0-out-d1-in; test@0 { compatible = "rohm,dh2228fv"; reg = <0>; spi-max-frequency = <50000000>; status = "okay"; spi-cpha; spi-cpol; }; };
As I could decode the signal from both MOSI and MISO line on oscilloscope, the HW is not the issue.
I also found a record that there is similar problem on the TDA4VM board.
Referring to the mentioned record and the following information found in the TRM, it appears that MCU_MCSPI1 is internally connected to MCSPI3.
From what I understand, to connect MCU_MCSPI1 to I/O, the MCU_SPI_CTRL[SPI_LINKDIS] register needs to be configured.
Is my understanding correct? Also, how should this be configured?
Regards,
Minsoo