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.

AM437x PRU device tree settings

Other Parts Discussed in Thread: SYSBIOS, AM4372

HI,

Ive to start with writing DTS for AM437X IDK.

Im looking at AM437X IDK datasheet, memory mapping inAM437X TRM, am43xx_idkevm_pinmux_data.c, idkevm_config as source of information to write the DTS.

However, Im not able understand how to include pinmux setting for PRUSS 0/1 and PRU HW controller information in the DTS.

Also Im not able to configure the pins G20, D25 for PRU 0 and A12, D24 pins for PRU 1 using pin-mux tool.

Kindly help in this regard.

Rohit.

  • The software team have been notified. They will respond here.
  • Hi Rohit,

    For pinmuxing the pins as PRU0/1, you can refer to arch/arm/boot/dts/am437x-idk-evm.dts search for PRU in the file.
    For the other configuration, there is a pretty extensive example in Documentation/devicetree/bindings/net/ti-prueth.txt & Documentation/devicetree/bindings/ti,pruss-remoteproc.txt.

    Best Regards,
    Yordan
  • Hi Yordan,

    am437x-idk-evm.dts doesnt have pinmuxing for PRUs. I got it done through pinmux tool.
    Documentation/devicetree/bindings/net/ti-prueth.txt helped and Im able to configure both PRUs now.

    Also, can you provide me some information/pointers about how I can start writing a dts from the scratch for TI boards? like how to choose the control modules and how I can configure the hardware interfaces?
    I have done currently using a combination of pinmux tool, schematic, IDK HW user guide and TRM.

    But I would like to know how to exactly choose the control modules and hardware interfaces for configuration.

    Besides also in the dts, how to set the default value pin? Im calculating the pin-set values using sysBIOS sdk. 

    For example, for UART0,

    /* SysBIOS SDK */

    {

    /* My UART 1 -> uart0_rxd -> K25 */
    PIN_UART0_RXD, 0, \
    ( \
    PIN_MODE(0) | \
    ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \
    (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN))
    ) \
    }

    In the dts, the value can be translated to:

     pinctrl-single,pins = <
    0x970 0x13070000 /* uart0_rxd */

    calculating ((PIN_PULL_UP_EN | PIN_RX_ACTIVE | PIN_DS_VALUE_OVERRIDE_EN | PIN_DS_OP_DIS | PIN_DS_PULL_UP_EN) & \

    (~PIN_PULL_UD_DIS & ~PIN_DS_OP_VAL_1 & ~PIN_DS_PULL_UD_EN & ~PIN_WAKE_UP_EN)) is a bit tiring. So, is there a way around?

    Rohit.

  • Hi Rohit,

    Besides also in the dts, how to set the default value pin?


    If you check the dts file, you'll see that am437x dts files inlcude the am4372.dtsi and the following headers:
    <dt-bindings/pinctrl/am43xx.h>
    you will see what is the value behind each of the macros used in your dts file.

    Best Regards,
    Yordan