AnsweredAssumed Answered

No /dev/spidev node for spi-gpio driver

Question asked by Kevin Chen on Mar 20, 2019
Latest reply on Mar 20, 2019 by Wigros Sun

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

Outcomes