Hello,
I try to access GPIO on pin P9_12 from python script using Adafruit_GPIO package, the pin is not available for use. Python script complains about missing file:
ValueError: Set gpio mode failed, missing file or invalid permissions.
config-pin does not see it either:
$ sudo config-pin P9_12 gpio
P9_12 pinmux file not found!
bash: /sys/devices/platform/ocp/ocpP9_12_pinmux/state: No such file or directory
Cannot write pinmux file: /sys/devices/platform/ocp/ocpP9_12_pinmux/state
What works is exporting GPIO 60 through sys fs, and reading its value from /sys/class/gpio/gpio60/value
With cape removed python script and config-pin work as expected. According to the documentation, the cape does not use this GPIO, so it should not be reserved.
Here’s output from version.sh:
$ sudo /opt/scripts/tools/version.sh
git:/opt/scripts/:[e307a944e0be0610ff5296e0abe4ad31a6e70daa]
eeprom:[A335BNLTBWA51645BBWG0580]
model:[TI_AM335x_BeagleBone_Black_Wireless]
dogtag:[BeagleBoard.org Debian Image 2017-08-01]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.07-00002-g61c3ee0fb5]:[location: dd MBR]
kernel:[4.14.21-bone-rt-r13]
nodejs:[v4.8.7]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg:[bb-cape-overlays]:[4.4.20180223.0-0rcnee0~jessie+20180223]
pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee2~jessie+20180104]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~jessie+20170830]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal netdev i2c bluetooth cloud9ide gpio pwm admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[ 0.889759] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[ 0.890749] gpio-of-helper ocp:cape-universal: ready
END
Regards,
Jacek.