Project

General

Profile

How to change the pinmux

Added by Spencer Mayott over 11 years ago

I am working with a MityDSP L138 on a custom baseboard, and am having trouble figuring out how to modify the pinmux settings. The board I am using re-purposes a lot of the I/O lines for different uses than on the industrial IO board, but I cannot find where I can modify the pinmux.

Also, how are the gpios mapped to the /sys/class/gpio directory in linux? In the industrial io schematics, the gpio lines are labeled like GP0_4 or GP2_12, but in linux they are just labeled gpio8 or gpio34. Is there some correlation like GPX_[Y] means gpio controller chip x and the Y gpio on that chip? I am using linux 2.6.34 from the MDK_2011-03-31.

Thanks,
Spencer Mayott


Replies (1)

RE: How to change the pinmux - Added by Tim Iskander over 11 years ago

Spencer
u-boot does the initial pinmux setup, look in board/davinci/mityomapl138/mityomapl138.c
The kernel then sets its own pinmux settings, see arch/arm/mach-davinci/baseboard-industrialio.c for the industiral I/O board.

For the GPIOs, you need to take the bank and offset number and create the actual gpio number from that.
Each bank has 32 (IIRC) GPIOs, so the linux gpio # would be bank*32 + offset [GPIO 1_3 = 1*32 + 3 = 35]

cheers
/Tim

    (1-1/1)
    Go to top
    Add picture from clipboard (Maximum size: 1 GB)