cancel
Showing results for 
Search instead for 
Did you mean: 

How do we access GPIO port Z registers through devmem?

Dat Tran
Senior II

We can use devmem to read/write all gpio port registers except for portZ.

We know this port relates to secure. is there any way to remove secure feature on this port so we can use devmem on this port?

Thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Dat Tran
Senior II

I got it working,

The was because I did not enable GPIOZ in RCC_MP_AHB5ENSETR.

View solution in original post

3 REPLIES 3

What chip are you talking about?

JW

Dat Tran
Senior II

Hi, STM32MP151AAC3

we are using SPL uboot see that uboot already have these code.

/* GPIOZ: deactivate the security */

writel(BIT(0), RCC_MP_AHB5ENSETR);

writel(0x0, GPIOZ_SECCFGR);

We also use " /sys/class/gpio/" and turn on /off PZ5 just fine. But use devmem to read 0x54004000 which is portZ base then system crashed.

Dat Tran
Senior II

I got it working,

The was because I did not enable GPIOZ in RCC_MP_AHB5ENSETR.