IMX6UL Sim1 not working

cancel
Showing results for 
Search instead for 
Did you mean: 

IMX6UL Sim1 not working

175 Views
Contributor IV

Hello All,

My company is planning to implement cardreader using SIM1 PORT1 of IMX6ul interfacing to TDA8035.

When I ran mxc_sim_test.out to test sim functionality, It is giving me following output.

atr[0]= 0x0
Receiving timeout
Error when tx/rx:-1

do you all have any idea,What can be wrong?

For more information, here is our implementation.

Pin configuration as shown in schematic here.

pastedImage_3.png

IMX6UL pin settings

pastedImage_4.png


I have couple of questions, Have I implemented device tree shown below correctly, according to schematic?

----------------------------------------------------------------------------------------------------------------------

pinctrl_sim1: sim1grp{
fsl,pins = <
MX6UL_PAD_CSI_DATA01__SIM1_PORT1_SVEN   0x0010    /* SVEN */
MX6UL_PAD_CSI_VSYNC__SIM1_PORT1_CLK     0x0031        /* CLK */
MX6UL_PAD_CSI_DATA00__SIM1_PORT1_RST_B 0x0010   /* RST_B*/
MX6UL_PAD_CSI_DATA02__SIM1_PORT1_TRXD   0xb809     /* IO */
MX6UL_PAD_CSI_HSYNC__SIM1_PORT1_PD       0x1B000       /* PD */
/*MX6UL_PAD_SD1_CMD__GPIO2_IO16             0x1B0B0*/       /* 5V3V */
>;
};

&sim1 {
pinctrl-names ="default";
pinctrl-0 = <&pinctrl_sim1>;
clocks = <&clks IMX6UL_CLK_SIM1>;
clock-names = "sim";
assigned-clocks = <&clks IMX6UL_CLK_SIM_PODF>;
assigned-clock-rates = <240000000>;
/* GPIO_ACTIVE_HIGH/LOW:sim card voltage control
* NCN8025:Vcc = ACTIVE_HIGH?5V:3V
* TDA8035:Vcc = ACTIVE_HIGH?5V:1.8V
*/
pinctrl-assert-gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;
port = <1>;
sven_low_active;
status = "okay";
};

----------------------------------------------------------------------------------------------

As we want to select 5v, I have asserted gpio high as (pinctrl-assert-gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;) and EN_1.8V as high through IO Expander.

2. Is the above dts setting for asserting gpio2 16 pin is correct?

This is urgent, Could someone help please?

Yuri‌, igorpadykov‌, joanxie

Regards,

Asma

Labels (1)
Tags (2)
7 Replies

2 Views
NXP TechSupport
NXP TechSupport

Hi Asma

one can look at sim example on nxp linux: linux/arch/arm/boot/dts/imx6ul-14x14-evk.dts

imx6ul-14x14-evk.dts\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

Pay attention to differencies in pad settings in pinctrl_sim2: sim2grp,

port number in "port = ", "assigned-clocks ..".

For gpio2 16 look at similar settings for "gpio4 23 GPIO_ACTIVE_HIGH".

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

0 Kudos

2 Views
Contributor IV

igorpadykov

I have taken reference from their only... But mxc_sim_test is not giving expected output...

Can you please verify if everything I have done above is correct?

0 Kudos

2 Views
NXP TechSupport
NXP TechSupport

>Can you please verify if everything I have done above is correct?

there are big differencies in your pad settings in pinctrl_sim2: sim2grp,

port number in "port = ", "assigned-clocks ..".

with sim example in nxp linux: linux/arch/arm/boot/dts/imx6ul-14x14-evk.dts

imx6ul-14x14-evk.dts\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

Best regards
igor

0 Kudos

2 Views
Contributor IV

Yes because I am using different pins and PORT1 of SIM 1.

Is there any difference in functionality of port0 and PORT1?

0 Kudos

2 Views
NXP TechSupport
NXP TechSupport

>Yes because I am using different pins and PORT1 of SIM 1.

it does not matter, check for example pad settings :pinctrl_sim1: sim1grp,

the same for clocks

0 Kudos

2 Views
Contributor IV

Hi igorpadykov‌,

I made the changes as sim2grp

&sim1 {
pinctrl-names ="default";
pinctrl-0 = <&pinctrl_sim1>;
clocks = <&clks IMX6UL_CLK_SIM1>;
clock-names = "sim";
assigned-clocks = <&clks IMX6UL_CLK_SIM_SEL>;
assigned-clock-parents = <&clks IMX6UL_CLK_SIM_PODF>;
assigned-clock-rates = <240000000>;
/* GPIO_ACTIVE_HIGH/LOW:sim card voltage control
* NCN8025:Vcc = ACTIVE_HIGH?5V:3V
* TDA8035:Vcc = ACTIVE_HIGH?5V:1.8V
*/
/*pinctrl-assert-gpios = <&gpio2 16 GPIO_ACTIVE_HIGH>;*/
port = <1>;
sven_low_active;
status = "okay";
};

pinctrl_sim1: sim1grp{
fsl,pins = <
MX6UL_PAD_CSI_DATA01__SIM1_PORT1_SVEN 0xb810 /* SVEN */
MX6UL_PAD_CSI_VSYNC__SIM1_PORT1_CLK 0x0011 /* CLK */
MX6UL_PAD_CSI_DATA00__SIM1_PORT1_RST_B 0xb810 /* RST_B*/
MX6UL_PAD_CSI_DATA02__SIM1_PORT1_TRXD 0xb811 /* IO */
MX6UL_PAD_CSI_HSYNC__SIM1_PORT1_PD 0xB808 /* PD */
MX6UL_PAD_SD1_CMD__GPIO2_IO16 0x3008 /* 5V3V */
>;
};

Scenario How I am testing:

Sim1 Port1 is connected to TDA8035:

First scenario

I am inserting Smart Card into into Card reader module and running mxc_sim_test.out. Ouput is:

No cardsim_cold_reset 

NO card ...

Second scenario

I am not inserting Smart Card into into Card reader module and running mxc_sim_test.out. Ouput is:

Receiving timeout
Error when tx/rx:-1

0 Kudos

2 Views
NXP TechSupport
NXP TechSupport

Hi Asma

one can check with oscilloscope if there any sim signals.

Best regards
igor