| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The command `make clobber ; make TEST_ASAN=y run-usb_tcpmv2_compliance`
doesn't pass because of several mismatched enums and an array out of
bounds error.
BRANCH=None
BUG=b:214087135
TEST=make clobber ; make TEST_ASAN=y run-usb_tcpmv2_compliance
Change-Id: I27cad82d2350e43c7891d5ff86e565553199cd7a
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3632185
Commit-Queue: Yuval Peress <peress@google.com>
Reviewed-by: Jameson Thies <jthies@google.com>
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch fixes the battery cannot resume from battery cut
off. Dojo battery is not responding at resuming from cut off.
Report battery status to BP_NOT_SURE instead of BP_YES at initial.
BUG=b:230411929
BRANCH=firmware-cherry-14454.B-main
TEST=On Dojo. Verified system is able to resume after the battery
is cut off.
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: Ia5b1d559025629e05c5e5d94e8e86d819dc85ee7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627093
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
Tested-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:231900728
TEST=make BOARD=moli
Signed-off-by: Elsie Shih <elsie_shih@wistron.corp-partner.google.com>
Change-Id: Ib02289aa71e9bd37d7dbf7b4c0fbb5e3fe889503
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3634168
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default groups k/l are set to input/pull down on startup
since for some variants they are not exposed on pins.
For the IT81302 they are, so do not set these as inputs
at startup by default, otherwise it breaks warm reboot
for any of these pins that are configured as outputs.
BUG=b:231727461
TEST=zmake build nereid; flash & run
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: I036b2ef5ec6bb38431b00644b90db44393a9384f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631842
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
See the bug for more details.
BUG=b:224397550
BRANCH=cherry
TEST=make sure the bug can be fixed.
Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
Change-Id: I2cbd1fd7ff9e8b09ca8261e8641c60462e2e7b47
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3616365
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Devin Lu <Devin.Lu@quantatw.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=cherry
TEST=make BOARD=cherry, dojo, tomato
Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
Change-Id: Id3a4efd8c0ed499e9d37db92fdca22ef5d87591b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3557943
Reviewed-by: Devin Lu <Devin.Lu@quantatw.com>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Nereid board v0 and v1 have been built with keyboards that don't match the
top row layout assumed by the "common" Nissa code. Split the keyboard
configuration into per-variant files and update the settings for Nereid to
reflect the actual hardware.
BUG=b:231655516
TEST=`evtest` now reports keys matching the legends printed on the
Nereid keyboard.
BRANCH=none
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Change-Id: Icd935f7da81eabc12bd4040119c1284d744651ed
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631852
Reviewed-by: Andrew McRae <amcrae@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set a larger timeout for the powerbtn task to wait for the
charger to be available before giving up starting the AP.
BUG=b:231675142
TEST=zmake build nereid; flash & run
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: Ie21bccee3a4e0630aeb5615dc26ad7997f395e62
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631721
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FAFT tests send batched commands to the EC shell,
which were overflowing the 64 byte buffer.
Increase the RX buffer size to accommodate the FAFT requirements.
This was happening on both nivviks and nereid.
BUG=b:231646498
TEST=Run FAFT_Setup
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: I5ead9e7413d3a3ce6072d4826c423adfed808e36
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3630104
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a print to the SBU fault interrupt. Otherwise, since the interrupt
is triggering the OCP module it may produce confusion as to what
happened on the connection.
BRANCH=guybrush
BUG=b:230345619
TEST=make buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ieb459d9fa499d5f3073f48d348c2da22d7224b86
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3632815
Commit-Queue: Robert Zieba <robertzieba@google.com>
Reviewed-by: Robert Zieba <robertzieba@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Addressing comments on http://crrev/c/3607054
BUG=b:214087135
TEST="make runhosttests" and "make try_build_boards"
BRANCH=NONE
Signed-off-by: Jameson Thies <jthies@google.com>
Change-Id: I558044230aa5548f284f44f6818bb8ad412b646c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631299
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We were filtering out some directories that are impossible to test with
coverage right now from the tests, but not from the boards.
Change filters to match in all 3 places.
BRANCH=None
BUG=None
TEST=None
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Change-Id: I17ff82e277069ecddb7c61b61e9ba089a3c54cc9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3632182
Auto-Submit: Jeremy Bettis <jbettis@chromium.org>
Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Yuval Peress <peress@google.com>
Commit-Queue: Yuval Peress <peress@google.com>
Tested-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Addressing comments on http://crrev/c/3587509, and moving Get_Status
request case from extended messages to control messages.
BUG=b:227236917
TEST=observed Status response on twinkie, plus "make runhosttests" and
"make try_build_boards"
BRANCH=NONE
Signed-off-by: Jameson Thies <jthies@google.com>
Change-Id: I0702cdda58a302e8ecfb7cc977273d12a6fdb4fa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631298
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
FP_PWR_EN is not required for flashing the FPMCU.
It is required for POR after the flash is complete.
Add FP_PWR_EN configuration for Zork and Guybrush.
BRANCH=None
BUG=b:229784281
TEST=Toggle the FPMCU_PWR_EN GPIO and confirm an additional
`power-on` log appears in /var/log/cros_fp.log
Signed-off-by: Ofer Fried <oferfried@chromium.org>
Change-Id: I3375936496b40d6361c198a12643414600b0d080
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3615482
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Commit-Queue: Ofer Fried <oferfried@google.com>
Tested-by: Ofer Fried <oferfried@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
reboot_ap_on_g3 is not visible in zephyr EC as the
file containing the legacy implementation is not loaded
as part of ectool build.
BUG=b:228775663
BRANCH=none
TEST=zmake build nivviks, make utils,
ectool reboot_ap_on_g3
shutdown -h now
ectool reboot_ap_on_g3 10
shutdown -h now
Signed-off-by: B R, Harsha <harsha.b.r@intel.com>
Change-Id: I19031381ded02b36d211a5787fb00747e9e8d55f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3611263
Reviewed-by: Andrew McRae <amcrae@google.com>
Reviewed-by: Li1 Feng <li1.feng@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a PLATFORM_EC_POWER_BUTTON_INIT_TIMEOUT Kconfig
to set CONFIG_POWER_BUTTON_INIT_TIMEOUT so that the
powerbtn task startup timeout can be configurable.
BUG=b:231675142
TEST=zmake build nereid; flash & run
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: I5eb3ebadbaa9a0d9f433acc7bbf07807f2e3a1c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3631720
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move Herobrine, Hoglin, and Villager USB mux configuration into
the devicetree.
BUG=b:227757117
TEST=zmake testall
TEST=check if usb_muxes structure is correct using gdb:
gdb ./build/zephyr/{herobrine|hoglin|villager}/output/zephyr.ro.elf
p usb_muxes
BRANCH=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I6fa1483e9f536a503e85e61be0b21119c9c4d3b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575158
Tested-by: Tomasz Michalec <tmichalec@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add necessary changes to make it possible to configure TCPCI USB-C mux
using devicetree. TCPCI USB-C mux has hpd-update property which allows
to select hpd_update callback. Right now it allows to select NULL (by
not selecting any value) or ps8xxx_tcpc_update_hpd_status. Because it is
common to use PS8xxx as a mux, special parade,usbc-mux-ps8xxx compatible
is made to automatically select default hpd_update callback.
BUG=b:227757117
TEST=zmake testall
BRANCH=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I2b5a98de58aa9fe8c47da69dff9151fd34f2a62b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3586441
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
Tested-by: Tomasz Michalec <tmichalec@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
USB muxes configuration of the Krabby is moved to the device tree.
BUG=b:227757117
TEST=zmake testall
TEST=check if usb_muxes structure is correct using gdb:
gdb ./build/zephyr/krabby/output/zephyr.ro.elf
p usb_muxes
BRANCH=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: Ib50e830ca028ec6e3c78bfd17695f695c883b1b1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3579119
Tested-by: Tomasz Michalec <tmichalec@google.com>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create a separated usb_muxes.c file in the shim layer to define the
usb_muxes array. Additional USB muxes in a chain are created in the same
file.
Common properties of the usb_mux DTS node are in cros-ec,usb-mux.yaml
file.
BUG=b:227757117
TEST=zmake testall
BRANCH=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I6cb26404b5cb44c6fce29f4176ebb6707af71d21
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575157
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Tested-by: Tomasz Michalec <tmichalec@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add the two ADC pins to detect the ADP_ID and the PWR_IN_IMON.
ADP_ID can identify the Barrel power device and the PWR_IN_IMON can
detect the adapter input voltage.
Use those ADC values to set the OBP pointer then trigger PROCHOT.
BUG=b:211806236;b:213955278
BRANCH=none
TEST=Kinox can get the 90w barrel adapter.
Signed-off-by: Matt Wang <matt_wang@compal.corp-partner.google.com>
Change-Id: I84455d1028b2cfc4297e10410092454f3dd61bc2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3521743
Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com>
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Create the initial EC image for the mithrax variant by copying
the brya reference board EC files into a new directory named for
the variant.
(Auto-Generated by create_initial_ec_image.sh version 1.5.0).
BUG=b:223091246
BRANCH=None
TEST=make BOARD=mithrax
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Change-Id: I7418b531c297464d1cb2e35c07b8263ecb283a78
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3602112
Reviewed-by: Ko Ko <ko_ko@compal.corp-partner.google.com>
Tested-by: Ko Ko <ko_ko@compal.corp-partner.google.com>
Reviewed-by: Ricky Chang <rickytlchang@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use the power button task processing to leave the CPU
off or to start it, rather than automatically starting it.
Run the check to discover the CPU state earlier so that
the power button init code can check the state of the CPU.
Refactor ap_power_force_shutdown() to avoid sending
the notification.
BUG=b:223113743
TEST=zmake build nivviks; flash & run
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: Id66a95390d054d8530e39dd6ce7088621eda6b86
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627374
Reviewed-by: Li1 Feng <li1.feng@intel.com>
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CONFIG_BRINGUP by default will not start the CPU, though
the current power sequence code starts automatically.
Turn off CONFIG_BRINGUP in preparation for a fix that
changes the way the power sequence code handles the
starting of the CPU (the power button logic should be used
to control the starting of the CPU).
BUG=b:223113743
TEST=zmake build nivviks; flash & run
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: I496bacf9f5e9da09260fd813aade84eca80dd57b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3626855
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Integrate power_monitor code from Brask into the Moli design.
BUG=b:222550779, b:229788499
TEST=make BOARD=moli
Signed-off-by: Elsie Shih <elsie_shih@wistron.corp-partner.google.com>
Change-Id: I1af34e2dc0ced24c92c8a868709bf063b3b35471
Signed-off-by: Elsie Shih <elsie_shih@wistron.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3476660
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-by: Boris Mittelberg <bmbm@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently rpm deviation is 7%, It will cause [ectool pwmsetfanrpm 5000]
and [ectool pwmgetfanrpm] not accurate.
BUG=b:231542804
TEST=make -j BOARD=moli
Signed-off-by: Elsie Shih <elsie_shih@wistron.corp-partner.google.com>
Change-Id: Ibba4b3bae04ceddd9952490ec11c5ede22b88a9e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627615
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In power state S0, "ap_power_sleep_notify_transition()" is called
continually. This is confusing since it should only be called
when AP sleep status changes in S0ix exit.
This CL adds condition check before calling it.
Now the S0ix handling has flow as:
1. Receive host command about AP sleep state changes(resume, suspend);
2. Process sleep state and send sleep notify for power state transition.
ap_power_chipset_handle_host_sleep_event()
ap_power_sleep_set_notify()
3. Power state machine will check current sleep notify and call the
transition.
ap_power_sleep_get_notify()
ap_power_sleep_notify_transition()
BUG=none
BRANCH=none
TEST=Run s0ix test on Nivviks for 100 times, pass.
Signed-off-by: Li Feng <li1.feng@intel.com>
Change-Id: I01c184da0f1aea2e9b99fda901f3df50555e126e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3628829
Reviewed-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The system_common_pre_init() function detects whether
a warm boot (sysjump) has been performed, and sets the
reset flags accordingly.
A number of modules rely on detecting whether a warm
boot has happened (e.g the GPIO init, AP power sequence etc.),
and previously the check was performed as part of the
main EC task initialisation, after the kernel and application
init phases. With more Zephyr based modules using SYS_INIT,
moving the check will allow modules using POST_KERNEL and
APPLICATION phase initialisation to check this flag as needed.
BUG=b:230691031
TEST=zmake testall; zmake build nivviks; flash and run
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: I772b57c32b3176a539d464d5d301ff9b87b9d8ce
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3612983
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Reviewed-by: Tristan Honscheid <honscheid@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
flake8 reports more errors than necessary on BUILD.py files because:
- They are out of the zmake tree, and therefore do not have the
correct .flake8 config file.
- flake8 is confused by undefined variables like "here" and
"register_project", which come from the execution context zmake
provides.
These are just config files anyway, running flake8 on them is likely
overkill. Turn that off.
BUG=none
BRANCH=none
TEST=for f in $(git ls-files); do
zephyr/zmake/pre-upload.sh "$(realpath "${f}")"
done
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ia6eae025ec560d3f6dbdc5c8a4ce50d7b9b94459
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3630476
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is much of the legwork required for go/cros-charging-splash, at
least the portion of connecting the charger from chipset off state.
What remains is:
- Examining battery state and charger supply to make better decisions
about when we can show the splash.
- Consider assertion of PROCHOT during bootup of a low power charger,
or after display initialization before the power button is pressed.
The next CL adds a simple text-based UI on top of this.
BUG=b:228370390
BRANCH=none
TEST=connect charger and boot to splash on brya (using ghost image)
(with full CL stack)
TEST=provided integration tests pass
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Ic114e975109a338ffaa3be977094020251fc36e6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3575089
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Aaron Massey <aaronmassey@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No room left in flash. If we wish to keep volteer building on ToT, we
need to figure out a way to get more bytes.
This disables some debug messages in board-specific code only.
This buys us another ~400 bytes of flash space in RO.
BUG=b:231623330
BRANCH=none
TEST=flash space increases:
*** 480 bytes in flash and 21760 bytes in RAM still available on volteer RO ****
*** 616 bytes in flash and 21760 bytes in RAM still available on volteer RW ****
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I56eaff7b4fbe7546e8f3c1253fdb66e70b794029
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3630477
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When passed a length of zero, the current behavior of
`i2c_read_sized_block` is to read up to 255 bytes from the i2c bus. This
commit changes that behavior so that passing a length of zero is an
error. `i2c_read_sized_block` is only used by the smart battery driver,
either directly or indirectly through `i2c_read_string`. I've checked
that there do not appear to be any places that currently rely on this
behavior.
BUG=b:228589840
TEST=Verified that battery strings are still read correctly, smart
battery mfg access still works
BRANCH=guybrush
Signed-off-by: Robert Zieba <robertzieba@google.com>
Change-Id: Ic025cd3cc805e6bd935b26100171a13e90b478a0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3605885
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`sb_read_mfgacc` currently uses `sb_read_string`. This function reads a
null-terminated string. However, the data that is being read is not a
null-terminated string. This is causing N-1 bytes to be read instead of
N bytes. This commit adds an `sb_read_sized_block` function that is used
instead. Only PARAM_SAFETY_STATUS and PARAM_OPERATION_STATUS are read
with `sb_read_mfgacc` and neither of these values are a string.
BUG=b:228589840
TEST=Ran i2ctrace to verify that right number of bytes are now being
read, tested with CL:3578293 to ensure no errors
BRANCH=guybrush
Change-Id: Iaedb4d28274bda8b6d1ee6d2021ebd04f83767f8
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3606146
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Diana Z <dzigterman@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CPS8100 is a Qi wireless power transmitter. This patch enables it for
Brask.
BUG=b:191418683, b:207658344
BRANCH=Brask
TEST=On Brask. /sys/class/power_supply/PCHG0/capacity, charge_type, status
change as a PRx is placed on or removed from the coil.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I66df4ec473517de1707a0dbb74dd699497daeb6d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3595283
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
PCHG no longer uses the device event subsystem for EC-AP notification.
This patch removes unused hook and device_enable_event. This is
basically a revert of CL:2863564.
BUG=None
BRANCH=None
TEST=Brask
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I0ca713253c3a802f977144ea8f0c0f728d9bebb5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3609109
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-by: Parth Malkan <parthmalkan@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently there is `i2c_read_string` that reads data in the form
`[Length] [byte 0] ... [byte Length-1]`. However this function only
reads null terminated strings. This commit adds `i2c_read_sized_block`
to support reading a general block of data with a length. This commit
also re-implements `i2c_read_string` in terms of `i2c_read_sized_block`
This changes the behavior of `i2c_read_string` to produce an empty
string on failure.
BUG=b:228589840
TEST=Verified that battery strings are read properly, used i2ctrace to
verify that `i2c_read_sized_block` reads the correct number of bytes
BRANCH=none
Signed-off-by: Robert Zieba <robertzieba@google.com>
Change-Id: Id4aaf727048329776311eec5d392aafbd1eef2b8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3605884
Reviewed-by: Diana Z <dzigterman@chromium.org>
Commit-Queue: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In TBT EV - Host Source Power Provisioning test item.
The port partner will return sink capability that it can support 3A,
but it will request 1.5A at the end.
In this case, EC will provide 3A for it and provide 1.5A for the second
port partner. This case will cause test failed due to EC only provide
1.5A for both port.
BUG=b:229683022
BRANCH=none
TEST=make -j BOARD=primus
TEST=make buildall
TEST=verified by GRL
Change-Id: Icc4904ec1267b7a34e64c01b626f607999072410
Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3592313
Commit-Queue: Diana Z <dzigterman@chromium.org>
Reviewed-by: Diana Z <dzigterman@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL bypass PG_PP3300_S5_OD to PG_PP3300_S5_EC_SEQ_OD,
follow HW change in b:226438219#34.
BUG=b:226438219
BRANCH=none
TEST=make BOARD=agah
Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com>
Change-Id: Icaa9c9a8d9d7ddd60c7e0e1a208a513c37e9eb37
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3622000
Reviewed-by: Boris Mittelberg <bmbm@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Limit input current to 96% of negotiated limit
BUG=none
BRANCH=none
TEST=Connect adapter then check input current.
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: I89cf7b1d9a8b8a022e1312dad5de853d53cf7308
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3626851
Reviewed-by: Boris Mittelberg <bmbm@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch changes battery LEDs from active low to active high for
new board version.
BUG=b:231281125
BRANCH=none
TEST=On Vell reworked board. Make sure LEDs work.
Signed-off-by: Devin Lu <Devin.Lu@quantatw.com>
Change-Id: I546b8f21116a72a91d64ce990ffac4adb26fd8d9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627376
Reviewed-by: Boris Mittelberg <bmbm@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The changes in commit 7dc9537d7a56dab267e4facb3c1398e1d0e44175 added
support in Zephyr for CONFIG_PLATFORM_EC_USB_PORT_ENABLE_DYNAMIC with
the same semantics as the equivalent option in the legacy EC, but failed
to change the definition in the shim code to remove the const qualifier.
This would cause code that believed it could write to the
usb_port_enable array to instead trigger undefined behavior.
BUG=b:231512828
TEST=Nereid no longer hangs at boot when CBI fw_config is set to 0
(unknown sub-board)
BRANCH=none
Change-Id: I747c9f1c1f02847cc367da38da1d4c7a12037516
Signed-off-by: Peter Marheine <pmarheine@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627094
Reviewed-by: Andrew McRae <amcrae@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove motion sensor task and configuration
BUG=b:224423318
BRANCH=none
TEST=make BOARD=osiris
Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com>
Change-Id: I3a222620acaa26bcdcc0e5d4403fb04c63477cb8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627370
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Adding features from the USB PD 3.1 revision of the specification
requires us to know the difference between USB PD Rev 3.0 and USB PD Rev
3.1 devices. But, the message header only has 2 bits for revision and
only provides the major revision. To determine a devices minor
revision, TCPMv2 will need to send a Get_Revision command and store the
Revision response which has major/minor revision/version information.
This CL adds support for sending Get_Revision, and receiving Revision.
BUG=b:214087135
TEST=Checked that the PE state was correctly holding the Revision
response from a USB PD Rev 3.1 partner, and also checked that the stored
RMDO value was 0 for a USB PD Rev 3.0 partner.
BRANCH=none
Signed-off-by: Jameson Thies <jthies@google.com>
Change-Id: I99f10c15750c3a1fee1d8bad89b0c4a0b0a6b2ba
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3607054
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove GPIO_ID_1_EC_KB_BL_EN due to outdated
BUG=b:224423318
BRANCH=none
TEST=make BOARD=osiris
Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com>
Change-Id: I380d03da1f8a93259a015746ea77062d2e4ad423
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627371
Reviewed-by: Boris Mittelberg <bmbm@google.com>
Commit-Queue: Boris Mittelberg <bmbm@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Volmar doesn't support USB4, so this config is not needed.
BUG=b:231458203
BRANCH=none
TEST=make -j BOARD=volmar
Signed-off-by: Boris Mittelberg <bmbm@google.com>
Change-Id: I77e98cb856077ffe448db06b72f843d419e7a31b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3628190
Reviewed-by: Prashant Malani <pmalani@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Taniks doesn't support USB4, so this config is not needed.
BUG=b:231457091
BRANCH=none
TEST=make -j BOARD=taniks
Signed-off-by: Boris Mittelberg <bmbm@google.com>
Change-Id: I1c996e8de5e614d1edb70764c0b545bad34529b4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3628191
Reviewed-by: Prashant Malani <pmalani@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We're required to exeute Error Recovery when we see a partner set the
data role bit we believe ourselves to have. The spec gives no specific
state this should be performed from, so centralize it to the PRL RX.
BRANCH=None
BUG=b:155418161,b:228478468
TEST=with a normal charger, verify connection completes successfully.
With bad apple charger connection, verify error recovery is performed
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I82071d01ece105dbfc483446995e7f423bd9804e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3602225
Reviewed-by: Aaron Massey <aaronmassey@google.com>
Reviewed-by: Michał Barnaś <barnas@google.com>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Lazor has less than 100 bytes free flash on ToT. Reduce the flash usage
by compiling out the higher-level PD debug strings.
BRANCH=None
BUG=None
TEST=build and observe lazor now has 700 bytes free flash
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: I9bbc5bb13dfc9ba020903c9966edcb0714e7b516
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3627804
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test CONSOLE_READ and CONSOLE_SNAPSHOT host commands if correct content
of buffer is returned in read next and read recent variants.
BUG=b:229935172
BRANCH=none
TEST=zmake -D test test-drivers
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I90af94c0851fc7311236beeba8108e36e53c49c4
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3310859
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
Tested-by: Tomasz Michalec <tmichalec@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Zephyr and CrEC implementation of EC_CMD_CONSOLE_READ is different. CrEC
allows to read the UART buffer upto character written before
EC_CMD_CONSOLE_SNAPSHOT host command. Also an index for CONSOLE_READ_NEXT
and CONSOLE_READ_RECENT subcommands is separated.
This CL changes Zephyr implementation to match CrEC.
BUG=b:229935172
TEST=zmake testall
TEST=check if /var/log/cros_ec.log has correct content and messages are
not duplicated
BRANCH=none
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I5256b45d04ff8d3994bcbaf2722bacc1f37d73b6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3613912
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Tested-by: Tomasz Michalec <tmichalec@google.com>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
|