LSIO_GPIO0_IO0x toggling on i.MX8QM

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

LSIO_GPIO0_IO0x toggling on i.MX8QM

LSIO_GPIO0_IO0x toggling on i.MX8QM

LSIO_GPIO0_IO0x toggling on i.MX8QM

Issue customer met:

Customer met LSIO_GPIO0_IO0x not toggling on i.MX8QM, they are working through the software on their board, part of that involves getting a few GPIO pins working.
They have been using several GPIO pins for a while now, we have some simple toggles and some others where we bit bang i2c, all of those have worked fine.
However, They have not been able to get 3 pins to either read or set successfully at all:

LSIO_GPIO0_IO00 (SIM0_CLK)
LSIO_GPIO0_IO01 (SIM0_RST)
LSIO_GPIO0_IO02 (SIM0_IO)

1\ Reproduce on our i.MX8QM EVK board

 a. Check the hardware connection

Check the LSIO_GPIO0_IO00 (SIM0_CLK), LSIO_GPIO0_IO01 (SIM0_RST) and LSIO_GPIO0_IO02 (SIM0_IO) connection in our i.MX8QM EVK board.

In the default design in NXP i.MX8QM EVK board, the pins SIM0_CLK, SIM0_RST and SIM0_IO connect to the SIM CARD on the base board.

Rita_Wang_0-1763386260542.png

 

Rita_Wang_1-1763386260561.png

 

Rita_Wang_2-1763386260597.png

    b. To make these pins work as GPIO pins

In the default pins mux, default pins mux on the SIM0, to make these pins work as GPIO, need to mux them to the GPIO functions.

SIM0_CLK (SIM0_CLK)

 

Rita_Wang_3-1763386260613.png

 

SIM0_RST (SIM0_RST)

Rita_Wang_4-1763386260627.png

 

SIM0_IO (SIM0_IO)

Rita_Wang_5-1763386260641.png

 

  c. In the source code change these pins mux to GPIO configuration:

Defalt setting for these pins :

linux-imx/arch/arm64/boot/dts/freescale/imx8qm-mek.dts at lf-6.12.y · nxp-imx/linux-imx · GitHub

 

pinctrl_sim0: sim0grp {

                             fsl,pins = <

                                           IMX8QM_SIM0_CLK_DMA_SIM0_CLK           0xc0000021

                                           IMX8QM_SIM0_IO_DMA_SIM0_IO                 0xc2000021

                                           IMX8QM_SIM0_PD_DMA_SIM0_PD               0xc0000021

                                          IMX8QM_SIM0_POWER_EN_DMA_SIM0_POWER_EN                         0xc0000021

                                           IMX8QM_SIM0_RST_DMA_SIM0_RST            0xc0000021

                             >;

              };

Linux dts should set them to GPIO0 functions:

              IMX8QM_SIM0_CLK_LSIO_GPIO0_IO00 0xc0000021

              IMX8QM_SIM0_RST_LSIO_GPIO0_IO01 0xc2000021

              IMX8QM_SIM0_IO_LSIO_GPIO0_IO02 0xc0000021

Build the source code, download the images to board, test on the SIM pins to see if these pins can work or not. Test on the J45 pins 3,5,6.

Rita_Wang_6-1763386260714.png

 

Test the SIM_CLK as an example:

Test commands in Linux

echo 480 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio480/direction

#output high
echo 1 > /sys/class/gpio/gpio480/value

#measure the PINs

#output low
echo 0 > /sys/class/gpio/gpio480/value

#measure the PINs

Found these pins can not toggling well.

2\ Go next further test and consideration

Foud the SCU_GPIO0_00, SCU_GPIO0_01, SCU_GPIO0_02 are also configurate as GPIO function in the SCFW,  in the default setting for the SC_P_SCU_GPIO0_00is the function GPIO0_00 , and when setting the SIM0_CLK to GPIO0_00 function then the GPIO0_00 can not work normally.

So if setting the SIM0_CLK as GPIO0_00 function, then we need to set the SC_P_SCU_GPIO0_00 this PIN to others function, so that no conflict of them. Even no use the pin SC_P_SCU_GPIO0_00 in hardware, we also need to set them to others function to avoid the conflict.

SCU_GPIO Pins mux:

SCU_GPIO0_00 (SCU_GPIO0_00)

