Commit f2b8dfe1 authored by Jeffrey Lee's avatar Jeffrey Lee
Browse files

Configure Pandora battery charging

Detail:
  s/Boot - Under Linux the Pandora uses a similar battery charging setup to the TouchBook. Reuse our TouchBook battery charging setup code to set things up appropriately for the Pandora.
Admin:
  Tested on Pandora


Version 0.80. Tagged as 'OMAP3-0_80'
parent 8690320d
......@@ -11,13 +11,13 @@
GBLS Module_HelpVersion
GBLS Module_ComponentName
GBLS Module_ComponentPath
Module_MajorVersion SETS "0.79"
Module_Version SETA 79
Module_MajorVersion SETS "0.80"
Module_Version SETA 80
Module_MinorVersion SETS ""
Module_Date SETS "21 Sep 2012"
Module_ApplicationDate SETS "21-Sep-12"
Module_Date SETS "23 Sep 2012"
Module_ApplicationDate SETS "23-Sep-12"
Module_ComponentName SETS "OMAP3"
Module_ComponentPath SETS "castle/RiscOS/Sources/HAL/OMAP3"
Module_FullVersion SETS "0.79"
Module_HelpVersion SETS "0.79 (21 Sep 2012)"
Module_FullVersion SETS "0.80"
Module_HelpVersion SETS "0.80 (23 Sep 2012)"
END
/* (0.79)
/* (0.80)
*
* This file is automatically maintained by srccommit, do not edit manually.
* Last processed by srccommit version: 1.1.
*
*/
#define Module_MajorVersion_CMHG 0.79
#define Module_MajorVersion_CMHG 0.80
#define Module_MinorVersion_CMHG
#define Module_Date_CMHG 21 Sep 2012
#define Module_Date_CMHG 23 Sep 2012
#define Module_MajorVersion "0.79"
#define Module_Version 79
#define Module_MajorVersion "0.80"
#define Module_Version 80
#define Module_MinorVersion ""
#define Module_Date "21 Sep 2012"
#define Module_Date "23 Sep 2012"
#define Module_ApplicationDate "21-Sep-12"
#define Module_ApplicationDate "23-Sep-12"
#define Module_ComponentName "OMAP3"
#define Module_ComponentPath "castle/RiscOS/Sources/HAL/OMAP3"
#define Module_FullVersion "0.79"
#define Module_HelpVersion "0.79 (21 Sep 2012)"
#define Module_LibraryVersionInfo "0:79"
#define Module_FullVersion "0.80"
#define Module_HelpVersion "0.80 (23 Sep 2012)"
#define Module_LibraryVersionInfo "0:80"
......@@ -753,15 +753,20 @@ Board_Init_OMAP35xEVM ROUT
Board_Init_TouchBook ROUT
Entry
; TouchBook battery charging
LDR a1, =&3ff ; Max charging current (1704mA)
BL Enable_main_battery_charging
; Touchbook needs TPS LED A turning off for EHCI
MOV a1, #GPIO_PIN_MAX+TPS_GPIO_PIN_MAX
MOV a2, #0
BL GPIOx_SetAsOutput
; TouchBook battery charging
EXIT
Enable_main_battery_charging ROUT
Entry "a1", 4
[ Debug
DebugTX "Enabling TB battery charging"
DebugTX "Enabling battery charging"
]
SUB sp, sp, #4
MOV a2, sp
MOV a3, #1
ADRL v1, IIC_DoOp_Poll
......@@ -807,8 +812,8 @@ Board_Init_TouchBook ROUT
BL TPSRead
CMP a1, #0
BNE %FT9
LDREQB ip, [a2]
TSTEQ ip, #&30 ; Accept any non-charging, non-overvoltage state
LDREQB ip, [a2]
TSTEQ ip, #&30 ; Accept any non-charging, non-overvoltage state
BEQ %FT8
SUBS v2, v2, #1
BGT %BT7
......@@ -838,14 +843,16 @@ Board_Init_TouchBook ROUT
BL TPSWrite
CMP a1, #0
BNE %FT9
; Increase charging current to max
; Set desired charging current (a1 on entry)
MOV a1, #&4a*2
ADD a2, sp, #4
MOV a3, #2
MOV a4, #&9B ; BCIIREF1
MOV ip, #&FF
STRB ip, [a2]
BL TPSWrite
CMP a1, #0
BNE %FT9
MOV a2, sp
MOV a3, #1
; Wait for any current BCI conversion to finish
7
MOV a1, #&4a*2
......@@ -871,7 +878,6 @@ Board_Init_TouchBook ROUT
MOV a4, #&3d ; BOOT_BCI
BL TPSWrite
9
ADD sp, sp, #4
[ Debug
CMP a1, #0
BEQ %FT10
......@@ -883,6 +889,9 @@ Board_Init_TouchBook ROUT
Board_Init_Pandora ROUT
Entry
; Increase battery charging current
LDR a1, =&35c ; 1158mA
BL Enable_main_battery_charging
; Enable some extra power supplies
MOV a3, #1
ADRL v1, IIC_DoOp_Poll
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment