imx8ulp m33 core gpio

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

imx8ulp m33 core gpio

7,866 Views
tangchao90
Contributor III

my dts configure is:

rpmsg_gpioa: gpio@0 {
compatible = "fsl,imx-rpmsg-gpio";
port_idx = <0>;
gpio-controller;
#gpio-cells = <2>;
#interrupt-cells = <2>;
interrupt-controller;
interrupt-parent = <&rpmsg_gpioa>;
status = "okay";
};

and when the system start , i do the command below

gpioget -c gpiochip0 0

[ 1387.700991] gpio_rpmsg virtio0.rpmsg-io-channel.-1.4: rpmsg not ack 1!
gpioget: unable to request lines: Invalid argument

I sure the gpiochip0 is the gpioa, 

how  can I control the m33 gpio?

Labels (1)
0 Kudos
Reply
27 Replies

1,645 Views
wendy-liu
Contributor II

Hello @Zhiming_Liu 

    According to your suggestion, I add some configutation in 

voidBOARD_SetTrdcGlobalConfig(void) as below:
        /* non secure state can access lpuart2(PBridge2 slot 11, T-MBC3) for eDMA0 */
        mbcBlockConfig.memoryAccessControlSelect = TRDC_MBC_ACCESS_CONTROL_POLICY_ALL_INDEX;
        mbcBlockConfig.nseEnable                 = true; /* non secure state can access the block for eDMA0 */
        mbcBlockConfig.mbcIdx                    = 3U;   /* MBC3 */
        mbcBlockConfig.domainIdx                 = TRDC_DMA0_DOMAIN_ID; /* MBC2_DOM0 */
        mbcBlockConfig.slaveMemoryIdx            = 0U;                  /* MBC3_DOM0_MEM0 */
        mbcBlockConfig.memoryBlockIdx            = 11U;                 /* MBC3_DOM0_MEM0_BLK_CFG_W11 */
        TRDC_MbcSetMemoryBlockConfig(TRDC, &mbcBlockConfig);
 
But the result is that I don't read reg of LPUART2[PCC_REG(
kCLOCK_Lpuart2). It means the Peripheral is not present...
Is there any new information on this?Looking forward to your reply!
0 Kudos
Reply

1,702 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

For the default m33 binary(power mode switch demo), this demo only register these two pins in sdk.

Zhiming_Liu_0-1744076490985.png

Linux side test:

Zhiming_Liu_1-1744076503152.png

You need register any gpios in sdk manually.



Best Regards,
Zhiming

0 Kudos
Reply

1,684 Views
tangchao90
Contributor III

hello 

    Great, i can do it also! 

    "gpioget -c gpiochip1 5" can work well

    "gpioset -c gpiochip1 5=1" but this command is blocked, I don't know why

0 Kudos
Reply

1,648 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hello,

This gpio is setting as interrput pin for touchscreen in GPIOB_INT0_IRQHandler. If you need to test m33 rpmsg gpio setting, please register another unused pin in app_srtm.c


Best Regards,
Zhiming

0 Kudos
Reply

1,594 Views
tangchao90
Contributor III

我的SDK版本信息 <ksdk:manifest xmlns:ksdk="http://nxp.com/ksdk/2.0/ksdk_manifest_v3.0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="SDK_2.x_MIMX8UD7xxx08" name="MIMX8UD7xxx08" brief="This is SDK version 24.12.00 manifest file. It describes the content of the MIMX8UD7xxx08 and additional settings for tools that support SDK version 24.12.00" format_version="3.15" api_version="2.0.0" configuration="bfc65bba44094a9ec982e114485cebdd" xsi:schemaLocation="http://nxp.com/ksdk/2.0/ksdk_manifest_v3.0.xsd http://nxp.com/mcuxpresso/sdk/sdk_manifest_v3.15.xsd">

0 Kudos
Reply

1,597 Views
tangchao90
Contributor III

hello Zhiming

    i have a try, i use the demo of  boards/evkmimx8ulp/driver_examples/rgpio/led_output

i change the GPIOE6 to GPIOC0, the gpio may be taking turns to shine,but it's not! 

diff --git a/boards/evkmimx8ulp/driver_examples/rgpio/led_output/cm33/app.h b/boards/evkmimx8ulp/driver_examples/rgpio/led_output/cm33/app.h
index 6589748..c7857db 100644
--- a/boards/evkmimx8ulp/driver_examples/rgpio/led_output/cm33/app.h
+++ b/boards/evkmimx8ulp/driver_examples/rgpio/led_output/cm33/app.h
@@ -11,8 +11,8 @@
* Definitions
******************************************************************************/
/*${macro:start}*/
-#define BOARD_LED_RGPIO GPIOE
-#define BOARD_LED_RGPIO_PIN 6U
+#define BOARD_LED_RGPIO GPIOC
+#define BOARD_LED_RGPIO_PIN 0U
/*${macro:end}*/

/*******************************************************************************
diff --git a/boards/evkmimx8ulp/driver_examples/rgpio/led_output/cm33/pin_mux.c b/boards/evkmimx8ulp/driver_examples/rgpio/led_output/cm33/pin_mux.c
index b87442f..485879e 100644
--- a/boards/evkmimx8ulp/driver_examples/rgpio/led_output/cm33/pin_mux.c
+++ b/boards/evkmimx8ulp/driver_examples/rgpio/led_output/cm33/pin_mux.c
@@ -82,7 +82,7 @@ BOARD_InitLedPins:
*
* END ****************************************************************************************************************/
void BOARD_InitLedPins(void) { /*!< Function assigned for the core: Cortex-M33[cm33] */
- IOMUXC_SetPinMux(IOMUXC_PTE6_PTE6, 0U);
+ IOMUXC_SetPinMux(IOMUXC_PTC0_PTC0, 0U);
}

0 Kudos
Reply

1,573 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

我这边验证过了,需要修改atf,把GPIOC的时钟打开。

plat/imx/imx8ulp/imx8ulp_bl31_setup.c

	mmio_write_32(0x28091000 + 0xbc, 0xc0000000);
	mmio_write_32(0x28820010, 0xffffffff);
	mmio_write_32(0x28820014, 0x3);
	mmio_write_32(0x28820018, 0xffffffff);
	mmio_write_32(0x2882001c, 0x3);

 

Zhiming_Liu_0-1744261178942.png

 

0 Kudos
Reply