No /dev/spidev node for spi-gpio driver

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

No /dev/spidev node for spi-gpio driver

1,312件の閲覧回数
kevinpwchen
Contributor II

Hi Sir,

I try to use spi-gpio driver to communicate with device because the device has limitation that I cannot use normal SPI driver. Below is my define in dts file. There is no build code error and I can see the driver info in the /sys/bus/platform/drivers/spi_gpio. However, I do not see its node in the /dev/spi*. Please kindly have your comments or idea about this problem. Thank you!

dtsi:

/dts-v1/;

#include "fsl-imx8qxp.dtsi"
#include "external-modem-pcie.dtsi"

/ {

......
model = "Freescale i.MX8QXP MEK WNC 20181026-2";
compatible = "fsl,imx8qxp-mek", "fsl,imx8qxp";

chosen {
bootargs = "console=ttyLP0,115200 earlycon=lpuart32,0x5a060000,115200";
stdout-path = &lpuart0;
};

spi1 {
compatible = "spi-gpio";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_spi1>;
status = "okay";
gpio-mosi = <&gpio0 25 GPIO_ACTIVE_LOW>;
gpio-miso = <&gpio0 26 GPIO_ACTIVE_LOW>;
cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
gpio-sck = <&gpio0 28 GPIO_ACTIVE_LOW>;
num-chipselects = <1>;
#address-cells = <1>;
#size-cells = <0>;

spidev0:spi1@0 {
compatible = "spidev";
// status = "okay";
spi-max-frequency = <1000000>;
reg = <0>;
};
};

Best regards

Kevin

0 件の賞賛
1 返信

1,056件の閲覧回数
weidong_sun
NXP TechSupport
NXP TechSupport

Hello Kevin,

    Actually, spidev is a virtual spi device, not for special hardware. you will do some modifications according to your spi devices.

     you can refter to the link to adjust your spidev.c.

如何在Linux Kernl中添加spidev的设备节点 - 博客小站 - CSDN博客 

Have a nice day!

BR,

weidong

0 件の賞賛