Rita_Wang_7-1763386260735.png

 

SCU_GPIO0_01 (SCU_GPIO0_01)

Rita_Wang_8-1763386260755.png

 

SCU_GPIO0_02 (SCU_GPIO0_02)

     

Rita_Wang_9-1763386260774.png

 

Tested the PINs "SIM0_CLK, SIM0_IO, SIM0_RST" on iMX8QM MEK with base board. All of them works fine. 

The key points are already listed.

  1. VDD_SIM0 power should be supplied (It is 3.3V on MEK from PF8100 LDO)
Rita_Wang_10-1763386260858.png

 

  1. Linux dts should set them to GPIO0 functions:

    IMX8QM_SIM0_CLK_LSIO_GPIO0_IO00 0xc0000021

    IMX8QM_SIM0_RST_LSIO_GPIO0_IO01 0xc2000021

    IMX8QM_SIM0_IO_LSIO_GPIO0_IO02 0xc0000021

  1. The default IOMUX for PINs SC_P_SCU_GPIO0_00, SC_P_SCU_GPIO0_01, SC_P_SCU_GPIO0_02 should be changed from 0 to others. 

Test on MEK, we used followed codes in SCFW board_init():

    else if (phase == BOOT_PHASE_FINAL_INIT)

    {

        /* Configure SNVS button for rising edge */

        SNVS_ConfigButton(SNVS_DRV_BTN_CONFIG_RISINGEDGE, SC_TRUE);

 

        /* Init PMIC if not already done */

        pmic_init();

        pad_force_mux(SC_P_SCU_GPIO0_00, 2,

            SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF);

        pad_force_mux(SC_P_SCU_GPIO0_01, 2,

            SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF);

        pad_force_mux(SC_P_SCU_GPIO0_02, 2,

            SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF);

    }

 Note:

In SCFW, should also set SC_P_SCU_GPIO0_00, SC_P_SCU_GPIO0_01, SC_P_SCU_GPIO0_02 to other functions, because they are set to GPIO0_0x function default, if two PINs set to the same functions, such as SIM0_CLK_DMA pin and SCU_GPIO0_00 pin are set to GPIO0_00 together, the function will not work correctly.

 

Test commands in LInux:

echo 480 > /sys/class/gpio/export
echo 481 > /sys/class/gpio/export
echo 482 > /sys/class/gpio/export

echo out > /sys/class/gpio/gpio480/direction
echo out > /sys/class/gpio/gpio481/direction
echo out > /sys/class/gpio/gpio482/direction

#output high
echo 1 > /sys/class/gpio/gpio480/value
echo 1 > /sys/class/gpio/gpio481/value
echo 1 > /sys/class/gpio/gpio482/value

#measure the PINs, they are correct high  ( 3V )

#output low
echo 0 > /sys/class/gpio/gpio480/value
echo 0 > /sys/class/gpio/gpio481/value
echo 0 > /sys/class/gpio/gpio482/value

#measure the PINs, they are correct low ( 0V )

The test result is based on real measurement on iMX8QM MEK. 

Rita_Wang_11-1763386260939.jpeg

 

Note:

1\In customer's side If still not work, To confirm the issue, please suggest customer build SCFW with parameter "-m", then use followed commands to dump the IOMUX registers:

md 0x41F80000 1
md 0x41F80040 1
md 0x41F80080 1

md 0x41F82140 1
md 0x41F82180 1
md 0x41F83000 1

 

The "md" command should run from SCFW debug UART, not linux/uboot UART.

2\Make sure the hardware in customer's side VDD_SIM0 power should be supplied .

 

 

