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).
I've tried a couple of things now, thought I would post my results for any other newbies playing with the same board (Olimex_A20-SOM) I use buildroot to build my images and I'm using "sunxi_defconfig" + SPI configs: [bruce@core a20-som]$ pwd /disk/software/drone/buildroot/board/olimex/a20-som [bruce@core a20-som]$ grep SPI sunxi_defconfig CONFIG_SPI=y CONFIG_SPI_SUN4I=y CONFIG_SPI_SUN6I=y CONFIG_SPI_MASTER=y CONFIG_SPI_SPIDEV=y [bruce@core a20-som]$ My buildroot kernel config: [bruce@core buildroot]$ pwd /disk/software/drone/buildroot [bruce@core buildroot]$ cat configs/olimex_a20-som_defconfig | grep KERNEL BR2_LINUX_KERNEL_PATCH="board/olimex/a20-som/kernel-headers" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_GIT=y BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/torvalds/linux.git" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="77c4cf17ae867ba93233b3832bda3de7adaae326" BR2_LINUX_KERNEL_VERSION="master" BR2_LINUX_KERNEL_PATCH="board/olimex/a20-som/kernel/" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/olimex/a20-som/sunxi_defconfig" BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x40008000" BR2_LINUX_KERNEL_APPENDED_UIMAGE=n BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_APPENDED_DTB=n BR2_LINUX_KERNEL_USE_INTREE_DTS=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="sun7i-a20-som" [bruce@core buildroot]$ The build runs through ok, I boot and can see the following spi kernel procs and devices: # ps -ef | grep -i spi 28 root [spi0] 29 root [spi1] 30 root [spi2] 91 root grep -i spi # # find /sys -iname "*spi*" /sys/bus/spi /sys/bus/spi/drivers/spidev /sys/bus/platform/devices/1c05000.spi /sys/bus/platform/devices/1c06000.spi /sys/bus/platform/devices/1c17000.spi /sys/bus/platform/drivers/sun4i-spi /sys/bus/platform/drivers/sun4i-spi/1c05000.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/1c05000.spi /sys/devices/soc@01c00000/1c05000.spi/spi_master /sys/devices/soc@01c00000/1c05000.spi/spi_master/spi0 /sys/devices/soc@01c00000/1c06000.spi /sys/devices/soc@01c00000/1c06000.spi/spi_master /sys/devices/soc@01c00000/1c06000.spi/spi_master/spi1 /sys/devices/soc@01c00000/1c17000.spi /sys/devices/soc@01c00000/1c17000.spi/spi_master /sys/devices/soc@01c00000/1c17000.spi/spi_master/spi2 /sys/class/spi_master /sys/class/spi_master/spi0 /sys/class/spi_master/spi1 /sys/class/spi_master/spi2 /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/firmware/devicetree/base/aliases/spi2 /sys/module/spidev # Then I changed my buildroot config file to test Emilio's kernel: BR2_LINUX_KERNEL_CUSTOM_REPO_URL=" https://bitbucket.org/emiliolopez/linux.git" BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="f97f72ee433f4b5c1ee1ba78abcec588cbe9565b" BR2_LINUX_KERNEL_VERSION="sunxi-dma" The build runs through and boots to login....this time I don't see any "spi" processes, but I do see spi messages in dmesg and I can see some spi stuff in "/proc/devices" and "/sys": # # ps -ef | grep -i spi 81 root grep -i spi # # dmesg | grep -i spi [ 0.820043] sun4i-spi 1c05000.spi: Unable to acquire DMA channel TX [ 0.826621] sun4i-spi 1c06000.spi: Unable to acquire DMA channel TX [ 0.833164] sun4i-spi 1c17000.spi: Unable to acquire DMA channel TX # # grep -i spi /proc/devices 153 spi # # find /sys -iname "*spi*" /sys/bus/spi /sys/bus/spi/drivers/spidev /sys/bus/platform/devices/1c05000.spi /sys/bus/platform/devices/1c06000.spi /sys/bus/platform/devices/1c17000.spi /sys/bus/platform/drivers/sun4i-spi /sys/bus/platform/drivers/sun6i-spi /sys/devices/soc@01c00000/1c05000.spi /sys/devices/soc@01c00000/1c06000.spi /sys/devices/soc@01c00000/1c17000.spi /sys/class/spi_master /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/firmware/devicetree/base/aliases/spi2 /sys/module/spidev # # ls -l /dev/*spi* ls: /dev/*spi*: No such file or directory # Perhaps I need to add "dma" attributes in my "sun7i-a20-som.dts" (sun7i-a20.dtsi already has dma configured for spi devices) Perhaps everything is all working and I've been starring at it for so long I've forgotten some simple udev/mknod step? As always....any tips or questions appreciated! Thanks Bruce On Fri, Jul 4, 2014 at 5:18 PM, bruce bushby <[email protected]> wrote: > *downloaded.....rather then purchased: > > http://events.linuxfoundation.org/sites/events/files/slides/petazzoni-device-tree-dummies.pdf > > Maxime: Thanks for the link! > > > On Fri, Jul 4, 2014 at 4:28 PM, bruce bushby <[email protected]> > wrote: > >> Got it, I wanted to make sure there wasn't some multiplexing voodoo >> which I had never heard about. I remember the Beaglebone had the omap pin >> mux ....so figured pin control was similar. >> >> Fortunately I don't need ethernet, but looking at the Olimex A20-SOM I'm >> not sure all the SPI devices are available anyway. >> >> Just purchased Device Tree for Dummies which should help things along. >> >> Thanks for the help! >> >> >> >> On Fri, Jul 4, 2014 at 3:24 PM, Maxime Ripard < >> [email protected]> wrote: >> >>> On Fri, Jul 04, 2014 at 02:27:32PM +0100, bruce bushby wrote: >>> > Does this mean that it's not possible to have SPI0-SPI3 + ethernet >>> > working at the same time? >>> >>> It is. The EMAC pins are also routed in the PH bank. So if your board >>> uses the relevant PA pins for the SPI controllers, and the PH pins for >>> the EMAC, it's fine. >>> >>> If you're using the PA pins for the EMAC, you're screwed, at least for >>> SPI3. >>> >>> Maxime >>> >>> -- >>> 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 [email protected]. For more options, visit https://groups.google.com/d/optout.
