resource partition to share GPIO3 between A35 and M4

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

resource partition to share GPIO3 between A35 and M4

599 Views
xiaokaoy
Contributor I

Hello.

I'm using i.MX8DualX. Some GPIO3 pins will be accessed by A35 and the other GPIO3 pins by M4. My wrote some code in board_system_config for that like this

 

BRD_ERR(rm_assign_resource(pt_boot, pt_sh, SC_R_GPIO_3));
BRD_ERR(rm_set_peripheral_permissions(pt_sh,
SC_R_GPIO_3, pt_boot, SC_RM_PERM_FULL));
BRD_ERR(rm_set_peripheral_permissions(pt_sh,
SC_R_GPIO_3, pt_m4_0, SC_RM_PERM_FULL));

 

I also moved those pads for M4 to the M4 partition:

BRD_ERR(rm_set_pad_movable(pt_boot, SC_P_QSPI0B_SCLK,
SC_P_COMP_CTL_GPIO_1V8_3V3_QSPI0B, SC_TRUE));

 

but it doesn't work.

0 Kudos
3 Replies

587 Views
igorpadykov
NXP Employee
NXP Employee

Hi xiaokaoy

 

according to description below:

"Pads and resources CANNOT BE SHARED there is no mechanism to protect the
pads and resources from contention, if access to a resource is required by multiple
partitions a virtual resource needs to be created, in this way the partition that requires
access asks the partition that owns the resource to configure/use
the resource on its behalf. See the VIRT_I2C example on the Linux BSP. "

https://community.nxp.com/t5/i-MX-Processors-Knowledge-Base/System-Controller-Firmware-101-Resource-...

 

https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/i2c/busses/i2c-rpmsg-imx.c?h=imx_5...

 

Best regards
igor

0 Kudos

562 Views
xiaokaoy
Contributor I

Thanks for your reply.

Do you mean that it is impossible to share GPIO3 even if A35 and M4 only access their respective groups of GPIO3 pins? e.g. A35 only accesses GPIO3_IO01/02/03 while M4 only accesses GPIO3_IO04/05/06? 

0 Kudos

543 Views
igorpadykov
NXP Employee
NXP Employee

Hi xiaokaoy

 

unfortunately such examples are not available.

 

Best regards
igor

0 Kudos