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.

Toggling GPMC_AD12 high and low

Hi to all,

Could any one let me know is it necessary to make GPIO_AD12 high or low we have to set GPIO_OE? And above all under which submodule GPIO_AD12 comes like if we talk about GPIO-64 has GPIO3 as module.

Thanks 

Siddarth

  • Hello Siddarth,

    At first, could you explain us more about your hardware and software platforms with OMAP4?

    As I can understand from your question: You want to configure GPMC_AD12 pad as GPIO. Am I right?

    To configure GPMC_AD12 as GPIO_36, you must change muxmode settings of this pad. In other words you must set 0x3 value in bit-field of  CONTROL_CORE_PAD0_GPMC_AD12_PAD1_GPMC_AD13[2:0] GPMC_AD12_MUXMODE
    Functional multiplexing selection for pad gpmc_ad12
    0x0: Select gpmc_ad12
    0x1: Select kpd_col0
    0x2: Select c2c_data11
    0x3: Select gpio_36
    0x5: Select sdmmc1_dat4

    Best regards,

    Yanko

  • Hi Yanko,

    Sorry for delay.

    And thanks for the reply. After reviewing your answer I studied T.R.M of omap4460 section 25 for GPIO and done the following things to configure gpio_36 high or low

    1. Configured the appropriate pad-mux register as 0x3 with physical address as 0x4A100058 as mentioned in T.R.M of omap4460 as __raw_writew(0x3,0x4A100058);
    2. Enabled the GPIO module: after going through T.R.M I found that gpio_36 lies under gpio module 2 and also gpio_36 is the fifth GPIO of GPIO2 module. (Kindly confirm it). and to enable GPIO module 2 I had set the modulemode field in the register CM_L4PER_GPIO2_CLKCTRL with physical address 0x4A009460 using __raw_writel(0x5,0x4A009460);
    3. Set the GPIO as an output: by setting GPIO_OE register __raw_writel(0x5,0x48055134);
    4. Now toggled the GPIO by setting/clearing the appropriate bit in GPIO_DATAOUT

                    u32 val;

     val = __raw_readl(0x4805513c);

    __raw_writel((val | 0x1),0x4805513c)

    __raw_writel((val & ~0x1),0x4805513c);

    Now could you let me know whether I am going in right direction or not. As after performing these steps gpio_36 is not toggled between high and low.

    Thanks

    Sid

  • Hello Sid,

    I confirm that your approach is correct. However, it would be fine to explain us, which hardware and software you use with OMAP4460?

    Best regards,

    Yanko

  • Hi Yanko,

    I am using a customized board with Jorjin module. I am able to toggle gpio_36 at u-boot level very well.

    Thanks 

    Sid