Looking much better:
# ls -l /dev/*spi*
crw-------    1 root     root      153,   0 Jan 10 13:51 /dev/spidev0.0
#


I added an spidev childnode to my spi1 node like so:

                spi1: spi@01c06000 {
                        pinctrl-names = "default";
                        pinctrl-0 = <&spi1_pins_a>;
                        status = "okay";
                        spidev@0 {
                                compatible = "linux,spidev";
                                reg = <0>;
                                spi-max-frequency = <1000000>;
                        };
                };



Rebuild, reboot and what would you know...... I have " /dev/spidev0.0"

Really can't thank you guys enough for all the help, much appreciated!!!!

next stop.....connecting an SPI  device ....hopefully without too many
sparks :)

I'm connecting an MPU9250:
http://www.drotek.fr/shop/421-1256-large_dm/mpu9250-gyro-accelerometer-magnetometer.jpg

Guessing the "compatible" string will just be spi?








On Sat, Jul 5, 2014 at 10:04 PM, bruce bushby <bruce.bus...@gmail.com>
wrote:

> Well Jon kindly pointed me to his repo which is confirmed to have spidev
> working on A20.  I used his repo and his .config file .....with the same
> results ...which I guess is a good thing as it means my previous attempts
> were probably all working and I just need to find what crucial step I am
> missing.
>
> Here you can see both spi kernel processes running
> #
> # ps -ef | grep -i spi
>    46 root     [spi0]
>    47 root     [spi1]
>   152 root     grep -i spi
> #
>
>
> I changed spidev to be a kernel module....and it loads without any problems
> # lsmod
> Module                  Size  Used by    Not tainted
> spidev                  5471  0
> #
>
>
>
> The /sys filesystem is aware of the spi devices:
> # find /sys -iname "*spi*"
> /sys/bus/spi
> /sys/bus/spi/drivers/spidev
> /sys/bus/platform/devices/1c06000.spi
> /sys/bus/platform/devices/1c17000.spi
> /sys/bus/platform/drivers/sun4i-spi
> /sys/bus/platform/drivers/sun4i-spi/1c06000.spi
> /sys/bus/platform/drivers/sun4i-spi/1c17000.spi
> /sys/bus/platform/drivers/sun6i-spi
> /sys/devices/soc@01c00000/1c06000.spi
> /sys/devices/soc@01c00000/1c06000.spi/spi_master
> /sys/devices/soc@01c00000/1c06000.spi/spi_master/spi0
> /sys/devices/soc@01c00000/1c17000.spi
> /sys/devices/soc@01c00000/1c17000.spi/spi_master
> /sys/devices/soc@01c00000/1c17000.spi/spi_master/spi1
> /sys/class/spi_master
> /sys/class/spi_master/spi0
> /sys/class/spi_master/spi1
> /sys/class/spidev
> /sys/firmware/devicetree/base/soc@01c00000/spi@01c05000
> /sys/firmware/devicetree/base/soc@01c00000/spi@01c06000
> /sys/firmware/devicetree/base/soc@01c00000/spi@01c17000
> /sys/firmware/devicetree/base/soc@01c00000/spi@01c1f000
> /sys/firmware/devicetree/base/soc@01c00000/pinctrl@01c20800/spi0@0
> /sys/firmware/devicetree/base/soc@01c00000/pinctrl@01c20800/spi1@0
> /sys/firmware/devicetree/base/soc@01c00000/pinctrl@01c20800/spi2@0
> /sys/firmware/devicetree/base/aliases/spi0
> /sys/firmware/devicetree/base/aliases/spi1
> /sys/module/spidev
> /sys/module/spidev/drivers/spi:spidev
> #
>
> I have added "udev" (eudev) to my build
> #
> # /etc/init.d/S10udev stop
> # /etc/init.d/S10udev start
> Populating /dev using udev: [ 1242.412281] udevd[164]: starting version 1.7
> done
> #
>
>
>
> Wondering if I need:
> 1. An actual spi device connected
> 2. An "spiddev node" ....or "spidev" as a "childnode" of spi1
>
>
> Also noticed I don't see any SPI messages from dmesg....which I guess is a
> hint I'll follow soon
>
>
>
>
>
>
>
>
>
>
> On Sat, Jul 5, 2014 at 8:59 PM, Maxime Ripard <
> maxime.rip...@free-electrons.com> wrote:
>
>> On Sat, Jul 05, 2014 at 02:14:44PM +0100, bruce bushby wrote:
>> > update: I added spi0 to my dts file and everything appears to build and
>> > boot smoothly.....however I still don't see anything under "/dev/*spi*"
>> >  ......perhaps something simple as a missing udev rule or mknod script.
>> I'm
>> > not sure who or what should create the "/dev/*spi*" device(s).
>>
>> /dev/spi* is handled by a driver called spidev. If this driver is not
>> both loaded and probed, you'll never see a /dev/spi* file, even though
>> the controller driver is working fine.
>>
>> --
>> Maxime Ripard, Free Electrons
>> Embedded Linux, Kernel and Android engineering
>> http://free-electrons.com
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to linux-sunxi+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to