Cannot reconfigure pins to gpio

55 views
Skip to first unread message

Zeph

unread,
Jan 14, 2020, 5:06:42 PM1/14/20
to BeagleBoard
Hi I'm fairly new to embedded linux development and I've been stuck on this problem for quite some time so any help would be greatly appreciated.

I am using a BeagleBoneBlack Wireless with Ubuntu 18.04 and Linux Kernel 4.14.108-ti-r113.

i need to reconfigure the pins that are not by default gpio. For example P8_46 pin which is by default an LCD_Data pin. 

When using the BBB with a debian stretch image I can use those pins as gpio. However, when I use my ubuntu distro, those pins will not work as gpio. When I try and reconfigure the pins using the config-pin utility I get this error:

P8_46 pinmux file not found!
bash
: /sys/devices/platform/ocp/ocp*P8_46_pinmux/state: No such file or directory
Cannot write pinmux file: /sys/devices/platform/ocp/ocp*P8_46_pinmux/state


I have tried following numerous tutorials online with no luck. I have looked into using device tree overlays but I always get stuck because there is no slots file in this path:

/sys/devices/platform/bone_capemgr/slots

This slots file doesn't exist and so I can never proceed.

Note: I need to be running the ubuntu distro.

Please help. Thanks!

Alexander Zangerl

unread,
Jan 14, 2020, 5:24:00 PM1/14/20
to beagl...@googlegroups.com
On Tue, 14 Jan 2020 12:52:01 -0800, Zeph writes:
>i need to reconfigure the pins that are not by default gpio. For example
>P8_46 pin which is by default an LCD_Data pin.

by default the lcd pins are assigned to/used by the hdmi framer, as per the
system reference manual.

>When using the BBB with a debian stretch image I can use those pins as
>gpio. However, when I use my ubuntu distro, those pins will not work as
>gpio. When I try and reconfigure the pins using the config-pin utility I
>get this error:
>
>P8_46 pinmux file not found!

to make these pins available for other purposes you'll need
to disable hdmi, using "disable_uboot_overlay_video=1" in uEnv.txt.

see for example:
https://github.com/beagleboard/linux/issues/139
and not quite as directly related:
https://github.com/beagleboard/bb.org-overlays/issues/76

>This slots file doesn't exist and so I can never proceed.

the slots stuff is long gone, you need to convince your uboot (via uEnv.txt)
to load the relevant overlays.
see https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays for
a little bit of explanation.

>Note: I need to be running the ubuntu distro.

you may have to update your uboot version to make the u-boot overlay stuff
work properly, but otherwise there shouldn't be any big differences
between ubuntu and debian that are relevant for your specific situation.


--
Best Regards,
Alexander Zangerl
IT Engineer

BREATHE-SAFE intelligent cabin air filtration
Keeps your lungs and cabin dust free!
290 Beatty Road, Archerfield QLD 4108 Australia,
Tel: +61 7 3276 7833 M. +61 415 482 341 E. a...@breathe-safe.com

Zeph

unread,
Jan 14, 2020, 9:05:50 PM1/14/20
to BeagleBoard
Thank you so much! This cleared up a lot of confusion for me and I was able to get things working. 
Reply all
Reply to author
Forward
0 new messages