Accessing gipos on j1003 connector on imx8mnano evk

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

Accessing gipos on j1003 connector on imx8mnano evk

Jump to solution
398 Views
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 Kudos
Reply
1 Solution
359 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

You could try with os in python to use bash.

Best regards.

View solution in original post

0 Kudos
Reply
5 Replies
376 Views
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 Kudos
Reply
174 Views
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 Kudos
Reply
362 Views
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 Kudos
Reply
360 Views
JorgeCas
NXP TechSupport
NXP TechSupport

Hello,

You could try with os in python to use bash.

Best regards.

0 Kudos
Reply
284 Views
ravis
Contributor I
thanks, I was to do it using the metioned link
0 Kudos
Reply