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.

8148 MCA[4]_AXR[1] set t o GPIO in kernal not working?

8148 ipnc rdk3.5

I want set MCA[4]_AXR[1]  to GPIO.

I debug the code in arch/arm/mach-omap2/device.c,

omap2_init_devices()

 omap_mux_init_signal("mcasp4_axr1.gpio0_24_mux1", TI81XX_MUX_MODE7 | TI814X_PULL_UP);
 omap_mux_init_signal("mcasp5_aclkx.gpio0_25_mux1",TI81XX_MUX_MODE7 | TI814X_PULL_UP);

my trace :

omap_mux_init_signal: Setting signal mcasp4_axr1.gpio0_24_mux1 0x0001 -> 0x20087
omap_mux_init_signal: Setting signal mcasp5_aclkx.gpio0_25_mux1 0x0001 -> 0x20087

but the Voltage on GPIO24,GPIO25 is low;

my question:

   1.  I think the problem maybe  mux pin setting on GPIO24,GPIO25 failed.

  2.  How can  I set mux pin to GPIO on kernal ?

Look forwards for your answer!!!!

  • Hi Yue,

    What is the value of the PINCNTL54 (addr 0x481408D4) register after kernel boot up? You can check it with the devmem2 tool. With the default kernel I have the value of 0x000C0001:

    root@dm814x-evm:~# devmem2 0x481408D4
    /dev/mem opened.
    Memory mapped at address 0x40282000.
    Read at address  0x481408D4 (0x402828d4): 0x000C0001

    The wiki page that explain pinmux is:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_User_Guide#TI814X.2FTI813X

    I have modified linux-kernel/arch/arm/mach-omap2/board-ti8148evm.c as below:

    #ifdef CONFIG_OMAP_MUX
    static struct omap_board_mux board_mux[] __initdata = {
        TI814X_MUX(MCASP4_AXR1, (OMAP_MUX_MODE7 | TI814X_PULL_UP)), /* gpio0_24_mux1 */
        { .reg_offset = OMAP_MUX_TERMINATOR },
    };

    Thus with this new kernel, I have:

    root@dm814x-evm:~# devmem2 0x481408D4
    /dev/mem opened.
    Memory mapped at address 0x40254000.
    Read at address  0x481408D4 (0x402548d4): 0x00020080

    Which means that GP0[24] signal is selected on this physical pin (J4) with pull-up enable.

    BR
    Pavel

  • thanks for your reply first.

    root@dm814x-evm:~# devmem2 0x481408D4            
    /dev/mem opened.
    Memory mapped at address 0x4031f000.
    Read at address  0x481408D4 (0x4031f8d4): 0x00020080

    but J4 still not pull-up...

    There are other reasons may?

  • Yue,

    yue gu1 said:
    but J4 still not pull-up...

    Please check:

    1. Check if you have external pull down resistor attached to J4

    2. Check if you have external device connected to the J4 pin, which drives it low (in TI EVM, J4 is connected to expansion connector)

    3. Check if you are aligned with the below wiki page:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_GPIO_Driver_User_Guide

    Set GPIO24 pin as output and set its output to 1.

    4. Check DM814x Silicon errata, Advisory 2.1.88. You can set bit 19 like below:

    TI814X_MUX(MCASP4_AXR1, (OMAP_MUX_MODE7 | TI814X_PULL_UP | TI814X_SLEW_SLOW)), /* gpio0_24_mux1 */

    Thus you should have the value of 0x000A0080. Try with this value also.

    5. Check DM814x Silicon errata, Advisory 2.1.87. You can set bit 18 like below:

    TI814X_MUX(MCASP4_AXR1, (OMAP_MUX_MODE7 | TI814X_PULL_UP | TI814X_SLEW_SLOW | TI814X_INPUT_EN)), /* gpio0_24_mux1 */

    Thus you should have the value of 0x000E0080. Thus J4 pin is bidirectional. Try with this value also.

    Regards,
    Pavel

  • thanks for your answer first.

    the setting is ok.

  • Yue,

    yue gu1 said:
    the setting is ok.

    Do you mean you have fix it (high level on J4 pin)?

    BR
    Pavel

  • thanks again for your answer.

    I fixed it with your help.

    It's due to my evm board question.