This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

BEAGLEBOARD-X15: Changing pinmux configuration

Part Number: BEAGLEBOARD-X15
Other Parts Discussed in Thread: AM5728

My engineering team and I are working with a BeagleBoard-X15 and plan on gathering sensor data through the pins mapped to the SPI and UART pins on the onboard AM5728 processor. We also plan on getting data through the USB ports and sending data out from some GPIO pins.

I'm not too experienced with microprocessor systems, but my team and I were looking through the BeagleBoard's pin layout diagram and found each pin on the board that we'd like to use. However, as I understand it, each of the BeagleBoard's pins are mapped to multiple AM5728 pins, and the pinmux must be configured so that the processor is prepared to receive signals to a specific pin (Please correct me if that was inaccurate or incorrect). I wanted to know how exactly this can be done, and where in the Debian Linux system the configuration files should be.

Here is the BeagleBoard's pin information: https://docs.google.com/spreadsheets/d/1mSqEpV_BAUHfeNApytxHcGhgTZwypy564GyOr66Nphs/edit?usp=sharing

An example of what we're doing:

In the spreadsheet at the link above, if you look in the BBX15 tab, near the top there is a pin labeled GPIO4_17 that outputs from the pin P16.03 on the BeagleBoard. On the right side of the spreadsheet, it says this can be used as the mcasp 0 d11, mcasp 5 tx fs, mcasp 5 rx fs, spi 2 cs0, etc. We would like to use this pin for its spi 2 cs0 function. How should we go about ensuring that the processor will take SPI data into that pin?

I'd greatly appreciate any help you could give! I also have questions about whether certain Python libraries will work to interface with the pins on this particular board, but I'll put details in a follow-up if allowable. Thanks!

  • Hi Ben,

    Your understanding is correct. Each one pin can play different role depending on muxmode configuration. For example you search for gpio4_14 in Datasheet Table 4.2 at:
    www.ti.com/.../am5728.pdf
    The pin role can be configured on Linux site in the board specific device tree file.
    The linked below resources will help you to configure specific pin roles like SPI or UART:
    processors.wiki.ti.com/.../Processor_SDK_Linux_UART
    processors.wiki.ti.com/.../Processor_SDK_Linux_SPI
    Note, addresses in the examples are processor specific. They can be different for your processor. The proper values can be found in the datasheet.
    Also refer to kernel documentation about pin configuration:
    git.ti.com/.../omap-spi.txt
    The Python libraries should use these configs when the Linux device tee is set properly.

    BR
    Tsvetolin Shulev
  • Thank you for those resources.

    From the datasheet, I now know exactly what muxmodes I want certain pins in, but I'm still unsure as to where and how these get edited.

    In the file with the kernel documentation about pin configuration, there are no pin addresses, so I'm not sure how it's talking to certain pins.

    In the file system on our board, I found the folder /sys/kernel/config/device-tree. It also has an empty folder called "overlays" inside of it. Is this where a device tree file would go? And what should these files be called? I also still don't understand exactly what should be in these files - the script doesn't make sense to me, as again it does not refer to pins or pin addresses.

  • Ben,

    You can find pin description and muxmode role in am5728 datasheet:
    www.ti.com/.../am5728.pdf
    The device tree file (.dtb file) must be in /rootfs/boot/ foder.

    BR
    Tsvetolin Shulev
  • Thank you again. I was able to edit the .dtb file and ended up seeing some spidev folders (I'm working with SPI devices) appear where they should. However, I'm having a problem compiling with certain settings in the .dtb

    Online, there is already a thread involving some of this: e2e.ti.com/.../1803945

    However, when I use the syntax:

    mcspi4_pins: pinmux_mcspi4_pins {
    pinctrl-single,pins = <
    0x344 (PIN_INPUT_PULLUP | MUX_MODE2)
    0x348 (PIN_INPUT_PULLUP | MUX_MODE2)
    0x34c (PIN_OUTPUT_PULLUP | MUX_MODE2)
    0x350 (PIN_OUTPUT_PULLUP | MUX_MODE2)
    >;
    };

    or anything with those parentheses after the 0x3XX, I get an "unable to parse input tree" error.

    I only got it to compile in this syntax that I saw elsewhere:

    mcspi4_pins: pinmux_mcspi4_pins {
    pinctrl-single,pins = <
    0x344 0x02
    0x348 0x02
    0x34c 0x02
    0x350 0x02
    >;
    };

    But I'm still not reading any signals out on those pins. I'm afraid that that 0x02 isn't actually touching the muxmode of the pins.