Android 5.0.2 GPIO

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 
1,995件の閲覧回数
kamilbystryk
Contributor III

I'm trying set 1 input (GPIO 5.12) and one output (GPIO 1.18) on i.MX6 Solo. What exatly i should set on *.dtsi file, to get GPIO access on sys/class/gpio?

0 件の賞賛
返信
1 解決策
1,740件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi Kamil,

In this case, you could use as reference the thread below:

DTS tree changes to access GPIO from linux on IMX6SL-EVK Board


Hope this will be useful for you.
Best regards!
/Carlos

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

元の投稿で解決策を見る

0 件の賞賛
返信
4 返答(返信)
1,740件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi Kamil,

You could refer to the following thread, which provides tips regarding GPIO usage on Android:

How do I map Android GPIO to actual i.MX6 hardware pins


Hope this will be useful for you.
Best regards!
/Carlos

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

0 件の賞賛
返信
1,740件の閲覧回数
kamilbystryk
Contributor III

Hello Carlos,

This link shows how to use defined GPIO. I know how use GPIO when he shows in /sys/class/gpio path, however I don't have idea how configure GPIO in kernel (what in resul give access in class/gpio).

I found some configuration in *.dtsi file, but i don't know how configure specific lines.

0 件の賞賛
返信
1,741件の閲覧回数
CarlosCasillas
NXP Employee
NXP Employee

Hi Kamil,

In this case, you could use as reference the thread below:

DTS tree changes to access GPIO from linux on IMX6SL-EVK Board


Hope this will be useful for you.
Best regards!
/Carlos

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

0 件の賞賛
返信
1,740件の閲覧回数
kamilbystryk
Contributor III

Hello Carlos.

At now, i can correctly add GPIO to filesystem, however i can't use GPIO as output (input works fine).

I define GPIO as:
MX6QDL_PAD_DISP0_DAT18__GPIO5_IO12 0x17059

I think, problem is in 0x17059 definition, but i don't know what is this "magic number"?

Second question - where i can put code to automaticly export and set GPIO at startup?

0 件の賞賛
返信