Duovero Multiplexes

From Gumstix User Wiki
Revision as of 04:17, 19 November 2013 by Conor O'Rourke (Talk | contribs) (Page in progress...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This wiki entries concentrates on the Duovero Parlor board and the Multiplexes available from the 40 pin connector.

Error creating thumbnail: Unable to save thumbnail to destination

The ground pin is nearest the console connector port and the power pins are nearest the centre of the board. This is as of writing but it is highly recommended that you check before connecting! Use a voltmeter to check the 3.3V, 5V and 1.8V pins to familiarise yourself with the layout.

There are also two connections on the Parlor board:

OMAP Pin GPIO # Purpose
AG24 GPIO121 user push button
AH24 GPIO122 user LED

The primary reference for multiplexes and pin functions is the Texas Instruments OMAP4 technical reference manual. The primary source reference is in the Uboot code in duovero_mux_data.h. You should start your journey here.

Software Muxing

A helpful post from Phil Lutz describes how multiplexing can be explored without kernel recompilation. The default multiplex for the user LED may not be set to GPIO in Uboot. It certainly is not set to GPIO by the OMAP itself. You can look at the OMAP data manual on page 48 you can see that the official name for GPIO 122 pin is "abe_dmic_din3" (Mode 0 names are accepted pin names).

This information can also be found by searching for "gpio_122" in the board pinmuxing configuration stored in sysfs: /sys/kernel/debug/omap_mux/board/core. Every pin which can be configured as gpio has a hint about that.

So now just check which is the current pinmuxing configuration for this pin by:

$ cat /sys/kernel/debug/omap_mux/abe_dmic_din3 
name: abe_dmic_din3.abe_dmic_din3 (0x4a100116/0x116 = 0x0100), b ah24, t NA
mode: OMAP_PIN_INPUT | OMAP_MUX_MODE0
signals: abe_dmic_din3 | slimbus2_data | abe_dmic_clk2 | gpio_122 | NA | dmtimer9_pwm_evt | NA | safe_mode

As the output suggests, the pin is configured in MODE0, this is 'abe_dmic_din3'. The other modes are listed in order as they appear in the OMAP data manual. gpio_122 is multiplex MODE 3. You can set it with:

 $ echo 3 > /sys/kernel/debug/omap_mux/abe_dmic_din3

Now you can turn on and off the LED using the usual gpio configuration in /sys/class/gpio/ (google it!).

Parlor pin mux table

To assist in figuring out which pins on the Parlor board can be assigned to which duties, here's a table of functions:

Connector Description OMAP Pin Reset state Mode0 Mode1 Mode2 Mode3 Mode4 Mode5 Mode6 Mode7
User LED AH24 7, Z, Pulldown abe_dmic_din3 slimbus2_data abe_dmic_clk2 gpio_122 NA dmtimer9_pwm_evt NA safe_mode
Button AG24 7, Z, Pulldown abe_dmic_din2 slimbus2_clock abe_mcasp_axr gpio_121 NA dmtimer11_pwm_evt NA safe_mode

In progress...!