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.

run time configuration of pin mux settings

Hi All

 

This query is related to pin mux controlling at run time. We are using AM335x with SDK version 7.

 

As of now the pins are configured at kernel load time via the settings mentioned in the DTS file. We have a requirement to change configuration of a few pins while the board is up and running. These pins have multiple functions and we want to be able to switch between those functions. For this we require configuring the multiplexing mode, pullup/pulldown etc.

 

Is this possible? If so, what is the best possible way.

 

Thanks in advance for your help.

 

Thanks and Regards

Manbir Singh Jhawer

  • Hi Manbir,

    You can use devmem2 tool in linux to read/write to AM335x registers.

    Which modules pins would you like to reconfigure? Have in mind that if you are trying to change the muxing of pins used by currently running driver, you are most likely won't be able to. You need to modify the pinmux settings of pins that are not currently in use by your system.

    Best Regards,
    Yordan
  • Hi Yordan
    Thanks for your reply. We were able to hack one sysfs entry ( /sys/kernel/debug/pinctrl/44e10800.pinmux/pinconf-config ) to write into pinctrl driver. This entry is not fully implemented in the driver. So I guess no one uses this.
    And I agree with your driver suggestion. We had to unload the omap serial driver ( after making it a module ) for our solution work. The serial driver held the pins otherwise.
    Thanks and RegardsManbir Singh Jhawer