Accessing gipos on j1003 connector on imx8mnano evk

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

Accessing gipos on j1003 connector on imx8mnano evk

ソリューションへジャンプ
552件の閲覧回数
ravis
Contributor I

Hi, I am trying to blink an led connected to EXP_IO9 pin on j1003 connector on imx8mnano evk.

I have followed kernal device tree configuration in the following linkhttps://variwiki.com/index.php?title=MX8M_GPIO .

I have found gpio definition #define MX8MN_IOMUXC_GPIO1_IO09_GPIO1_IO9 in imx8mn-pinfunc.h and added the definition MX8MN_IOMUXC_GPIO1_IO09_GPIO1_IO9  in the iomuxc node edited arch/arm64/boot/dts/freescale/fsl-imx8mn-evk.dtsi, for verifying whether the correct .dtsi file I have edited "yellow:status" default led on imx8mn evk to "yellow1:status" and done bitbake imx-image-multimedia then flashed the image in imx8mnano evk. Then checked the gpioinfo command but there "yellow:status" is not changed to "yellow1:status", tried gpioset gpiochip1 9=0/1 and gpioget gpiochip1 9, but there is no change in status its always '1'.

I would like to know whether the above approach is correct ?..if no suggest the approach to access the gpio's on j1003 pin header

 

0 件の賞賛
返信
1 解決策
513件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

You could try with os in python to use bash.

Best regards.

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
530件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

 

You can use the GPIO on our demo image without modify the device tree.

 

The GPIO pins of RPI connector are connected to a I2C port expander on I2C3.

 

JorgeCas_0-1715100833256.png

Using gpioinfo you can see it on gpiochip5:

 

JorgeCas_1-1715100833259.png

EXP_IO9 is on line 11 and you need to use the next command:

 

gpioset -c gpiochip5 11=1

or

gpioset -c gpiochip5 11=0

 

JorgeCas_2-1715100833267.jpeg

Also, this link could be helpful.

 

Best regards.

 

0 件の賞賛
返信
328件の閲覧回数
nandlol
Contributor I

Hello @JorgeCas , 

 

may ask you where you find this information "EXP_IO9 is on line 11" please?

I don't find the relation between EXP_IO9 and (gpiochip5, line 11)

Regards

0 件の賞賛
返信
516件の閲覧回数
ravis
Contributor I

Hello Jorge,

Thanks for the post, I followed it and able to control the led on j1003 with gpioset commands. I would like to know the procedure by writing a recipe c code to control led  for the same gpio(EXP_IO 09). I have added the c code mentioned in the link mentioned  by you and done bitbake, but getting errors. can you suggest the procedure to control led in c or python(tried to install python libgpiod package but failed with errors). 

0 件の賞賛
返信
514件の閲覧回数
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

You could try with os in python to use bash.

Best regards.

0 件の賞賛
返信
438件の閲覧回数
ravis
Contributor I
thanks, I was to do it using the metioned link
0 件の賞賛
返信