AnsweredAssumed Answered

how to enable SPI in LS1043a

Question asked by yang gao on Mar 12, 2018
Latest reply on Mar 22, 2018 by yang gao

Hi,

 

I'm working with LS1043A and yocto poky, and I am trying to communicate over the SPI. In the menuconfig, I have enabled all these options:

#
# Other I2C/SMBus bus drivers
#
CONFIG_SPI=y
CONFIG_SPI_DEBUG=y
CONFIG_SPI_MASTER=y

#
# SPI Master Controller Drivers
#
# CONFIG_SPI_ALTERA is not set
# CONFIG_SPI_BITBANG is not set
# CONFIG_SPI_CADENCE is not set
# CONFIG_SPI_GPIO is not set
CONFIG_SPI_FSL_LIB=y
CONFIG_SPI_FSL_SPI=y
CONFIG_SPI_FSL_DSPI=y
# CONFIG_SPI_OC_TINY is not set
CONFIG_SPI_PL022=y
# CONFIG_SPI_PXA2XX is not set
# CONFIG_SPI_PXA2XX_PCI is not set
# CONFIG_SPI_ROCKCHIP is not set
# CONFIG_SPI_QUP is not set
# CONFIG_SPI_S3C64XX is not set
# CONFIG_SPI_SC18IS602 is not set
# CONFIG_SPI_TEGRA20_SFLASH is not set
# CONFIG_SPI_XCOMM is not set
# CONFIG_SPI_XILINX is not set
# CONFIG_SPI_DESIGNWARE is not set

#
# SPI Protocol Masters
#
CONFIG_SPI_SPIDEV=y
# CONFIG_SPI_TLE62X0 is not set
# CONFIG_SPMI is not set
# CONFIG_HSI is not set 

 

and in the fsl-ls1043a.dtsi, I added as follows:

 

dspi0: dspi@2100000 {
   compatible = "fsl,ls1043a-dspi", "fsl,ls1021a-v1.0-dspi";
   #address-cells = <1>;
   #size-cells = <0>;
   reg = <0x0 0x2100000 0x0 0x10000>;
   interrupts = <0 64 0x4>;
   clock-names = "dspi";
   clocks = <&clockgen 4 0>;
   spi-num-chipselects = <5>;
   big-endian;
   status = "ok";

   bus-num = <0>;


   spidev:spi@0 {
   #address-cells = <1>;
   #size-cells = <1>;
   compatible = "spidev";
   reg = <0>;
   spi-max-frequency = <108000000>;
   };
};

 

After the compilation, there is not /dev/spidev. I would like to know how to enable SPI in LS1043a?

Thanks in advance!

Attachments

Outcomes