SPIDEV probe function not called

  • Hello,


    I want to access the SPI bus from Linux userspace. CONFIG_PICOCOREMX8MP_SPI_A/B/C are defined in the device tree, however no spi node appears in /dev after loading spidev. I made attempts with spidev as kernel module and builtin driver, but this didn't change anything. Apparently the driver's probe function isn't called at all.

    I found this article, which is about the same problem:


    https://community.nxp.com/t5/i…in-Kirkstone/td-p/1640472


    However, the proposed solution to replace the compatible field in the device tree didn't work for me. What am I missing?


    (fsimx8mp-Y2024.07)

  • Hello ETCE_SWD ,


    when I use fsimx8mp-Y2024.07, I can see spidev1.0, spidev2.0 and spidev3.0. Can you please provide the output of the following commands?


    cat /proc/device-tree/soc\@0/bus\@30800000/spi\@30820000/status

    cat /proc/device-tree/soc\@0/bus\@30800000/spi\@30830000/status

    cat /proc/device-tree/soc\@0/bus\@30800000/spi\@30840000/status

    dmesg | grep -i spi


    Your F&S support Team

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Thanks for your support. The content of all three status items is "okay". The output of the grep command is


    root@fsimx8mp:~# dmesg | grep -i spi

    GICv3: 160 SPIs implemented

    GICv3: 0 Extended SPIs implemented

    SPI driver spidev has no spi_device_id for linux,spidev

    (As already mentioned, I also tried to change the compatible field in the device tree to an item listed in the spidev_dt_ids[] table (e.g. "rohm,dh2228fv"). With that, the spidev problem reported in the kernel log disappeared, however still I didn't get any spidev items in /dev)


    Edit: There was a mistake in my previous comment, the spidev problem nevertheless appears in the kernel log, which seems to be normal because it is created by drivers/spi/spi.c when the spidev driver registers, independently whether a device uses this entry or not)