ecspi 1 for spi eeprom is not working on imx8mq

cancel
Showing results for 
Search instead for 
Did you mean: 

ecspi 1 for spi eeprom is not working on imx8mq

728 Views
krupa_parameswa
Contributor I

Hello 

I am using imx8mq processor based evk where i am trying to configure spi eeprom on ecspi 1 but unable to get clock signal when probed but the driver is getting register, plz someone help me out in solving this issue why i am unable to use ecspi as expected.

The following is been configured in dts file:

ecspi1: ecspi@30820000 {
compatible = "fsl,imx6ul-ecspi", "fsl,imx51-ecspi";
reg = <0x0 0x30820000 0x0 0x10000>;
interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clk IMX8MQ_CLK_ECSPI1_ROOT>,
<&clk IMX8MQ_CLK_ECSPI1_ROOT>;
clock-names = "ipg", "per";
interrupt-parent = <&gpc>;
fsl,spi-num-chipselects = <1>;
cs-gpios = <&gpio5 9 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1>;
#address-cells = <1>;
#size-cells = <0>;
status = "okay";

/* MAGIK2_SMARC : Secure EEPROM */
eeprom: ataes132a@0 {
compatible = "atmel,at25";
reg = <0>;
size = <65536>;
pagesize= <32>;
address-width= <16>;
spi-max-frequency = <1000000>;
};

pinctrl_ecspi1: ecspi1grp {
fsl,pins = <
/* MAGIK2_SMARC : TBC whether to configure SS0 as GPIO ALT mode or ECSPI1_SS0 mode */
/*MX8MQ_IOMUXC_ECSPI1_SS0_ECSPI1_SS0 0x100b1*/
MX8MQ_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x19
MX8MQ_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x100b1
MX8MQ_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x100b1
MX8MQ_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x100b1
>;
};

Regards

Krupa

Tags (1)
0 Kudos
3 Replies

338 Views
krupa_parameswa
Contributor I

Hello igor

In our configuration uart3 is configured in the below way

pinctrl_uart3: uart3grp {
fsl,pins = <
MX8MQ_IOMUXC_UART3_TXD_UART3_DCE_TX 0x49
MX8MQ_IOMUXC_UART3_RXD_UART3_DCE_RX 0x49
>;
};

 where we are not using SPI lines for that 

And MX8MQ_IOMUXC_ECSPI1_SCLK this lines we are not using for mip-dsi 

still we are unable to get clock signal when probes , please can you tell is there any other way to configure to use spi eeprom

Regards

Krupa

0 Kudos

338 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Krupa

one can look at nitrogen 8m ecspi2 example:

linux-imx6/imx8mq-nitrogen8m.dts at boundary-imx_4.9.x_8mq_ga-pass1-ath10k · boundarydevices/linux-i... 

Best regards
igor

0 Kudos

338 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Krupa

one can try latest Linux L4.14.78 and check that some ecspi1 pins

are used by other modules, for example MX8MQ_IOMUXC_ECSPI1_MISO*,

MX8MQ_IOMUXC_ECSPI1_SS0* are used by uart3
and MX8MQ_IOMUXC_ECSPI1_SCLK* by mipi-dsi in fsl-imx8mq-evk.dts,
fsl-imx8mq-evk-lcdif-rm67191.dtsi

freescale\dts\boot\arm64\arch - linux-imx - i.MX Linux kernel 

For testing one can use spi unit test

mxc_spi_test\test - imx-test - i.MX Driver Test Application Software 

Just for reference one can look at sect.4.3 Enhanced Configurable Serial Peripheral

Interface (ECSPI) attached Linux Manual.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos