I have at91sam9x35 based custom board and want to use spi (spidev) from user space. For the same i have edited at91sam9x35.dtsi as follows .
at91sam9x35.dtsi
Code: Select all
spi0: spi@f0000000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "atmel,at91sam9x5-spi";
reg = <0xf0000000 0x100>;
interrupts = <13 4 3>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi0>;
dma-mask = <0xffffffff>;
dma = <&dma0 0x10002212>;
status = "okay";
//also checked with spi-num-chipselects = <1>
cs-gpios = <&pioA 14 0>;
spidev@0 {
compatible = "linux,spidev";
spi-max-frequency = <10000000>;
reg = <0>;
};
};
spi0 {
pinctrl_spi0: spi0-0 {
atmel,pins =
<0 11 0x1 0x0 /* PA11 periph A SPI0_MISO */
0 12 0x1 0x0 /* PA12 periph A SPI0_MOSI */
0 13 0x1 0x0 /* PA13 periph A SPI0_SPCK */
0 14 0x1 0x0>; /* PA14 periph A SPI0_NPCS0 */
};
};
But at the time of booting device cant get registered successfully.
it shows following error.
atmel_spi f0000000.spi: Using dma0chan1 (tx) and dma0chan2 (rx) for DMA transfers
atmel_spi f0000000.spi: Atmel SPI Controller at 0xf0000000 (irq 17)
atmel_spi f0000000.spi: master is unqueued, this is deprecated
atmel_spi f0000000.spi: chipselect 0 already in use
spi_master spi32766: spi_device register error /ahb/apb/spi@f0000000/m25p80@0
Still the devise listed under /dev but no any output signal on spi port when i write to .
Code: Select all
# ls /dev/spidev*
/dev/spidev32766.0
I have 3.6.9 kernel. as i am new to device tree concept, i am unable to understand where did i wrong?