How to use SPI5 on the IMX6D.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use SPI5 on the IMX6D.

693 Views
864535720
Contributor II

My chip model is MCIMX6D5EYM10AD and my Linux version is 3.14.52. I see the data sheet introduction, IMX6D has 5 ecSPI. But when I was using SPI5, something went wrong. In the IMX6qdl.dtsi file, I added the device node of ecspi5 with reference to the node of ecspi4:

ecspi4: ecspi@02014000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi";
reg = <0x02014000 0x4000>;
interrupts = <0 34 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6QDL_CLK_ECSPI4>,      //there is IMX6QDL_CLK_ECSPI4
<&clks IMX6QDL_CLK_ECSPI4>;
clock-names = "ipg", "per";
status = "disabled";
};

ecspi5: ecspi@02018000 {
#address-cells = <1>;
#size-cells = <0>;
compatible = "fsl,imx6q-ecspi", "fsl,imx51-ecspi";
reg = <0x02018000 0x4000>;
interrupts = <0 35 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6Q_CLK_ECSPI5>,      //there is IMX6Q_CLK_ECSPI5
<&clks IMX6Q_CLK_ECSPI5>;
clock-names = "ipg", "per";
status = "disabled";
};

But when configuring the clock, I found that only IMX6Q_CLK_ECSPI5, there is no clock information for IMX6D SPI5. Then I used IMX6Q_CLK_ECSPI5 for configuration. After the configuration is complete, I added the following nodes to the imx6qdl-sabresd.dtsi file:

But in my kernel startup, my probe function has not been matched. I am sure my driver code is correct because it matches the other SPI and it works fine. At the same time, I can also confirm that the pins of SPI5 are not multiplexed into other functions.
Excuse me, on the spi5, what is the reason that the probe function is not executed correctly?
I learned online that imx6dl only has 4 SPIs. So is the number of imx6dspi 4 or 5? If it is 5, is the fifth spi using GPIO emulation or an SPI controller? If the fifth spi uses a spi controller, how should I configure the device tree to use spi5 correctly?

imx6qdl-clock.h

pastedImage_2.png

imx6qdl.dtsi

pastedImage_3.png

imx6q.dtsi

pastedImage_4.png

I look forward to your reply

Labels (1)
0 Kudos
Reply
1 Reply

610 Views
jimmychan
NXP TechSupport
NXP TechSupport

i.MX6D and i.MX6Q are using same DT files.

0 Kudos
Reply