This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

omap 4460 uart4_rx switch to gpio155 output mode3 not working

I have Pandaboard ES Rev B2 and running Android 4.0 (AOSP). I try to do below jobs to switch pin UART4_RX to gpio155 'output' mode3, but it could not working, Why? (PS. If I try to setup it to be input gpio mode3 (0x11b), it will work properly, but could not work for input gpio mode3.)

cd /sys/kernel/debug/omap_mux

sudo echo 0x01b > uart4_rx

sudo cat uart4_rx

name: uart4_rx.uart4_rx (0x4a10015c/0x15c = 0x4100), b ag20, t NA
mode: OMAP_PIN_INPUT | OMAP_PIN_OFF_WAKEUPENABLE | OMAP_MUX_MODE0
signals: uart4_rx | sdmmc4_dat2 | kpd_row8 | gpio_155 | NA | NA | NA | safe_mode

 

  • Hello Steve,

    To change the mode of the ball AG20, it must be made some modifications in the PAD control registers. 

    Register CONTROL_CORE_PAD0_UART4_RX_PAD1_UART4_TX[2:0] UART4_RX_MUXMODE

    - Functional multiplexing selection for pad uart4_rx
    0x0: Select uart4_rx
    0x1: Select sdmmc4_dat2
    0x2: Select kpd_row8
    0x3: Select gpio_155    - Set 0x3 in the bit-field, to use gpio155.
    0x7: Select safe_mode

    Or: Name: uart4_rx.uart4_rx (0x4a10015c/0x15c = 0x4103), b ag20, t NA

    To configure gpio_155 as output, it must be set following:

    CONTROL_CORE_PAD0_UART4_RX_PAD1_UART4_TX[10] UART4_RX_ OFFMODEOUTENABLE  - OffMode mode output enable value for pad uart4_rx. This is an active low signal
    0x0: Output enable
    0x1: Output disable

    CONTROL_CORE_PAD0_UART4_RX_PAD1_UART4_TX[11] UART4_RX_OFFMODEOUTVALUE - OffMode mode output value for pad uart4_rx
    0x0: Set value at 0
    0x1: Set value at 1

    I suggest you using the PAD configuration tool for OMAP4460, it will help you to configure easier PADs in OMAP4460 - OMAP4460 Pad Configuration Tool (v1.1.0.3)

    See the listed files and apply the necessary modifications:

    - arch/arm/mach-omap2/mux44xx.c

    - arch/arm/mach-omap2/mux44xx.h

    - arch/arm/mach-omap2/mux.c

    - arch/arm/mach-omap2/mux.c

    See the following functions in mux.c -


    static int __init omap_mux_mode_gpio(struct omap_mux_partition *partition, u16 mode)

    static inline void omap_mux_decode(struct seq_file *s, u16 val)

    Best regards,

    Yanko