Commit Graph

16504 Commits

Author SHA1 Message Date
Jason.Guo 5326411b2c gumboz: Update power led behavior.
This path update power led behavior as following:
system s0 power led on
system s0ix blinking white
system s5 power led off

BUG=none
BRANCH=Zork
TEST=none

Signed-off-by: jason.guo@quanta.corp-partner.google.com
Change-Id: Ic77e5795494a543405b513878ea643f41028af3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567862
Reviewed-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
2020-12-09 02:33:17 +00:00
Tommy Chung 18609f320d lantis: Update LED configuration
In lantis, we have a power LED and two battery LEDs. Also, we have two
USB-C ports, and which battery LED takes action related to different
charging states will depend on which USB-C port has been plugged in for
power charge. We blink power LED to indicate system suspend, and we also
override battery LEDs for clamshell SKU, which doesn't have power LED.

BUG=b:171546871
BRANCH=dedede
TEST=Make sure that all LEDs act correctly.

Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
Change-Id: I32e931efad9477f64e83e75057b3ae04db997e63
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2556726
Reviewed-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
2020-12-09 01:48:07 +00:00
YongBeum.Ha db240bf9ab sasuke : apply EC change in sasuke
Sync with schematics of sasuke

BUG=b:172869638
BRANCH=None
TEST=make BOARD=sasuke

Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com>
Change-Id: Ib19431e2f4dd6b9da1e5f2e06a44883496bead54
Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2569070
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Raymond Chung <raymondchung@ami.corp-partner.google.com>
2020-12-09 01:38:27 +00:00
Craig Hesling e1718af45b dartmonkey: Note for unused SLP_S4_L and SLP_SUS_L
These sleep lines were never used in code and have since been removed
from the reference schematic, but they are driven on nocturne.
This means that it would be bad if thee lines were ever accidentally
repurposed in the future.
Confirmed on A70 PVT/MP schematic.

TEST=make BOARD=dartmonkey
BUG=b:175115925

Change-Id: I3d1e3bbee5d242026a37464f6f0154243e262972
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2579463
Tested-by: Craig Hesling <hesling@chromium.org>
Auto-Submit: Craig Hesling <hesling@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Commit-Queue: Craig Hesling <hesling@chromium.org>
2020-12-08 23:31:45 +00:00
Keith Short b5b7e4500c volteer: Configure additional unused signals
Configure additional unused signals to save power on S0ix. Savings are
about 200 uW.

EC power consumption, averaged over 60 minutes:
Before changes: Avg 5.07 mW, max 13.61 mW, min 3.68 mW
With changes: Avg 4.84 mW, max 7.14 mW, min 3.54 mW

BUG=b:155882590
BRANCH=none
TEST=make buildall
TEST=Use Volteer reworked with sweetberry and measure power.

Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I9f01b04b0c363a31a8c6f703666d65f00c79ad8c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2578932
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
2020-12-08 21:57:57 +00:00
Yuval Peress 6f0894886e common:online_calibration: Spoof sensor data
This change allows the `accelspoof` ec command to also
override the calibration data (bypassing the calibration
module). This config flag should be used when testing
layers above the EC (kernel and up)'s handling of the
calibration values.

BRANCH=none
BUG=none
TEST=Built on eve and added unit tests.
TEST=make run-online_calibration_spoof -j

Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I4735b9613c152af5559661a91565b05635d6495e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2494986
2020-12-08 19:06:07 +00:00
Abe Levkoy 9760abbefe TCPMv2: Fix Soft Reset logic
BUG=b:173025773,b:173025737,b:155181980
TEST=Observe Soft Reset after not receiving GoodCRC 3 times
BRANCH=firmware-volteer-13521.B-master

Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: Iee7016549a8a83b21d0a7ca168ace7ea2594a594
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2578199
Reviewed-by: Diana Z <dzigterman@chromium.org>
2020-12-08 17:48:24 +00:00
Tao Xia 51626bb285 storo: Initial EC image
Create the initial EC image for the storo variant by copying the
waddledee reference board EC files into a new directory named for
the variant.

(Auto-Generated by create_initial_ec_image.sh version 1.3.0).

BUG=b:174284884
BRANCH=None
TEST=make BOARD=storo

Signed-off-by: Tao Xia <xiatao5@huaqin.corp-partner.google.com>
Change-Id: If1648599689e6da5985248ffa095b298ef221142
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567079
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Tested-by: Wentao Qin <qinwentao@huaqin.corp-partner.google.com>
Commit-Queue: Henry Sun <henrysun@google.com>
2020-12-08 16:13:10 +00:00
Patryk Duda f03d488b98 power/host_sleep: Fix notifying about power state transitions
CL:2321874 moves sleep_set_notify() and sleep_notify_transition()
under CONFIG_POWER_SLEEP_FAILURE_DETECTION ifdef and introduces their
no-op counterparts if CONFIG_POWER_SLEEP_FAILURE_DETECTION is not
defined. Before that CL aforementioned functions were outside ifdef.
Commit message also mentions that CL is only moving code, not performing
any logical changes.

Therefore this CL is moving sleep_set_notify() and sleep_notify_transition()
outside ifdef and removes their no-on counterparts to eliminate logical
changes introduced in CL:2321874

Issue was found when running EC ToT on octopus (casta). When AP was
going to S0ix EC reported that fact, but PD was not changing DRP
state to 'toggle off'.

BUG=b:162083524, b:161775827
BRANCH=none
TEST=Compile and flash firmware on octopus (tested on casta).
     Go to ChromeOS Developer Console and issue 'powerd_dbus_suspend'
     Check EC console if PD stack is reporting state transition and make
     sure that DRP is set to 'toggling off'

Signed-off-by: Patryk Duda <pdk@semihalf.com>
Change-Id: I6ba4187c8549ee6d9e3b19543d67c49520927cb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575064
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
2020-12-08 08:51:58 +00:00
Diana Z e8f63281b4 Waddledoo: Reduce flash usage
Define CONFIG_DEBUG_ASSERT_BRIEF for waddledoo to save flash space.

BRANCH=dedede
BUG=None
TEST=make -j buildall; observe waddledoo is back over 2k free flash

Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I90223c6c46067aa23dd9722377cbaf3202a32e52
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576451
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
2020-12-08 08:19:08 +00:00
Eric Yilun Lin dd1942af2d charger: replace charger_get_input_current uses
Replace them with charger_get_input_current_limit which is
aligned to the old usage, no funcional changes.

Keep OCPC charger_get_input_current uses as was, since it
is its intended use.

Also, implement
- isl923x_get_input_current, raa48900_get_input_current
- sm5803_get_input_current_limit

BUG=b:171853295
TEST=1. grep "\<charger_get_input_current\>"; only ocpc uses the function.
     2. make buildall
     3. test with CL:2569086 on waddledee(sm5803), waddledoo(raa489000),
        hayato(isl923x), pompom(isl923x), and ensure the output
        of `curr 0|1` equalts to the report of power meter.
BRANCH=none

Change-Id: I71aca33cbc88dda9b0238cb71b1609665a9c9a7f
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2569085
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
2020-12-08 06:28:52 +00:00
Eric Yilun Lin 7ae129c1f3 charger: add charger_get_input_current_limit
A pre-processing CL for the later CL which migrate API from
charger_get_input_current.

BUG=b:171853295
TEST=make buildall
BRANCH=none

Change-Id: Ia15ce47ac5d068b7125c58115e368f9dfa87958c
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2569084
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
2020-12-08 06:28:44 +00:00
Eric Yilun Lin a94624f1a2 charger: rename charger_set_input_current
charger_set_input_current was actually sets the input current limit,
so renames it to charger_set_input_current_limit.

BUG=b:171853295
TEST=make buildall
TEST=not output from `grep -r "\<charger_set_input_current\>"`
BRANCH=none

Change-Id: Icf4e99f287a7d4fc2d9560e8502e46cc07bfc085
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2569083
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
2020-12-08 06:28:42 +00:00
Gwendal Grignou 4761e94ef6 driver: tcs3400: Report ODR for RGB sensor
To be able to send data to the host, the oversampling ratio must be
non-zero. It implies:
- the host send a set frequency request for the RGB sensor
- the EC use the frequency from the clear sensor to calculate the
RGB sensor oversampling ratio

BUG=b:172343923
BRANCH=kukui,hatch,volteer
TEST=On Volteer, in calibration mode, check we get samples from the RGB
sensor.

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Change-Id: I70eb62287cae983800cdadaee4cfe00b2f22b734
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2570825
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2020-12-08 05:41:24 +00:00
Gwendal Grignou 55c8840ada driver: tcs3400: In calibration mode: always send data
When in calibration mode, send data periodically, even when
measurement is identical to the previous one.

