SPI1 on imx8qxp-colibri module is not working

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

SPI1 on imx8qxp-colibri module is not working

574 Views
chetan21_bidap
Contributor I

Hi Technical support Team,
I am working on NXP® i.MX 8QXP Computer on Module and using BSP5 device tree. SPI1 line used as below.
SPI1_CLK (SODIMM 101) ----->Ball configured (SAI0_TXFS)
SPI1_MOSI (SODIMM 103) ----->Ball configured (SAI0_TXD)
SPI1_MISO (SODIMM 37 ) ----->Ball configured (CSI_EN)
SPI1_CS0 (SODIMM 29) ----->Ball configured (CSI_RESET)

Device tree setting as below.

pinctrl_lpspi0: lpspi0 {
fsl,pins = <
IMX8QXP_CSI_RESET_LSIO_GPIO3_IO03       0x18000040            / SODIMM 29 ---> SPI1_CS0 /
IMX8QXP_SAI0_TXD_ADMA_SPI1_SDO          0x10000040             / SODIMM 103 ---> SPI1_MOSI /
IMX8QXP_CSI_EN_ADMA_SPI1_SDI                0x18000040             / SODIMM 37 ---> SPI1_MISO /
IMX8QXP_SAI0_TXFS_ADMA_SPI1_SCK         0x10000040            / SODIMM 101 ---> SPI_CLK /
>;
};

The above pins configured in device tree and spidev0.0 showing in /dev/ file. But when we try to write or do any communication on same line then we are not getting any signal on hardware pins.
FYI .....This spi pin also tested as gpio and its working fine. Also we have tried with other default SPI2 then it’s working.
Please provide your inputs.

Thanks and Regards,
Ajay

0 Kudos
Reply
1 Reply

560 Views
igorpadykov
NXP Employee
NXP Employee

Hi Chetan

 

one can try to add lpspi1 entries, for example

 

Fsl-imx8dx.dtsi :
lpspi1: lpspi@5a010000 {

compatible = "fsl,imx7ulp-spi";
reg = <0x0 0x5a010000 0x0 0x10000>;
interrupts = <GIC_SPI 217 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&gic>;
clocks = <&clk IMX8QXP_SPI1_CLK>,
<&clk IMX8QXP_SPI1_IPG_CLK>;
clock-names = "per", "ipg";
assigned-clocks = <&clk IMX8QXP_SPI1_CLK>;
assigned-clock-rates = <20000000>;
power-domains = <&pd_dma_lpspi1>;
status = "disabled";
};

Fsl-imx8qxp-mek.dts:

pinctrl_lpspi1: lpspi1grp {

fsl,pins = <
SC_P_SAI0_TXFS_ADMA_SPI1_SCK 0xD600004c
SC_P_SAI0_TXD_ADMA_SPI1_SDO 0xD600004c
SC_P_SAI0_TXC_ADMA_SPI1_SDI 0xD600004c
>;

};

pinctrl_lpspi1_cs: lpspi1cs {

fsl,pins = <
SC_P_SAI0_RXD_LSIO_GPIO0_IO27 0xE0000021
>;
};

&lpspi1 {
#address-cells = <1>;
#size-cells = <0>;
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpspi1 &pinctrl_lpspi1_cs>;
cs-gpios = <&gpio0 27 GPIO_ACTIVE_LOW>;
status = "okay";

spidev@0 {

compatible = "rohm,dh2228fv";
status = "okay";
spi-max-frequency = <1000000>;
reg = <0>;
};

};

driver clk-imx8qxp.c

clks[IMX8QXP_SPI1_CLK] = imx_clk_gate_scu("spi1_clk", "spi1_div", SC_R_SPI_1, SC_PM_CLK_PER, (void __iomem *)(LPSPI_1_LPCG), 0, 0);

 

Best regards
igor

0 Kudos
Reply