| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The C1 PPC interrupt is defined but not enabled on init. Should enable
it.
BUG=b:258532320
BRANCH=Trogdor
TEST=Build all the affected boards
Change-Id: I793a511783c7266897f3dc5f0988eb6ca16decc9
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4019344
Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
Commit-Queue: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch makes PCHG sub-system handle errors. It adds event and error
masks to select which events and errors to be reported in each chipset
power state.
A host can clear error flags by sending a mask via EC_CMD_PCHG command
when it acknowledges errors.
This patch itself will not introduce any behavioral change. Actual
changes will happen when the host takes actions on reported errors.
BUG=b:245764044
BRANCH=None
TEST=Redrix
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I19b432d6515ad6821b4e3bc9a228a1fdaa353b0f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3938410
Reviewed-by: caveh jalali <caveh@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BRANCH=none
BUG=b:172020503
TEST=make buildall
Signed-off-by: Tom Hughes <tomhughes@chromium.org>
Change-Id: Iea7d3c0400cc7af8bbad109d6adbbf18e73714a2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3952907
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update strongbad boards to use new struct usb_mux_chain.
BUG=b:236274003
TEST=make buildall
BRANCH=None
Cq-Depend: chromium:3748785
Signed-off-by: Tomasz Michalec <tm@semihalf.com>
Change-Id: I6527f41f081bca7a179f52afb87a6f534d2f09f2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3779622
Reviewed-by: Keith Short <keithshort@chromium.org>
Tested-by: Tomasz Michalec <tmichalec@google.com>
Commit-Queue: Tomasz Michalec <tmichalec@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normally we don't do this, but enough changes have accumulated that
we're doing a tree-wide one-off update of the name & style.
BRANCH=none
BUG=chromium:1098010
TEST=`repo upload` works
Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b
Signed-off-by: Mike Frysinger <vapier@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add PWR_STATE_FORCED_IDLE state which indicates PWR_STATE_IDLE state is
forced when charge control is not normal.
Also update led.c files for boards to replace chflag use with new
PWR_STATE_FORCED_IDLE.
BUG=b:241167493
TEST=make buildall, zmake build --all, make runhosttests -j
BRANCH=None
Signed-off-by: Parth Malkan <parthmalkan@google.com>
Cq-Depend: chromium:3807136
Change-Id: Ib00ed3df977482a4430b0c3d16a2a0e305bbd47f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3807134
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I17b3fb522507863b87fd96ce9eaf34216fbd03a1
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728168
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I1929d7fddc93f67296c2cc120c10814d8ac358a1
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728150
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: Iff1a4de95219581c794868cd2f63d35252001d6a
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728167
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: Idf75f5dfbdd58f84b758d2b65756c2adccb52c8c
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728169
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=b:236386294
BRANCH=none
TEST=none
Change-Id: I16e14a6cf9037ced9618837d23785c1aaffdcc47
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728126
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define an explicit function to set events for the usb charger tasks, so
that the caller is not coupled to the internal task implementation, and
we can use a single task on a later patch.
BRANCH=none
BUG=b:226411332
TEST=make buildall
TEST=zmake testall
TEST=cq dry run
Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: I7a1223642b800568bf4f9864f75b2b647c84d29f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3663746
Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use a finer grain set of define, to allow some sensors to use interrupt
when wired properly and some use force mode when not using interrupt.
BUG=b:230401133
BRANCH=asurada,dedede,brya
TEST=Build all. Check Zephyr with herobrine. Check on bugzzy.
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Change-Id: I9c7d50b88a0eaec017f4e5e2ccfdb80761d71fb3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3609121
Reviewed-by: Yuval Peress <peress@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
i2c.h only requires the enum gpio_signal, so use gpio_signal.h
instead of gpio.h.
The builld doesn't compare due to an ASSERT() calls in i2c-stm32f4.c
because the line numbers changed.
Before this change:
80068b2: f240 2332 movw r3, #562
80068b6: 48a4 ldr r0, [pc, #656]
80068b8: f7fc fb1a bl 8002ef0 <panic_assert_fail>
After this change:
80068b2: f44f 730d mov.w r3, #564
80068b6: 48a4 ldr r0, [pc, #656]
80068b8: f7fc fb1a bl 8002ef0 <panic_assert_fail>
BUG=b:218856245
BRANCH=none
TEST=compare_build.sh
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: I0f9f428d5c575c444b9df69f71a0ed6c4b3e378c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3489094
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the PS8xxx I2C flags name from PS8751_I2C_ADDR to
PS8XXX_I2C_ADDR.
BRANCH=main
BUG=b:194432779
TEST=make -j buildall
Signed-off-by: Sam Hurst <shurst@google.org>
Change-Id: Ie8ac1c922c46bb425b7e7b1a39173872d48f6353
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3449669
Tested-by: Sam Hurst <shurst@google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Sam Hurst <shurst@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Normalise the name of the tablet mode detection
GPIO so that everyboard does not need to redefine it.
BUG=none
TEST=zmake testall; make buildall
BRANCH=none
Signed-off-by: Andrew McRae <amcrae@google.com>
Change-Id: Ifb458e755d1e00c0cff66a02c78dfccaba2d070c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3397141
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
move baseboard/trogdor/usbc_config.c to board file to
let board modify charger_profile_override.
BUG=none
BRANCH=trogdor
TEST="make BOARD" build pass for trogdor family (pompom,
pazquel, coachz, lazor, marzipan, homestar,
wormdingler, trogdor, mrbland, quackingstick,
kingoftown)
"zmake -D testall" without ERROR message.
Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com>
Change-Id: I6dc71f64a1275fa1a71692f43611d3888f780cb6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3255090
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Bob Moragues <moragues@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Convert all instances of i2c_ports[] to use declared initializers. This
allows the fields to be reordered without breaking code.
BUG=none
BRANCH=none
TEST=compare_build.sh
Signed-off-by: Keith Short <keithshort@chromium.org>
Change-Id: Ibecd375996b92119eca35721d084c35b6e4e6f1f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3300186
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the functions are copied by many boards, move them to common.
The specific param regs are defined in each specific boards.
BUG=b:203031618
BRANCH=none
TEST=make BOARD=burnet/coachz/eve/homestar/kappa/mrbland/quackingstick/
wormdingler.
Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com>
Change-Id: I77c070663ad3e800ec484bd21865c5d911a2c48b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3220718
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Coachz is down to 100's of bytes of free flash on ToT. Enable LTO to
free up about 9k in flash space.
BRANCH=None
BUG=None
TEST=make -j BOARD=coachz shows 9k+ free flash
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ib49e4f41780c7df5ebdeabf91dface0fea2f0234
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3192234
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since the drivers are now taking a mux_state_t set of flags to update,
go ahead and unify the usb_mux API this way as well. It makes the
parameters more apparent than the 1/0 inputs, and aligns the stack to
use the same parameters.
BRANCH=None
BUG=b:172222942
TEST=make -j buildall
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ie943dbdf03818d8497c0e328adf2b9794585d96e
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3095438
Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit is for second source BMI260, We use chip id to detect which
MotionSensor is on the board(BMI160 or BMI260) and combine two different
setting for different MotionSensor.
BUG=b:195908820
TEST=make -j BOARD=coachz
Verify build on SIT board
BRANCH=Trogdor
Signed-off-by: pengjunhao <pengjunhao5@huaqin.corp-partner.google.com>
Reviewed-by: tongjian <tongjian@huaqin.corp-partner.google.com>
Reviewed-by: yudengwu <yudengwu@huaqin.corp-partner.google.com>
Change-Id: Ib12226744800a9ca2e6f620295e8c2ff762999e3
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3118645
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit is for second source motionsensor combine(BMI160 & BMI260),
We use chip id to detect which MotionSensor is on the board but flash
is not enough so we reduce some console cmd.
BUG=b:195908820
TEST=make -j BOARD=coachz
Verify build on SIT board
BRANCH=Trogdor
Signed-off-by: pengjunhao <pengjunhao5@huaqin.corp-partner.google.com>
Reviewed-by: tongjian <tongjian@huaqin.corp-partner.google.com>
Reviewed-by: yudengwu <yudengwu@huaqin.corp-partner.google.com>
Change-Id: I396052cb5996858507864c5201c2d93f1a885618
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3139717
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: Jian Tong <tongjian@huaqin.corp-partner.google.com>
Commit-Queue: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the use of adc_chip.h where adc.h is also used. In this
case, adc_chip.h is redundant.
BRANCH=none
BUG=b:181271666
TEST=buildall passes
Change-Id: Id7baf9aef949447a4d47934242f9bae97c971262
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3120317
Reviewed-by: Keith Short <keithshort@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When PCHG isn't enabled in RO, a keyboard is disabled until another
USB device is plugged.
This patch restores PCHG in RO but disables it by assigning an
invalid value to the IRQ signal (GPIO_IH_COUNT). A PCHG task
will be started but will not run because there will be no event.
BUG=b:193223400, b:173235954
BRANCH=trogdor
TEST=On CoachZ, stylus charges in normal mode and doesn't charge in
recovery mode.
Change-Id: Icb5702474ac5ef74119455ab4879447cb7a963e4
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3100491
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There are 2 tablet mode triggers:
* Lid: when the lid angle close to 360 degree, either detected by
a GMR sensor or by the angle computed by 2 motion sensors.
* Base: when the detachable base is detached.
These 2 triggers set the tablet mode status, which as a boolean,
resulting a race condition.
This CL fixes the race condition. Each trigger updates its own bit. The
final tablet mode status is the OR of all bits.
BRANCH=Trogdor
BUG=b:193873098
TEST=Attached the base, checked tablet_mode enabled;
detached the base, checked tablet_mode disabled;
flip base to 360 degree, checked tablet_mode disabled;
move the base out of the lid, checked tablet_mode disabled.
Change-Id: Ia9d9d2d66c194796c1039cc8b746c8d1f28a4496
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044414
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some hardware doesn't have the external pull-up fix for the bugs,
like b/164256614, b/177611071. It requires rework to stuff the
resistor. For people who has difficulty to do the rework, this CL
is a software workaround, which makes the GPIO push-pull, instead
of open-drain.
BRANCH=Trogdor
BUG=b:190818143
TEST=Booted the Coachz rev-1 board, the I2C bus didn't get wedged.
Change-Id: I82116b855db49ec7c93d90727c7837a58cda8d3e
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2956832
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Peripheral devices don't need to be charged until EC jumps to RW.
This patch removes PCHG from the RO copy.
BUG=b:173235954
BRANCH=trogdor
TEST=Charge stylus on Coachz.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I8156d1408bf69f4c1fccecaf3a77eaec29fa2c99
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2795065
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We stuffed an external pull-up resistor on the GPIO HIBERNATE_L for
fixing the CCD bugs, like b/173828265, b/177611071.
The GPIO can be used as open drain.
BRANCH=Trogdor
BUG=b:189184814
TEST=Tested on Lazor; CCD connection still worked under EC hibernate.
Change-Id: I50d832f1619f976a4cb682fa1b666add96563222
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2950925
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL introduces an unified method to force base attach/detach, to
deprecate the hard-coded gpio pin name table in
hammerd/hammertests/common.py.
Also modifies base_force_state to use the same parameter type as host
command.
BUG=b:188625010
TEST=manually,
run `ectool basestate attach|detach|reset` on coachz
BRANCH=trogdor,kukui
Signed-off-by: Ting Shen <phoenixshen@google.com>
Change-Id: I5235661727cbbd15015c49d588ec70605e4a33e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2910472
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Tested-by: Ting Shen <phoenixshen@chromium.org>
Commit-Queue: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing SC7180 power sequence can be reused on its next generation.
Generalize the filenames, sc7180.c/sc7180.h to qcom.c/qcom.h.
BRANCH=None
BUG=b:187980397
TEST=Built all the Chromium EC images and Zephyr EC images.
Change-Id: Ie04218ef0a12a4e8aa2db353040c5c39c533ae6f
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2893484
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Today some platforms include MKBP_KEYBOARD because they use side buttons,
switches or other events that share the same driver with MKBP keyboard.
Those platforms don't enable KEYSCAN task. The CL is moving key emulation
functionality to MKBP input devices, to make a clear separation
between the real keyboard usage and emulation/buttons/switches/etc.
All boards that were selecting `CONFIG_KEYBOARD_PROTOCOL_MKBP` without
KEYSCAN task are now updated to select `CONFIG_MKBP_INPUT_DEVICES`
BUG=b:170966461
BRANCH=main,firmware-dedede-13606.B,firmware-volteer-13672.B-main
TEST=None
Signed-off-by: Boris Mittelberg <bmbm@google.com>
Change-Id: I515140ebf6e175f4b29991329f92266ffca232a8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2824044
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allowing EC buttons and switches to be signaled via MKBP protocol, using
CONFIG_MKBP_INPUT_DEVICES. Default behaviour is unchanged.
BUG=b:170966461
BRANCH=main,firmware-dedede-13606.B,firmware-volteer-13672.B-main
TEST=None
Signed-off-by: Boris Mittelberg <bmbm@google.com>
Cq-Depend: chromium:2824044
Change-Id: Ib96f98ecb3717a8ee8963be69fb7d7eb72e6d132
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2796382
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When the base state changes, update the virtual switch. It sends a
mode change event to notify AP and then AP will query the latest
virtual switch of the base state.
BRANCH=None
BUG=b:174295396
TEST=Checked detaching and attaching the base.
Detach the base:
> [269.820490 BASE_DET = 2813 (pulse 0)]
[269.821044 tablet mode enabled]
[269.821486 event set 0x0000000010000000]
[269.821974 base state: detached]
Attach the base:
> [273.714608 BASE_DET = 156 (pulse 0)]
[273.715151 tablet mode disabled]
[273.715598 event set 0x0000000010000000]
[273.716907 base state: attached]
[273.717754 event set 0x0000000010000000]
Change-Id: I2f0cac61ee359083df300f4fe3f3d16a14dfb926
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2884609
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The basestate console command is used by tests to emulate the base
detach or attach state. Enable it to pass the tests.
BRANCH=Trogdor
BUG=b:174295396
TEST=Run the basestate to emulate the attach and detach states.
Change-Id: I49f7b135873dd821d533088b320bfcadafc85659
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2884608
Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove bringup configs to generate locked image for production.
BRANCH=trogdor
BUG=b:183687793
TEST=build
Signed-off-by: hanwenchao <hanwenchao@huaqin.corp-partner.google.com>
Change-Id: I369d4d8e6d55e34e43dd4218aaed9a25ef845e49
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2859349
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Bob Moragues <moragues@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Commit-Queue: Philip Chen <philipchen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch adds EC_CMD_PCHG_UPDATE, which allows the host to update
firmware of ctn730 via I2C.
An updater (e.g. ectool) is expected to issue EC_PCHG_UPDATE_CMD_OPEN,
multiple EC_PCHG_UPDATE_CMD_WRITEs, then EC_PCHG_UPDATE_CLOSE. Each
sub-command completion is notified to the host via EC_MKBP_EVENT_PCHG.
An updater is supposed to wait for the previous sub-command to
complete before proceeding to the next.
Example:
localhost ~ # ectool pchg 0
State: DOWNLOAD (6)
FW Version: 0x104
localhost ~ # ectool pchg 0 update 0x207000 0x105 /path/to/image.bin
Update file /path/to/image.bin (85632 bytes) is opened.
Writing firmware (port=0 ver=0x105 addr=0x207000 bsize=128):
**********************************************************************
FW update session closed (CRC32=0x7bd5c66f).
localhost ~ # ectool pchg 0 reset
Reset port 0 complete
localhost ~ # ectool pchg 0
State: ENABLED (2)
FW Version: 0x105
BUG=b:182600604, b:173235954
BRANCH=trogdor
TEST=ectool pchg 0 update 0x201200 0x105 /tmp/user_ee_X0.1_V1.5.bin
TEST=ectool pchg 0 reset
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I9c62f1714dd69428ab5870c443cb4eb77881a6c6
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2757099
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function prototype is defined in quite a few files, none of which
is visible to Zephyr.
Add a prototype in one place and remove the others.
BUG=b:183296099
BRANCH=none
TEST=make buildall
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: I2f3f1e08614408e7b8f6bb0633a478765c73beaa
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789800
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This function prototype is defined in lots of files, none of which is
visible to Zephyr.
Add a prototype in one place and remove the others.
BUG=b:183296099
BRANCH=none
TEST=make buildall
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Ia324327a69b117483ab9ee5c85eba93c0fb5ad9c
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789799
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use board-specific override files when generating VIFs for boards.
BUG=b:172276715
TEST=make buildall
BRANCH=none
Signed-off-by: Abe Levkoy <alevkoy@chromium.org>
Change-Id: I197365018ceb8197c22d631cebf4cbce1c0119f7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2785506
Reviewed-by: Denis Brockus <dbrockus@chromium.org>
Commit-Queue: Denis Brockus <dbrockus@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
sc7180 depends on board specific functions:
- board_set_switchcap_power
- board_is_switchcap_enabled
- board_is_switchcap_power_good
The declaration for these functions were copied between many board.h
files. Move the declaration to the new sc7180.h file so it can be
commonly sourced.
BUG=b:183054226
BRANCH=none
TEST=make buildall
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: Icecb6220bfecdbee665dacb0834ab5752b06815b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2774363
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
base_detect_change() and tablet_set_mode() skip doing anything if the
state has no change.
Originally, the S3->S5 hook sets the state to DISCONNECTED. The next
startup S5->S3 may not initialize the state correctly if no change,
e.g. the case: attach keyboard -> power-off -> detach keyboard ->
power-on. It won't set the tablet mode and won't notify AP.
We should set the state to UNKNOWN in the S3->S5 hook. The next startup
will set the states correctly and notify AP.
BRANCH=Trogdor
BUG=b:179930342
TEST=Plug keyboard, power-off AP, unplug keyboard, power-on AP, plug
keyboard, and checked the EC log that proper states are set and events
are sent to AP.
Change-Id: Ie6111f2ebbbde7ec6a9de2045a463d769ee6fb2b
Signed-off-by: Wai-Hong Tam <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2685409
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, full charge status is implied by capacity = 100 and
PCHG_STATE_DETECTED (i.e. state='not charging'). If the charger
stops charging before 100% (for battery health control), this
condition doesn't work.
This patch makes PCHG send PCHG_STATE_FULL explicitly when it sees
the soc goes above the threshold in PCHG_STATE_DETECTED.
BUG=b:179390065,b:173235954
BRANCH=trogdor
TEST=CoachZ. Charge till 96% and verify PCHG0/state becomes 'Full'.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I634f96992cdc7ef44b5e43544603cc5cc9b3a62d
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2691366
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ctn730 push-pulls the IRQ line. When it's off, the line should stay
low to prevent the EC from getting false IRQ.
This patch also configures the ctn730 reset line as GPIO_ODR_HIGH so
that the line is kept high and a reset can be issued if needed.
BUG=b:173235954, b:178096436
BRANCH=trogdor
TEST=CoachZ. Verified reset line goes up and down by gpioset.
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Change-Id: I0023d9a980826a6ea4741459a0b65c2cc11e6106
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2656766
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add BASE_EN debounce time to meet TP reset sequence
BRANCH=master
BUG=b:176398060
TEST=make BOARD=coachz -j
flash ec and check BASE_EN delay time
Signed-off-by: hegang5 <hegang5@huaqin.corp-partner.google.com>
Change-Id: I04fb80d9f44a56bbf52dc089406ab0bd4fc2cd16
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2637166
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In Zephyr CONFIG_FLASH_SIZE is a Kconfig value that is used
throughout. The issue is that the units don't match. In
Zephyr the value is in KiB instead of bytes. This refactor
simply renames CONFIG_FLASH_SIZE in platform/ec to include
the unit (via _BYTES).
BRANCH=none
BUG=b:174873770
TEST=make buildall
be generated by the build instead of per board
Signed-off-by: Yuval Peress <peress@chromium.org>
Change-Id: I44bf3c7a20fcf62aaa9ae15715be78db4210f384
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2627638
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
EC firmware picks the correct driver based on the board ID
BRANCH=Trogdor
BUG=b:172952070
TEST=make BOARD=coachz -j
flash ec and check TYPE-C base function
Signed-off-by: gaochao <gaochao@huaqin.corp-partner.google.com>
Change-Id: Iefedb6cfcff99f406bd1bb1e136433a1e4cd28d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2540068
Reviewed-by: Gang He <hegang5@huaqin.corp-partner.google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Tested-by: Gang He <hegang5@huaqin.corp-partner.google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
add battery information for coachz
BUG=b:176260625
BRANCH=Trogdor
TEST=make BOARD=coachz
Signed-off-by: hegang5 <hegang5@huaqin.corp-partner.google.com>
Change-Id: Ia87062417db1a5a8a53088d4da96948d10b0d129
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2612239
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The base_DET pin interrupt requires setting to gpio
Remove ALT setting to enable interrupt
BRANCH=trogdor
BUG=b:175747582
TEST=make BOARD=coach
check the softkeyboard hot-plug function is ok
Change-Id: I09cf857fc32cf855ef75ce2ad4448a4b65508156
Signed-off-by: Simon Zhou <zhouguohui@huaqin.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2529271
Reviewed-by: Gang He <hegang5@huaqin.corp-partner.google.com>
Reviewed-by: Wai-Hong Tam <waihong@google.com>
Reviewed-by: Bob Moragues <moragues@chromium.org>
Tested-by: Gang He <hegang5@huaqin.corp-partner.google.com>
Commit-Queue: Wai-Hong Tam <waihong@google.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
coachz update current limit to 95 percent
BRANCH=none
BUG=none
TEST=make BOARD=coachz -j
Signed-off-by: hegang5 <hegang5@huaqin.corp-partner.google.com>
Change-Id: I9e2fcd2b9fb84114ce7ceb64ec0e91154306da5b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597132
Reviewed-by: Wai-Hong Tam <waihong@google.com>
|