how to driver ecspi in linux6.1.x for imx6ull ?

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

how to driver ecspi in linux6.1.x for imx6ull ?

669件の閲覧回数
bighero77
Contributor III

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.

タグ(3)
0 件の賞賛
返信
3 返答(返信)

642件の閲覧回数
JosephAtNXP
NXP TechSupport
NXP TechSupport

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-Linuxspidev.rst 

Regards

0 件の賞賛
返信

594件の閲覧回数
bighero77
Contributor III

would you please give me an example code for ecspi drvier  on imx6ull (linux6.1.x)

0 件の賞賛
返信

604件の閲覧回数
bighero77
Contributor III

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");

0 件の賞賛
返信