UART1 and UART2 not working although the overlay is loaded

Hi ,
I wanted to use the UART 1 and UART2 on my beaglebone running 4.19.94-ti-r50 kernel but I have the following error:
config-pin P9.24 uart
ERROR: open() for /sys/devices/platform/ocp/ocp:P9_24_pinmux/state failed, No such file or directory

version.sh shows:
*git:/opt/scripts/:[80d937707b4c91677fbacc2be59d6000c7bad008]*
*eeprom:[A335BNLT00C04414BBBK9123]*
*model:[TI_AM335x_BeagleBone_Black]*
*dogtag:[BeagleBoard.org Debian Buster LXQt Image 2020-08-25]*
*bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot SPL 2019.04-00002-gc9b3922522 (Aug 24 2020 - 16:42:18 -0500)]:[location: dd MBR]*
*bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2019.04-00002-gc9b3922522]:[location: dd MBR]*
*UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]*
*UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0]*
*UBOOT: Loaded Overlay:[BB-ADC-00A0.bb.org-overlays]*
*UBOOT: Loaded Overlay:[BB-UART1-00A0]*
*UBOOT: Loaded Overlay:[BB-UART2-00A0]*
*kernel:[4.19.94-ti-r50]*
*nodejs:[v10.24.0]*
*/boot/uEnv.txt Settings:*
*uboot_overlay_options:[enable_uboot_overlays=1]*
*uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/BB-UART1-00A0.dtbo]*
*uboot_overlay_options:[uboot_overlay_addr1=/lib/firmware/BB-UART2-00A0.dtbo]*
*uboot_overlay_options:[disable_uboot_overlay_emmc=1]*
*uboot_overlay_options:[disable_uboot_overlay_video=1]*
*uboot_overlay_options:[disable_uboot_overlay_audio=1]*
*uboot_overlay_options:[disable_uboot_overlay_wireless=1]*
*uboot_overlay_options:[uboot_overlay_pru=AM335X-PRU-RPROC-4-19-TI-00A0.dtbo]*
*uboot_overlay_options:[enable_uboot_cape_universal=1]*
*pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]*
*pkg:[bb-cape-overlays]:[4.14.20210821.0-0~buster+20210821]*
*pkg:[bb-customizations]:[1.20220119.0-0~buster+20220125]*
*pkg:[bb-usb-gadgets]:[1.20220112.3-0~buster+20220112]*
*pkg:[bb-wl18xx-firmware]:[1.20211222.2-0~buster+20211222]*
*pkg:[kmod]:[26-1]*
*pkg:[librobotcontrol]:[1.0.5-git20200715.0-0~buster+20200716]*
*pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]*
*groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal input bluetooth netdev i2c gpio admin spi iio docker tisdk weston-launch xenomai cloud9ide pwm eqep remoteproc]*
*cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]*
when trying adafruit lib  I got of course:
>>> import Adafruit_BBIO.UART as UART
>>> import serial
>>> UART.setup("UART1")
py_setup_uart(UART1): set_pin_mode() failed for pin=P9_26Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Set pin mode failed for uart channel.

What could be wrong here that I have the message:
cat: ‘/sys/devices/platform/ocp/ocp:P9_24_pinmux/state’: No such file or directory

Thanks in advance,

HI @malkowki since you loaded the overlays, you don’t need to use Adafruit_BBIO.UART, just call the usart normally thru python…

Regards,

Hi Robert,
Even when I using the following command I am getting error:
config-pin -q P9.24
ERROR: open() for /sys/devices/platform/ocp/ocp:P9_24_pinmux/state failed, No such file or directory

Here I am not using any Adafruit _BBIO_UART
.

What could be the issue then?

P9.26 96 fast rx 0 uart 1 rxd serial@48022000 (pinmux_bb_uart1_pins)
P9.24 97 fast 0 uart 1 txd serial@48022000 (pinmux_bb_uart1_pins)

They are already loaded…

*UBOOT: Loaded Overlay:[BB-UART1-00A0]*
*UBOOT: Loaded Overlay:[BB-UART2-00A0]*

The pins don’t need to be configured with config-pin… as they are already set as uarts…

Regards,