Not able to access gpio on imx8m nano lpd4 evk

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

Not able to access gpio on imx8m nano lpd4 evk

2,453 Views
abrar_maniyar
Contributor I

Hi Team,

 I am using imx8m nano lpd4 Evk, Linux image 5.4-Zeus.

In that, I am trying to access the Gpio pins of j1003 and control it over user space

how can I configure and use those pins as a Gpio?

can you please share the steps for that?

 

Thanks and Regards,

Labels (1)
0 Kudos
Reply
7 Replies

2,431 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @abrar_maniyar,

Could you please provide me with the GPIOs that you want to access?

One can try with the device tree pin muxing to configure those GPIOs as the ALT of GPIO function and use it in the userspace.

 

Thank you.
Best regards,
Dhruvit.

0 Kudos
Reply

2,429 Views
abrar_maniyar
Contributor I

hi @Dhruvit 

Now from  /sys/ I can handle the Gpio but I am not getting how I can do it from the device tree/kernel space,

can you please share the steps like:

1. how can I find the specific pin from the pin function.h file.

2. how to add a node in dts, want to blink led from kernel space.

quite confused due to the i2c expander.

 

Thanks and Regards,

0 Kudos
Reply

2,426 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @abrar_maniyar,

Could you please provide me with the GPIOs that you want to access?

0 Kudos
Reply

2,424 Views
abrar_maniyar
Contributor I

hi @Dhruvit 

want to access EXP_IO10, which is connected to 15 pin of J1003.

 

Thanks and Regards,

0 Kudos
Reply

1,652 Views
Sivananda
Contributor II

Hi, are you able to access gpio pins on j1003. can you tell the procedure to access gpios on j1003 connector

0 Kudos
Reply

2,411 Views
abrar_maniyar
Contributor I

Hi @Dhruvit 

Any update?

0 Kudos
Reply

2,406 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @abrar_maniyar,

To use it from the kernel space, one can write a custom driver to access the particular GPIO(i.e., in your case, it is EXP_IO10). And access it with gpio cansleep APIs, as the EXP_IO10 is connected to the I2C Expander on the i.MX8MN.

 

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

 

Thank you.
Best regards,
Dhruvit.

0 Kudos
Reply