%3CLINGO-SUB%20id%3D%22lingo-sub-2196700%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3ELSIO_GPIO0_IO0x%20%20toggling%20on%20i.MX8QM%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2196700%22%20slang%3D%22en-US%22%20mode%3D%22UPDATE%22%3E%0A%3CP%3ELSIO_GPIO0_IO0x%20toggling%20on%20i.MX8QM%3C%2FP%3E%0A%3CP%3EIssue%20customer%20met%3A%3C%2FP%3E%0A%3CP%3ECustomer%20met%20LSIO_GPIO0_IO0x%20not%20toggling%20on%20i.MX8QM%2C%20they%20are%20working%20through%20the%20software%20on%20their%20board%2C%20part%20of%20that%20involves%20getting%20a%20few%20GPIO%20pins%20working.%3CBR%20%2F%3EThey%20have%20been%20using%20several%20GPIO%20pins%20for%20a%20while%20now%2C%20we%20have%20some%20simple%20toggles%20and%20some%20others%20where%20we%20bit%20bang%20i2c%2C%20all%20of%20those%20have%20worked%20fine.%3CBR%20%2F%3EHowever%2C%20They%20have%20not%20been%20able%20to%20get%203%20pins%20to%20either%20read%20or%20set%20successfully%20at%20all%3A%3CBR%20%2F%3E%3CBR%20%2F%3ELSIO_GPIO0_IO00%20(SIM0_CLK)%3CBR%20%2F%3ELSIO_GPIO0_IO01%20(SIM0_RST)%3CBR%20%2F%3ELSIO_GPIO0_IO02%20(SIM0_IO)%3C%2FP%3E%0A%3CP%3E1%5C%20Reproduce%20on%20our%20i.MX8QM%20EVK%20board%3C%2FP%3E%0A%3CP%3E%26nbsp%3Ba.%20Check%20the%20hardware%20connection%3C%2FP%3E%0A%3CP%3ECheck%20the%20LSIO_GPIO0_IO00%20(SIM0_CLK)%2C%20LSIO_GPIO0_IO01%20(SIM0_RST)%20and%20LSIO_GPIO0_IO02%20(SIM0_IO)%20connection%20in%20our%20i.MX8QM%20EVK%20board.%3C%2FP%3E%0A%3CP%3EIn%20the%20default%20design%20in%20NXP%20i.MX8QM%20EVK%20board%2C%20the%20pins%20SIM0_CLK%2C%20SIM0_RST%20and%20SIM0_IO%20connect%20to%20the%20SIM%20CARD%20on%20the%20base%20board.%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Rita_Wang_0-1763386260542.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Rita_Wang_0-1763386260542.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365913i17E734901345D9CF%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Rita_Wang_0-1763386260542.png%22%20alt%3D%22Rita_Wang_0-1763386260542.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Rita_Wang_1-1763386260561.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Rita_Wang_1-1763386260561.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365914iC87B05272D2319CC%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Rita_Wang_1-1763386260561.png%22%20alt%3D%22Rita_Wang_1-1763386260561.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Rita_Wang_2-1763386260597.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Rita_Wang_2-1763386260597.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365915iA3BB8D34CBF6F740%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Rita_Wang_2-1763386260597.png%22%20alt%3D%22Rita_Wang_2-1763386260597.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20b.%20To%20make%20these%20pins%20work%20as%20GPIO%20pins%3C%2FP%3E%0A%3CP%3EIn%20the%20default%20pins%20mux%2C%20default%20pins%20mux%20on%20the%20SIM0%2C%20to%20make%20these%20pins%20work%20as%20GPIO%2C%20need%20to%20mux%20them%20to%20the%20GPIO%20functions.%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ESIM0_CLK%20(SIM0_CLK)%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Rita_Wang_3-1763386260613.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Rita_Wang_3-1763386260613.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365919iDF0EC08A62B840D5%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Rita_Wang_3-1763386260613.png%22%20alt%3D%22Rita_Wang_3-1763386260613.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3ESIM0_RST%20(SIM0_RST)%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Rita_Wang_4-1763386260627.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Rita_Wang_4-1763386260627.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365917i4DA46CD7B5F56141%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Rita_Wang_4-1763386260627.png%22%20alt%3D%22Rita_Wang_4-1763386260627.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3ESIM0_IO%20(SIM0_IO)%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Rita_Wang_5-1763386260641.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Rita_Wang_5-1763386260641.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365916i7BC72660E7FCED87%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Rita_Wang_5-1763386260641.png%22%20alt%3D%22Rita_Wang_5-1763386260641.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3E%26nbsp%3B%26nbsp%3B%3C%2FSTRONG%3Ec.%26nbsp%3BIn%20the%20source%20code%20change%20these%20pins%20mux%20to%20GPIO%20configuration%3A%3C%2FP%3E%0A%3CP%3EDefalt%20setting%20for%20these%20pins%20%3A%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fgithub.com%2Fnxp-imx%2Flinux-imx%2Fblob%2Flf-6.12.y%2Farch%2Farm64%2Fboot%2Fdts%2Ffreescale%2Fimx8qm-mek.dts%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noreferrer%22%3Elinux-imx%2Farch%2Farm64%2Fboot%2Fdts%2Ffreescale%2Fimx8qm-mek.dts%20at%20lf-6.12.y%20%C2%B7%20nxp-imx%2Flinux-imx%20%C2%B7%20GitHub%3C%2FA%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3Epinctrl_sim0%3A%20sim0grp%20%7B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20fsl%2Cpins%20%3D%20%26lt%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20IMX8QM_SIM0_CLK_DMA_SIM0_CLK%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200xc0000021%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20IMX8QM_SIM0_IO_DMA_SIM0_IO%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200xc2000021%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20IMX8QM_SIM0_PD_DMA_SIM0_PD%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200xc0000021%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20IMX8QM_SIM0_POWER_EN_DMA_SIM0_POWER_EN%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200xc0000021%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20IMX8QM_SIM0_RST_DMA_SIM0_RST%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%200xc0000021%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26gt%3B%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3B%3C%2FP%3E%0A%3CP%3ELinux%20dts%20should%20set%20them%20to%20GPIO0%20functions%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3BIMX8QM_SIM0_CLK_LSIO_GPIO0_IO00%200xc0000021%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20IMX8QM_SIM0_RST_LSIO_GPIO0_IO01%200xc2000021%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20IMX8QM_SIM0_IO_LSIO_GPIO0_IO02%200xc0000021%3C%2FP%3E%0A%3CP%3EBuild%20the%20source%20code%2C%20download%20the%20images%20to%20board%2C%20test%20on%20the%20SIM%20pins%20to%20see%20if%20these%20pins%20can%20work%20or%20not.%20Test%20on%20the%20J45%20pins%203%2C5%2C6.%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Rita_Wang_6-1763386260714.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Rita_Wang_6-1763386260714.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365922i58D04248F908A446%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Rita_Wang_6-1763386260714.png%22%20alt%3D%22Rita_Wang_6-1763386260714.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3ETest%20the%20SIM_CLK%20as%20an%20example%3A%3C%2FP%3E%0A%3CP%3ETest%20commands%20in%20Linux%3C%2FP%3E%0A%3CP%3Eecho%20480%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fexport%3C%2FP%3E%0A%3CP%3Eecho%20out%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fgpio480%2Fdirection%3C%2FP%3E%0A%3CP%3E%23output%20high%3CBR%20%2F%3Eecho%201%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fgpio480%2Fvalue%3C%2FP%3E%0A%3CP%3E%23measure%20the%20PINs%3C%2FP%3E%0A%3CP%3E%23output%20low%3CBR%20%2F%3Eecho%200%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fgpio480%2Fvalue%3C%2FP%3E%0A%3CP%3E%23measure%20the%20PINs%3C%2FP%3E%0A%3CP%3E%3CEM%3EFound%20these%20pins%20can%20not%20toggling%20well.%3C%2FEM%3E%3C%2FP%3E%0A%3CP%3E2%5C%20Go%20next%20further%20test%20and%20consideration%3C%2FP%3E%0A%3CP%3EFoud%20the%20%3CSTRONG%3ESCU_GPIO0_00%2C%20SCU_GPIO0_01%2C%20SCU_GPIO0_02%20%3C%2FSTRONG%3Eare%20also%20configurate%20as%20GPIO%20function%20in%20the%20SCFW%2C%20%26nbsp%3Bin%20the%20default%20setting%20for%20the%20SC_P_SCU_GPIO0_00is%20the%20function%20GPIO0_00%20%2C%20and%20when%20setting%20the%20SIM0_CLK%20to%20GPIO0_00%20function%20then%20the%20GPIO0_00%20can%20not%20work%20normally.%3C%2FP%3E%0A%3CP%3ESo%20if%20setting%20the%20SIM0_CLK%20as%20GPIO0_00%20function%2C%20then%20we%20need%20to%20set%20the%20SC_P_SCU_GPIO0_00%20this%20PIN%20to%20others%20function%2C%20so%20that%20no%20conflict%20of%20them.%20Even%20no%20use%20the%20pin%20SC_P_SCU_GPIO0_00%20in%20hardware%2C%20we%20also%20need%20to%20set%20them%20to%20others%20function%20to%20avoid%20the%20conflict.%3C%2FP%3E%0A%3CP%3ESCU_GPIO%20Pins%20mux%3A%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3ESCU_GPIO0_00%20(SCU_GPIO0_00)%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Rita_Wang_7-1763386260735.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Rita_Wang_7-1763386260735.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365921iB83FBE11211CC17B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Rita_Wang_7-1763386260735.png%22%20alt%3D%22Rita_Wang_7-1763386260735.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3ESCU_GPIO0_01%20(SCU_GPIO0_01)%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Rita_Wang_8-1763386260755.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Rita_Wang_8-1763386260755.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365920iE4331FAE2BFD7426%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Rita_Wang_8-1763386260755.png%22%20alt%3D%22Rita_Wang_8-1763386260755.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%3CSTRONG%3ESCU_GPIO0_02%20(SCU_GPIO0_02)%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Rita_Wang_9-1763386260774.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Rita_Wang_9-1763386260774.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365923iAF1BF673A8B0E6B7%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Rita_Wang_9-1763386260774.png%22%20alt%3D%22Rita_Wang_9-1763386260774.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3ETested%20the%20PINs%20%22SIM0_CLK%2C%20SIM0_IO%2C%20SIM0_RST%22%20on%20iMX8QM%20MEK%20with%20base%20board.%20All%20of%20them%20works%20fine.%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20key%20points%20are%20already%20listed.%3C%2FP%3E%0A%3COL%3E%0A%3CLI%3EVDD_SIM0%20power%20should%20be%20supplied%20(It%20is%203.3V%20on%20MEK%20from%20PF8100%20LDO)%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Rita_Wang_10-1763386260858.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Rita_Wang_10-1763386260858.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365925iF7A1D5806ADFF97F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Rita_Wang_10-1763386260858.png%22%20alt%3D%22Rita_Wang_10-1763386260858.png%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3COL%20start%3D%222%22%3E%0A%3CLI%3ELinux%20dts%20should%20set%20them%20to%20GPIO0%20functions%3A%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20IMX8QM_SIM0_CLK_LSIO_GPIO0_IO00%200xc0000021%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20IMX8QM_SIM0_RST_LSIO_GPIO0_IO01%200xc2000021%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20IMX8QM_SIM0_IO_LSIO_GPIO0_IO02%200xc0000021%3C%2FP%3E%0A%3COL%20start%3D%223%22%3E%0A%3CLI%3EThe%20default%20IOMUX%20for%20PINs%26nbsp%3BSC_P_SCU_GPIO0_00%2C%26nbsp%3BSC_P_SCU_GPIO0_01%2C%26nbsp%3BSC_P_SCU_GPIO0_02%20should%20be%20changed%20from%200%20to%20others.%26nbsp%3B%3C%2FLI%3E%0A%3C%2FOL%3E%0A%3CP%3ETest%20on%20MEK%2C%20we%20used%20followed%20codes%20in%20SCFW%20board_init()%3A%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20else%20if%20(phase%20%3D%3D%20BOOT_PHASE_FINAL_INIT)%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%7B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%2F*%20Configure%20SNVS%20button%20for%20rising%20edge%20*%2F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20SNVS_ConfigButton(SNVS_DRV_BTN_CONFIG_RISINGEDGE%2C%20SC_TRUE)%3B%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%2F*%20Init%20PMIC%20if%20not%20already%20done%20*%2F%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20pmic_init()%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20pad_force_mux(SC_P_SCU_GPIO0_00%2C%20%3CSTRONG%3E2%3C%2FSTRONG%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20SC_PAD_CONFIG_NORMAL%2C%20SC_PAD_ISO_OFF)%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20pad_force_mux(SC_P_SCU_GPIO0_01%2C%20%3CSTRONG%3E2%3C%2FSTRONG%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20SC_PAD_CONFIG_NORMAL%2C%20SC_PAD_ISO_OFF)%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20pad_force_mux(SC_P_SCU_GPIO0_02%2C%20%3CSTRONG%3E2%3C%2FSTRONG%3E%2C%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20%26nbsp%3B%20SC_PAD_CONFIG_NORMAL%2C%20SC_PAD_ISO_OFF)%3B%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%20%26nbsp%3B%20%7D%3C%2FP%3E%0A%3CP%3E%26nbsp%3BNote%3A%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EIn%20SCFW%2C%20should%20also%20set%26nbsp%3BSC_P_SCU_GPIO0_00%2C%26nbsp%3BSC_P_SCU_GPIO0_01%2C%26nbsp%3BSC_P_SCU_GPIO0_02%20to%20other%20functions%2C%20because%20they%20are%20set%20to%20GPIO0_0x%20function%20default%2C%20if%20two%20PINs%20set%20to%20the%20same%20functions%2C%20such%20as%26nbsp%3BSIM0_CLK_DMA%20pin%20and%26nbsp%3BSCU_GPIO0_00%20pin%20are%20set%20to%20GPIO0_00%20together%2C%20the%20function%20will%20not%20work%20correctly.%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3ETest%20commands%20in%20LInux%3A%3C%2FP%3E%0A%3CP%3Eecho%20480%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fexport%3CBR%20%2F%3Eecho%20481%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fexport%3CBR%20%2F%3Eecho%20482%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fexport%3C%2FP%3E%0A%3CP%3Eecho%20out%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fgpio480%2Fdirection%3CBR%20%2F%3Eecho%20out%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fgpio481%2Fdirection%3CBR%20%2F%3Eecho%20out%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fgpio482%2Fdirection%3C%2FP%3E%0A%3CP%3E%23output%20high%3CBR%20%2F%3Eecho%201%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fgpio480%2Fvalue%3CBR%20%2F%3Eecho%201%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fgpio481%2Fvalue%3CBR%20%2F%3Eecho%201%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fgpio482%2Fvalue%3C%2FP%3E%0A%3CP%3E%23measure%20the%20PINs%2C%20they%20are%20correct%20high%20%26nbsp%3B(%203V%20)%3C%2FP%3E%0A%3CP%3E%23output%20low%3CBR%20%2F%3Eecho%200%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fgpio480%2Fvalue%3CBR%20%2F%3Eecho%200%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fgpio481%2Fvalue%3CBR%20%2F%3Eecho%200%20%26gt%3B%20%2Fsys%2Fclass%2Fgpio%2Fgpio482%2Fvalue%3C%2FP%3E%0A%3CP%3E%23measure%20the%20PINs%2C%20they%20are%20correct%20low%20(%200V%20)%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3EThe%20test%20result%20is%20based%20on%20real%20measurement%20on%20iMX8QM%20MEK.%26nbsp%3B%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Rita_Wang_11-1763386260939.jpeg%22%20style%3D%22width%3A%20400px%3B%22%3E%3Cspan%20class%3D%22lia-inline-image-display-wrapper%22%20image-alt%3D%22Rita_Wang_11-1763386260939.jpeg%22%20style%3D%22width%3A%20300px%3B%22%3E%3Cimg%20src%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F365924iE1CD3CED4BE43D3F%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Rita_Wang_11-1763386260939.jpeg%22%20alt%3D%22Rita_Wang_11-1763386260939.jpeg%22%20%2F%3E%3C%2Fspan%3E%3C%2FSPAN%3E%0A%3CBR%20%2F%3E%0A%3CP%3ENote%3A%3C%2FP%3E%0A%3CP%3E1%5CIn%20customer's%20side%20If%20still%20not%20work%2C%26nbsp%3BTo%20confirm%20the%20issue%2C%20please%20suggest%20customer%20build%20SCFW%20with%20parameter%20%22-m%22%2C%20then%20use%20followed%20commands%20to%20dump%20the%20IOMUX%20registers%3A%3C%2FP%3E%0A%3CP%3Emd%200x41F80000%201%3CBR%20%2F%3Emd%200x41F80040%201%3CBR%20%2F%3Emd%200x41F80080%201%3C%2FP%3E%0A%3CP%3Emd%200x41F82140%201%3CBR%20%2F%3Emd%200x41F82180%201%3CBR%20%2F%3Emd%200x41F83000%201%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CP%3EThe%20%22md%22%20command%20should%20run%20from%20SCFW%20debug%20UART%2C%20not%20linux%2Fuboot%20UART.%3C%2FP%3E%0A%3CP%3E2%5CMake%20sure%20the%20hardware%20in%20customer's%20side%26nbsp%3BVDD_SIM0%20power%20should%20be%20supplied%20.%3C%2FP%3E%0A%3CBR%20%2F%3E%0A%3CBR%20%2F%3E%0A%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
3 weeks ago
Updated by: