diff options
Diffstat (limited to 'firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c')
-rw-r--r-- | firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c b/firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c index b4923835aa..a3760d145a 100644 --- a/firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c +++ b/firmware/target/mips/ingenic_x1000/fiiom3k/power-fiiom3k.c | |||
@@ -68,8 +68,14 @@ void power_init(void) | |||
68 | axp173_adc_set_enabled(bits); | 68 | axp173_adc_set_enabled(bits); |
69 | 69 | ||
70 | /* Turn on all power outputs */ | 70 | /* Turn on all power outputs */ |
71 | i2c_reg_modify1(AXP173_BUS, AXP173_ADDR, 0x12, 0, 0x5f, NULL); | 71 | i2c_reg_modify1(AXP173_BUS, AXP173_ADDR, |
72 | i2c_reg_modify1(AXP173_BUS, AXP173_ADDR, 0x80, 0, 0xc0, NULL); | 72 | AXP173_REG_PWROUTPUTCTRL, 0, 0x5f, NULL); |
73 | i2c_reg_modify1(AXP173_BUS, AXP173_ADDR, | ||
74 | AXP173_REG_DCDCWORKINGMODE, 0, 0xc0, NULL); | ||
75 | |||
76 | /* Set the default charging current. This is the same as the | ||
77 | * OF's setting, although it's not strictly within the USB spec. */ | ||
78 | axp173_set_charge_current(780); | ||
73 | 79 | ||
74 | /* Short delay to give power outputs time to stabilize */ | 80 | /* Short delay to give power outputs time to stabilize */ |
75 | mdelay(5); | 81 | mdelay(5); |
@@ -82,7 +88,8 @@ void adc_init(void) | |||
82 | void power_off(void) | 88 | void power_off(void) |
83 | { | 89 | { |
84 | /* Set the shutdown bit */ | 90 | /* Set the shutdown bit */ |
85 | i2c_reg_setbit1(AXP173_BUS, AXP173_ADDR, 0x32, 7, 1, NULL); | 91 | i2c_reg_setbit1(AXP173_BUS, AXP173_ADDR, |
92 | AXP173_REG_SHUTDOWNLEDCTRL, 7, 1, NULL); | ||
86 | while(1); | 93 | while(1); |
87 | } | 94 | } |
88 | 95 | ||