From: hjc Date: Tue, 12 Mar 2013 02:15:11 +0000 (+0800) Subject: rk3168_86v: compatible with wm831x and act8846; set ddr 300 Mhz X-Git-Tag: firefly_0821_release~7432 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5ac55d8efa22c7f917d874666b57a0e244ec2021;p=firefly-linux-kernel-4.4.55.git rk3168_86v: compatible with wm831x and act8846; set ddr 300 Mhz --- diff --git a/arch/arm/configs/rk3168_86v_codec_defconfig b/arch/arm/configs/rk3168_86v_codec_defconfig index 25d6d06b7f8f..29895499ceab 100644 --- a/arch/arm/configs/rk3168_86v_codec_defconfig +++ b/arch/arm/configs/rk3168_86v_codec_defconfig @@ -22,7 +22,7 @@ CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_ARCH_RK30=y CONFIG_DDR_INIT_CHANGE_FREQ=y -CONFIG_DDR_SDRAM_FREQ=324 +CONFIG_DDR_SDRAM_FREQ=300 # CONFIG_DDR_FREQ is not set # CONFIG_DDR_TEST is not set CONFIG_RK_CLOCK_PROC=y @@ -271,8 +271,10 @@ CONFIG_RK29_FEED_DOG_BY_INTE=y CONFIG_RK29_WATCHDOG_ATBOOT=y CONFIG_RK29_WATCHDOG_DEFAULT_TIME=5 CONFIG_MFD_TPS65910=y +CONFIG_MFD_WM831X_I2C=y CONFIG_REGULATOR=y CONFIG_REGULATOR_TPS65910=y +CONFIG_REGULATOR_WM831X=y CONFIG_REGULATOR_ACT8846=y CONFIG_MEDIA_SUPPORT=y CONFIG_VIDEO_DEV=y @@ -384,6 +386,7 @@ CONFIG_LEDS_GPIO=y CONFIG_SWITCH=y CONFIG_SWITCH_GPIO=y CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_WM831X=y CONFIG_TPS65910_RTC=y CONFIG_STAGING=y CONFIG_ANDROID=y diff --git a/arch/arm/configs/rk3168_86v_defconfig b/arch/arm/configs/rk3168_86v_defconfig index 98b71b27e416..5225f9fe2313 100644 --- a/arch/arm/configs/rk3168_86v_defconfig +++ b/arch/arm/configs/rk3168_86v_defconfig @@ -22,7 +22,7 @@ CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_ARCH_RK30=y CONFIG_DDR_INIT_CHANGE_FREQ=y -CONFIG_DDR_SDRAM_FREQ=324 +CONFIG_DDR_SDRAM_FREQ=300 # CONFIG_DDR_FREQ is not set # CONFIG_DDR_TEST is not set CONFIG_RK_CLOCK_PROC=y @@ -271,9 +271,11 @@ CONFIG_RK29_FEED_DOG_BY_INTE=y CONFIG_RK29_WATCHDOG_ATBOOT=y CONFIG_RK29_WATCHDOG_DEFAULT_TIME=5 CONFIG_MFD_TPS65910=y +CONFIG_MFD_WM831X_I2C=y CONFIG_MFD_RK610=y CONFIG_REGULATOR=y CONFIG_REGULATOR_TPS65910=y +CONFIG_REGULATOR_WM831X=y CONFIG_REGULATOR_ACT8846=y CONFIG_MEDIA_SUPPORT=y CONFIG_VIDEO_DEV=y @@ -388,6 +390,7 @@ CONFIG_LEDS_GPIO=y CONFIG_SWITCH=y CONFIG_SWITCH_GPIO=y CONFIG_RTC_CLASS=y +CONFIG_RTC_DRV_WM831X=y CONFIG_TPS65910_RTC=y CONFIG_STAGING=y CONFIG_ANDROID=y diff --git a/arch/arm/mach-rk30/board-rk3168-86v.c b/arch/arm/mach-rk30/board-rk3168-86v.c index d311c01dc556..97b71df6507d 100755 --- a/arch/arm/mach-rk30/board-rk3168-86v.c +++ b/arch/arm/mach-rk30/board-rk3168-86v.c @@ -1793,21 +1793,33 @@ static void rk30_pm_power_off(void) { printk(KERN_ERR "rk30_pm_power_off start...\n"); gpio_direction_output(POWER_ON_PIN, GPIO_LOW); -#if defined(CONFIG_MFD_WM831X) - wm831x_set_bits(Wm831x,WM831X_GPIO_LEVEL,0x0001,0x0000); //set sys_pwr 0 - wm831x_device_shutdown(Wm831x);//wm8326 shutdown -#endif -#if defined(CONFIG_REGULATOR_ACT8846) + if (pmic_is_tps65910()) { - printk("enter dcdet===========\n"); + printk("enter dcdet pmic_is_tps65910===========\n"); if(gpio_get_value (RK30_PIN0_PB2) == GPIO_LOW) { printk("enter restart===========\n"); arm_pm_restart(0, NULL); } tps65910_device_shutdown(); - } -#endif + }else if(pmic_is_act8846()){ + printk("enter dcdet pmic_is_act8846===========\n"); + if(gpio_get_value (RK30_PIN0_PB2) == GPIO_LOW) + { + printk("enter restart===========\n"); + arm_pm_restart(0, NULL); + } + act8846_device_shutdown(); + }else if(pmic_is_wm8326()){ + printk("enter dcdet pmic_is_wm8326===========\n"); + if(gpio_get_value (RK30_PIN0_PB2) == GPIO_LOW) + { + printk("enter restart===========\n"); + arm_pm_restart(0, NULL); + } + wm831x_set_bits(Wm831x,WM831X_GPIO_LEVEL,0x0001,0x0000); //set sys_pwr 0 + wm831x_device_shutdown(Wm831x);//wm8326 shutdown + } while (1); }