Master md files are out of date. Point to main branch in case someone
lands in master branch from an old link.
BUG=b:180952272,b:180921286
BRANCH=None
TEST=Preview changes with gerrit
Exempt-From-Owner-Approval: fixing docs
Change-Id: I6583b6c7fc21248eb49a6cd71e077fbdb5de2435
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2727846
Reviewed-by: Sean Abraham <seanabraham@chromium.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Auto-Submit: Sean Abraham <seanabraham@chromium.org>
Tested-by: Sean Abraham <seanabraham@chromium.org>
I'm not sure what changed, but VSCode doesn't recognize "c18".
The next best option is c17 or gnu17.
The original change to c18 was
commit 971e1b069f.
BRANCH=none
BUG=none
TEST=./util/ide-config.sh vscode all:RW all:RO | tee .vscode/c_cpp_properties.json
# Check that VSCode is happy with gnu17 in
# .vscode/c_cpp_properties.json.
Signed-off-by: Craig Hesling <hesling@chromium.org>
Change-Id: I6797898dc7b546f805de43e07457a98ba22cc9ad
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2593917
Commit-Queue: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
This patch adds a host command to get the peripheral charge port
count and status.
$ ectool pchg
1
$ ectool pchg 0
State: CHARGING (4)
Battery: 50%
Flags: 0x0
$ ectool pchg 0 foo
Invalid parameter count
Usage1: pchg
Usage2: pchg <port>
Usage1 prints the number of ports.
Usage2 prints the status of a port.
$ ectool pchg 100
Bad port index
BUG=b:173235954
BRANCH=Trogdor
TEST=Done on CoachZ. See the description above.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I33f261e48b16d5933b6f3ca9f3c12fec476edda3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2555628
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
It is replaced by the hdctools in all current configurations (servod
based development).
BUG=none
TEST=none
Change-Id: I56d97d776a8c2aaf47aa39802cc9831c4f3416a7
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2560631
Reviewed-by: Namyoon Woo <namyoon@chromium.org>
Tested-by: Patrick Georgi <pgeorgi@chromium.org>
Commit-Queue: Patrick Georgi <pgeorgi@chromium.org>
Making it easier to follow the code with
regard to the VIF spec for DR_Swap_To_DFP_Supported
and add is_alt_mode_controller in the SNK path
decision.
BUG=b:172293518
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I06b4b86ef3e08f5768ae7396a50abff579aaaff7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2560613
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
This is a helper running on the host, so should use host tooling.
Changing this avoids a build failure on cheza where chromeos-ec the
would fail to build before the openssl package (which is supposed to
work given that chromeos-ec doesn't list openssl in its dependencies,
and this pkg-config invocation is not a reason to start doing so).
BUG=None
BRANCH=None
TEST=emerge-cheza -v1 chromeos-ec
Signed-off-by: Mattias Nissler <mnissler@chromium.org>
Change-Id: I45161285db17a56b29a36549d3b113f42dff9362
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2550660
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
Added check for USB4_Supported in is_usb_pd_supported
because USB4_Supported is a must be YES for PD_Support
Also split up PD_Port_Type from Type_C_State_Machine
because PD_Port_Type should not appear if this
component does not support USB PD and the same exclusion
can not be said about Type_C_State_Machine
BUG=b:172293518
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I3d1a8f603693d90673ea3e610ca751f8d9c027a4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2552858
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
On using Ectool command - reboot_ap_on_g3 [<delay>] && shutdown -h now,
AP must perform a reboot from G3 state to S0 state with configurable
delay in seconds on it's next corresponding shutdown cycle.
BUG=b:172885634
BRANCH=none
TEST=Run Ectool command - reboot_ap_on_g3 50 && shutdown -h now.
Change-Id: I2c5eb304d27a9647f0adc220d91de2d0b4061460
Signed-off-by: ravindr1 <ravindra@intel.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2528731
Reviewed-by: Keith Short <keithshort@chromium.org>
some refactoring for does_respond_to_discov_sop_xxx
and is_usb_pd_supported was added to make the common
code available for other uses as well
BUG=b:172434299
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I36c7df53e61734fcbdd176e3ea292a3f8914fdf9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2550309
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>
Some device data is only valid if Device_Supports_USB_Data
in the Upstream Facing Port Fields group.
Some host data is only valid if Host_Supports_USB_Data
in Downstream Facing Port Fields
BUG=b:172441959,b:172438944
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I41edde27d9cc6fb49934e0d176efc90540a9faee
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2550308
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>
Since this is the most common correct answer, I am changing
the default from USB 2 to USB 3.2 GEN 1x1
BUG=b:172441959,b:172438944
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I758ec7ec0df2f285466d83ddb0dcfa8cc98efa55
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2547192
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
set to the index of the Component if USB4_Supported
is true
BUG=b:172417427
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Id99f9bff22dae82282aed5622b6b1041e13934a3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2546987
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
genvif has a new option of creating an output
file based solely on the overrides and not the
configs. This will make comparisons from other
generators a little easier.
USAGE: genvif -b|--board <board name>
-o|--out <out directory>
[-n|--no-config]
[-v|--over <override XML file>]
BUG=b:173219559
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I4af5662321e29ed806dea0a2420fd8f4627f8e0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2538955
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
You can now feed in a VIF XML file with fields that
you want to override and these will get set instead
of using the CONFIG_ initialization for those fields.
$ build/morphius/util/genvif -o build/morphius \
-b morphius_sku5_dvt2 \
--over board/morphius/sku5_dvt2.xml
Where the override file is a valid VIF file (no
matter how partial it is). Tags such as <? .... ?>
and comments <!-- .... --> are ignored. In the
above example the override file looked as followed:
<?xml version="1.0" encoding="UTF-8"?>
<VIF>
<Model_Part_Number>Morphius SKU5</Model_Part_Number>
<Product_Revision>DVT2</Product_Revision>
</VIF>
The Model_Part_Number and Product_Revision used this
override value instead of "morphius" and "FIX-ME".
The values can also be used to set other values. I
added a couple of those but the uses of get_vif_field
can be added to create more automated generation.
Here are a couple of examples:
static bool is_src(void)
{
int override_value;
bool was_overridden;
/* Determine if we are DRP, SRC or SNK */
was_overridden = get_vif_field_tag_number(
&vif.Component[0]
.vif_field[Type_C_State_Machine],
&override_value);
if (was_overridden) {
switch (override_value) {
case SRC:
case DRP:
return true;
case SNK:
return false;
default:
break;
}
}
return src_pdo_cnt;
}
and
/* Determine if we are DRP, SRC or SNK */
was_overridden = get_vif_field_tag_number(
&vif->Component[0]
.vif_field[Type_C_State_Machine],
&override_value);
if (was_overridden) {
switch (override_value) {
case SRC:
case SNK:
case DRP:
type = (enum dtype)override_value;
break;
default:
was_overridden = false;
}
}
if (!was_overridden) {
if (is_drp())
type = DRP;
else if (is_src() && is_snk())
/* No DRP with SRC and SNK PDOs detected. So ignore. */
/* ie. Twinkie or Plankton */
return 0;
else if (is_src())
type = SRC;
else if (is_snk())
type = SNK;
else
return 1;
}
Bumped the version to 3.0.0.6.
BUG=b:172489443
BRANCH=none
TEST=use --over to override fields within the XML
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: Ic1ecd3e0d2f643c3315bcc8abecdf7490fb69b8a
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2535672
Tested-by: Denis Brockus <dbrockus@chromium.org>
Auto-Submit: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>
Add EC_REBOOT_COLD_AP_OFF as a command of EC_CMD_REBOOT_EC host command,
that would cold reboot EC without booting AP.
BUG=chromium:1121907
TEST=With CL:2422025 CL:2459802,
echo 1 > /var/lib/power_manager/reset_ec_on_next_shutdown
click shutdown on UI and observe that EC is rebooted and AP is
still off.
TEST=With CL:2422025 CL:2459802,
echo 1 > /var/lib/power_manager/reset_ec_on_next_shutdown
dbus-send --system --print-reply --dest=org.chromium.PowerManager \
/org/chromium/PowerManager \
org.chromium.PowerManager.RequestRestart \
int32:0 string:test
observe that EC is rebooted.
Change-Id: Ifccff3831d785091b7c99def0e43a0d20bfc412b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428361
Commit-Queue: Pi-Hsun Shih <pihsun@chromium.org>
Tested-by: Pi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
A long is 32-bit, but a long long is 64-bit. The function name should be
strtoull if it is returning 64 bits of data.
BRANCH=none
BUG=b:172592963
TEST=builds
Signed-off-by: Jett Rink <jettrink@chromium.org>
Change-Id: I04c40f9256ed37eb1cf9b6bd1b0ef0320fe49b0c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2530874
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Some zork variants have battery model names that differ only beyond
the 7th character, which cannot be differentiated with the current
limitation of 8 characters per battery string. Introduce a new hostcmd
version that allows longer battery strings and enable it on Zork.
Because allowing longer strings through the host memory map is more
difficult and not required (because getting the full longer string
is mostly only useful for servicing), the host memory map is unchanged.
ectool is updated to use hostcmd (rather than memory map) if the new
command version is available, in order to take advantage of it.
BUG=b:171854783
TEST=ectool battery prints longer strings when supported by the EC;
a hacked EC on morphius can return 11 characters of text.
An EC running older firmware still works with a new ectool.
BRANCH=zork
Change-Id: I63d20d4f690b6945cb1d423aafaf55dafc039211
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519243
Reviewed-by: Edward Hill <ecgh@chromium.org>
The ec_response_locate_chip.reserved field was overloaded to return
the TCSS port mapping. We are no longer doing this, so there is no
point for ectool to print out a reserved field.
BRANCH=none
BUG=b:153941950
TEST=buildall passes
Change-Id: Ib0c2c5ba95b2d9afb72455e4864e69deb0abd185
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427633
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Keith Short <keithshort@chromium.org>
not currently within our ability. So marking this
as NO until the feature is added to the stack.
BUG=b:172445415
BRANCH=none
TEST=verify XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I2632349d3d40f3f59b98d4388bd63753cfdc11c0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519812
Tested-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
A little bit of cleanup.
Bumped revision to 3.0.0.4.
Reorganized fields for easy maintenance based on 3.12.
Moved file open/close to the routine that outputs.
BUG=b:172293518
BRANCH=none
TEST=check XML output
Signed-off-by: Denis Brockus <dbrockus@google.com>
Change-Id: I4e0f55bb26fdfa91305176914812eba085a09ecd
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519809
Tested-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
This also makes cros lint (shellcheck) happy.
This doesn't change any of the current usages of these variables.
BRANCH=none
BUG=b:168613053
TEST=./util/compare_build.sh # This forces a static version
TEST=BOARD=bloonchipper CR50_DEV=blah ./util/getversion.sh
TEST=BOARD=bloonchipper CR50_DEV=blah CR50_SQA=1 ./util/getversion.sh
TEST=BOARD=cr50 CRYPTO_TEST=1 ./util/getversion.sh
Signed-off-by: Craig Hesling <hesling@chromium.org>
Change-Id: I4ad34b4a9d0c8823568ddfecd50f87f55666c902
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2404474
Reviewed-by: Mike Frysinger <vapier@chromium.org>
The currently generated format is XML. The GRL C2 software requires the
the filename end in .xml to successfully use it. Output to a file with
this name.
BUG=b:170646602
TEST=make buildall
BRANCH=none
Change-Id: I54dbfaef1bc76be58a0007039da659562f97e372
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2514902
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
The new I2C_STRIP_FLAGS macro was added to avoid conflict with
Zephyr's macro. This CL performs the migration to that new API.
BRANCH=none
BUG=b:172067439
TEST=make runtests -j and built for various boards: eve, volteer,
arcada_ish, atlas, hatch, kohaku, nocturne, samus, and scarlet
Change-Id: I0583b647435db96ec268f186252b367bdc4118a6
Signed-off-by: Yuval Peress <peress@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2511097
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Jett Rink <jettrink@chromium.org>