Hello,
Under Linux 3.0.101, I was able to modify GPIO mode, read and writes by locating the pin mux, exporting, setting pin direction and value. For instance, under 3.0.101 I could script:
#locate correct pin
grep gpio_102 /debug/omap_mux/*
#check mux setting
cat /debug/omap_mux/cam_d3
#modifiy mux for general GPIO
echo 0x4 > /debug/omap_mux/cam_d3
#export pin
echo 102 > /sys/class/gpio/export
#set pin as output
echo out > /sys/class/gpio/gpio102/direction
#Set pin driver level
echo 0 > /sys/class/gpio/gpio102/value
Under the Mainstream Linux (4.4.y), I found it necessary to first enable the debugfs using
mount -t debugfs none /sys/kernel/debug/
However, because of changes in underlying Linux architecture, I'm no longer able to modifiy the GPIO modes. The /sys/kernel/debug/omap_mux directory contains only an empty directory called board,
Explicitly, I need to modify GPIO_103 (cam_d4), GPIO_102 (cam_d3), GPIO_96 (cam_xclka), and GPIO_94 (cam_hs) modes as GPIO OUTPUT on the Mainstream Linux to drive some external logic. Note, appropriate SOM hardware R-Packs had already been modified for use under 3.0.101.
Do you have any suggestions, references or resources that might help me?
-William