I am using LS1088ARDB-PB board for my development. I am trying to interface external SPI slave device from LS1088ARDB.
I am using flexbuild2012 package, I did not see any SPI drivers available in /dev folder in root mode.
Please suggest how to enable SPI drivers on LS1088ARDB-PB board.
Thanks & Regards
Suresh
Please enable the following options in Linux Kernel configuration file.
CONFIG_SPI
CONFIG_SPI_FSL_DSPI
CONFIG_SPI_SPIDEV
Please define DSPI device device node in the dts file, please refer to the following.
&dspi {
bus-num = <0>;
status = "okay";
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
reg = <0>;
spi-max-frequency = <1000000>;
};
flash@1 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "jedec,spi-nor";
spi-cpol;
spi-cpha;
spi-max-frequency = <3500000>;
reg = <1>;
};
};
Hi yipingwang,
Thanks you for your reply,
I am using flexbuild_lsdk2012 source code and I am trying to identify the Kernel Configuration file to update your suggestions. But I could not able to locate the Kernel Configuration file. Could you please help me to identify the location of the Kernel Configuration file?
Thanks & Regards
Suresh
Linux Kernel configuration file is located in flexbuild_lsdk2012/build/linux/linux/arm64/LS/output/LSDK-20.12-V5.4/.config.
Please go to folder flexbuild_lsdk2012/build/linux/linux/arm64/LS/output/LSDK-20.12-V5.4/, run command "make ARCH=arm64 menuconfig" to configure Kernel options.
Then rebuild Linux kernel with command.
$ flex-builder -c linux -a arm64
Hi yipingwang,
Thanks for your reply,
All of your suggestions, I could found in flexbuild_lsdk2012 already enabled and i can able to boot the board through SPI flash also.
I am planning to use another SPI port not QSPI which was already used for boot. for accessing the SPI port (not QSPI) i should able to see SPI device in "/dev" folder. I need your suggestion for to enable that SPI port to use at user space.
Thanks & Regards
Suresh
To use spidev, please open CONFIG_SPI, CONFIG_SPI_FSL_DSPI and CONFIG_SPI_SPIDEV.
They are have been opened in arm64 defconfig.
Moreover, dts needs to be modifed as below, under dspi node:
spidev0: spi@0 {
reg = <0>;
compatible = "rohm,dh2228fv";
spi-max-frequency = <3000000>;
}
Hi Yipingwang,
Still I could not able to succeeded for enabling SPI port (Not QSPI). Please suggest which dts file I need to modify for your suggested changes. I am using flexbuild_lsdk2108 package. if possible please share that modified dts file.
Regards
Suresh
Hi yipingwang,
Directory Name: /flexbuild_lsdk2108/components/linux/linux/arch/arm64/boot/dts/freescale#
File Name: fsl-ls1088a-rdb.dts
&dspi {
status = "okay";
bus-num = <0>;
spidev@0 {
compatible = "linux,spidev";
spi-max-frequency = <12000000>;
reg = <0>;
};
};
Directory Name: /flexbuild_lsdk2108/components/linux/linux/arch/arm64/boot/dts/freescale#
File Name: fsl-ls1088a.dtsi
dspi: spi@2100000 {
compatible = "fsl,ls1088a-dspi",
"fsl,ls1021a-v1.0-dspi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x0 0x2100000 0x0 0x10000>;
interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
clock-names = "dspi";
clocks = <&clockgen 4 1>;
spi-num-chipselects = <6>;
status = "enabled";
};
After updating these changes still i could not able to see the dspi device in the /dev tree.
Can you please help me if there is any standard procedure to add dspi (not QSPI) into the device tree and enable the device?
Thanks & Regards
Suresh