From 485f7d37fe8f0c3a5578cec4f44c710c8cf202ef Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E5=BC=A0=E6=99=B4?= Date: Wed, 16 May 2012 11:41:45 +0800 Subject: [PATCH] rk30:phone loquat:Make the clk32kaudio and clk32kg output 32.768K clock --- arch/arm/mach-rk30/board-rk30-phone-twl60xx.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-rk30/board-rk30-phone-twl60xx.c b/arch/arm/mach-rk30/board-rk30-phone-twl60xx.c index 8a0f660e6510..198db66d1f5a 100755 --- a/arch/arm/mach-rk30/board-rk30-phone-twl60xx.c +++ b/arch/arm/mach-rk30/board-rk30-phone-twl60xx.c @@ -80,6 +80,8 @@ #define LDO7_CFG_TRANS 0x75 #define LDO7_CFG_STATE 0x76 #define LDO7_CFG_VOLTAGE 0x77 +#define CLK32KG_CFG_STATE 0x11 +#define CLK32KAUDIO_CFG_STATE 0x14 static inline int twl_reg_read(unsigned base, unsigned slave_subgp) { u8 value; @@ -106,12 +108,16 @@ int tps80032_pre_init(void){ twl_reg_write(PREQ1_RES_ASS_A,TWL_MODULE_PM_SLAVE_RES,0x0b); twl_reg_write(PREQ1_RES_ASS_B,TWL_MODULE_PM_SLAVE_RES,0x10); - twl_reg_write(PREQ1_RES_ASS_C,TWL_MODULE_PM_SLAVE_RES,0x2f); + twl_reg_write(PREQ1_RES_ASS_C,TWL_MODULE_PM_SLAVE_RES,0x27); + twl_reg_write(PHOENIX_MSK_TRANSITION,TWL_MODULE_PM_MASTER,0x00); twl_reg_write(PHOENIX_SENS_TRANSITION,TWL_MODULE_PM_MASTER,0xc0); //set pmu enter sleep on a preq1 rising edge twl_reg_write(SMPS1_CFG_STATE,TWL_MODULE_PM_RECEIVER,0x01); //set state twl_reg_write(SMPS2_CFG_STATE,TWL_MODULE_PM_RECEIVER,0x01); twl_reg_write(LDO7_CFG_STATE,TWL_MODULE_PM_RECEIVER,0x01); + + twl_reg_write(CLK32KG_CFG_STATE,TWL_MODULE_PM_SLAVE_RES,0x01); //set clk32kg on when we use + twl_reg_write(CLK32KAUDIO_CFG_STATE,TWL_MODULE_PM_SLAVE_RES,0x01); //set clk32kaudio on when we use // twl_reg_write(LDO5_CFG_TRANS,TWL_MODULE_PM_RECEIVER,0x03); //set ldo5 is disabled when in sleep mode // twl_reg_write(LDO7_CFG_TRANS,TWL_MODULE_PM_RECEIVER,0x03); //set ldo7 is disabled when in sleep mode -- 2.34.1