i.MX8QM GPIO Getting started

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

i.MX8QM GPIO Getting started

849 Views
johnbeckett_sp
Contributor I

Hi,

I'm using an imx8qm based carrier board which I would like to control M41_GPIO0_01 and M41_GPIO0_00.
How do I map M41_GPIO0 to a userspace "gpiochip"?

0 Kudos
Reply
3 Replies

825 Views
lydia_ziegler
NXP Employee
NXP Employee

Hi @johnbeckett_sp 

 

The QM RM should have the details you are looking for:

https://www.nxp.com/webapp/Download?colCode=IMX8QMRM

 

lydia_ziegler_0-1677677679492.png

 

Look at Chapter 9 for the Chip IO configuration.

As mentioned above, the SCFW actually owns the control so you will need to also review the changes required there.  See this guide:

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

 

SCFW porting kits can be downloaded here:

https://www.nxp.com/design/software/embedded-software/i-mx-software/embedded-linux-for-i-mx-applicat...

 

Thanks,

Lydia

 

 

 

 

0 Kudos
Reply

839 Views
lydia_ziegler
NXP Employee
NXP Employee

Hi, @johnbeckett_sp 

You probably want to familiarize yourself with the System Controller firmware and how it handles the signals.  Start here:

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

For your question, you can focus on the Resource Management service page for specifics.

Hope this helps,

Lydia

 

0 Kudos
Reply

829 Views
johnbeckett_sp
Contributor I

Hi @lydia_ziegler ,

I probably should have mentioned that this is a custom board, and I am not fully in control of the kernel or the image that it is running.

I've got the following register maps for the gpiochip devices from decompiling the dtb to a dts:
gpio0 = "/bus@5d000000/gpio@5d080000";
gpio1 = "/bus@5d000000/gpio@5d090000";
gpio2 = "/bus@5d000000/gpio@5d0a0000";
gpio3 = "/bus@5d000000/gpio@5d0b0000";
gpio4 = "/bus@5d000000/gpio@5d0c0000";
gpio5 = "/bus@5d000000/gpio@5d0d0000";
gpio6 = "/bus@5d000000/gpio@5d0e0000";
gpio7 = "/bus@5d000000/gpio@5d0f0000";


I've not been able to find a document that contains the map to show me which GPIO device is at which address, and also the details such as pull resister config.

0 Kudos
Reply