Google Groups

Re: GPIO use


Prajwal Upadhya Apr 20, 2012 6:29 PM
Posted in group: pandaboard
Hi,
 We are trying to set the GPIO135 available on the (pin 18)J3
expansion
header. We have deployed the android ice cream sandwich on the panda
board.

 For this we have added the line "OMAP4_MUX(MCSPI1_SOMI,
OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT)" in the struct omap_board_mux
board_mux[] of board-omap4panda.c.

 This struct contains all the pin mux configurations. This change does
not seem to let us control the status (High/Low) of the pin. We were
wondering if anybody could point out the extra changes (if any) that
need to be done in order to configure the pin as an output pin.

Also, when we do a cat /sys/kernel/debug/gpio we see this.

GPIOs 0-31, gpio:
 gpio-0   (DVI PD              ) out hi
 gpio-1   (hub_power           ) out hi

GPIOs 32-63, gpio:
 gpio-39  (nfc_int             ) in  lo
 gpio-41  (hdmi_gpio_ls_oe     ) out hi
 gpio-43  (vwl1271             ) out hi
 gpio-46  (kim                 ) out hi
 gpio-60  (hdmi_gpio_hpd       ) out hi
 gpio-62  (hub_nreset          ) out hi
 gpio-63  (?                   ) in  lo

GPIOs 64-95, gpio:

GPIOs 96-127, gpio:
 gpio-127 (audpwron            ) out lo

GPIOs 128-159, gpio:
 gpio-134 (nfc_firm            ) in  lo
 gpio-135 (nfc_ven             ) in  lo

GPIOs 160-191, gpio:

The pin (GPIO135) is registered as an input pin instead as an output
pin as configured by the mux configuration mentioned earlier. We are
not sure y this is happening. It would be very helpful if anyone can
guide us.

On Mar 26, 9:11 pm, David Anders <danders....@gmail.com> wrote:
> samsounda,
>
> please review the docs on compile linux kernel for pandaboard.
>
> Dave
>
> On Mar 26, 10:14 pm, samsounda...@gmail.com wrote:
>
>
>
>
>
>
>
> > I am having the same problem. I changed the files as you mentioned but what
> > do I do from here? How do I get the file compiled and installed?
>
> > On Wednesday, March 14, 2012 2:14:40 PM UTC-5, qua...@gmail.com wrote:
>
> > > *Mux probably means "Pins Multiplexing"*
>
> > > see:* *http://elinux.org/BeagleBoardPinMux
>
> > > Details of OMAP35x PinMux can be found in OMAP35x Applications Processor
> > > TRM <http://www.ti.com/lit/ug/spruf98u/spruf98u.pdf> (spruf98u.pdf) in
> > > section *7.4.4.3 Pad Multiplexing Register Fields* (page 782)
>
> > > I created initalization part forGPIO. When I tried to showGPIOstatus
> > > via "cat /sys/kernel/debug/gpio" I saw this:
>
> > > GPIOs 32-63,gpio:
>
> > >gpio-32 (pandaboard_exp_menu ) in hi
>
> > >gpio-33 (pandaboard_exp_volup) in hi
>
> > >gpio-36 (pandaboard_exp_power) in hi
>
> > >gpio-37 (pandaboard_exp_voldw) in lo
>
> > >gpio-38 (pandaboard_exp_back ) in lo
>
> > > I was not able to controlgpio-37 andgpio-38 (low state).
>
> > > If you have some similar problem with addressing ofGPIOyou must add some
> > > snipped to board-omap4panda.c file.*
> > > *
>
> > >  find (board-omap4panda.c):
>
> > > #ifdef CONFIG_OMAP_MUX
>
> > > static struct omap_board_mux board_mux[] __initdata = {
>
> > >  and append code like this:
>
> > >  * */**GPIOExpansion board */
>
> > > // AD12 -GPIO36 - HOME
>
> > > OMAP4_MUX(GPMC_AD12, OMAP_PIN_INPUT | OMAP_MUX_MODE3),
>
> > > // AD08 -GPIO32 - MENU
>
> > > OMAP4_MUX(GPMC_AD8, OMAP_PIN_INPUT | OMAP_MUX_MODE3),
>
> > > // AD14 -GPIO38 - BACK
>
> > > OMAP4_MUX(GPMC_AD14, OMAP_PIN_INPUT | OMAP_MUX_MODE3),
>
> > > // AD09 -GPIO33 - VOLUME_UP
>
> > > OMAP4_MUX(GPMC_AD9, OMAP_PIN_INPUT | OMAP_MUX_MODE3),
>
> > > // AD13 -GPIO37 - VOLUME_DOWN
>
> > > OMAP4_MUX(GPMC_AD13, OMAP_PIN_INPUT | OMAP_MUX_MODE3),
>
> > > Note: This snipped is from my configuration for chipsee expansion board.