BUG=b:172343923
TEST=On Volteer, check data is coming periodically.
BRANCH=kukui,hatch,volteer

Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Change-Id: I31da6edcf5d175812697b99b7e7ef6ec85497770
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2570824
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2020-12-08 05:41:23 +00:00
wen zhang 1c5dbcb07c Kakadu: Fix battery charging status for bq27542
Fix the battery charging status for gauge bq27542.

BUG=b:174725434
BRANCH=master
TEST=1.make -j BOARD=kakadu
     2.verified the battery charging status and the result is OK.

Change-Id: Ie3a926dd96b967679d2c51856afc3d1c157835f5
Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576196
Reviewed-by: Chen-Tsung Hsieh <chentsung@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
2020-12-08 05:38:35 +00:00
Eric Yilun Lin 9551bd9430 kukui: allow Vconn swap if battery exists.
BUG=b:174324375
TEST=insert Apple dongle, and HDMI port works.
BRANCH=kukui

Change-Id: I6ac5c6ce172c6f395a38b0be7dffb4e92f3b9dc4
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2578221
Reviewed-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Tested-by: Mike Lee <mike5@huaqin.corp-partner.google.com>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
2020-12-08 05:32:33 +00:00
Ko_Ko fc827a9f05 Madoo: Fixing LED behavior
Fix the following behavior:
1. Rescue LED from EVT and previous board(board id<3)
2. Change low battery led color according to customer's demand
3. Fixing the issue that when removing AC from right port, left
   battery led will blink and go off.

BUG=b:173464588
BRANCH=None
TEST=flash on EVT board and change cbi to verify the LED functions

Signed-off-by: Ko_Ko <Ko_Ko@compal.corp-partner.google.com>
Change-Id: Ie4a855e4d846a05b681e386cb82f702eea8c4e6e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2577152
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Ko Ko <ko_ko@compal.corp-partner.google.com>
Tested-by: Ko Ko <ko_ko@compal.corp-partner.google.com>
2020-12-08 04:01:21 +00:00
Eric Herrmann a0f2c4640c SYV682: Disable VCONN on VCONN OCP
The SYV682 has a 'soft' overcurrent protection on VCONN which current
limits to ~600mA. If the cause is a short it will eventually hit thermal
shutdown. Instead, we should disable VCONN when we get an OCP event. We
must allow current spikes for at least 1ms, so disable with a deglitch.

BUG=b:170441866,b:172710638
TEST=make buildall
TEST=On Voxel, short VCONN to ground for at least 100ms, then observe
that VCONN is disabled and 'VCONN OC!' is printed in the EC console.
BRANCH=None

Signed-off-by: Eric Herrmann <eherrmann@chromium.org>
Change-Id: I6712543b73072c959597c73cd493f248267a42ae
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2572237
Reviewed-by: Keith Short <keithshort@chromium.org>
Tested-by: Keith Short <keithshort@chromium.org>
2020-12-08 01:32:22 +00:00
Peter Marheine de6407f867 TCPMv2 DRP: always try sink caps on PE_SNK_Ready for FRS
Prior to this change, device policy was inhibited from requesting
partner sink capabilities when entering SNK.Ready out of a power role
swap (because the flag gets cleared while invalidating the old contract
in the PRS process), which prevents Fast Role Swap from being enabled
in most situations- for instance Section E.2 of the USB-PD specification
revision 3.0 version 2.0 states that a PRS is a normal part of
connecting to a hub and the device should request sink caps via device
policy in order to enable FRS.

This change attempts to get sink caps from the port partner in
PE_SNK_Ready, then use them to evaluate support for FRS. By moving
partner capabilities evaluation to PE_SNK_Ready, we also prevent
FRS from being enabled when operating as a source: we don't expect
sinks to send FRS, and this helps avoid detecting (and attempting to
act on) spurious FRS signaling.

BUG=b:146393213
TEST=Morphius connects to a hub supporting FRS as expected and successfully
     completes a fast role swap when power is removed from the hub.
