Accessing GPIO in imx6

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

Accessing GPIO in imx6

4,921件の閲覧回数
sameerarvikar
Contributor III

I want to change value of GPIO1_25  (phy_reset)

but following error comes

root@var-som-mx6:~# echo 25 > /sys/class/gpio/export
-sh: echo: write error: Device or resource busy

What should i do to change the value of phy reset pin

Following is current status

root@var-som-mx6:~# cat /sys/kernel/debug/gpio
GPIOs 0-31, platform/209c000.gpio, 209c000.gpio:
gpio-6 (cd ) in lo
gpio-25 (phy-reset ) out lo
gpio-28 (usb_h1_vbus ) out lo

GPIOs 32-63, platform/20a0000.gpio, 20a0000.gpio:

GPIOs 64-95, platform/20a4000.gpio, 20a4000.gpio:

GPIOs 96-127, platform/20a8000.gpio, 20a8000.gpio:
gpio-101 (tlv320aic3x reset ) out lo
gpio-111 (usb_otg_vbus ) out lo
gpio-121 (Menu ) in hi
gpio-122 (Back ) in hi

GPIOs 128-159, platform/20ac000.gpio, 20ac000.gpio:
gpio-139 (Home ) in hi

GPIOs 160-191, platform/20b0000.gpio, 20b0000.gpio:
gpio-178 (sysfs ) out lo

GPIOs 192-223, platform/20b4000.gpio, 20b4000.gpio:
gpio-200 (wlan-en-regulator ) out lo

Thanks and Regards

ラベル(5)
タグ(2)
0 件の賞賛
返信
1 返信

2,410件の閲覧回数
Carlos_Musich
NXP Employee
NXP Employee

Hi sameerarvikar,

most likely the gpio is being used by another driver, in this case no other driver can access to the gpio. You can look into the devi tree file (.dts) and look which module is using this pin. Then you can comment or delete the line where the pin is being initialized within such module and after rebuilding the dtb file you may be able to use it as a gpio.


Best regards,
TIC

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

0 件の賞賛
返信