Hi all,
I have a i.MX 8M Quad Evaluation Kit. I am use yocto with kernel version 4.9.51.
I'm now want to add a spi device node in /dev/. But when I change kernel config and dts file, not see spi node in /dev/
and also not find kernel load spi driver from boot log.
Follow is my changes:
1. tmp/work-shared/imx8mqevk/kernel-source/arch/arm64/configs/defconfig
Add:
CONFIG_REGMAP_SPI=y
CONFIG_SPI=y
CONFIG_SPI_DEBUG=y
CONFIG_SPI_MASTER=y
CONFIG_SPI_BITBANG=y
CONFIG_SPI_IMX=y
CONFIG_SPI_FSL_LIB=y
CONFIG_SPI_FSL_SPI=y
CONFIG_SPI_SPIDEV=y
2. tmp/work-shared/imx8mqevk/kernel-source/arch/arm64/boot/dts/freescale
ecspi1 {
compatible = "fsl,imx6ul-ecspi", "fsl,imx51-ecspi";
status = "okay";
};
&ecspi1 {
#size-cells = <0>;
#address-cells = <1>;
fsl,spi-num-chipselects = <4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1>;
cs-gpios = <&gpio5 25 0>, <&gpio3 6 0>, <&gpio3 7 0>, <&gpio3 8 0>;
status = "okay";
num-cs = <4>;
mxl2771: mxl@0 {
compatible = "spidev";
reg = <0>;
spi-max-frequency = <10000000>;
};
};
//below is in &iomuxc
pinctrl_ecspi1: ecspi1igrp {
fsl,pins = <
MX8MQ_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x87 // Schmitt, slow slew, 40 ohm
MX8MQ_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x87
MX8MQ_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x87
MX8MQ_IOMUXC_ECSPI1_SS0_ECSPI1_SS0 0x87 // SS0
MX8MQ_IOMUXC_SAI5_RXC_GPIO3_IO20 0x87 // SS1
MX8MQ_IOMUXC_SAI5_RXD0_GPIO3_IO21 0x87 // SS2
MX8MQ_IOMUXC_SAI5_RXD1_GPIO3_IO22 0x87 // SS3
MX8MQ_IOMUXC_SAI5_RXD2_GPIO3_IO23 0x87 // SS4
MX8MQ_IOMUXC_SAI5_RXD3_GPIO3_IO24 0x87 // SS5
>;
};