BRANCH=zork

Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: Icf402b4ded99d35e23b51b168cb7f306c3ac156b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2564978
Reviewed-by: Diana Z <dzigterman@chromium.org>
2020-12-08 01:07:38 +00:00
Edward Hill 527cde4475 npcx: Don't delay hibernate wake by 2 seconds
Waking from PSL hibernate is power-on for EC but not for H1, so
we should not add the 2 second delay for CONFIG_BOARD_RESET_AFTER_POWER_ON
in this case.

BUG=b:173180800
BRANCH=zork
TEST=no 2 second delay on wake from hibernate

Signed-off-by: Edward Hill <ecgh@chromium.org>
Change-Id: Ib0c8f2ca7f197626b20a11e21ace44a5046db18b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576439
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
2020-12-07 21:38:40 +00:00
Ruben Rodriguez Buchillon 055007c09b stats_manager: add export to b/ friendly .md
This change in addition to our copy/paste friendly textfile also outputs
a buganizer markdown friendly .md summary of the results, to paste into
bugs.

BUG=b:174800621
BRANCH=None
TEST=dut-power -t 3
Storing .md summaries at:
[...]/S?_20201204-104756/onboard_summary.md
     cat [...]/S?_20201204-104756/onboard_summary.md
**Onboard INA**

|NAME|COUNT|MEAN|STDDEV|MAX|MIN|
|-|-:|-:|-:|-:|-:|
|LCD_BL_VOUT_mw|3|0.00|0.00|0.00|0.00|
|PP1200_BRIJ_mw|3|0.00|0.00|0.00|0.00|
|PP1200_TCPC_C0_mw|3|0.00|0.00|0.00|0.00|
|PP1800_EC_mw|3|0.00|0.00|0.00|0.00|
|PP1800_SENSORS_mw|3|0.00|0.00|0.00|0.00|
|PP1800_VR_mw|3|0.00|0.00|0.00|0.00|
|PP3300_A_R_mw|3|0.00|0.00|0.00|0.00|
|PP3300_EC_STBY_mw|3|0.00|0.00|0.00|0.00|
|PP3300_EC_mw|3|0.00|0.00|0.00|0.00|
|PP3300_H1_mw|3|0.00|0.00|0.00|0.00|
|PP3300_HUB_mw|3|0.00|0.00|0.00|0.00|
|PP3300_PD_A_mw|3|0.00|0.00|0.00|0.00|
|PP3300_PD_EC_mw|3|0.00|0.00|0.00|0.00|
|PP3300_TCPC_C0_mw|3|0.00|0.00|0.00|0.00|
|PP5000_A_mw|3|0.00|0.00|0.00|0.00|
|PPVAR_BAT_R_mw|3|0.00|0.00|0.00|0.00|
|PPVAR_BAT_mw|3|0.00|0.00|0.00|0.00|

TEST=pytest stats_manager_unittest.py
21 passed

TEST=python2 -m py.test stats_manager_unittest.py
21 passed

Change-Id: I94e2d00721e744614838992604cd7a3124c0e39f
Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2573736
Reviewed-by: Puthikorn Voravootivat <puthik@chromium.org>
2020-12-07 21:34:14 +00:00
Michael5 Chen 9519eb83f1 delbin: Initial PS8811 registers.
Depend on b/160937185 #32, initial PS8811 registers.

BUG=b:160937185
BRANCH=firmware-volteer-13521.B
TEST=manual
Check register value under s0.

Signed-off-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com>
Change-Id: I262858b61050f9ad857f44e703bbd3cfd0e989f0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2561904
Reviewed-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
2020-12-07 19:59:01 +00:00
amber.chen 8405cbe461 lindar: modify LED function to match LED SPEC
modify LED function to match LED SPEC

BUG=b:174443628
BRANCH=firmware-vloteer-13521.B
TEST=make -j BOARD=lindar

Signed-off-by: amber.chen <amber.chen@lcfc.corp-partner.google.com>
Change-Id: Ie51eaa92aed3c22c5452a132048f95287ea94367
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2566857
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
2020-12-07 19:45:36 +00:00
Tom Hughes bc4833e0da docs: Fix typos in write protection doc
BRANCH=none
BUG=none
TEST=view in gitiles

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Ib512490365a0f20380813bd871f7effbf374a435
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2552604
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
2020-12-07 17:23:01 +00:00
Tom Hughes b5f739adf6 docs: Fix headers in write protection doc
gitiles doesn't render backticks in headers.

