read / get the OMAP PIN MUX status in user space

Dear all,

Please forgive my noise, if there is already a answer somewhere in the
list! But, I just can not find the precise and easy way to do that.

I am working on a OMAP4 processor and used u-boot to configure the PIN
MUX (PIN MUX is disabled in the kernel), but except for the original u-
boot source file, I can not get the actual status of the PIN registers
after the system boot.

Showing the actual PIN MUX status in use space is obviously a very
useful feature. Do anyone have a idea?

Many thanks,
Hans

Hi Hans,

Please forgive my noise, if there is already a answer somewhere in the
list! But, I just can not find the precise and easy way to do that.

here is very nice guide for configuring PINMUX and working with PWM for OMAP3:

Hope this helps,
Maksym.

Hi Hans,

Without a driver for PIN MUX controller, the only way to get what you
want is to access physical memory.

You can either use devmem2 or roll your own script to use /dev/mem for
that purpose.

kel

Not exactly what your asking for but For OMAP3, there's a kernel
driver that can set the mux from userspace. The driver will print the
current status after setting the mux.

frank

Forgot to add the link:

https://github.com/ftagius/OMAP-cmpc

Thanks to Maksym, Kel and Frank!

It turns out the devmem2 is a very efficient tool to monitor (so far I
have not changed the value on the fly) the PIN MUX settings of OMAP.

For those who need to reading the setting very often, I composed a
script that takes the register offset address(es) and show the setting
values for OMAP4430:

https://github.com/embedded-open/readpinmux

Please be aware that the base address and the interpretation of the
readouts in this scrip are based on the Technical Manual for OMAP4430
Version Z (SWPU231Z). To use it for the OMAP3 processor, you need to
update the base address and the interpretation part of the script
(according to the technical manual). Anyway, the hex and binary value
of the register settings are in the output.