Hi TI,
I have a problem with SPIdev and Mcspi driver for AM437x and TI Linux kernel 3.12.10. I have done this steps for enabling the spidev device:
- Enable the McSPI driver for OMAP in kernel
- Enable the User mode SPI device driver support in kernel
- Added configuration into the device tree
spi0_pins: spi0_pins { pinctrl-single,pins = < 0x150 (PIN_OUTPUT | MUX_MODE0) /* spi0_clk.spi0_clk */ 0x154 (PIN_OUTPUT | MUX_MODE0) /* spi0_d0.spi0_d0 */ 0x158 (PIN_INPUT | MUX_MODE0) /* spi0_d1.spi0_d1 */ 0x15C (PIN_OUTPUT | MUX_MODE0) /* spi0_cs0.spi0_cs0 */ >; }; &spi0 { #address-cells = <1>; #size-cells = <0>; status = "okay"; pinctrl-names = "default"; pinctrl-0 = <&spi0_pins>; spidev@0 { #address-cells = <1>; #size-cells = <0>; compatible = "spidev"; reg = <0>; spi-max-frequency = <16000000>; spi-cpha; }; };
The kernel registers new spidev device as /dev/spidev1.0. The dmesg message is:
of_dma_request_slave_channel: dma-names property of node '/ocp/spi@48030000' missing or empty
spi spi1.0: not using DMA for McSPI
There is also same message when I open a SPI communication.
The problem is: I'm not able to receive any message. The outgoing messages (MOSI) are working fine, but I always receive (MISO) no answer. I tried the communication with slave device, I even tried the spidev_test utility with MISO and MOSI pins connected. But I always receive zeros:
# ./spitest
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)
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 00 00 00 00
00 00
I found similar problems on this forum, but no solution:
https://e2e.ti.com/support/arm/sitara_arm/f/791/p/480760/1733656#pi316653=2
https://e2e.ti.com/support/arm/sitara_arm/f/791/p/521127/1897149#1897149
Thank you for any answer, that would help me to get the SPI communication working.
Best regards,
Jan Moravec