BRANCH=none
BUG=none
TEST=view in gitiles

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: I312799ad938d35e8452a90d129baf933ff6639e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2552603
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
2020-12-07 17:22:57 +00:00
Jan Dabros db461b09ac servo_v4p1: Add support for host hub I2C interface
BUG🅱️150323106,b:169929627
BRANCH:master
TEST:make -b servo_v4p1.
     Verify that we are receiving descriptive message for all GL3590
     events. E.g. try to access invalid port:
     i2cxfer raw 1 0x50 0 0xd0
     For the full list of events refer to GL3590 I2C Application Note.

Signed-off-by: Jan Dabros <jsd@semihalf.com>
Change-Id: Ia34f1deb508bbbaad94d2eb1a279d200958db92e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2563687
Reviewed-by: Brian Nemec <bnemec@chromium.org>
2020-12-07 08:35:43 +00:00
Jan Dabros e6e50043b2 gl3590: Add initial support for USB HUB I2C interface
GL3590 is a USB hub with support for out-of-band transactions via I2C.
Set of additional registers allow to disable/enable ports, query port
status (including power-related information), handle over-current events
and others.

This initial driver implements method for reading and writing from/to
GL3590 registers as well as event handler to parse asynchronous messages
from hub.

BUG🅱️150323106,b:169929627
BRANCH:master
TEST:buildall. Functionality can be tested on servo_v4p1 with a
     consecutive commit applied.

Signed-off-by: Jan Dabros <jsd@semihalf.com>
Change-Id: I385ff4790ddc367d07b7e588f4e10aeb83e9f1c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2563686
Reviewed-by: Brian Nemec <bnemec@chromium.org>
2020-12-07 08:35:41 +00:00
Ching-Kang Yen f8bd5bd04c config.h: Make body detection setting use separate default value
Formerly, if a board want to customize the body detection settings, it
need to fill all the settings. This CL makes it just have to fill the
exact settings that we want to customize.

BRANCH=None
BUG=b:123434029
TEST=buildall

Signed-off-by: Ching-Kang Yen <chingkang@chromium.org>

Change-Id: I7554e8f21a446f8d93b2558402690e265e82b58e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2569087
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Ching-Kang Yen <chingkang@chromium.org>
Commit-Queue: Ching-Kang Yen <chingkang@chromium.org>
Tested-by: Ching-Kang Yen <chingkang@chromium.org>
2020-12-07 05:15:58 +00:00
Ben Chen 1df0d9f61f voxel: disable CONFIG_KEYBOARD_VIVALDI
Disable Vivaldi keyboard since Vivaldi currently does not
allow for side volume buttons to be distinguished from
keyboard volume F9/F10 keys. This is necessary so that Chrome
can ignore F9/F10 in tablet mode, but side volume buttons still work.

BUG=b:173147060
BRANCH=master
TEST=make -j BOARD=voxel
TEST=make buildall
TEST=test on voxel, side-buttons work in clamshell/tablet mode
and that F9/F10 only work in clamshell.

Change-Id: I6bcc07ede9e88a82c44642493037eca81936f98f
Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2573658
Reviewed-by: Keith Short <keithshort@chromium.org>
2020-12-07 03:01:03 +00:00
Jacky Wang 12525b7266 copano : Config EC chipset
Base on schematic, change EC chip to npcx7m7fc from npcx7m6fc.

BUG=b:174720060
BRANCH=firmware-volteer-13521.B
TEST=make BOARD=copano

Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com>
Change-Id: Iaf9d52636f6ffc14a9a15d776a3d65a0241a5ded
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2571135
Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
2020-12-07 02:07:19 +00:00
Marco Chen 272523a385 casta: change CONFIG_BC12_MAX14637_DELAY_FROM_OFF_TO_ON to 100
BUG=b:173166535
BRANCH=octopus
TEST=build and flash to casta; verify whether BC12 can detect
CDP/DCP/SDP correctly.
TEST=`make buildall -j`

Signed-off-by: Marco Chen <marcochen@chromium.org>
Change-Id: I6e3b9d79416a0cdf8200dae16e22cf0b2564c391
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567198
Reviewed-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com>
2020-12-07 01:40:32 +00:00
Marco Chen 4d0f6d74a5 max14637: add a config to define delay in ms from power off to on
BUG=b:173166535
BRANCH=octopus
TEST=Change delay to 100; build and flash casta; verify whether BC12 can
detect CDP/DCP/SDP correctly.
TEST=`make -j buildall`

