Device Tree creation using PinMux

Forums Devices OSD335x-SM Device Tree creation using PinMux

Viewing 1 reply thread
  • Author
    Posts
    • #8570
      Mat Mat Mahermemaher
      Participant

        Hi,

        Can you advise on a workflow to generate a custom Device Tree directly using the TIPinMux output? This tool produces a .dtsi file with the correct pin allocation for my board, but I get a little lost between having the standard OSD335x device tree files and this pinmux file, trying to integrate them.

        Can’t help but think there should be a way to take a standard OSD335x CPU include file, the custom TI pinmux file, then a standard dts file to bring everything together?

        Mat

      • #8571
        Neeraj Kumar Reddy DantuNeeraj Dantu
        Moderator

          memaher,

          The pinmux tool generates a device tree include file that only sets the pin multiplexing for the pins.  This file can be included in the device tree source file for the board. You just have to fill out the incomplete structures in the source include file that the pinmux tool generated and make sure that all the correct pins are being grouped appropriately to be referenced in the peripheral node.

          In the device tree for the OSD3358-SM-RED, this pinmux setting is done as part of the board device tree source file. Note that the device tree file de-references the am33xx_pinmux node here: https://github.com/octavosystems/OSD335x-Device-Tree/blob/master/OSD3358-SM-RED/osd3358-bsm-refdesign.dts#L165 and sets up the hardware pin multiplexing similar to the output of the pinmux tool.

          Using the source include or making the hardware pin multiplexing part of the source file for the board are both valid ways to go about getting a device tree together. If you are starting with the osd3358-bsm-refdesign.dts and want to  use the source include file generated by the pinmux tool, you can include the file in your device tree source file, delete the reference to am33xx_pinmux node in the osd3358-bsm-refdesing.dts and make sure the appropriate pinmux nodes(from the source include file generated by pinmux tool) are referenced in the peripheral initialization nodes.

      Viewing 1 reply thread
      • You must be logged in to reply to this topic.