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.

SK-AM64B: SPI problem (tisdk-default-image-am64xx-evm.wic.xz)

Part Number: SK-AM64B

Hello,

According to SK-AM64B EVM User's Guide, the user expansion connector is compatible with Raspberry Pi 4B connector. I want to use SPI0 (or SPI1) to communicate with an ADC and I do not know how to do it. I am trying to run spidev test and it does not work. There is no dev/spidev. I guess I have to modify the device tree but I do not know the files I have to modify, Is it k3-am642-sk.dts?

Once the device tree is compiled, what is the following step?

  • Yes both SPI0 (via main_spi0 dts node) and SPI2 (via main_spi2 dts node) are accessible on the RPI expansion header of the SK-AM64B. As an example how to setup SPI0 on AM64 you can use this here from the AM64 EVM: https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm64/boot/dts/ti/k3-am642-evm.dts?h=ti-linux-5.10.y#n565   It shows how to setup an SPI device, the associated driver, and the needed pinmux.

    If you have an ADC the general approach goes like this. I'd search the Kernel tree (using variants of git grep -i <adc_name_here>) to see if it is supported or by which driver, and then figure out the required "compatible" string for example from the driver source code or the dts documentation included in the Kernel. Then searching again using the compatible string you usually find examples of how it's setup in the dts which again you can just recycle.

    Regards, Andreas