Signed-off-by: Marco Chen <marcochen@chromium.org>
Change-Id: I08cd881a2413e540eaaab3789f98e28f39514ad5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567197
Reviewed-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
2020-12-07 01:40:30 +00:00
Yuval Peress 9094a1b13a zephyr: fix build for keyboard shim
See platform/ec/common/build.mk for reference. The use of
keyboard_scan.c should only be allowed when HAS_TASK_KEYSCAN
is defined. As such, we should always set HAS_TASK_KEYSCAN to
1 if CONFIG_PLATFORM_EC_KEYBOARD is defined. Further,
CROS_EC_TASK_LIST was defined per project and it doesn't need
to be, we can instead define it once for all boards depending
on which tasks are set to 1 in shimmed_tasks.h

Note that shimmed_tasks.h can still be used in tests.

BRANCH=none
BUG=none
TEST=zmake testall

Cq-Depend: chromium:2566421
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: Id0ed49dd49e3c4eb2ac23184cf943c91dcd261eb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567560
2020-12-05 05:16:48 +00:00
Simon Glass 8483283989 zephyr: Sort the options a bit
We have quite a few options already and plan to add more. Sort them to
make it easier to see what is there.

The I2C enum isn't really connected with the basic CONFIG munging done
in config_chip.h so move it to i2c.h instead.

Fix the 'keybaord' typo while we are here.

BRANCH=none
BUG=none
TEST=build and boot on volteer

Change-Id: Id03fe44ff859736f1e2f86231ca1e8d9dc4c50af
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575198
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
2020-12-05 02:48:13 +00:00
Jett Rink b06ad2df42 zephyr: add CBI module to zephyr options
Shim in CBI module and necessary dependencies.

BRANCH=none
BUG=b:168032342,b:168032589
TEST=type `cbi` on volteer

Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: Ic08f472f8d52cd4521b78f819ea22e337cccc6f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2572736
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Queue: Simon Glass <sjg@chromium.org>
2020-12-04 18:28:03 +00:00
Zick Wei 4682423de5 dirinboz: remove unuse config
This patch remove unuse config on dirinboz:
CONFIG_IO_EXPANDER_PCAL6408
CONFIG_USB_MUX_PS8740

BUG=none
BRANCH=zork
TEST=make BOARD=dirinboz

Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Change-Id: I6cbbb20b4b43c860206828943b9376959b0e1cad
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2573659
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
2020-12-04 17:01:01 +00:00
Eric Yilun Lin 8a03b83e5b asurada: use udelay for HPD pulse
usleep is unstable on asurada, we use udelay instead to prevent from
the pulse width over the spec (1ms).

BUG=b:171172053
TEST=ensure the pulse width is reliable.
BRANCH=none

Change-Id: I8b349b6d09dca3a116e6fc9a2552faa041664674
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2539262
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
2020-12-04 09:11:12 +00:00
Ting Shen 898d76ff51 power/mt8192: back to S5 when PMIC failed to shutdown
`apshutdown` sometimes fails to shutdown PMIC, when this happens,
powerstate will bounce between G3 and S5G3 until watchdog kicks in.

To fix this, we should detect PMIC status in S5G3, go back to S5 to
retry shutdown if PMIC is still alive.

BUG=b:174546890
TEST=Run the reproduce steps in b/174546890#comment13,
     verify EC enters G3.
BRANCH=main

Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I1f0544e16d818074378f58f1208bd586031a5ebb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2573895
Reviewed-by: Eric Yilun Lin <yllin@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
Tested-by: Ting Shen <phoenixshen@chromium.org>
2020-12-04 09:04:04 +00:00
Eric Yilun Lin ce184a2ee3 syv682x: update OVP warning
The VBAT OVP function is actually protecting the CC lines (if not VCONN
SRC), and VBAT (if VCONN SRC).

BUG=none
TEST=none
BRANCH=none

Change-Id: I2eda0d2777d7e0facaf7340afe8e500454fc7169
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2573664
Reviewed-by: Ayo Wu <ayowu@google.com>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
2020-12-04 08:57:36 +00:00
wen zhang 2c3dd5d148 Kakadu: Fix battery is_present status for bq27542
Fix the battery is_present status for gauge bq27542.

