Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
U
uboot-imx
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
8
Issues
8
List
Boards
Labels
Milestones
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Librem5
uboot-imx
Commits
948b8227
Commit
948b8227
authored
Nov 20, 2019
by
Angus Ainslie (Purism)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
board: purism: librem5: update the timeouts for birch
Signed-off-by:
Angus Ainslie (Purism)
<
angus@akkea.ca
>
parent
6ceb158f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
board/purism/librem5/librem5.c
board/purism/librem5/librem5.c
+14
-11
No files found.
board/purism/librem5/librem5.c
View file @
948b8227
...
...
@@ -371,7 +371,7 @@ int init_tps65982(void)
printf
(
"%s: starting
\n
"
,
__func__
);
if
(
tps65982_wait_for_app
(
8000
,
20
00
)
)
{
if
(
tps65982_wait_for_app
(
500
,
1
00
)
)
{
/* check that VBAT is present and greater than 3000 mV. reseting the
tps65982 disconnects VBUS so we need a different power source.
Battery voltage greater than 4.15V likely means the battery is not
...
...
@@ -389,11 +389,13 @@ int init_tps65982(void)
gpio_direction_output
(
TPS_RESET
,
1
);
mdelay
(
2
);
gpio_direction_output
(
TPS_RESET
,
0
);
mdelay
(
100
0
);
mdelay
(
100
);
if
(
tps65982_wait_for_app
(
8000
,
200
0
)
)
{
if
(
tps65982_wait_for_app
(
1000
,
25
0
)
)
{
printf
(
"tps65982 failed to boot
\n
"
);
board_ecspi_init
();
gpio_direction_output
(
LED_G
,
0
);
gpio_direction_output
(
LED_R
,
1
);
return
1
;
}
...
...
@@ -420,7 +422,7 @@ int init_tps65982(void)
int
init_charger_bq25896
(
void
)
{
u8
val
;
int
iinlim
,
vbat
,
ret
,
i
;
int
iinlim
,
vbat
,
ret
;
struct
udevice
*
udev
,
*
bus
;
/* Set the i2c bus */
...
...
@@ -495,16 +497,13 @@ int init_charger_bq25896(void)
vbat
=
(
val
&
0x7f
)
*
20
+
2304
;
printf
(
"VBAT mV %d
\n
"
,
vbat
);
if
((
vbat
<
2
4
00
)
&&
(
iinlim
<=
500
))
{
if
((
vbat
<
2
8
00
)
&&
(
iinlim
<=
500
))
{
/* battery voltage too low and
* insufficient current to boot linux.
* Keep the charger disabled and try to boot
*/
gpio_direction_output
(
LED_G
,
0
);
gpio_direction_output
(
LED_R
,
1
);
printf
(
"%s: voltage and current too low linux probably won't boot
\n
"
,
__func__
);
/* allow trickle charge 128 mA */
dm_i2c_reg_write
(
udev
,
0x04
,
0x1
);
#if 0
} else {
if (iinlim > 500) {
/* have enough voltage and current to fastcharge */
...
...
@@ -516,8 +515,12 @@ int init_charger_bq25896(void)
dm_i2c_reg_write(udev, 0x04, 0x2);
printf("%s: tricklecharge 256 mA\n", __func__);
}
#endif
}
/* set 1.6A charge limit */
dm_i2c_reg_write
(
udev
,
0x04
,
0x19
);
/* re-enable charger */
val
=
dm_i2c_reg_read
(
udev
,
0x03
);
val
=
val
|
0x10
;
...
...
@@ -584,8 +587,8 @@ int board_late_init(void)
#endif
if
(
fastboot_key_pressed
())
{
printf
(
"
enter fastboot!
\n
"
);
env_set
(
"bootcmd"
,
"
fastboot 0
"
);
printf
(
"
stop in u-boot
\n
"
);
env_set
(
"bootcmd"
,
""
);
}
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment