SPI5 clock in STM32MP151
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-08 1: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?
- Labels:
-
STM32MP15 Lines
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-08 6: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-08 7:05 AM
Hi, it is Dunfell OpenSTLinux, HEAD:ed4cbda9145779f757d92d158ae612238d1c7078
Yes, It is a custom board
SPI5 part looks like this:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-08 7:07 AM
And this is what clk_summary says about SPI5_K clock:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-08 7: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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-08 7: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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-08 7:41 AM
@vsaakian ,
Can you show me your DT with spidev on SPI5 ?
Kind regards,
Erwan.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-08 7:41 AM
As for esp32c6 - I don't see anything in dmesg. I doubt it is a valid driver
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-08 7:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-12-08 7: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.
