GPIO proper addressing

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

GPIO proper addressing

871 Views
lukaszprzeniosl
Contributor II

Hello there,

For a while now I am trying to configure some GPIO's on the T1040 platform through a DTS file. I have learned recently, that pinmuxing is done in the RCW file, instead of the DTS file, which makes things a little easier to understand now. Still, I think there is some misconception in the GPIO modules numbering. In the datasheet, one can find this table:

pastedImage_1.png

While when one looks in the Linux kernel sources, one can find GPIO's numbered not from 1 to 4, but from 0 to 3...

pastedImage_2.png

So in the dts file, If I intend to address this physical pin:

pastedImage_3.png

Do I refer to GPIO2?

I would appreciate all help.

Tags (3)
0 Kudos
Reply
1 Reply

797 Views
Pavel
NXP Employee
NXP Employee

You are right, Linux kernel uses own GPIO's numbering.

Attached file contains .dts file from NXP SDK 2.0-1703 for the T1040RDB board.

 

Look at the following page about using mpc8xxx_gpio.c driver:

https://stackoverflow.com/questions/3458782/how-to-use-mpc8xxx-gpio-c-device-driver


Have a great day,
Pavel Chubakov

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

0 Kudos
Reply