Hello,
I am trying to access the GPIOs from the OEM OS, but I am not sure how the numbers in the Hardware User Manual are mapped in the OS. Is there a list somewhere that spells this out? For a concrete example, I am trying to make GPIO-II (GPIO_78) an output to enable a mezzanine board part. However, in /sys/class/gpio, it looks like I can only access GPIO 1056 up to GPIO 1100 or so.
Thank you,
Chris
From a little bit of testing, it looks like if you add 1100 to the target GPIO number that will get you the correct GPIO. For my example where I am looking for GPIO-78, the OS number is 1178.
Let me know if this is correct.
Thank you,
Chris
Hi Chris,
The GPIO-II is mapped to GPIO78 in confiuration, it might be used for camera, I will checki it.
From dev list , these gpios could be used
HI
sh-4.4# cd /sys/kernel/debug
sh-4.4# cat gpio
You will see these:
gpiochip0: GPIOs 1100-1279, parent: platform/f000000.pinctrl, f000000.pinctrl:
gpio0 : in low func0 2mA pull down
gpio1 : out low func0 2mA pull down
The base address is 1100, so for gpio 78, you can use 1178 to export it.
sh-4.4# echo 1178 > export
sh-4.4# ls -l
total 0
--w------- 1 root root 4096 Jan 28 15:59 export
lrwxrwxrwx 1 root root 0 Jan 28 15:59 gpio1178 -> ../../devices/platform/soc/f000000.pinctrl/gpiochip0/gpio/gpio1178
Please try it.
Thanks
Kevin