M4 pin mux problem

cancel
Showing results for 
Search instead for 
Did you mean: 

M4 pin mux problem

281 Views
Contributor IV

Hello,

we make project on i.MX8QXP platform,and camera and display add GPIO to control their power enable.

M4 need add the pin control,I add the pin config in pin_mux.c and pin_mux.h,but after the pin add M4 can not boot.

please give help,is there some guide to config GPIO in M4 size?

my code like below,I want to use this as GPIO function:

in head file

/* Camera960 (number A29), 1V8_EN */

#define BOARD_INITPINS_960_PWR18_EN_GPIO LSIO__GPIO4 /*!< GPIO device name: LSIO__GPIO4 */
#define BOARD_INITPINS_960_PWR18_EN_GPIO_PIN 30U /*!< LSIO__GPIO4 pin index: 30 */
#define BOARD_INITPINS_960_PWR18_EN_PIN_NAME ENET0_RGMII_TX_CTL /*!< Pin name */
#define BOARD_INITPINS_960_PWR18_EN_PIN_FUNCTION_ID SC_P_ENET0_RGMII_TX_CTL /*!< Pin function id */
#define BOARD_INITPINS_960_PWR18_EN_LABEL "960_PWR18_EN" /*!< Label */
#define BOARD_INITPINS_960_PWR18_EN_NAME "960_PWR18_EN" /*!< Identifier name */

/* EX_PWR_EN (number J31), CAM_DIS_1V1_EN */
#define BOARD_INITPINS_EX_PWR_EN_PERIPHERAL LSIO__GPIO0 /*!< GPIO device name: LSIO__GPIO0 */
#define BOARD_INITPINS_EX_PWR_EN_SIGNAL 16U /*!< LSIO__GPIO0 pin index: 16 */
#define BOARD_INITPINS_EX_PWR_EN_PIN_NAME SPI3_CS0 /*!< Pin name */
#define BOARD_INITPINS_EX_PWR_EN_PIN_FUNCTION_ID SC_P_SPI3_CS0 /*!< Pin function id */
#define BOARD_INITPINS_EX_PWR_EN_LABEL "EX_PWR_EN" /*!< Label */
#define BOARD_INITPINS_EX_PWR_EN_NAME "EX_PWR_EN" /*!< Identifier name */

in BOARD_InitPins()

 err = sc_pad_set_all(ipc, BOARD_INITPINS_960_PWR18_EN_PIN_FUNCTION_ID, 0U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_ENET0_RGMII_TX_CTL register modification value */
 if (SC_ERR_NONE != err)
 {
 assert(false);
 }

 err = sc_pad_set_all(ipc, BOARD_INITPINS_EX_PWR_EN_PIN_FUNCTION_ID, 0U, SC_PAD_CONFIG_NORMAL, SC_PAD_ISO_OFF, 0x0 ,SC_PAD_WAKEUP_OFF);/* IOMUXD_SPI3_CS0 register modification value */
 if (SC_ERR_NONE != err)
 {
 assert(false);
 }

Thanks

0 Kudos
6 Replies

8 Views
NXP TechSupport
NXP TechSupport

Hi Xu

some m4 pinmux examples can be found in

linux/arch/arm64/boot/dts/freescale/fsl-imx8qxp-mek-m4.dts

fsl-imx8qxp-mek-m4.dts\freescale\dts\boot\arm64\arch - linux-imx - i.MX Linux kernel 

and SDK_2.5.2_MEK-MIMX8QX. found on Welcome | MCUXpresso SDK Builder 

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

0 Kudos

8 Views
Contributor IV

Hello,

I can not find linux/arch/arm64/boot/dts/freescale/fsl-imx8qxp-mek-m4.dts this file in my code,
I want to the code example.

Thanks

0 Kudos

8 Views
NXP TechSupport
NXP TechSupport

Hello

it is in linux

linux-imx - i.MX Linux kernel 
Linux  Documentation
i.MX Software | NXP 

Best regards
igor

0 Kudos

8 Views
Contributor IV

Hello,

could u shared the file and how to modify SCFW about share GPIO between M4 and A core?

Thanks

0 Kudos

8 Views
NXP TechSupport
NXP TechSupport

please check documentation in SCFW Porting Kit

Best regards
igor

0 Kudos

8 Views
Contributor IV

hello,

Pls share linux/arch/arm64/boot/dts/freescale/fsl-imx8qxp-mek-m4.dts this file,I also not find it.

Thanks

0 Kudos