i m trying to interface the SAM slot(contact) to imx6ul. will you please help me which driver i need to use in this. i tried with imx_sim.c driver, in this
if (devm_request_irq(&pdev->dev, sim->ipb_irq, sim_irq_handler,
0, "mxc_sim_ipb", sim))
i didnt get what is "mxc_sim_ipb", and how to pass it in devicetree,
but IRQ pin is not there to use in this slot.
Please help me out from which driver to use for SAM slot(Smartcard) and which parameters i need to pass it in devicetree.
Thank you
Ganesh.K
Hi Igor,
Using ENET2(PORT0) pins, smart card is always detecting without card while inserting and removing time.
Using CSI_DATA(PORT1) pins, its able to detect the smart card.
Can i know the reason, why the ENET2(PORT0) pins are not detecting the card?
And is there any difference between PORT0 and PORT1?
and while running the application we are getting following output for CSI_DATA(PORT1) pins,
*****************************************************************************************************
---- Running < ./sam > test ----------
atr[0]= 0x3b atr[1]= 0x95 atr[2]= 0x94 atr[3]= 0x40 atr[4]= 0xff atr[5]= 0xd0 atr[6]= 0x1 atr[7]= 0x75 atr[8]= 0x0 atr[9]= 0x0
CLA not support
*****************************************************************************************************
Here what is "CLA not support"?
Please help me from above
Thank You
Ganesh.K
Hi Igor,
Thank you for your support, it is very helping to us to solve the issues.
we have got the attributes from the card using application as below:
***********************************************************************************************************************************
---- Running < ./sam > test ----------
atr[0]= 0x3b atr[1]= 0x95 atr[2]= 0x94 atr[3]= 0x40 atr[4]= 0xff atr[5]= 0xd0 atr[6]= 0x1 atr[7]= 0x75 atr[8]= 0x0 atr[9]= 0x0
***********************************************************************************************************************************
Now we wanted to do authentication.For this do you have any sample application?
Thank You
Ganesh.K
Hi Igor,
We are using below pinmuxing,its always detecting the card while inserting and removing time,but we are not getting the data.
pinctrl_sim2: sim2grp {
fsl,pins = <
MX6UL_PAD_UART3_RX_DATA__SIM2_PORT0_PD 0xb808
MX6UL_PAD_ENET2_TX_EN__SIM2_PORT0_CLK 0x31
MX6UL_PAD_ENET2_TX_CLK__SIM2_PORT0_RST_B 0xb808
MX6UL_PAD_ENET2_RX_ER__SIM2_PORT0_SVEN 0xb808
MX6UL_PAD_ENET2_TX_DATA1__SIM2_PORT0_TRXD 0xb809
MX6UL_PAD_UART3_TX_DATA__GPIO1_IO24 0x3008
>;
};
};
&sim2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sim2>;
assigned-clocks = <&clks IMX6UL_CLK_SIM_SEL>;
assigned-clock-parents = <&clks IMX6UL_CLK_SIM_PODF>;
assigned-clock-rates = <240000000>;
pinctrl-assert-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
port = <0>;
sven_low_active;
status = "okay";
};
While using below pinmux we are able to read the atr values but its says CLA not support,output is like below.
**********************************************************************************
---- Running < ./sam > test ----------
atr[0]= 0x3b atr[1]= 0x95 atr[2]= 0x94 atr[3]= 0x40 atr[4]= 0xff atr[5]= 0xd0 atr[6]= 0x1 atr[7]= 0x75 atr[8]= 0x0 atr[9]= 0x0
CLA not support
pinctrl_sim2: sim2grp {
fsl,pins = <
MX6UL_PAD_CSI_DATA03__SIM2_PORT1_PD 0xb808
MX6UL_PAD_CSI_DATA04__SIM2_PORT1_CLK 0x31
MX6UL_PAD_CSI_DATA05__SIM2_PORT1_RST_B 0xb808
MX6UL_PAD_CSI_DATA06__SIM2_PORT1_SVEN 0xb808
MX6UL_PAD_CSI_DATA07__SIM2_PORT1_TRXD 0xb809
MX6UL_PAD_CSI_DATA02__GPIO4_IO23 0x3008
>;
};
};
&sim2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_sim2>;
assigned-clocks = <&clks IMX6UL_CLK_SIM_SEL>;
assigned-clock-parents = <&clks IMX6UL_CLK_SIM_PODF>;
assigned-clock-rates = <240000000>;
pinctrl-assert-gpios = <&gpio4 23 GPIO_ACTIVE_LOW>;
port = <1>;
sven_low_active;
status = "okay";
};
what is the difference between PORT0 and PORT1 ?
Any issues with PORT0 ?
Please help me from above.
Thank You
Ganesh.K
Hi Ganesh
sim2 signals are used for csi on i.MX6UL EVK so one can check
its usage.
Best regards
igor
Hi Ganesh
one can try sim unit test
mxc_sim_test\test - imx-test - i.MX Driver Test Application Software
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi Igor,
Thanks for quick reply.
We running the application on target board and we got below output.
---- Running < ./sam > test ----
atr[0]= 0x0
Receiving timeout
Error when tx/rx:-1
Can you please help us,where we are wrong and please provide test procedure and expected output for sam.
Thank you
Ganesh.K
Hi Ganesh
please try to test on i.MX6UL EVK reference board.
Regarding "Receiving timeout" on custom board one can check sim signals
with oscilloscope.
Best regards
igor