| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In the interest of making long-term branch maintenance incur as little
technical debt on us as possible, we should not maintain any files on
the branch we are not actually using.
This has the added effect of making it extremely clear when merging CLs
from the main branch when changes have the possibility to affect us.
The follow-on CL adds a convenience script to actually pull updates from
the main branch and generate a CL for the update.
BUG=b:204206272
BRANCH=ish
TEST=make BOARD=arcada_ish && make BOARD=drallion_ish
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow better code coverage by checking return codes in various internal
static functions.
BRANCH=none
BUG=b:184856083
TEST=make buildall -j
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I28afe0538ed9ac98d4ecb9c499d218cd11cbc1ca
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3158736
Commit-Queue: Yuval Peress <peress@google.com>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Yuval Peress <peress@google.com>
Auto-Submit: Yuval Peress <peress@google.com>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=none
TEST=make buildall -j
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I7963baa87d6edbd208fb8bad5c80866f26527748
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3138385
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Return the status of the init function. This will be used in
testing to verify that initialization was correct.
BRANCH=none
BUG=b:184856083
TEST=make buildall -j
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I578b32b24b3ee59abf646307fb9670d2db74fe3b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3133624
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There's a bug in the chip_revision calculation. Also, add a missing
include which causes a warning during build.
BUG=none
BRANCH=none
TEST=make buildall -j
Change-Id: Id636f4abcfffc0158d879d4b9333c7cb3ac1ee21
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3133800
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Yuval Peress <peress@chromium.org>
Auto-Submit: Yuval Peress <peress@chromium.org>
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Current software sets some registers only during initial
powering of LN9310 (when battery is plugged in). If LN9310
was reset for any reason and then a system power on was
attempted (power button press), then LN9310 would attempt a
startup without the workaround (bad idea). This change adds a
check before every LN9310 enable/disable event and
re-initializes LN9310 if a reset has occurred .
BRANCH=Trogdor
BUG=b:185308433
TEST=Should not break the current boot flow, i.e. power-up and
power-down (using long-press of the power button) should function
Change-Id: I98c08f50bfd48e09776033eac64658f6e27fb58f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2876869
Reviewed-by: John Crossley <crossley@lionsemi.corp-partner.google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: John Crossley <crossley@lionsemi.corp-partner.google.com>
Tested-by: John Crossley <crossley@lionsemi.corp-partner.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This improved workaround (compared to the previous 2520279) moves
the CFLY precharge step out of the ln9310's internal startup
sequence and implements it using I2C commands sent by the EC just before
the I2C command that triggers the ln9310 startup. The workaround
additionally modifies the ln9310's internal startup sequence to use
the precharged CFLY capacitors as decoupling of an internal node
during the startup sequence which should help prevent an OV glitch
from appearing on the LN9310 output even if the internal level
shifter on SW1 glitches and pulls up on the C1PA/B nodes.
BRANCH=Trogdor
BUG=b:185308433
TEST=Should not break the current boot flow, i.e. power-up and
power-down (using long-press of the power button) should function
similar to before this change. Testing the efficacy at preventing
the SCOUT overvoltage glitch must be done with LN9310 parts screened
out at wafer test that have a higher likelihood of exhibiting the
glitch at the SCOUT output. With these parts, startup should be
observed with a scope probe monitoring LN9310 SCOUT for overvoltagee.
Change-Id: I216991f950196225cabbbfdaa2333f1650f7f4fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2837531
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Tested-by: John Crossley <crossley@lionsemi.corp-partner.google.com>
Commit-Queue: John Crossley <crossley@lionsemi.corp-partner.google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move driver/ln9310.h to include/driver/ln9310.h so this header can be
readily included from Zephyr builds.
BUG=b:183054226
BRANCH=none
TEST=buildall
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I47c1d8dc8af90c690639ef1621cc66a9946ba40b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2776220
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CC_CHIPSET is only available if the chipset task is enabled, but the
ln9310 has no other dependencies on power sequencing. Bringup may
require this driver to be enabled before power sequencing. It makes
more sense to log to the I2C channel, since we communicate with this
chip on I2C.
BUG=b:183054226
BRANCH=none
TEST=buildall
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I3b040c88613be6075a834c6758b79965ab88fd76
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2776219
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set the minimum switching frequency to 25 kHz to
avoid the audible frequency band.
BRANCH=Trogdor
BUG=b:180886790
TEST=In IDLE mode check that LN9310 switching freq.
stays above the audible frequency range.
Change-Id: Ia609fd002e34b6bc684385ceb8405fe84a447ae7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2633442
Reviewed-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change initialization value of these three registers to reduce
hibernate mode current: INFET_CP_PD_BIAS_CFG=0x0, INGATE_PD_EN=0x0,
INFET_AUTO_MODE=0x1
BRANCH=Trogdor
BUG=b:176858036
TEST=In hibernate mode check that LN9310 VIN current drops
from 1.6 mA (w/ previous firmware) to ~105 uA.
Change-Id: I9041a912cd68fdf75a7bd2d40d88e17e1dc893c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2622758
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update Startup sequence to fully address SC_OUT over voltage issue.
BRANCH=master
BUG=170591575
TEST=Build successfully.
Change-Id: I31cbd839a7943ee19c19601bf178db6911f3dffd
Signed-off-by: Sean Hou <seanhou@lionsemi.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2520279
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to mitigate the risk of overvolting something that uses
very low power, we want to make sure our switching frequency is
not too slow.
Also, we are choosing to use VIN for VDR in case EXT_5V is not
available when the chip is trying to startup.
TODO: This patch might have some power efficiency implications on
lower current loads, but until we figure out a more ideal fix
this is a good temporary mitigation.
BRANCH=master
BUG=b:170591575
TEST=make BOARD=lazor EXTRA_CFLAGS=-DBOARD_REV=4
TEST=With a non ideal switchcap, and no load (eg: on limozeen keep
qsip pmic off), touch with a finger the BST1A capacitor (eg C67)
After this patch nothing bad will happen, without this patch the
QSIP might get overvolted and permanently killed.
Signed-off-by: Alexandru M Stan <amstan@chromium.org>
Signed-off-by: Sean Hou <seanhou@lionsemi.com>
Change-Id: Ie230eb8fe87db35854b727585a667cbfdb30e46c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2477473
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing code sets it to a wrong register, LN9310_REG_SYS_CTRL.
Correct it. Also override the LN9310_REG_SYS_CTRL to 0.
BRANCH=None
BUG=b:163867792, b:169127324
TEST=Verified the power-on sequence worked.
Change-Id: Idb96e5510eb47b7f652d9ea38be5a5a7eb84e88f
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2425454
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Leaving STANDBY_EN on blocks the power on sequence. Clear
the bit explicitly.
BRANCH=None
BUG=b:163867792, b:169127324
TEST=Built the image correctly.
Change-Id: Iadfcb3a7eb58f076704392f1dd7762400ed1ab58
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2424806
Reviewed-by: Sean Hou <seanhou@lionsemi.com>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use SELF_SYNC instead of MANUAL_UPDATE method to cross
OPERATION_MODE register, which is a multi-bit i2c register,
from i2c clock domain to local ref_clk domain
BRANCH=None
BUG=None
TEST=Built successfully.
Change-Id: Ibc4d1b6ae12a323a3b7c345247ab92e4acc762dc
Signed-off-by: Sean Hou <seanhou@lionsemi.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2393090
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Tested-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checking the input voltage to make the decision of 2S battery or 3S
battery is not reliable. The 3S battery with very low charge might be
under 10V that we initialized the switchcap to 2:1 mode. When the
battery was then charged up to 12V, VOUT would go to 6 V which would
be a problem.
This change moves the decision to board customization. It checks the
SKU ID. It can be extended to other ways, like checking the battery
manufacturer and device names.
To prevent any damage when attaching a 3S battery to a 2S-SKU board,
add a check before configuring the switchcap to 2:1 mode.
BRANCH=None
BUG=b:163867792, b:151393598
TEST=Built successfully.
Change-Id: I3f69132bc00b13ec39b229e98a34a5f7f75008f1
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2391210
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
|
|
Add LN9310 2:1 and 3:1 switchcap driver. It will be used in Trogdor
projects.
BRANCH=None
BUG=b:163867792
TEST=Defined the CONFIG and built correctly.
Change-Id: I14b55c7cd3be06e3811cc58a182b1694e6ad57ff
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2386481
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
|