diff options
Diffstat (limited to 'firmware/target/arm/imx233/sansa-fuzeplus')
-rw-r--r-- | firmware/target/arm/imx233/sansa-fuzeplus/powermgmt-fuzeplus.c | 46 | ||||
-rw-r--r-- | firmware/target/arm/imx233/sansa-fuzeplus/powermgmt-target.h | 48 |
2 files changed, 94 insertions, 0 deletions
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/powermgmt-fuzeplus.c b/firmware/target/arm/imx233/sansa-fuzeplus/powermgmt-fuzeplus.c new file mode 100644 index 0000000000..3e068f007d --- /dev/null +++ b/firmware/target/arm/imx233/sansa-fuzeplus/powermgmt-fuzeplus.c | |||
@@ -0,0 +1,46 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2011 by Amaury Pouly | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #include "config.h" | ||
22 | #include "powermgmt-target.h" | ||
23 | |||
24 | const unsigned short battery_level_dangerous[BATTERY_TYPES_COUNT] = | ||
25 | { | ||
26 | 3659 | ||
27 | }; | ||
28 | |||
29 | const unsigned short battery_level_shutoff[BATTERY_TYPES_COUNT] = | ||
30 | { | ||
31 | 3630 | ||
32 | }; | ||
33 | |||
34 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging disabled */ | ||
35 | const unsigned short percent_to_volt_discharge[BATTERY_TYPES_COUNT][11] = | ||
36 | { | ||
37 | /* Toshiba Gigabeat S Li Ion 700mAH figured from discharge curve */ | ||
38 | { 3659, 3719, 3745, 3761, 3785, 3813, 3856, 3926, 3984, 4040, 4121 }, | ||
39 | }; | ||
40 | |||
41 | /* voltages (millivolt) of 0%, 10%, ... 100% when charging enabled */ | ||
42 | const unsigned short percent_to_volt_charge[11] = | ||
43 | { | ||
44 | /* Toshiba Gigabeat S Li Ion 700mAH figured from charge curve */ | ||
45 | 4028, 4063, 4087, 4111, 4135, 4156, 4173, 4185, 4194, 4202, 4208 | ||
46 | }; | ||
diff --git a/firmware/target/arm/imx233/sansa-fuzeplus/powermgmt-target.h b/firmware/target/arm/imx233/sansa-fuzeplus/powermgmt-target.h new file mode 100644 index 0000000000..34d1d00e1d --- /dev/null +++ b/firmware/target/arm/imx233/sansa-fuzeplus/powermgmt-target.h | |||
@@ -0,0 +1,48 @@ | |||
1 | /*************************************************************************** | ||
2 | * __________ __ ___. | ||
3 | * Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | * \/ \/ \/ \/ \/ | ||
8 | * $Id$ | ||
9 | * | ||
10 | * Copyright (C) 2011 by Amaury Pouly | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or | ||
13 | * modify it under the terms of the GNU General Public License | ||
14 | * as published by the Free Software Foundation; either version 2 | ||
15 | * of the License, or (at your option) any later version. | ||
16 | * | ||
17 | * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY | ||
18 | * KIND, either express or implied. | ||
19 | * | ||
20 | ****************************************************************************/ | ||
21 | #ifndef POWERMGMT_TARGET_H | ||
22 | #define POWERMGMT_TARGET_H | ||
23 | |||
24 | #include "config.h" | ||
25 | #include "powermgmt-imx233.h" | ||
26 | |||
27 | /* Fuze+ OF settings: | ||
28 | * - current ramp slope: 50 mA/s | ||
29 | * - conditioning threshold voltage: 3 V | ||
30 | * - conditioning max voltage: 3.1 V | ||
31 | * - conditioning current: 60 mA | ||
32 | * - conditioning timeout: 1 h | ||
33 | * - charging voltage: 4.2 V | ||
34 | * - charging current: 200 mA | ||
35 | * - charging threshold current: 30 mA | ||
36 | * - charging timeout: 4 h | ||
37 | * - top off period: 30 min | ||
38 | * - high die temperature: 71 °C | ||
39 | * - low die temperature: 56 °C | ||
40 | * - safe temperature current: 30 mA | ||
41 | */ | ||
42 | |||
43 | #define IMX233_CHARGE_CURRENT 200 | ||
44 | #define IMX233_STOP_CURRENT 30 | ||
45 | #define IMX233_TOPOFF_TIMEOUT (30 * 60 * HZ) | ||
46 | #define IMX233_CHARGING_TIMEOUT (4 * 3600 * HZ) | ||
47 | |||
48 | #endif /* POWERMGMT_TARGET_H */ | ||