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.

TMDX654IDKEVM: Device tree overlays

Part Number: TMDX654IDKEVM

Hi,

How could i dynamically load and unload the device tree overlays for am65x Linux platform to configure the PRU pins?

Best Regards,

Jerry

  • Hello Jerry,

    Do you want to load device tree overlays during Uboot, during Linux runtime, or at another time?

    Tell me more about why you want dynamic configuration of PRU pins.

    Regards,

    Nick

  • Hi Nick,

    My working environment is A53 running Linux and use the PRU as real-time control .  Now in the PRU part, i am  using the ICSSG PRU GPO and GPI and pwm output.   The GPO and GPI can be accessed by  R30 and R31. but need to be initialized in Linux device tree.  It is right?

    I do not want to change the AM65X EVM Device Tree directly. Instead i want to use the device tree overlays to do the initialize things.  For the load time, Uboot or Linux, both are ok for me. I prefer Linux runtime as convenient for debug.

    Best Regards,

    Jerry

  • Hello Jerry,

    Initializing PRU GPO / GPI signals

    You only need to initialize resources that Linux uses in the device tree. Since the PRU is the core driving signals to and from PRU GPO and GPI pins, Linux does not need to do any specific initialization for those signals.

    Do note that the PRU cannot modify registers that require elevated permissions, so the PRU will not be able to set up pinmuxing for the GPO and GPI signals. The ARM core must set up the pinmuxing. Another thing to note is that the PRU GPO value is not automatically set on initialization. That means you cannot know if the GPO signal will be high or low until you directly program the GPO value to be low or high.

    If your application is ok with not knowing the output value on the GPO pin during boot, then you can just set pinmuxing in the Linux device tree. Linux will set up pinmuxing, and for a short while the GPO value will be undefined until Linux loads the PRU firmware and the PRU sets the GPO value. If you must have a known value on the GPO pins at all times, let me know and we can work from there.

    Device Tree Overlays 

    At this point in time, TI only supports selecting device tree overlays during uboot. I can point you to more resources if you have additional questions.

    Regards,

    Nick