query: ubuntu: 3.8.5-bone11: pin mux

For Ubuntu 12.10, Kernel:3.8.5-bone11,

Any pointers as to where the userspace mux sysfs entry is located on
3.8 kernel now.

On 3.2 kernel equivalent is here:
/sys/kernel/debug/omap_mux/

regards
randy

For Ubuntu 12.10, Kernel:3.8.5-bone11,

Any pointers as to where the userspace mux sysfs entry is located on
3.8 kernel now.

On 3.2 kernel equivalent is here:
/sys/kernel/debug/omap_mux/

/sys/kernel/debug/pinctrl/44e10800.pinmux

But, it isn't writable, so you'll need to use devicetree overlays.
pinmux-helper and capemgr are there to help do that on-the-fly without
having to install another driver to make the pinctrl calls. Here's an
example:

https://github.com/jadonk/validation-scripts/tree/master/test-capemgr

For Ubuntu 12.10, Kernel:3.8.5-bone11,

Any pointers as to where the userspace mux sysfs entry is located on
3.8 kernel now.

On 3.2 kernel equivalent is here:
/sys/kernel/debug/omap_mux/

/sys/kernel/debug/pinctrl/44e10800.pinmux

But, it isn't writable, so you'll need to use devicetree overlays.
pinmux-helper and capemgr are there to help do that on-the-fly without
having to install another driver to make the pinctrl calls. Here's an
example:

https://github.com/jadonk/validation-scripts/tree/master/test-capemgr

Thanks will give it a try today.

Thanks again.

For Ubuntu 12.10, Kernel:3.8.5-bone11,

Any pointers as to where the userspace mux sysfs entry is located on
3.8 kernel now.

On 3.2 kernel equivalent is here:
/sys/kernel/debug/omap_mux/

/sys/kernel/debug/pinctrl/44e10800.pinmux

But, it isn't writable, so you'll need to use devicetree overlays.
pinmux-helper and capemgr are there to help do that on-the-fly without
having to install another driver to make the pinctrl calls. Here's an
example:

https://github.com/jadonk/validation-scripts/tree/master/test-capemgr

Wow so much going on to just change a pin mux.
Something looks over engineered to me here.

Looks i might be better off to just do a raw register write to mux
registers after mmap to userspace. Will that work?

For Ubuntu 12.10, Kernel:3.8.5-bone11,

Any pointers as to where the userspace mux sysfs entry is located on
3.8 kernel now.

On 3.2 kernel equivalent is here:
/sys/kernel/debug/omap_mux/

/sys/kernel/debug/pinctrl/44e10800.pinmux

But, it isn't writable, so you'll need to use devicetree overlays.
pinmux-helper and capemgr are there to help do that on-the-fly without
having to install another driver to make the pinctrl calls. Here's an
example:

https://github.com/jadonk/validation-scripts/tree/master/test-capemgr

Wow so much going on to just change a pin mux.
Something looks over engineered to me here.

Looks i might be better off to just do a raw register write to mux
registers after mmap to userspace. Will that work?

Nope. :frowning:

As far as I know, the kernel won't let you write to those registers
after mmap()ing them. There is this attempt to get the kernel to
manage the pinmuxes through the pinctrl API. It is in a rather
frustrating stage of development.

For Ubuntu 12.10, Kernel:3.8.5-bone11,

Any pointers as to where the userspace mux sysfs entry is located on
3.8 kernel now.

On 3.2 kernel equivalent is here:
/sys/kernel/debug/omap_mux/

/sys/kernel/debug/pinctrl/44e10800.pinmux

But, it isn't writable, so you'll need to use devicetree overlays.
pinmux-helper and capemgr are there to help do that on-the-fly without
having to install another driver to make the pinctrl calls. Here's an
example:

https://github.com/jadonk/validation-scripts/tree/master/test-capemgr

Wow so much going on to just change a pin mux.
Something looks over engineered to me here.

Looks i might be better off to just do a raw register write to mux
registers after mmap to userspace. Will that work?

Nope. :frowning:

Registers like GPIO are mmap'd and work well.
Any reason why mux control register behave differently then?

As far as I know, the kernel won't let you write to those registers
after mmap()ing them.

Any particular reason?

There is this attempt to get the kernel to
manage the pinmuxes through the pinctrl API. It is in a rather
frustrating stage of development.

Looks things are still in preliminary state then.

Jason

For Ubuntu 12.10, Kernel:3.8.5-bone11,

Any pointers as to where the userspace mux sysfs entry is located on
3.8 kernel now.

On 3.2 kernel equivalent is here:
/sys/kernel/debug/omap_mux/

/sys/kernel/debug/pinctrl/44e10800.pinmux

But, it isn't writable, so you'll need to use devicetree overlays.
pinmux-helper and capemgr are there to help do that on-the-fly without
having to install another driver to make the pinctrl calls. Here's an
example:

https://github.com/jadonk/validation-scripts/tree/master/test-capemgr

Wow so much going on to just change a pin mux.
Something looks over engineered to me here.

Looks i might be better off to just do a raw register write to mux
registers after mmap to userspace. Will that work?

Nope. :frowning:

I am able to mmap() the mux register base address.
From userspace i can also read the value.

ptr = mmap(NULL, 0x1FFF, flags, MAP_SHARED, m_fd, 0x44E10000);

Read of *ptr returns correct value for any valid register for pin mux.
But *ptr = 0 is not able to write to reflect a zero.

Any reason why this does not work?

Thats what i did if u look at this thread:

"3.8 kernel: support legacy pin mux"