blob: d7a5d11cbcbfa1df1086fd84bbb5a855d6a0cd76 [file] [log] [blame]
Paul Walmsley69d88a02008-03-18 10:02:50 +02001#ifndef __ARCH_ARM_MACH_OMAP2_CM_REGBITS_24XX_H
2#define __ARCH_ARM_MACH_OMAP2_CM_REGBITS_24XX_H
3
4/*
5 * OMAP24XX Clock Management register bits
6 *
7 * Copyright (C) 2007 Texas Instruments, Inc.
8 * Copyright (C) 2007 Nokia Corporation
9 *
10 * Written by Paul Walmsley
11 *
12 * This program is free software; you can redistribute it and/or modify
13 * it under the terms of the GNU General Public License version 2 as
14 * published by the Free Software Foundation.
15 */
16
Paul Walmsley69d88a02008-03-18 10:02:50 +020017#define OMAP24XX_EN_CAM_SHIFT 31
Paul Walmsley69d88a02008-03-18 10:02:50 +020018#define OMAP24XX_EN_WDT4_SHIFT 29
Paul Walmsley69d88a02008-03-18 10:02:50 +020019#define OMAP2420_EN_WDT3_SHIFT 28
Paul Walmsley69d88a02008-03-18 10:02:50 +020020#define OMAP24XX_EN_MSPRO_SHIFT 27
Paul Walmsley69d88a02008-03-18 10:02:50 +020021#define OMAP24XX_EN_FAC_SHIFT 25
Paul Walmsley69d88a02008-03-18 10:02:50 +020022#define OMAP2420_EN_EAC_SHIFT 24
Paul Walmsley69d88a02008-03-18 10:02:50 +020023#define OMAP24XX_EN_HDQ_SHIFT 23
Paul Walmsley69d88a02008-03-18 10:02:50 +020024#define OMAP2420_EN_I2C2_SHIFT 20
Paul Walmsley69d88a02008-03-18 10:02:50 +020025#define OMAP2420_EN_I2C1_SHIFT 19
Paul Walmsley69d88a02008-03-18 10:02:50 +020026#define OMAP2430_EN_MCBSP5_SHIFT 5
Paul Walmsley69d88a02008-03-18 10:02:50 +020027#define OMAP2430_EN_MCBSP4_SHIFT 4
Paul Walmsley69d88a02008-03-18 10:02:50 +020028#define OMAP2430_EN_MCBSP3_SHIFT 3
Paul Walmsley69d88a02008-03-18 10:02:50 +020029#define OMAP24XX_EN_SSI_SHIFT 1
Paul Walmsley69d88a02008-03-18 10:02:50 +020030#define OMAP24XX_EN_MPU_WDT_SHIFT 3
Paul Walmsley69d88a02008-03-18 10:02:50 +020031#define OMAP24XX_CLKSEL_MPU_SHIFT 0
Rajendra Nayak6ab9f692012-11-10 21:22:28 -070032#define OMAP24XX_CLKSEL_MPU_WIDTH 5
Paul Walmsley801954d2008-08-19 11:08:44 +030033#define OMAP24XX_AUTOSTATE_MPU_MASK (1 << 0)
Paul Walmsley69d88a02008-03-18 10:02:50 +020034#define OMAP24XX_EN_TV_SHIFT 2
Paul Walmsley69d88a02008-03-18 10:02:50 +020035#define OMAP24XX_EN_DSS2_SHIFT 1
Paul Walmsley69d88a02008-03-18 10:02:50 +020036#define OMAP24XX_EN_DSS1_SHIFT 0
Paul Walmsleyf38ca102010-05-20 12:31:04 -060037#define OMAP24XX_EN_DSS1_MASK (1 << 0)
Paul Walmsley69d88a02008-03-18 10:02:50 +020038#define OMAP2430_EN_I2CHS2_SHIFT 20
Paul Walmsley69d88a02008-03-18 10:02:50 +020039#define OMAP2430_EN_I2CHS1_SHIFT 19
Paul Walmsley69d88a02008-03-18 10:02:50 +020040#define OMAP2430_EN_MMCHSDB2_SHIFT 17
Paul Walmsley69d88a02008-03-18 10:02:50 +020041#define OMAP2430_EN_MMCHSDB1_SHIFT 16
Paul Walmsley69d88a02008-03-18 10:02:50 +020042#define OMAP24XX_EN_MAILBOXES_SHIFT 30
Paul Walmsley69d88a02008-03-18 10:02:50 +020043#define OMAP2430_EN_SDRC_SHIFT 2
Paul Walmsley69d88a02008-03-18 10:02:50 +020044#define OMAP24XX_EN_PKA_SHIFT 4
Paul Walmsley69d88a02008-03-18 10:02:50 +020045#define OMAP24XX_EN_AES_SHIFT 3
Paul Walmsley69d88a02008-03-18 10:02:50 +020046#define OMAP24XX_EN_RNG_SHIFT 2
Paul Walmsley69d88a02008-03-18 10:02:50 +020047#define OMAP24XX_EN_SHA_SHIFT 1
Paul Walmsley69d88a02008-03-18 10:02:50 +020048#define OMAP24XX_EN_DES_SHIFT 0
Paul Walmsleyda0747d2009-01-28 12:18:22 -070049#define OMAP24XX_ST_MAILBOXES_SHIFT 30
Paul Walmsleyda0747d2009-01-28 12:18:22 -070050#define OMAP24XX_ST_HDQ_SHIFT 23
Paul Walmsleyda0747d2009-01-28 12:18:22 -070051#define OMAP2420_ST_I2C2_SHIFT 20
Paul Walmsley20042902010-09-30 02:40:12 +053052#define OMAP2430_ST_I2CHS1_SHIFT 19
Paul Walmsleyda0747d2009-01-28 12:18:22 -070053#define OMAP2420_ST_I2C1_SHIFT 19
Paul Walmsley20042902010-09-30 02:40:12 +053054#define OMAP2430_ST_I2CHS2_SHIFT 20
Paul Walmsleyda0747d2009-01-28 12:18:22 -070055#define OMAP24XX_ST_MCBSP2_SHIFT 16
Paul Walmsleyda0747d2009-01-28 12:18:22 -070056#define OMAP24XX_ST_MCBSP1_SHIFT 15
Paul Walmsleyda0747d2009-01-28 12:18:22 -070057#define OMAP24XX_ST_DSS_SHIFT 0
Paul Walmsleyda0747d2009-01-28 12:18:22 -070058#define OMAP2430_ST_MCBSP5_SHIFT 5
Paul Walmsleyf38ca102010-05-20 12:31:04 -060059#define OMAP2430_ST_MCBSP4_SHIFT 4
Paul Walmsleyf38ca102010-05-20 12:31:04 -060060#define OMAP2430_ST_MCBSP3_SHIFT 3
Paul Walmsleyda0747d2009-01-28 12:18:22 -070061#define OMAP24XX_ST_AES_SHIFT 3
Paul Walmsleyda0747d2009-01-28 12:18:22 -070062#define OMAP24XX_ST_RNG_SHIFT 2
Paul Walmsleyda0747d2009-01-28 12:18:22 -070063#define OMAP24XX_ST_SHA_SHIFT 1
Paul Walmsleya56d9ea2011-02-25 15:39:29 -070064#define OMAP24XX_AUTO_SDRC_SHIFT 2
Paul Walmsley6ae690d2011-02-25 15:39:29 -070065#define OMAP24XX_AUTO_GPMC_SHIFT 1
Paul Walmsley6ae690d2011-02-25 15:39:29 -070066#define OMAP24XX_AUTO_SDMA_SHIFT 0
Paul Walmsley69d88a02008-03-18 10:02:50 +020067#define OMAP24XX_CLKSEL_USB_MASK (0x7 << 25)
Paul Walmsley69d88a02008-03-18 10:02:50 +020068#define OMAP24XX_CLKSEL_SSI_MASK (0x1f << 20)
Paul Walmsley69d88a02008-03-18 10:02:50 +020069#define OMAP2420_CLKSEL_VLYNQ_MASK (0x1f << 15)
Paul Walmsley69d88a02008-03-18 10:02:50 +020070#define OMAP24XX_CLKSEL_DSS2_MASK (0x1 << 13)
Paul Walmsley69d88a02008-03-18 10:02:50 +020071#define OMAP24XX_CLKSEL_DSS1_MASK (0x1f << 8)
72#define OMAP24XX_CLKSEL_L4_SHIFT 5
Rajendra Nayak6ab9f692012-11-10 21:22:28 -070073#define OMAP24XX_CLKSEL_L4_WIDTH 2
Paul Walmsley69d88a02008-03-18 10:02:50 +020074#define OMAP24XX_CLKSEL_L3_SHIFT 0
Rajendra Nayak6ab9f692012-11-10 21:22:28 -070075#define OMAP24XX_CLKSEL_L3_WIDTH 5
Paul Walmsley69d88a02008-03-18 10:02:50 +020076#define OMAP24XX_CLKSEL_GPT12_MASK (0x3 << 22)
Paul Walmsley69d88a02008-03-18 10:02:50 +020077#define OMAP24XX_CLKSEL_GPT11_MASK (0x3 << 20)
Paul Walmsley69d88a02008-03-18 10:02:50 +020078#define OMAP24XX_CLKSEL_GPT10_MASK (0x3 << 18)
Paul Walmsley69d88a02008-03-18 10:02:50 +020079#define OMAP24XX_CLKSEL_GPT9_MASK (0x3 << 16)
Paul Walmsley69d88a02008-03-18 10:02:50 +020080#define OMAP24XX_CLKSEL_GPT8_MASK (0x3 << 14)
Paul Walmsley69d88a02008-03-18 10:02:50 +020081#define OMAP24XX_CLKSEL_GPT7_MASK (0x3 << 12)
Paul Walmsley69d88a02008-03-18 10:02:50 +020082#define OMAP24XX_CLKSEL_GPT6_MASK (0x3 << 10)
Paul Walmsley69d88a02008-03-18 10:02:50 +020083#define OMAP24XX_CLKSEL_GPT5_MASK (0x3 << 8)
Paul Walmsley69d88a02008-03-18 10:02:50 +020084#define OMAP24XX_CLKSEL_GPT4_MASK (0x3 << 6)
Paul Walmsley69d88a02008-03-18 10:02:50 +020085#define OMAP24XX_CLKSEL_GPT3_MASK (0x3 << 4)
Paul Walmsley69d88a02008-03-18 10:02:50 +020086#define OMAP24XX_CLKSEL_GPT2_MASK (0x3 << 2)
Paul Walmsley801954d2008-08-19 11:08:44 +030087#define OMAP24XX_AUTOSTATE_DSS_MASK (1 << 2)
Paul Walmsley801954d2008-08-19 11:08:44 +030088#define OMAP24XX_AUTOSTATE_L4_MASK (1 << 1)
Paul Walmsley801954d2008-08-19 11:08:44 +030089#define OMAP24XX_AUTOSTATE_L3_MASK (1 << 0)
Paul Walmsley69d88a02008-03-18 10:02:50 +020090#define OMAP24XX_EN_3D_SHIFT 2
Paul Walmsley69d88a02008-03-18 10:02:50 +020091#define OMAP24XX_EN_2D_SHIFT 1
Paul Walmsley801954d2008-08-19 11:08:44 +030092#define OMAP24XX_AUTOSTATE_GFX_MASK (1 << 0)
Paul Walmsley69d88a02008-03-18 10:02:50 +020093#define OMAP2430_EN_ICR_SHIFT 6
Paul Walmsley69d88a02008-03-18 10:02:50 +020094#define OMAP24XX_EN_OMAPCTRL_SHIFT 5
Paul Walmsley69d88a02008-03-18 10:02:50 +020095#define OMAP24XX_EN_WDT1_SHIFT 4
Paul Walmsley69d88a02008-03-18 10:02:50 +020096#define OMAP24XX_EN_32KSYNC_SHIFT 1
Paul Walmsleyda0747d2009-01-28 12:18:22 -070097#define OMAP24XX_ST_MPU_WDT_SHIFT 3
Paul Walmsleyda0747d2009-01-28 12:18:22 -070098#define OMAP24XX_ST_32KSYNC_SHIFT 1
Paul Walmsley69d88a02008-03-18 10:02:50 +020099#define OMAP24XX_CLKSEL_GPT1_MASK (0x3 << 0)
Paul Walmsley69d88a02008-03-18 10:02:50 +0200100#define OMAP24XX_EN_54M_PLL_SHIFT 6
Paul Walmsley69d88a02008-03-18 10:02:50 +0200101#define OMAP24XX_EN_96M_PLL_SHIFT 2
Paul Walmsley69d88a02008-03-18 10:02:50 +0200102#define OMAP24XX_EN_DPLL_MASK (0x3 << 0)
Paul Walmsleyb6ffa052012-10-29 20:56:17 -0600103#define OMAP24XX_ST_54M_APLL_SHIFT 9
Paul Walmsleyb6ffa052012-10-29 20:56:17 -0600104#define OMAP24XX_ST_96M_APLL_SHIFT 8
Paul Walmsley69d88a02008-03-18 10:02:50 +0200105#define OMAP24XX_AUTO_54M_MASK (0x3 << 6)
Paul Walmsley69d88a02008-03-18 10:02:50 +0200106#define OMAP24XX_AUTO_96M_MASK (0x3 << 2)
107#define OMAP24XX_AUTO_DPLL_SHIFT 0
108#define OMAP24XX_AUTO_DPLL_MASK (0x3 << 0)
Paul Walmsley69d88a02008-03-18 10:02:50 +0200109#define OMAP24XX_APLLS_CLKIN_SHIFT 23
Tero Kristo944ee5d2014-02-20 19:09:18 +0200110#define OMAP24XX_APLLS_CLKIN_WIDTH 3
Paul Walmsley69d88a02008-03-18 10:02:50 +0200111#define OMAP24XX_APLLS_CLKIN_MASK (0x7 << 23)
Paul Walmsley69d88a02008-03-18 10:02:50 +0200112#define OMAP24XX_DPLL_MULT_MASK (0x3ff << 12)
Paul Walmsley69d88a02008-03-18 10:02:50 +0200113#define OMAP24XX_DPLL_DIV_MASK (0xf << 8)
114#define OMAP24XX_54M_SOURCE_SHIFT 5
Rajendra Nayak6ab9f692012-11-10 21:22:28 -0700115#define OMAP24XX_54M_SOURCE_WIDTH 1
Paul Walmsley69d88a02008-03-18 10:02:50 +0200116#define OMAP2430_96M_SOURCE_SHIFT 4
Rajendra Nayak6ab9f692012-11-10 21:22:28 -0700117#define OMAP2430_96M_SOURCE_WIDTH 1
Paul Walmsleyf38ca102010-05-20 12:31:04 -0600118#define OMAP24XX_48M_SOURCE_MASK (1 << 3)
Paul Walmsley69d88a02008-03-18 10:02:50 +0200119#define OMAP24XX_CORE_CLK_SRC_MASK (0x3 << 0)
Paul Walmsley69d88a02008-03-18 10:02:50 +0200120#define OMAP2420_EN_IVA_COP_SHIFT 10
Paul Walmsley69d88a02008-03-18 10:02:50 +0200121#define OMAP2420_EN_IVA_MPU_SHIFT 8
Paul Walmsley69d88a02008-03-18 10:02:50 +0200122#define OMAP24XX_CM_FCLKEN_DSP_EN_DSP_SHIFT 0
Paul Walmsley69d88a02008-03-18 10:02:50 +0200123#define OMAP2420_EN_DSP_IPI_SHIFT 1
Paul Walmsley69d88a02008-03-18 10:02:50 +0200124#define OMAP2420_CLKSEL_IVA_MASK (0x1f << 8)
Paul Walmsley69d88a02008-03-18 10:02:50 +0200125#define OMAP24XX_CLKSEL_DSP_IF_MASK (0x3 << 5)
Paul Walmsley69d88a02008-03-18 10:02:50 +0200126#define OMAP24XX_CLKSEL_DSP_MASK (0x1f << 0)
Paul Walmsley801954d2008-08-19 11:08:44 +0300127#define OMAP2420_AUTOSTATE_IVA_MASK (1 << 8)
Paul Walmsley801954d2008-08-19 11:08:44 +0300128#define OMAP24XX_AUTOSTATE_DSP_MASK (1 << 0)
Paul Walmsley69d88a02008-03-18 10:02:50 +0200129#define OMAP2430_EN_OSC_SHIFT 1
Paul Walmsley69d88a02008-03-18 10:02:50 +0200130#define OMAP2430_CM_ICLKEN_MDM_EN_MDM_SHIFT 0
Paul Walmsley69d88a02008-03-18 10:02:50 +0200131#define OMAP2430_CLKSEL_MDM_MASK (0xf << 0)
Paul Walmsley801954d2008-08-19 11:08:44 +0300132#define OMAP2430_AUTOSTATE_MDM_MASK (1 << 0)
Paul Walmsley55ae3502010-12-21 21:05:15 -0700133#define OMAP24XX_CLKSTCTRL_DISABLE_AUTO 0x0
134#define OMAP24XX_CLKSTCTRL_ENABLE_AUTO 0x1
Paul Walmsley69d88a02008-03-18 10:02:50 +0200135#endif