2008-08-19 08:08:43 +00:00
|
|
|
/*
|
2010-01-27 03:13:13 +00:00
|
|
|
* OMAP3 powerdomain definitions
|
2008-08-19 08:08:43 +00:00
|
|
|
*
|
|
|
|
* Copyright (C) 2007-2008 Texas Instruments, Inc.
|
2011-03-08 02:28:15 +00:00
|
|
|
* Copyright (C) 2007-2011 Nokia Corporation
|
2008-08-19 08:08:43 +00:00
|
|
|
*
|
2010-12-22 03:01:20 +00:00
|
|
|
* Paul Walmsley, Jouni Högander
|
2008-08-19 08:08:43 +00:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
|
|
* published by the Free Software Foundation.
|
|
|
|
*/
|
|
|
|
|
2010-12-22 03:01:20 +00:00
|
|
|
#include <linux/kernel.h>
|
|
|
|
#include <linux/init.h>
|
2008-08-19 08:08:43 +00:00
|
|
|
|
2010-12-22 04:05:16 +00:00
|
|
|
#include "powerdomain.h"
|
2010-12-22 03:01:20 +00:00
|
|
|
#include "powerdomains2xxx_3xxx_data.h"
|
2008-08-19 08:08:43 +00:00
|
|
|
|
|
|
|
#include "prcm-common.h"
|
2010-12-21 22:30:55 +00:00
|
|
|
#include "prm2xxx_3xxx.h"
|
2008-08-19 08:08:43 +00:00
|
|
|
#include "prm-regbits-34xx.h"
|
2010-12-21 22:30:55 +00:00
|
|
|
#include "cm2xxx_3xxx.h"
|
2008-08-19 08:08:43 +00:00
|
|
|
#include "cm-regbits-34xx.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* 34XX-specific powerdomains, dependencies
|
|
|
|
*/
|
|
|
|
|
2010-01-27 03:13:13 +00:00
|
|
|
#ifdef CONFIG_ARCH_OMAP3
|
2008-08-19 08:08:43 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* Powerdomains
|
|
|
|
*/
|
|
|
|
|
|
|
|
static struct powerdomain iva2_pwrdm = {
|
|
|
|
.name = "iva2_pwrdm",
|
|
|
|
.prcm_offs = OMAP3430_IVA2_MOD,
|
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
|
|
|
.pwrsts = PWRSTS_OFF_RET_ON,
|
|
|
|
.pwrsts_logic_ret = PWRSTS_OFF_RET,
|
|
|
|
.banks = 4,
|
|
|
|
.pwrsts_mem_ret = {
|
|
|
|
[0] = PWRSTS_OFF_RET,
|
|
|
|
[1] = PWRSTS_OFF_RET,
|
|
|
|
[2] = PWRSTS_OFF_RET,
|
|
|
|
[3] = PWRSTS_OFF_RET,
|
|
|
|
},
|
|
|
|
.pwrsts_mem_on = {
|
2011-03-08 02:28:15 +00:00
|
|
|
[0] = PWRSTS_ON,
|
|
|
|
[1] = PWRSTS_ON,
|
2008-08-19 08:08:43 +00:00
|
|
|
[2] = PWRSTS_OFF_ON,
|
2011-03-08 02:28:15 +00:00
|
|
|
[3] = PWRSTS_ON,
|
2008-08-19 08:08:43 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2010-01-27 03:13:13 +00:00
|
|
|
static struct powerdomain mpu_3xxx_pwrdm = {
|
2008-08-19 08:08:43 +00:00
|
|
|
.name = "mpu_pwrdm",
|
|
|
|
.prcm_offs = MPU_MOD,
|
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
|
|
|
.pwrsts = PWRSTS_OFF_RET_ON,
|
|
|
|
.pwrsts_logic_ret = PWRSTS_OFF_RET,
|
2009-12-08 23:33:15 +00:00
|
|
|
.flags = PWRDM_HAS_MPU_QUIRK,
|
2008-08-19 08:08:43 +00:00
|
|
|
.banks = 1,
|
|
|
|
.pwrsts_mem_ret = {
|
|
|
|
[0] = PWRSTS_OFF_RET,
|
|
|
|
},
|
|
|
|
.pwrsts_mem_on = {
|
|
|
|
[0] = PWRSTS_OFF_ON,
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2010-07-14 13:38:49 +00:00
|
|
|
/*
|
|
|
|
* The USBTLL Save-and-Restore mechanism is broken on
|
2011-03-31 01:57:33 +00:00
|
|
|
* 3430s up to ES3.0 and 3630ES1.0. Hence this feature
|
2010-07-14 13:38:49 +00:00
|
|
|
* needs to be disabled on these chips.
|
|
|
|
* Refer: 3430 errata ID i459 and 3630 errata ID i579
|
2010-11-17 17:52:11 +00:00
|
|
|
*
|
|
|
|
* Note: setting the SAR flag could help for errata ID i478
|
|
|
|
* which applies to 3430 <= ES3.1, but since the SAR feature
|
|
|
|
* is broken, do not use it.
|
2010-07-14 13:38:49 +00:00
|
|
|
*/
|
2010-01-27 03:13:13 +00:00
|
|
|
static struct powerdomain core_3xxx_pre_es3_1_pwrdm = {
|
2008-08-19 08:08:43 +00:00
|
|
|
.name = "core_pwrdm",
|
|
|
|
.prcm_offs = CORE_MOD,
|
2009-02-06 03:45:28 +00:00
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES1 |
|
|
|
|
CHIP_IS_OMAP3430ES2 |
|
2010-07-14 13:38:49 +00:00
|
|
|
CHIP_IS_OMAP3430ES3_0 |
|
|
|
|
CHIP_IS_OMAP3630ES1),
|
2009-02-06 03:45:28 +00:00
|
|
|
.pwrsts = PWRSTS_OFF_RET_ON,
|
2010-02-24 19:05:50 +00:00
|
|
|
.pwrsts_logic_ret = PWRSTS_OFF_RET,
|
2009-02-06 03:45:28 +00:00
|
|
|
.banks = 2,
|
|
|
|
.pwrsts_mem_ret = {
|
|
|
|
[0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
|
|
|
|
[1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
|
|
|
|
},
|
|
|
|
.pwrsts_mem_on = {
|
|
|
|
[0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
|
|
|
|
[1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2010-01-27 03:13:13 +00:00
|
|
|
static struct powerdomain core_3xxx_es3_1_pwrdm = {
|
2009-02-06 03:45:28 +00:00
|
|
|
.name = "core_pwrdm",
|
|
|
|
.prcm_offs = CORE_MOD,
|
2010-07-14 13:38:49 +00:00
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430ES3_1 |
|
|
|
|
CHIP_GE_OMAP3630ES1_1),
|
2008-08-19 08:08:43 +00:00
|
|
|
.pwrsts = PWRSTS_OFF_RET_ON,
|
2010-02-24 19:05:50 +00:00
|
|
|
.pwrsts_logic_ret = PWRSTS_OFF_RET,
|
2010-11-17 17:52:11 +00:00
|
|
|
/*
|
|
|
|
* Setting the SAR flag for errata ID i478 which applies
|
|
|
|
* to 3430 <= ES3.1
|
|
|
|
*/
|
2009-02-06 03:45:28 +00:00
|
|
|
.flags = PWRDM_HAS_HDWR_SAR, /* for USBTLL only */
|
2008-08-19 08:08:43 +00:00
|
|
|
.banks = 2,
|
|
|
|
.pwrsts_mem_ret = {
|
|
|
|
[0] = PWRSTS_OFF_RET, /* MEM1RETSTATE */
|
|
|
|
[1] = PWRSTS_OFF_RET, /* MEM2RETSTATE */
|
|
|
|
},
|
|
|
|
.pwrsts_mem_on = {
|
|
|
|
[0] = PWRSTS_OFF_RET_ON, /* MEM1ONSTATE */
|
|
|
|
[1] = PWRSTS_OFF_RET_ON, /* MEM2ONSTATE */
|
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct powerdomain dss_pwrdm = {
|
|
|
|
.name = "dss_pwrdm",
|
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
|
|
|
.prcm_offs = OMAP3430_DSS_MOD,
|
|
|
|
.pwrsts = PWRSTS_OFF_RET_ON,
|
2011-03-08 02:28:15 +00:00
|
|
|
.pwrsts_logic_ret = PWRSTS_RET,
|
2008-08-19 08:08:43 +00:00
|
|
|
.banks = 1,
|
|
|
|
.pwrsts_mem_ret = {
|
2011-03-08 02:28:15 +00:00
|
|
|
[0] = PWRSTS_RET, /* MEMRETSTATE */
|
2008-08-19 08:08:43 +00:00
|
|
|
},
|
|
|
|
.pwrsts_mem_on = {
|
2011-03-08 02:28:15 +00:00
|
|
|
[0] = PWRSTS_ON, /* MEMONSTATE */
|
2008-08-19 08:08:43 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2009-01-28 02:44:28 +00:00
|
|
|
/*
|
|
|
|
* Although the 34XX TRM Rev K Table 4-371 notes that retention is a
|
|
|
|
* possible SGX powerstate, the SGX device itself does not support
|
|
|
|
* retention.
|
|
|
|
*/
|
2008-08-19 08:08:43 +00:00
|
|
|
static struct powerdomain sgx_pwrdm = {
|
|
|
|
.name = "sgx_pwrdm",
|
|
|
|
.prcm_offs = OMAP3430ES2_SGX_MOD,
|
2009-02-06 03:45:25 +00:00
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
|
2008-08-19 08:08:43 +00:00
|
|
|
/* XXX This is accurate for 3430 SGX, but what about GFX? */
|
2009-01-28 02:44:28 +00:00
|
|
|
.pwrsts = PWRSTS_OFF_ON,
|
2011-03-08 02:28:15 +00:00
|
|
|
.pwrsts_logic_ret = PWRSTS_RET,
|
2008-08-19 08:08:43 +00:00
|
|
|
.banks = 1,
|
|
|
|
.pwrsts_mem_ret = {
|
2011-03-08 02:28:15 +00:00
|
|
|
[0] = PWRSTS_RET, /* MEMRETSTATE */
|
2008-08-19 08:08:43 +00:00
|
|
|
},
|
|
|
|
.pwrsts_mem_on = {
|
2011-03-08 02:28:15 +00:00
|
|
|
[0] = PWRSTS_ON, /* MEMONSTATE */
|
2008-08-19 08:08:43 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct powerdomain cam_pwrdm = {
|
|
|
|
.name = "cam_pwrdm",
|
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
|
|
|
.prcm_offs = OMAP3430_CAM_MOD,
|
|
|
|
.pwrsts = PWRSTS_OFF_RET_ON,
|
2011-03-08 02:28:15 +00:00
|
|
|
.pwrsts_logic_ret = PWRSTS_RET,
|
2008-08-19 08:08:43 +00:00
|
|
|
.banks = 1,
|
|
|
|
.pwrsts_mem_ret = {
|
2011-03-08 02:28:15 +00:00
|
|
|
[0] = PWRSTS_RET, /* MEMRETSTATE */
|
2008-08-19 08:08:43 +00:00
|
|
|
},
|
|
|
|
.pwrsts_mem_on = {
|
2011-03-08 02:28:15 +00:00
|
|
|
[0] = PWRSTS_ON, /* MEMONSTATE */
|
2008-08-19 08:08:43 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct powerdomain per_pwrdm = {
|
|
|
|
.name = "per_pwrdm",
|
|
|
|
.prcm_offs = OMAP3430_PER_MOD,
|
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
|
|
|
.pwrsts = PWRSTS_OFF_RET_ON,
|
|
|
|
.pwrsts_logic_ret = PWRSTS_OFF_RET,
|
|
|
|
.banks = 1,
|
|
|
|
.pwrsts_mem_ret = {
|
2011-03-08 02:28:15 +00:00
|
|
|
[0] = PWRSTS_RET, /* MEMRETSTATE */
|
2008-08-19 08:08:43 +00:00
|
|
|
},
|
|
|
|
.pwrsts_mem_on = {
|
2011-03-08 02:28:15 +00:00
|
|
|
[0] = PWRSTS_ON, /* MEMONSTATE */
|
2008-08-19 08:08:43 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct powerdomain emu_pwrdm = {
|
|
|
|
.name = "emu_pwrdm",
|
|
|
|
.prcm_offs = OMAP3430_EMU_MOD,
|
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct powerdomain neon_pwrdm = {
|
|
|
|
.name = "neon_pwrdm",
|
|
|
|
.prcm_offs = OMAP3430_NEON_MOD,
|
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
|
|
|
.pwrsts = PWRSTS_OFF_RET_ON,
|
2011-03-08 02:28:15 +00:00
|
|
|
.pwrsts_logic_ret = PWRSTS_RET,
|
2008-08-19 08:08:43 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct powerdomain usbhost_pwrdm = {
|
|
|
|
.name = "usbhost_pwrdm",
|
|
|
|
.prcm_offs = OMAP3430ES2_USBHOST_MOD,
|
2009-02-06 03:45:25 +00:00
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
|
2008-08-19 08:08:43 +00:00
|
|
|
.pwrsts = PWRSTS_OFF_RET_ON,
|
2011-03-08 02:28:15 +00:00
|
|
|
.pwrsts_logic_ret = PWRSTS_RET,
|
2009-04-23 10:58:51 +00:00
|
|
|
/*
|
|
|
|
* REVISIT: Enabling usb host save and restore mechanism seems to
|
|
|
|
* leave the usb host domain permanently in ACTIVE mode after
|
|
|
|
* changing the usb host power domain state from OFF to active once.
|
|
|
|
* Disabling for now.
|
|
|
|
*/
|
|
|
|
/*.flags = PWRDM_HAS_HDWR_SAR,*/ /* for USBHOST ctrlr only */
|
2008-08-19 08:08:43 +00:00
|
|
|
.banks = 1,
|
|
|
|
.pwrsts_mem_ret = {
|
2011-03-08 02:28:15 +00:00
|
|
|
[0] = PWRSTS_RET, /* MEMRETSTATE */
|
2008-08-19 08:08:43 +00:00
|
|
|
},
|
|
|
|
.pwrsts_mem_on = {
|
2011-03-08 02:28:15 +00:00
|
|
|
[0] = PWRSTS_ON, /* MEMONSTATE */
|
2008-08-19 08:08:43 +00:00
|
|
|
},
|
|
|
|
};
|
|
|
|
|
2009-01-28 02:44:18 +00:00
|
|
|
static struct powerdomain dpll1_pwrdm = {
|
|
|
|
.name = "dpll1_pwrdm",
|
|
|
|
.prcm_offs = MPU_MOD,
|
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct powerdomain dpll2_pwrdm = {
|
|
|
|
.name = "dpll2_pwrdm",
|
|
|
|
.prcm_offs = OMAP3430_IVA2_MOD,
|
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct powerdomain dpll3_pwrdm = {
|
|
|
|
.name = "dpll3_pwrdm",
|
|
|
|
.prcm_offs = PLL_MOD,
|
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct powerdomain dpll4_pwrdm = {
|
|
|
|
.name = "dpll4_pwrdm",
|
|
|
|
.prcm_offs = PLL_MOD,
|
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct powerdomain dpll5_pwrdm = {
|
|
|
|
.name = "dpll5_pwrdm",
|
|
|
|
.prcm_offs = PLL_MOD,
|
2009-02-06 03:45:25 +00:00
|
|
|
.omap_chip = OMAP_CHIP_INIT(CHIP_GE_OMAP3430ES2),
|
2009-01-28 02:44:18 +00:00
|
|
|
};
|
|
|
|
|
2010-12-22 03:01:20 +00:00
|
|
|
/* As powerdomains are added or removed above, this list must also be changed */
|
|
|
|
static struct powerdomain *powerdomains_omap3xxx[] __initdata = {
|
2009-01-28 02:44:18 +00:00
|
|
|
|
2010-12-22 03:01:20 +00:00
|
|
|
&wkup_omap2_pwrdm,
|
|
|
|
&gfx_omap2_pwrdm,
|
|
|
|
&iva2_pwrdm,
|
|
|
|
&mpu_3xxx_pwrdm,
|
|
|
|
&neon_pwrdm,
|
|
|
|
&core_3xxx_pre_es3_1_pwrdm,
|
|
|
|
&core_3xxx_es3_1_pwrdm,
|
|
|
|
&cam_pwrdm,
|
|
|
|
&dss_pwrdm,
|
|
|
|
&per_pwrdm,
|
|
|
|
&emu_pwrdm,
|
|
|
|
&sgx_pwrdm,
|
|
|
|
&usbhost_pwrdm,
|
|
|
|
&dpll1_pwrdm,
|
|
|
|
&dpll2_pwrdm,
|
|
|
|
&dpll3_pwrdm,
|
|
|
|
&dpll4_pwrdm,
|
|
|
|
&dpll5_pwrdm,
|
|
|
|
#endif
|
|
|
|
NULL
|
|
|
|
};
|
2008-08-19 08:08:43 +00:00
|
|
|
|
|
|
|
|
2010-12-22 03:01:20 +00:00
|
|
|
void __init omap3xxx_powerdomains_init(void)
|
|
|
|
{
|
|
|
|
pwrdm_init(powerdomains_omap3xxx, &omap3_pwrdm_operations);
|
|
|
|
}
|