This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3358: spi

Part Number: AM3358


Tool/software: Linux

hello,everyone:

I want to use the board above SPI interface to communicate  wite external equipment, but I do not fount SPI equipment under /dev  with the SDK, and I found that the kernel SPI device is compiled in a modular manner, how should I open SPI equipment?

thank you very much.

  • Hi HughYZ,

    It would be best if you can elaborate the query better and outline your requirements.
    Can you please provide details of the following?
    1) Are you using AM335x custom board or EVM/starter kit?
    2) Which is the SPI slave are you planning to interface?
    3) Does the SPI slave is supported in the kernel?

    thanks,
    Prabhuraj Tavag,
    BlackPepper Technologies
  • HI,prabhuraj tavag20
    Thank you very much for your advice!

    I used the bb black and i use PROCESSOR-SDK-LINUX-AM335X 04_00_00_04 to install my system on bb black.
    the kernel is Linux am335x-evm 4.9.28-geed43d1050 #1 PREEMPT Wed Jun 28 17:20:01 EDT 2017 armv7l GNU/Linux.
    I do not fount SPI equipment under /dev.and I find spi device is compiled as a module in this kernel.
    so i done as follows:
    1) install spi module
    2)modify dts as follows:


    &spi1 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&spi1_pins_s0>;
    spidev@1 {
    spi-max-frequency = <24000000>;
    reg = <0>;
    compatible = "rohm,dh2228fv";
    };
    }
    then i can find /dev/spidev1.0.

    but when i test with Documentation/spi/spidev_test.c, All the data I received was 0。
    what i should to do to solve this.
    thank you again!