Enable SPI

Discussion in 'Kernels' started by cyrilf, Aug 24, 2015.

  1. cyrilf

    cyrilf Active Member

    Joined:
    Feb 19, 2015
    Messages:
    168
    Likes Received:
    47
    OK it didn't solve my problem. My last chance is to build a toolchain with Buildroot so I'll be pretty sure it will find the libs.
     
  2. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    Is the error still the same? Then I'm almost sure you didn't run my instructions correctly - you need to have on target /lib/arm-linux-gnueabihf/lib/libc.so.6
     
  3. cyrilf

    cyrilf Active Member

    Joined:
    Feb 19, 2015
    Messages:
    168
    Likes Received:
    47
    Yes it was still exactly the same.
    I built my own ARM toolchain with buildroot and it works perfectly. So at least I can boot :)

    Now, I'd like to enable SPI. Here is the /dev directory with the default kernel configuration file provided by patrick :

    Code:
    autofs              network_throughput  tty25               tty52
    console             null                tty26               tty53
    cpu_dma_latency     pps0                tty27               tty54
    dri                 ptmx                tty28               tty55
    full                ptp0                tty29               tty56
    galcore             pts                 tty3                tty57
    i2c-0               random              tty30               tty58
    i2c-1               root                tty31               tty59
    i2c-2               rtc0                tty32               tty6
    input               shm                 tty33               tty60
    kmsg                snd                 tty34               tty61
    log                 tty                 tty35               tty62
    loop-control        tty0                tty36               tty63
    loop0               tty1                tty37               tty7
    loop1               tty10               tty38               tty8
    loop2               tty11               tty39               tty9
    loop3               tty12               tty4                ttymxc1
    loop4               tty13               tty40               ttymxc3
    loop5               tty14               tty41               ubi_ctrl
    loop6               tty15               tty42               urandom
    loop7               tty16               tty43               vcs
    mem                 tty17               tty44               vcs1
    memory_bandwidth    tty18               tty45               vcsa
    mmcblk0             tty19               tty46               vcsa1
    mmcblk0p1           tty2                tty47               watchdog
    mmcblk0p2           tty20               tty48               watchdog0
    mxc_hdmi            tty21               tty49               zero
    mxc_ipu             tty22               tty5
    mxc_vpu             tty23               tty50
    network_latency     tty24               tty51
    I should find something like spi1 and spi2 according to the pinout sheme.
     
  4. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    I'm not sure but I think you need to add ecspi1 node to device tree to actually see something.
     
  5. cyrilf

    cyrilf Active Member

    Joined:
    Feb 19, 2015
    Messages:
    168
    Likes Received:
    47
    Hm, it seems that most of the drivers aren't available in that kernel. I don't even have a lan interface...
     
    Last edited: Sep 11, 2015
  6. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62
    Do you see include file on top? ;)

    And I'm sure lan interface is enabled. Seems your buildroot doesn't do something correctly.
     
  7. cyrilf

    cyrilf Active Member

    Joined:
    Feb 19, 2015
    Messages:
    168
    Likes Received:
    47
    Yes yes I've seen them.

    Well, I simply forgot to put my own interface file in /etc/network/ ...

    OK, I downloaded a PDF about the kernel device tree format, I guess I'll have to write a bit of code in the .dts file 'cause SPI is not supported :S
     
    Last edited: Sep 11, 2015
  8. cyrilf

    cyrilf Active Member

    Joined:
    Feb 19, 2015
    Messages:
    168
    Likes Received:
    47
    I have no idea how to edit a .DTS file. I mean, how could I know the unit address, the registers, the pins, etc... ?
     
    Last edited: Sep 14, 2015
  9. cyrilf

    cyrilf Active Member

    Joined:
    Feb 19, 2015
    Messages:
    168
    Likes Received:
    47
    No idea how to enable SPI anyone ?
     
  10. vpeter

    vpeter Active Member

    Joined:
    Nov 29, 2014
    Messages:
    303
    Likes Received:
    62

Share This Page