How to convert gpio group + IO pin to gpio number of linux on i.MX8

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

How to convert gpio group + IO pin to gpio number of linux on i.MX8

2,992件の閲覧回数
kevinpwchen
Contributor II

Hi Sir,

As I knew, we can use below rule to convert gpio pin of i.MX6 to GPIO number.

(GPIO group x 32) + pin number = GPIO number of linux

Is it the same as i.MX8? It seems not the same. For example:

GPIO4_IO19 is gpio-371 of linux.

Do you know why?

Best regards

Kevin

0 件の賞賛
返信
1 返信

2,509件の閲覧回数
weidong_sun
NXP TechSupport
NXP TechSupport

Hello, Kevin,

   >>Is it the same as i.MX8?

yes, iMX8MQ's GPIOs are same as those of i.MX6. You can check "arch/arm/mach-imx/hardware.h" .

For example GPIO4_19, should be (4-1)x32 + 19 =115.

Have a nice day!

Regards,

NXP TIC weidong sun

0 件の賞賛
返信