2023-12-08 01:32 AM
Working on setting up SPI bus and get a connection to ESP32C6 WiFi/BT module. Trying to configure SPI5 clock in device tree for STM32MP151. Have used different sources (HSI, HSE, PLL4Q), but the enable count on the SPI5_k clock is always zero. I am suspecting now that problem must be elsewhere. Has anyone stumbled upon this?
2023-12-08 06:54 AM
Hello @vsaakian ,
A little bit difficult to help with no context, can you explain :
- On which OpenSTLinux are you ?
- Is it a custom board ?
- Can you share your platform device tree involving SPI5 node ?
Kind regards,
Erwan.
2023-12-08 07:05 AM
Hi, it is Dunfell OpenSTLinux, HEAD:ed4cbda9145779f757d92d158ae612238d1c7078
Yes, It is a custom board
SPI5 part looks like this:
2023-12-08 07:07 AM
And this is what clk_summary says about SPI5_K clock:
2023-12-08 07:31 AM
Thank you for additional information,
Do you have any trace of the driver of esp32c6 in dmesg ? Are you sure it is probed ?
Kind regards,
Erwan.
2023-12-08 07:34 AM
I so far have only tried with spidev which did not work really. DT example above I have not tried yet. This is how spidev probing looks like:
2023-12-08 07:41 AM
@vsaakian ,
Can you show me your DT with spidev on SPI5 ?
Kind regards,
Erwan.
2023-12-08 07:41 AM
As for esp32c6 - I don't see anything in dmesg. I doubt it is a valid driver
2023-12-08 07:42 AM
2023-12-08 07:55 AM
@vsaakian ,
Different comments :
1) esp32c6 seems to not be a driver upstreamed on Linux and I do not see any compatible that matches with the one you put in the device tree. If this driver is not upstreamed, it must at least exist on your side if you declare it like that in the device tree, or Linux will never make any link between the driver you try to use through SPI5, and the real one (that does not exist ?).
When I see your device tree, it means that you have your own driver (or a driver you found somewhere) that has been added to your sources, with the corresponding compatible. If it is not the case, it is not a clock issue, this is just a driver issue.
2) Concerning spidev, the compatible "linux,spidev" does not exist anymore. You need to look at spidev.c file and you will see the list of compatible supported :
#ifdef CONFIG_OF
static const struct of_device_id spidev_dt_ids[] = {
{ .compatible = "rohm,dh2228fv" },
{ .compatible = "lineartechnology,ltc2488" },
{ .compatible = "ge,achc" },
{ .compatible = "semtech,sx1301" },
{ .compatible = "lwn,bk4" },
{ .compatible = "dh,dhcom-board" },
{ .compatible = "menlo,m53cpld" },
{},
};
I hope these explanations will help you to go forward.
Kind regards,
Erwan.