IMX6SL-EVK-PL reading/writing GPIO/kpp

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

IMX6SL-EVK-PL reading/writing GPIO/kpp

1,284 Views
moranmoran
Contributor III

Hello,

I'm working on the IMX6SL EVB.

using Kernel 3.10.53 and imx6sl-evk-pl.dtb.

I've several questions regarding read/write GPIO/KPP ( from user space ) :

1) After setting (export,direction ...) all needed in order to write / read from GPIO there are few that works and some that doesn't.

for example all the LCD_DATX works (read/write) while other like LED_DEBUG (HSIC_STROBE) that doesn't.

Where is the place that i can see the diffrent between them and how to enable the ones that dowsn't works.

2) Probably same question as above , just fucus on KPP.

i can see kernel prints of evbug while press on the push buttons , but i can't read them from user space.

3) what is the diffrent between Device tree pinctrl setting to the setting register in the imx6sl-pinfunc.h

for example (for the KEY_ROW0) in the device tree the setting is : 0x1b0b0

while in the header the setting is :  0x18C 0x494 0x754 0x0 0x0

what each configure ? 

Thanks in advance 

Moran.

Labels (1)
0 Kudos
8 Replies

1,035 Views
igorpadykov
NXP Employee
NXP Employee

Hi Moran

one can try to debug attaching jtag and checking gpio iomux registers or printf them.

For keypad understanding may be useful to look at attached baremetal sdk example

and description in Chapter 19 Configuring the Keypad Controller of pdf file.

diffrence between Device tree pinctrl setting (0x1b0b0) and the setting register in the imx6sl-pinfunc.h,

0x1b0b0 is pad control register value IOMUXC_SW_PAD_CTL_PAD_x.

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

0 Kudos

1,035 Views
moranmoran
Contributor III

Except using the JTAG to determine if some GPIO owned by kernel or not , is there any file such device tree or other way to see it the list of free GPIO.

Thanks.

0 Kudos

1,035 Views
igorpadykov
NXP Employee
NXP Employee
0 Kudos

1,035 Views
moranmoran
Contributor III

I've already saw it while searching over the net .... it still doesn't answer why i can use some pads as GPIO (read/write) while other not.

Thanks.

0 Kudos

1,035 Views
igorpadykov
NXP Employee
NXP Employee

Hi Moran

 

reason may be that these pins are used by some other modules.

Best regards
igor

0 Kudos

1,035 Views
moranmoran
Contributor III

Hello ,

Sorry for the late response.

- I've disable the KPP driver in the imx6sl-evk-common.dtsi dtsdevicetree ( change from okay to disable ).

- Now i don't get the evbug message each press on pushbutton.

- Still using sysFS (export,direction,value -in or out ) dosn't works with these IOs

-  Also i see that in /sys/kernel/debug/gpio that these IOs used by sysFS

GPIOs 64-95, platform/20a4000.gpio, 20a4000.gpio:
gpio-86 (2198000.usdhc cd ) in hi
gpio-88 (sysfs ) in lo
gpio-89 (sysfs ) in lo

What have i missed ? 

how to find which driver used them ?

Thanks in advance,

Moran.

0 Kudos

1,035 Views
moranmoran
Contributor III

thanks Igor for your response.

I'll read the Key chapter and review the SDK you've sent.

1) I'm still trying to undesrstand where i can see the GPIOs that i can read/write / or where i can see those who own by the Kernel and restricted to user space.

2) So if Device tree pinctrl setting is the IOMUXC_SW_PAD_CTL_PAD_x , what is the pad setting in the imx6sl-pinfunc.h ( the device tree use this header ).

thanks. 

0 Kudos

1,035 Views
igorpadykov
NXP Employee
NXP Employee

Hi Moran

imx6sl-pinfunc.h provides muxing options, while pinctrl setting in dts provides pad setting

Best regards
igor

0 Kudos