I am trying to access the SPI from the Keystone II EVMK2K. On the EVM SPI2 breaks out on the 120 pin MIPI connector. I am trying to gain access to this device from Userspace. Currently I am running a 3.8 kernel, but the documentation for SPI has not been updated to show how to add spidev to the device tree, it still only shows how to add it to the board file in older kernel versions. I have setup the davinici-spi-v1 bindings according to the documentation and the SPI0 (nor flash) bindings. I am now trying to figure out how to add a /dev/spidevX.Y for each chip select. Here are the binding I am currently using:
spi2@21000800 { #address-cells = <0x1>; #size-cells = <0x0>; compatible = "ti,davinci-spi-v1"; reg = <0x21000800 0x200>; ti,davinci-spi-num-cs = <0x4>; ti,davinci-spi-intr-line = <0x0>; interrupts = <0x0 0x128 0xf01>; clocks = <&clkspi>; spidev10:spi@0 { #address-cells = <1>; #size-cells = <1>; compatible = "rohm,dh2228fv"; spi-max-frequency = <100000>; reg = <3>; }; spidev11:spi@1 { #address-cells = <1>; #size-cells = <1>; compatible = "rohm,dh2228fv"; spi-max-frequency = <100000>; ti,davinci-spi-io-type = <2>; reg = <1>; }; spidev12:spi@2 { #address-cells = <1>; #size-cells = <1>; compatible = "rohm,dh2228fv"; spi-max-frequency = <100000>; ti,davinci-spi-io-type = <2>; reg = <2>; }; spidev13:spi@3 { #address-cells = <1>; #size-cells = <1>; compatible = "rohm,dh2228fv"; spi-max-frequency = <100000>; ti,davinci-spi-io-type = <2>; reg = <3>; };
};
Here are my questions:
1) I see that the spidev for the nor device uses the dh2228fv driver. I see in spidev.c that this is the compatible string for the spidev character device, but why use a DAC as the compatible string for spidev?
2) Where is the complete list of binding for the spidev device?
3) Looking at spi-davinci.c it seems to use spi_bitbang, is it actually bitbanging the SPI, or is this a hardware SPI driver?
4) From userspace when I issue and open(), followed by write() on the device file. I see the transaction begin on an Oscope, but only the first byte is sent and then the write() blocks, the clock stops, and the chip select is not released and my program freezes. Could this be a setup issue?