BUG=b:174802149
BRANCH=master
TEST=1.make -j BOARD=kakadu
     2.verified the battery present status and the result is OK.

Change-Id: Ic8d9d503bc2f7d9648df56c150018f304aacfb18
Signed-off-by: wen zhang <zhangwen6@huaqin.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2571145
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
2020-12-04 08:54:24 +00:00
Diana Z 832193295d COIL: Rename SLEEP_MASK_I2C_CONTROLLER
Rename SLEEP_MASK_I2C_CONTROLLER and related comments.

BRANCH=None
BUG=None
TEST=make -j buildall

Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ib49a5c6b07a203dc659ed65909292e5f1009d33f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2558907
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
2020-12-04 05:39:57 +00:00
Diana Z 21cc691d17 COIL: Rename local variables in common i2c_controller
Rename local variables and related comments in common i2c_controller
code.

BRANCH=None
BUG=None
TEST=make -j buildall

Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I712217d86f7232f509f1f649b772ec73204ceb53
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2558906
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
2020-12-04 05:39:56 +00:00
Eric Yilun Lin defe99857e sm5803: add parenthesis to the input of macros
Inputs have to be guarded with parenthesis.

BUG=none
TEST=make buildall
BRANCH=main

Change-Id: Iedf678e1a2b0f3525aa2b788b0e2c9171d3b4acc
Signed-off-by: Eric Yilun Lin <yllin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2570885
Reviewed-by: Tzung-Bi Shih <tzungbi@chromium.org>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
2020-12-04 03:49:55 +00:00
Matt Ziegelbaum 651090dfda genesis: hardcode barrel jack connected state
The proto boards have an error in which GPIO_BJ_ADP_PRESENT_L never
pulls low due to an error in the board layout. Since it's not possible
to boot genesis with type-C power anyway, just hardcode the connection.

BUG=b:173566595
TEST=Boot to AP
BRANCH=None

Change-Id: I56b4393b5ddce03ac79158c41f66e3463c064b83
Signed-off-by: Matt Ziegelbaum <ziegs@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2552227
Reviewed-by: Joe Tessler <jrt@chromium.org>
2020-12-04 03:24:42 +00:00
Matt Ziegelbaum 25d19620d4 genesis: add initial genesis EC firmware
Genesis is similar to Ambassador, so the starting point for its firmware
is a copy of Ambassador's firmware.

BUG=b:173566595
TEST=None/doesn't boot due to power differences
BRANCH=None

Change-Id: I6de3c9ae83f58c21bf5588817cfde02c7ef1247a
Signed-off-by: Matt Ziegelbaum <ziegs@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2552226
Reviewed-by: Joe Tessler <jrt@chromium.org>
2020-12-04 01:59:13 +00:00
Yuval Peress 57f9e36a39 zephyr: Add is-test flag to zmake.yaml files under test/
This change will make the firmware builder auto-detect new tests.

BRANCH=none
BUG=none
TEST=Ran zephyr's firmware_builder.py

Cq-Depend: chromium:2551964
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I70ba1b32b67e2cb4e3676d228b299294028597a9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2552848
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
2020-12-04 00:13:10 +00:00
Jett Rink e4382776c3 zephyr/test/i2c: update to i2c_controller.c name
After COIL rename, we need to update the CMakeLists.txt for the i2c test

BRANCH=none
BUG=b:174572350
TEST=builds and passes test

Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I33b712876c11dc77e7835c2505749d449e11ffa6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2572398
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
2020-12-03 23:44:40 +00:00
Denis Brockus b8172d1718 genvif: fix null string for USB_VID_SOP
copy/pasted wrong name array when setting the value
Bumped the version to 3.0.0.9

BUG=b:172293518
BRANCH=none
TEST=verify XML output

Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I50b2dacfcd64bb3276ebec4e3c376056f42ce891
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2572245
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
2020-12-03 21:49:07 +00:00
Terry Chen 99dba15582 eldrid: modify charger configuration
BUG=b:166728543
BRANCH=firmware-volteer-13521.B-master
TEST=make buildall

Signed-off-by: Terry Chen <terry_chen@wistron.corp-partner.google.com>
Change-Id: I1a918326a625f294fe6cd9a2ec8e2c5b2af43569
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2534231
Tested-by: Scott Chao <scott_chao@wistron.corp-partner.google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
2020-12-03 21:39:06 +00:00