SPI driver for linux 2.6.29

Dhinakaran K Dhinakaran.K at Lntemsys.com
Tue Nov 10 22:17:47 EST 2009


Hi,
     I've a PPC8313e based board running linux2.6.29 on it. Also I've a 
FRAM interfaced to it via SPI. This FRAM almost similar to SPI based 
EEPROM, so I'm trying to use EEPROM's driver AT25.

Kernel Configuration :
        SPI support --> selected
                Freescale MPC83xx/QUICC Engine SPI controller --> selected 
(Actually I've replaced MPC83xx's controller driver with modified 
MPC8XXX's(from 2.6.31) one for it was not getting probed,)
                User mode SPI device driver support  --> selected

DTS File;
                spi at 7000 {
                        cell-index = <0>;
                        compatible = "fsl,spi";
                        reg = <0x7000 0x1000>;
                        interrupts = <16 0x8>;
                        interrupt-parent = <&ipic>;
                        mode = "cpu";
                        fram at 0{
                                                compatible = 
"ramtron,fm25";         -->(Modified at25 as fm25 )
                                                spi-max-frequency = 
<100000000>;
                                                reg = <0>;
                                                };

                        };

                and we are forcing following values in AT25 driver
                        byte_len        = 65536;
                        name            = fram-spi
                        page_size       = 65535;
                        flags           = EE_ADDR2;
Problem:
        Drivers are getting complied. But I'm not sure how to acces(i.e, 
read/write) the actual SPI-FRAM device. 
Should I use 
        1. /dev/spi/X nodes created by spidev driver 
                When I use this node, open fails with ERRNO 6
                        or
        2. /sys/bus/spi/devices/spi32766.0/eeprom file.
                When I use this sysfs file,Im not able to read / write 
properly

Queries:
        1. What will be device nodes for this custom at25(fm25) driver, 
which registers to spi.c driver?
        2. Is spidev.c involved in this picture?


Any help/directions in this regard will of great help.




Thanks n Regards
dhina



More information about the Linuxppc-dev mailing list