Search code examples
device-treebeagleboard

Beaglebone AI - Pinmuxing vout-pins for PRU usage


I am trying to configure a pinmux on the BBAI to use the UART from the PRU's. I am running Debian buster with 4.14.108-ti-r131 kernel.

This is part of my device tree overlay:

&cape_pins_default {
   pinctrl-single,pins = <
     DRA7XX_CORE_IOPAD( 0x3614, PIN_OUTPUT | MUX_MODE10 ) // P8.31a PRU1 TX
     DRA7XX_CORE_IOPAD( 0x3610, PIN_INPUT  | MUX_MODE10 ) // P8.33a PRU1 RX
     DRA7XX_CORE_IOPAD( 0x35E4, PIN_INPUT  | MUX_MODE10 ) // P8.43 PRU0 UART RX
     DRA7XX_CORE_IOPAD( 0x35E8, PIN_OUTPUT | MUX_MODE10 ) // P8.44 PRU0 UART TX
   >;
};

In BBBlack you need to disable HDMI or EMMC for some PRU pins, I tried it like so in /boot/uEnv.txt:

disable_uboot_overlay_video=1
disable_uboot_overlay_emmc=1

Is this also valid on the BBAI? The show-pins script after fiddling and rebooting for quite a while now still states MUX_MODE0 and some vout... function (I assume this is some HDMI thing?)

P8.31a                   133   C8 0 slow         vout1_d14
P8.33a                   132   C6 0 slow         vout1_d1
P8.43                    121  F10 0 slow         vout1_d2
P8.44                    122  G11 0 slow         vout1_d3

Is there anything more I need to setup or that I missed? Thanks in advance!


Solution

  • I found out, that after reinstalling the BBAI image, that on the clean image, HDMI was disabled. For making the device-tree overlay I used the am5729-beagleboneai.dts and defined a custom dtb= in /boot/uEnv.txt as a base, which was the problem, because it enabled HDMI.

    Extending the default overlay - which is am572x-bone-common-univ.dtsi - or by loading a pru overlay in the uEnv.txt file did the trick for me. There are plenty of examples for pru overlays for the BBAI in the beagleboards repo linked above, so I went with that.

    uname_r=4.19.94-ti-r68
    #dtb=
    
    enable_uboot_overlays=1
    uboot_overlay_pru=src/arm/overlays/BBAI-PR1_UART0.dtb