GPIO Pin output

Hi Robert,

GPIO3_21 (GPIO_117) is on P9_25:
image

I configured it as output. But toggling the value from 0 <=> 1 , P9_25 is measured as 3.2V fixed.
GPIO3_19 (GPIO_115) on P9_27 works and toggles as expected.

Did I miss anything for GPIO_117, such as pin mux mode? or there is a possible hardware issue?

Thank You,
David

Hi Robert,

I tested on the BeagleBone Black Wireless: ( Kernel Version: 4.19.50-ti-r20 ).
GPIO3_19 (GPIO_115) on P9_27 toggles from 0 1 to as output
GPIO3_21 (GPIO)117) on P9_25 doesn’t toggle from 0 to 1 as output.

It seems gpio pin driver (kernel) or pin mapping having some issues?

Thank you,
David

Please show me the show-pins.pl dump:

debian@bbb-pwr01-ser09:~$ sudo /opt/scripts/device/bone/show-pins.pl  | grep '9.25\|9.27'
P9.27                            105 C13 fast rx down 7 gpio 3.19        ocp/P9_27_pinmux (pinmux_P9_27_default_pin)
P9.25 / audio osc                107 A14 fast rx  up  0 asp 0 tx hclk    mcasp@48038000 (mcasp0_pins)

I got an error when run show-pins.pl

debian@beaglebone:/opt/scripts/device/bone$ sudo ./show-pins.pl
[sudo] password for debian:
Can’t locate Inline/Files.pm in @INC (you may need to install the Inline::Files module) (@INC contains: /etc/perl /usr/local/lib/arm-linux-gnueabihf/perl/5.28.1 /usr/local/share/perl/5.28.1 /usr/lib/arm-linux-gnueabihf/perl5/5.28 /usr/share/perl5 /usr/lib/arm-linux-gnueabihf/perl/5.28 /usr/share/perl/5.28 /usr/local/lib/site_perl /usr/lib/arm-linux-gnueabihf/perl-base) at ./show-pins.pl line 11.
BEGIN failed–compilation aborted at ./show-pins.pl line 11.

Best Regards,
David

Install libinline-files-perl

sudo apt update
sudo apt install libinline-files-perl

Regards,

Now I got:
Can’t open /sys/kernel/debug/pinctrl/4a003400.pinmux/pinmux-pins: No such file or directory at /opt/scripts/device/bone/show-pins.pl line 61.

Regards,
David

in that folder:
image

regards,
david

since you don’t have libinline-files-perl, your version of that perl script is old…

cd /opt/scripts/
git pull

Regards,

I did git pull, now I got:
Can’t open /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins: No such file or directory at /opt/scripts/device/bone/show-pins.pl line 61.

I pasted image previously. The file is 44e10800.pinmux-pinctrl-single, which seems not the same as script expected.

David

Can you run: git rev-parse HEAD so we can see what version of the repo is at…

debian@bbb-pwr03-ser11:/opt/scripts$ git rev-parse HEAD
e4e4854ef8ff9ada5c85553376043ee7679167

That directory was changed in v4.19.x, the script was updated…

debian@bbb-pwr03-ser11:~$ uname -r
4.19.94-ti-r58
debian@bbb-pwr03-ser11:~$ cd /sys/kernel/debug/pinctrl/
debian@bbb-pwr03-ser11:/sys/kernel/debug/pinctrl$ ls -lha
total 0
drwxr-xr-x  4 root root 0 Jan  1  1970 .
drwxr-xr-x 42 root gpio 0 Jan  1  1970 ..
drwxr-xr-x  2 root root 0 Jan  1  1970 44e10800.pinmux-pinctrl-single
drwxr-xr-x  2 root root 0 Jan  1  1970 44e3e000.rtc
-r--r--r--  1 root root 0 Jan  1  1970 pinctrl-devices
-r--r--r--  1 root root 0 Jan  1  1970 pinctrl-handles
-r--r--r--  1 root root 0 Jan  1  1970 pinctrl-maps
debian@bbb-pwr03-ser11:/sys/kernel/debug/pinctrl$ sudo /opt/scripts/device/bone/show-pins.pl  | grep '9.25\|9.27'
P9.27                            105 C13 fast rx down 7 gpio 3.19        ocp/P9_27_pinmux (pinmux_P9_27_default_pin)
P9.25 / audio osc                107 A14 fast rx  up  0 asp 0 tx hclk    mcasp@48038000 (mcasp0_pins)

git reverse HEAD returns different ID:
46d33928c4a396ef472829bcf22761546e550a6f

I think I am ok. I can propose hardware designer to move the pin into a different gpio pin.

Best Regards,
David

That means your version of /opt/scripts/ is here: Jun 20, 2019

show pins was patched for v4.19.x on July 8, 2019…

So yeah…

run, git pull with a active network connection…

cd /opt/scripts/
git pull

Regards,

Here is the result:
P9.27 105 C13 fast rx down 7 gpio 3.19 ocp/P9_27_pinmux (pinmux_P9_27_default_pin)
P9.25 / audio osc 107 A14 fast rx up 0 asp 0 tx hclk mcasp@48038000 (mcasp0_pins)

Best Regards,
David

They are the same as your posted.

Regards,
David

Hi Robert,

P9_25 (GPIO3_21) is connected to OSC output, so it is not to be used as GPIO, right? But on our boards, I have removed R110, which disconnects GPIO3_21 from OSC output. But it still cannot be toggled in out board. I didn’t remove R110 on the BBBw, and didn’t try that way.

I am planning to move it to GPIO3_16. That will resolve it.

Best Regards,
David

From that line, we see that P9.25 is configured for audio usage…

So disable hdmi-audio, and then you access the pin thru userspace…

https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Disable_on-board_devices

Regards,

Hi Robert,

That works and is simple. Super! Thank you very much!

Best Regards,
David