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.

GPIO on omap 4460

Other Parts Discussed in Thread: 4460

Hi,

Currently I am working on OMAP4460 (panda board with ICS ).

I am writing a driver in which I am using two GPIO's (155 and 156).

In OMAP3, we used to have two registers to enable ICLK and FCLK (CM_FCLKEN_PER, CM_ICLKEN_PER),

In OMAP4 I am not able to see such kind of registers to enable these clocks.

Can you please let me know the registers to use for these clocks in OMAP4460.

  • Sunil,

    I believe you are looking for the L4PER_CM2 registers, which are defined in section 3.11.39 of the public TRM, which is available here:

    http://www.ti.com/general/docs/wtbu/wtbudocumentcenter.tsp?templateId=6123&navigationId=12667

    Regards,

    Gina

  • Hi,

    I don't get exactly what you are trying to do. My guess is that you are trying to get a clock through a gpio, is that correct?

    If that's the case gpio 155 and 156 will not be useful since I think are not connected to a clock.

    For a better understanding of clocks on 4460 you should see chapter 3.6 Clock Management Functional Description in the 4460 TRM.

    Regards!

    ICe


  • Hi Gina,

    Thanks  for the reply.

    Then for ICLK, we can set CM_L4PER_CLKSTCTR [CLKACTIVITY_L4_PER_ICLK] bit

    and for FCLK, we can set CM_L4PER_CLKSTCTR [CLKACTIVITY_PER_32K_FCLK] bit.

    Please correct me if I am wrong.

    BTW, is it necessary to enable these clock for GPIOs to function correctly.?

     

    Regards,

    Sunil Kumar.

  • Sunil,

    As Israel mentioned, it depends what you are trying to do.  If you are using GPIOs 155 and 156 as regular GPIOs, you will just need to set the direction and pull type in the software.  If you are trying to use the GPIO as a clock source, it looks like only GPIOs 1-6 are available.

    Regards,

    Gina

  • sunil kumar dommati said:

    I am writing a driver in which I am using two GPIO's (155 and 156).

    In OMAP3, we used to have two registers to enable ICLK and FCLK (CM_FCLKEN_PER, CM_ICLKEN_PER),

    In OMAP4 I am not able to see such kind of registers to enable these clocks.

    Can you please let me know the registers to use for these clocks in OMAP4460.

    This is indeed a difference between PRCM architecture between OMAP3 and OMAP4. In OMAP4 you no longer explicitly enabled the interface and functional clocks to the module, you simply enable the module via the appropriate CLKCTRL register. For example, GPIOs 155 and 156 are part of the GPIO5 bank of GPIOs and so to access the registers for GPIO5 you need to set the CM_L4PER_GPIO5_CLKCTRL.MODULEMODE = 0x1. This will effectively enable the interface and functional clocks for you.

    Hope this helps.
    Jon

     

     

  • Israel Cepeda said:

    I don't get exactly what you are trying to do. My guess is that you are trying to get a clock through a gpio, is that correct?

    My understanding is that Sunil is just asking how to enable the appropriate clocks so that he can program the GPIO registers. By default clocks to the GPIO module are disabled and hence, you cannot access the GPIO registers.

    Jon

     

  • Hi Jon,

    Thanks for the clarification.

    Yes, I m trying to access GPIO registers.I will try the CLKCTRL register.

    Regards,

    Sunil