Hi.
I need use linux 6.1.x and ecspi on imx6ull.
up to now. I cannot make this works. for example, I find the probe function would not run into.
I have no idea. would you please tell me where can I find the driver code on imx6ull with the
linux kernel is 6.1.x.
is it possible to run linux6.1.x on imx6ull ?
how to driver ecspi in linux6.1.x for imx6ull ?
thanks.
Hi,
Thank you for your interest in NXP Semiconductor products,
ECSPI can be used in Linux as spidev, have you tried it before?
FYI, IMX8MN-ECSPI-buses-not-available-in-Linux, spidev.rst
Regards
In the kernel spi driver code. I find the device_id is found. that is, the compatible string matched.
but. the probe would not run into.
#include <linux/init.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/spi/spi.h>
#include <linux/platform_device.h>
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/device.h>
struct imx6ull_ecspi {
struct spi_controller *controller;
void __iomem *base;
struct device *dev;
};
static struct class *imx6ull_ecspi_class; // 全局变量保存设备类指针
static int imx6ull_ecspi_setup(struct spi_device *spi)
{
}
static int imx6ull_ecspi_transfer_one_message(struct spi_controller *controller,
struct spi_message *message)
{
}
static int imx6ull_ecspi_probe(struct platform_device *pdev)
{
// cannot run into this.
}
static int imx6ull_ecspi_remove(struct platform_device *pdev)
{
}
static const struct of_device_id imx6ull_ecspi_of_match[] = {
{ .compatible = "fsl,imx6ull-ecspi", },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, imx6ull_ecspi_of_match);
static struct platform_driver imx6ull_ecspi_driver = {
.probe = imx6ull_ecspi_probe,
.remove = imx6ull_ecspi_remove,
.driver = {
.name = "imx6ull-ecspi",
.of_match_table = imx6ull_ecspi_of_match,
},
};
module_platform_driver(imx6ull_ecspi_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Your Name");
MODULE_DESCRIPTION("i.MX6ULL eCSPI driver");