up to now ,, I cannot create device in /dev for imx93 lpspi.
the following is my setting:
dts: lpspi3 part:
&lpspi3 {
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default"; // pinctrl-names = "default", "sleep";
pinctrl-0 = <&pinctrl_lpspi3>;
status = "okay"; // okay disabled
spidev@0 {
compatible = "spidev";
spi-max-frequency = <1000000>;
reg = <0>;
};
};
in module driver code:
static const struct of_device_id imx93_lpspi_of_match[] = {
{ .compatible = "spidev", },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, imx93_lpspi_of_match);
static struct platform_driver imx93_lpspi_driver = {
.probe = imx93_lpspi_probe,
.remove = imx93_lpspi_remove,
.driver = {
.name = "imx93-spi",
.bus = &spi_bus_type,
.owner = THIS_MODULE,
.of_match_table = imx93_lpspi_of_match,
.pm = NULL,
},
};
before I use insmod spi.ko, and after I use insmod spi.ko. I cannot find any spi device (spidevX.y) in /dev/
what happen?
would you please tell me how to find an example code(dts and module driver code ) which can create /dev/spidevX.Y
thanks a lot.
Hello @bighero77
I hope you are doing very well.
Please take a look to the imx93-9x9-qsb-lpspi.dts.
Using that device tree, you should be able to see the spi under /dev.
Best regards,
Salas.