Consummate bcm wifi oob on all platform(Wake gpio define).
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-rk30 / board-rk30-sdk-tps65910.c
index d61ef3f69c3654acb0065adaad56003da432094f..6d4d79812f69c8509cec7a78648c96fe3f50c250 100755 (executable)
@@ -191,6 +191,7 @@ int tps65910_pre_init(struct tps65910 *tps65910){
         }
        
        val  |= 0xff;
+       val  &= ~(0x07);   //set vdd1 vdd2 vio in pfm mode when in sleep
        err = tps65910_reg_write(tps65910, TPS65910_SLEEP_KEEP_RES_ON, val);
        if (err) {
                printk(KERN_ERR "Unable to read TPS65910 Reg at offset 0x%x= \
@@ -227,6 +228,23 @@ int tps65910_pre_init(struct tps65910 *tps65910){
        }
        #endif
        #endif
+
+       /**********************set arm in pwm ****************/
+         val = tps65910_reg_read(tps65910, TPS65910_DCDCCTRL);
+        if (val<0) {
+                printk(KERN_ERR "Unable to read TPS65910_DCDCCTRL reg\n");
+                return val;
+        }
+       
+       val &= ~(1<<4);
+       err = tps65910_reg_write(tps65910, TPS65910_DCDCCTRL, val);
+       if (err) {
+               printk(KERN_ERR "Unable to read TPS65910 Reg at offset 0x%x= \
+                               \n", TPS65910_VDIG1);
+               return err;
+       }       
+       /************************************************/
+       
        printk("%s,line=%d\n", __func__,__LINE__);
        return 0;
 
@@ -601,7 +619,7 @@ void __sramfunc board_pmu_tps65910_resume(void)
 
 static struct tps65910_board tps65910_data = {
        .irq    = (unsigned)TPS65910_HOST_IRQ,          
-       .irq_base = NR_GIC_IRQS + NR_GPIO_IRQS,
+       .irq_base = IRQ_BOARD_BASE,
        .gpio_base = TPS65910_GPIO_EXPANDER_BASE,
        
        .pre_init = tps65910_pre_init,