| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, only the state of charge is modified by battfake command.
This patch applies the faked state of charge to the remaining capacity
as well.
BUG=b:163721887
BRANCH=Octopus
TEST=Verified Fleex wakes up host on BATTERY_LEVEL_CRITICAL.
TEST=Verified powerd reports faked state of charge.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I34eb409bab129804a983abbe2a1d021298ce044e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2432865
Reviewed-by: Todd Broch <tbroch@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow dedede boards to boot with only a 15W charger present.
BRANCH=None
BUG=b:166003337,b:168730307
TEST=on waddledoo and waddledee, confirm board can boot to S0 and remain
there with a 15W charger in C0 or in C1 and no battery
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I24f8f2f13bb2b2ba92ba6e2b87db569bd023e5c7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2438670
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
console.h currently relies on many config options to selectively
define macros. It does not currently include config.h, which means
these config options are not guaranteed to be defined by this point.
We will need this for Zephyr as well.
There were a few configuration header files which implicitly relied on
the ording of including console.h to bring in stdint.h at some point.
We explicitly include what we use here to fix that.
BUG=b:167590251
BRANCH=none
TEST=build passes
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ia005577a2579962ee8b14c61930f37fe28bc8f5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427088
Reviewed-by: Yuval Peress <peress@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We will move to an API compatible with Zephyr's API. See the bug for
complete rationale and plan.
BUG=b:169151160
BRANCH=none
TEST=buildall
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Id611f663446abf00b24298a669f2ae47fef7f632
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427507
Tested-by: Dawid Niedźwiecki <dn@semihalf.com>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We used rms_noise^2 as noise level for body_detection. But, there are
still some different noise level based on different devices. Add the
CONFIG_BODY_DETECTION_VAR_NOISE_FACTOR to adjust the noise_level.
Default value is 120%, since the 100% of the rms_noise^2 is not enough,
especially in 200Hz.
BRANCH=None
BUG=b:123434029
TEST=make buildall; make BOARD=ampton, re-flash the DUT, see if the body
detection works
Signed-off-by: Ching-Kang Yen <chingkang@chromium.org>
Change-Id: I2a7416b0bd8d0aac51d16c3aed9d962837f52c0b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2416477
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Heng-ruey Hsu <henryhsu@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chromium:1031705
BRANCH=master
TEST=None
Signed-off-by: kerker <kerker@chromium.org>
Change-Id: If043aa2d7d8b758571f43730635f741e3b81d8ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431316
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chromium:1031705
BRANCH=master
TEST=None
Signed-off-by: kerker <kerker@chromium.org>
Change-Id: I50b9aa6724bc6d9db5c7f743909d81c0b2dfc849
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431319
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since hayato firmware is ready now, we can now replace
board_get_version() calls by compile time macros to make the
code simpler.
BUG=b:163098341
TEST=make BOARD=asurada/hayato
BRANCH=none
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I5d40e29d097f0cf0cbc6d58b6154832e928445fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2437237
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement new gpio changes for rev2, including:
- temp sensors removed
- VBUS adc assigned to ADC0
- new location for it5205 interrupt is TBD, temporarily remove the code
BUG=b:168767467
TEST=1) `adc` in ec console
2) `ectool usbpdpower`
BRANCH=none
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I4de70280ad5c1af227242d62cf0aa61758f8cc20
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2435266
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Esche is non-power LED design, to indicate system suspend, blinking
battery white LED (1 sec on/1 sec off) to indicate system suspend
without charging.
BUG=none
BRANCH=firmware-kukui-12573.B
TEST=Make sure LED blinking on suspend without charging.
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: I7a2fb73434efec7da3bf5bcd68d658db20418f99
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2432227
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Share with same firmware with Burnet base on SKUID.
BUG=b:161767717
BRANCH=firmware-kukui-12573.B
TEST=make buildall
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: I5b7e3b69d8af821aea5646ee40e510a6dc45d271
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431311
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Burnet is 360 SKU and Esche is clamshell SKUID. Disable Esche IMU
sensors base on SKUID.
BUG=none
BRANCH=firmware-kukui-12573.B
TEST=On Burnet, check sensor initial passed.
TEST=On Esche, check no sensor initial.
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: I1839fb7c1366c8ccde6db00f0fba9f1eb9f6d3a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2387681
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CL:2321689 already sent SKUID to EC. This patch enable AP set SKUID
to EC to distinguish platform factor.
BUG=b:161767717
BRANCH=firmware-kukui-12573.B
TEST=make buildall -j and boots to Burnet
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: I5f92c293a26c0612b3a61bf009961217e17e8f3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2386691
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Disable PD log and enable GPIO short name to save ~800 bytes for RO.
BUG=none
BRANCH=none
TEST=make buildall
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: I326199411a3728b0ff6f5dc9531ad054245b31b5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2432226
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apply CL:2043151 to burnet.
BUG=b:169259387
BRANCH=firmware-kukui-12573.B
TEST=Boot Burnet, no sensor init fail.
TEST=emmc still works.
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: Ic4bde54ab3bf2b1482230335fe5d2b71dc72faa6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2430908
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify usb_mux structure, and set up by different board_id.
BUG=b:162802526
BRANCH=none
TEST=modify board_version
and unit can project to external monitor via main board type-c.
Signed-off-by: elmo_lan <elmo_lan@compal.corp-partner.google.com>
Change-Id: I13b3ef4d808edf4aa667d36053897dd1369daa81
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431320
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:167884598
TEST=make BOARD=zed
BRANCH=master
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I0b3542bff38756c07e5073672f0d485cd6a9d0c8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428444
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Supports ULPOSC and selects ULPOSC2 (360MHz).
BRANCH=none
BUG=b:146213943
BUG=b:156222893
TEST=make BOARD=asurada_scp
Signed-off-by: Tzung-Bi Shih <tzungbi@chromium.org>
Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Change-Id: Ib9f043bb5575a6e18fc64479c7b241e11e012b5c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2198823
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 61d40d6eaa88437d48e06fba9b773f7eb99f6ecc.
Revert the workaround since CL:2393404 solved the problem.
BUG=b:163076059
BRANCH=zork
TEST=none
Change-Id: I0397141b5b4e15736172474cb073842e18c3a71d
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2437194
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This was added to the presubmit back in the days of the legacy commit
queue, to avoid blowing up the CQ when unit tests had not been run.
This is unnecessary now with Parallel CQ, these tests are run as a
part of CL-specific commit queues.
BUG=none
BRANCH=none
TEST=presubmit
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I57837755e37cc46f80ad5bd7c61082d2c7077aa8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2436379
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since all chromebooks are DP SRC, set TUSB544 always at
DP Alt mode source (set TUSB544_DIR_SEL_USB_DP_SRC
to register TUSB544_REG_GENERAL6).
BUG=b:169303733
BRANCH=zork
TEST=Plug in typeC monitor which can provide 20V power and
make sure it can display while boot to S0 on Ezkinil.
Change-Id: I893f7f0ca98ede6ffd678c1118212cad9184d2ba
Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431313
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
Tested-by: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove motion sense (gyro + accel) drivers, since HW has none.
BUG=b:166183179
BRANCH=zork
TEST=none
Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: I954bf491dd7cecf8a76d28b02ea100a0decb12d6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2437191
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds config options and tables required to pull in i2c support
for honeybuns. In addition, config options for CBI were added to
facilitate i2c testing.
BUG=b:148493929
BRANCH=None
TEST=ran i2cscan on quiche
> i2cscan
Scanning 0 usbc.................
0x18.
0x19.
0x1a.
0x1b.
0x1c.
0x1d.
0x1e.
0x1f.
0x20.
0x21.
0x22.
0x23.
0x24.
0x25.
0x26.
0x27...........................
0x42..............................
0x60.......................
Scanning 1 usb_mst.
0x08.
0x09.
0x0a.
0x0b.
0x0c.
0x0d.
0x0e.
0x0f.
0x10.
0x11.
0x12.
0x13.
0x14.
0x15.
0x16.
0x17..........................................
0x41................................
0x61.........
0x6a.............
Scanning 2 eeprom.........................................
0x30................................
0x50.......................................
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: Ib1b8b795a2a07a5b1cbe167b17c3f70a8d9703b2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2213943
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds the configs required to enable EC console.
BUG=b:148493929
BRANCH=None
TEST=verfied ec console works on quiche
> help
Known commands:
chan gpioget md sysinfo
crash gpioset panicinfo sysjump
flashinfo help reboot syslock
flashwp hibernate rw taskinfo
gettime history shmem timerinfo
HELP LIST = more info; HELP CMD = help on CMD.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: Ie78965483a1c70368e4375e63ddf33a423bb7776
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2399622
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL replaces the placeholder chip family/variant with the correct
version for the STM32G4.
BUG=b:168616400
BRANCH=None
TEST=make buidall
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: Id6e70d8048f7454302178dd8c6b47ba587b75a95
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2419495
Commit-Queue: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds a function in baseboard that will sequence through a list
of gpio controlled power rails and chip resets. The table includes a
delay prior to executing the next entry. The table is intended to be
in board.c as the rails and delays can very much be board specific.
BUG=b:167430750
BRANCH=None
TEST=Verified that power rails come up and status LED is on.
Signed-off-by: Scott Collyer <scollyer@google.com>
Change-Id: I830dee9eb28d4648d274d8cbc49b6972cd70dba5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2213837
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Scott Collyer <scollyer@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
samus_pd is on the very edge of usable flash RO. Free up some space to
give us breathing room.
Before:
52 bytes in flash and 1620 bytes in RAM still available on samus_pd RO
436 bytes in flash and 1620 bytes in RAM still available on samus_pd RW
After:
564 bytes in flash and 1620 bytes in RAM still available on samus_pd RO
920 bytes in flash and 1620 bytes in RAM still available on samus_pd RW
BRANCH=none
BUG=b:169343201
TEST=make buildall
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ia898e74f0d9a88d7a78b1cc0bd5bdbf3c1b14818
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2430284
Commit-Queue: Keith Short <keithshort@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reasons:
1. We integrated pd into ec for all recent projects. So after Skylake,
we don't need it anymore.
2. For old project, they can find it in firmware branch.
BUG=chromium:1031705
BRANCH=master
TEST=None
Signed-off-by: kerker <kerker@chromium.org>
Change-Id: I8975a0d61058b9c95c7c681c17cf1c543cffeaac
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2434587
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 6ed9b65ae38977118f0d5f02d6f5c61da23c5f24.
Reason for revert: Historically, Octopus variants used the baseboard
VID and PID.
Original change's description:
> volteer: Move USB PID to board files
>
> Add TODOs to update variants boards.
>
> BUG=none
> TEST=make buildall
> BRANCH=none
>
> Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
> Change-Id: If0d8d0dd544c06114f355dcf281b2841a8397aee
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2417348
> Reviewed-by: Keith Short <keithshort@chromium.org>
BUG=b:168826898,b:168827570,b:168827133,b:168827128,b:168827420
BUG=b:168827418,b:168826886,b:168826868,b:168827029,b:168826914
Change-Id: I5b9b1cee25e34a4b922fd604b49deabc9591b4e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431687
Tested-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For boards which are using the SM charger chips, they will have a Psys
offset register to generate the OCPC Psys output.
BRANCH=None
BUG=b:168783892
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ib963ed11f73a76dfeffa11d5ab4a81ccbbd71102
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2435746
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some dedede batteries have a charge request of (0,0) when the
battery is completely depleted. Enable this config option to help
revive those batteries.
BUG=None
BRANCH=None
TEST=Build and flash drawcia, drain battery until it's dead, plug in a
charger on C1 and verify that the battery can be revived.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: I9206120a0c36813cbcd5618fe595faf57741ac47
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431696
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit fixes a bug in how OCPC determined which portion of the
charge curve that we are in. Upon startup, the phase is uninitialized
and we get a charge_request of 0,0. The code assumed that if the
battery voltage was less than the desired voltage, we'd be in the CV
state. But ignoring a zero desired voltage prevented us from assuming
we're in CV.
BUG=b:168135339
BRANCH=None
TEST=Build and flash drawcia, cutoff the battery, wait 15s, plug in a
charger on C1, verify that the DUT comes out of cutoff.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: Id5f36d701c2d4e1608954c898c5bc4f0010dec1d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431695
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The OCPC code will ensure that the first VSYS set point is either the
battery voltage, or if not present, the minimum battery voltage as
specified by the batt_info structure. There's no need to set an
intermediate value here upon init. The default regulation set point
will be set by the strapping resistor on the charger IC before FW even
gets a chance to run.
BUG=b:168730125
BRANCH=None
TEST=Build and flash drawcia. Cutoff battery, wait 15s, plug in
charger on C1, verify that VSYS is not initially set with a bad
voltage.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: Ibf7c09679fc132c049b79f7ac070d9b3caed794b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431694
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 1a09ade7b846cc048fb2f177adcacd5f836b8887.
Reason for revert: b:167734179 CCD detection is failing on many devices. Tests on reverted devices show this is primary cause.
Original change's description:
> ServoV4/V4p1: Change CCD detection flow
>
> Currently, servoV4 and servoV4p1 don't apply terminations to SBU when
> searching for a DUT. This means SBU can float which can break the SBU
> voltage detection. Technically, the DUT should only need to pull up D+
> and can float D- since it is a FS USB2 device when in CCD mode.
>
> Change the detection to connect SBU to the USB2 hub on servoV4/4p1. The
> USB2 hub will apply 15k pulldowns to the USB lines, which will pull SBU
> down and fix detection in the case where the DUT floats SBU.
>
> BUG=b:161762948, b:150886157, b:151487379
> TEST=make BOARD=servo_v4; make BOARD=servo_v4p1
> TEST=check that CCD works on DUT without pulldown resistors on SBU
> BRANCH=none
>
> Change-Id: I9b6f620617fb0e270e35804704111afd3c606a3b
> Signed-off-by: Eric Herrmann <eherrmann@chromium.org>
> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2352439
> Reviewed-by: Wai-Hong Tam <waihong@google.com>
BUG=b:167734179, b:168546666, b:168548776
TEST=Measured SBU voltages with the prior CL included, observed
low voltages and no-voltage on some platforms including variations
of dedede under the flipped orientation.
TEST=Reverted the CL and CCD detection worked reliably,
devices with CCD not driving SBU rails started working, and
labstation release was more reliable on prior versions.
Change-Id: Iaecd7371164804ce09a7fd19ac8fd1f44d93aef2
Signed-off-by: Brian Nemec <bnemec@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2429496
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Eric Herrmann <eherrmann@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When coming out of cutoff, the BFET can be disabled if the system is
powered up from an auxiliary charge port and the battery is dead. Our
attempts to regulate VSYS won't actually cause the battery to come out
of cutoff. This commit adds a check to see if the BFET is disabled
and tries to enable it such that the battery can actually be charged.
BUG=b:168730125, b:168135339
BRANCH=None
TEST=Build and flash drawcia, cutoff battery, wait 15s, plug in AC on
C1, verify that DUT is able to revive battery pack and start charging.
Verify that this works at 0% SoC and 50%.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: Ie452f1e82f39fb7b525db60e198ab584e2b1564e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431693
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since changing the approach of charging via the sub board on systems
that use the SM5803, we need to update the PID constants to work with
this new approach. This commit updates the constants for drawcia.
BUG=b:168253008
BRANCH=None
TEST=Build and flash drawcia and verify charging is working as
expected.
Change-Id: I8073aa240f90a0ba1ba3d2adabdc0e9fd12dfc6d
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2415512
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit updates the PID constants for waddledee after having
switched to forcing the BFET on instead of using linear mode for the
majority of the charge curve.
BUG=b:168253008
BRANCH=None
TEST=Build and flash waddledee, verify that charging from the sub
board is working and converges without significant oscillation.
Change-Id: Ia55d7b693c4e0745fc4bec94c96595c81995be3c
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2407018
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit just performs some miscellaneous fixes for OCPC.
Some key fixes are:
- Fix handling of full batteries with respect to CFET status
- Reducing upward transitions
- Restrict system resistance calculations to high current scenarios
only.
BUG=b:168135339
BRANCH=None
TEST=Build and flash waddldee with new PID constants, drain battery,
verify DUT can charge from the sub board port all the way to full,
verify DUT can source out the main board port while charging from the
sub board. Verify that the charging curve is fairly stable.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: Id170b1c5dfe56733f4ebcf350bf96d0de59e3ec4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2411467
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When tuning an OCPC system, the OCPC debug output is very useful in
order to examine the behaviour of the system. However, instead of
simply looking at a bunch of changing numbers on the terminal, it's
easier to view a waveform of the current entering the battery. In
lieu of using an oscilloscope with a current probe, this commit adds a
visualization graph which shows the current entering the battery
relative to the target current. Each segment on the graph represents
5% of the target current.
Usage is as follows:
> ocpcdebug enable/viz/all/disable
`enable` will show text debug only.
`viz` will show the visualization graph (output shown below).
`all` will show both the graph and text debug data.
`disable` will show no debug output.
Here is an example of the output
[2665.199505 Act Chg: 1]
[2665.702271 Battery 47% (Display 47.1 %) / ??h:?? to empty]
[2665.703810 charge_request(13050mV, 1800mA)]
[2665.725854 OCPC: Target VSYS: 11979mV]
[----------#----------] (actual)251mA (desired)1880mA
[2666.317342 OCPC: Target VSYS: 12179mV]
[----------|---------o] (actual)879mA (desired)1880mA
[2666.908941 OCPC: Target VSYS: 12274mV]
[----------|-----o----] (actual)1216mA (desired)1880mA
[----------|o---------] (actual)1631mA (desired)1880mA
[2668.090373 OCPC: Target VSYS: 12259mV]
[----------#----------] (actual)1797mA (desired)1880mA
[----------#----------] (actual)1813mA (desired)1880mA
[----------#----------] (actual)1769mA (desired)1880mA
[----------#----------] (actual)1779mA (desired)1880mA
BUG=None
BRANCH=None
TEST=Build and flash waddledee, enable debug command, verify that
visualization graph is shown.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: Ie271524ce2ce90781b966a77f2a7ef27dc969075
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2410556
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: David Schneider <dnschneid@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to have both our charger ICs behave the same way when running
OCPC, this commit changes our usage of the charger IC to force the
BFET to be on during the majority of the charge curve. This also
improves efficiency over using the previous linear mode.
Additionally, as part of the charger init, the initial VSYS voltage is
set to the battery voltage.
BUG=b:168253008,b:168252106
BRANCH=None
TEST=Build and flash waddledee. Verify DUT can charge from both
ports. Verify DUT can source out of both ports. Verify that DUT can
sink and charge simultaneously from both ports.
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Change-Id: I56a59b4aaff11b6f2f190695c8497b19a9dbf9e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2410555
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify battery parameters:
1.SMP:precharge_current to 256,start_charging_max_c to 50
2.LGC:precharge_current to 256
3.SUNWODA:precharge_current to 186, start_charging_max_c to 50
BUG=b:167264077
BRANCH=none
TEST=make buildall -j
Signed-off-by: jerry2.huang <jerry2.huang@lcfc.corp-partner.google.com>
Change-Id: I37dbcc176d22988a47fba5b59d82b3b3e2eb6b68
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2435169
Reviewed-by: Henry Sun <henrysun@google.com>
Commit-Queue: Henry Sun <henrysun@google.com>
Tested-by: Henry Sun <henrysun@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:168453157
TEST=Verify virtual_battery_operation() is called
BRANCH=none
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: If634d6fafab7e49dcfeae8088e07d0f7de5cf89e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2434838
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In order to support the kernel driver to use the ioexpander
pwm driver, we add two host command EC_CMD_PWM_SET_DUTY and
EC_CMD_PWM_GET_DUTY to the board layer to support it.
Besides, to avoid the RO rom size overflow, we remove the
ioexpander pwm function and keyboard backlight function
from the RO rom.
BUG=b:162902808
BRANCH=firmware-kukui-12573.B
TEST=build pass
Change-Id: Ibbd66164c19cd792a865f471c0c32ecb595f75e7
Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2430904
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The value in PWMDCRi register is used to control the clock
of the PWM. We only need to set the clock value to the
register after normalized to the 255.
BUG=b:162902808
BRANCH=firmware-kukui-12573.B
TEST=`kblight <percentage>` is working correctly
Change-Id: I6a0c012a06789eb8bbca6209a00b06ef34ee9c86
Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431321
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL update USB_C1_HPD_IN_DB use gpio_or_ioex_set_level().
BUG=none
BRANCH=zork
TEST=verify EC not panic on board version>=3.
Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Change-Id: Ifc01005d0f974f1ab3f5f095156b516e0cba9ff1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428355
Reviewed-by: Edward Hill <ecgh@chromium.org>
Commit-Queue: Edward Hill <ecgh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chromium:1031705
BRANCH=master
TEST=None
Signed-off-by: kerker <kerker@chromium.org>
Change-Id: I78713f635e00cf01e1df641436b3a6d2f5c3c00b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431318
Reviewed-by: Yu-Ping Wu <yupingso@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Vbus PROCHOT comparator provides feedback for OTG Vbus sourcing,
so it should not be disabled while a port is active. Additionally, it must
be enabled before Vbus is sourced and so is not a candidate to move into
the PD connect/disconnect hooks. It can be disabled on PD disconnect in
chipset off or suspended states to save power after unplug.
BRANCH=None
BUG=b:168931726
TEST=on waddledee, reboot EC with a sinking dongle plugged in and
observe the port begins sourcing again in S0 with no errors. Suspend
DUT and observe sourcing out continues to work, and remove dongle and
observe all PROCHOT comparators are disabled.
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I70f7d8386c650d91257e5d76f95aa5cef145c5ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2429520
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Supports NPCX797FC dose not leave unused flash space.
BUG=b:169172356
BRANCH=master
TEST=make buildall
Change-Id: I643790fc34b949d4efc847bb102f3d29fd341a12
Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2425986
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The reversed-plug is not supported. Updated the TODO's and removed
the reversed-plug detection.
BRANCH=None
BUG=b:169094188, b:168712053
TEST=Built the Coachz image.
Change-Id: I15563c91e37bb752f15a7538bd1e19b9d922d5f9
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2432411
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Trace pyusb source code to make sure the correct interface, and change
them properly.
BUG=chromium:1031705
BRANCH=master
TEST=None
Signed-off-by: kerker <kerker@chromium.org>
Change-Id: I185bf8a7d47f641f6554ba2d36a11d56967661b0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2422929
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|