I use the kernel 3.12.rc4 on the embedded Linux device (olimex imx233 micro). My goal is to use /dev/spidev to communicate with another spi device.
I am editing arch/arm/boot/dts/imx23-olinuxino.dts as:
ssp1: ssp@80034000 { #address-cells = <1>; #size-cells = <0>; compatible = "fsl,imx23-spi"; pinctrl-names = "default"; pinctrl-0 = <&spi2_pins_a>; clock-frequency = <1000000>; status = "okay"; spidev: spidev@0 { compatible = "spidev"; spi-max-frequency = <1000000>; reg = <1>; }; };
arch/arm/boot/dts/imx23.dtsi: has this configuration
spi2_pins_a: spi2@0 { reg = <0>; fsl,pinmux-ids = < 0x0182 /* MX23_PAD_GPMI_WRN__SSP2_SCK */ 0x0142 /* MX23_PAD_GPMI_RDY1__SSP2_CMD */ 0x0002 /* MX23_PAD_GPMI_D00__SSP2_DATA0 */ 0x0032 /* MX23_PAD_GPMI_D03__SSP2_DATA3 */ >; fsl,drive-strength = <1>; fsl,voltage = <1>; fsl,pull-up = <1>; };
Pairing devices looks right. When I compile the kernel, I get /dev/spidev1.1 . After that, I use spidev_test.c and track contacts using an oscilloscope. The output signals of SCK and MOSI are correct, however, the chipselect is set to a logical height even during data transfer.
Is there a way to determine why spidev cannot set logic low during transmission? It seems that either additional things should be passed on to the kernel, or there is a problem with spidev that cannot control the chip selection. I wonder if I need to change something to spidev.h or spidev.c in the kernel / spi driver directory? or how can i solve it?
CPU Reference Guide
linux linux-kernel spi
sven
source share