Commit Graph

8748 Commits

Author SHA1 Message Date
Jett Rink
fbc40d6fce chip/ite: add ADC constants
Add ADC constants to ITE driver to match existing driver style

BRANCH=none
BUG=none
TEST=none

Change-Id: I7e101a26b81d0cd5ffd50f94c18f20335df06c67
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/982560
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Dino Li <Dino.Li@ite.com.tw>
2018-03-28 16:40:39 -07:00
Philip Chen
f03486d36c scarlet: Limit the maximal acceptable VBUS to 5.5V
BUG=b:74399717
BRANCH=scarlet
TEST=Plug in a charger with 5V/9V/15V PD profiles, confirm
scarlet picks 5V

Change-Id: I58ee110d110d873b7221695bf4a182d6d04b65e1
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/982555
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Alexandru M Stan <amstan@chromium.org>
2018-03-27 20:35:12 -07:00
Scott Collyer
a4146020c3 yorp: Fix I2C slave address for PPC
The initial checkin had this address set to NX20P3483_ADDR0, but since
the ADDR pin on the NX20P3483 is tied to GND, then it should be
NX20P3483_ADDR0.

BUG=b:74206647
BRANCH=none
TEST=test on Yorp P0 and verify [0.071748 p0: PPC init'd.]

Change-Id: I2f650140a7efadf028e4df54628c170da6931033
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/982549
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
2018-03-27 20:35:03 -07:00
Nicolas Boichat
bd49214121 isl923x: Set OTG enable debounce time to 150ms
The default setting is to wait 1.3s from receiving the command, to
enable the OTG output: that's too long, and makes time to active
base very long when running on battery.

BRANCH=none
BUG=b:76396020
TEST=Probe POGO 1/5 and one of the USB lines, check that time from
     connect to active USB is reduced to 580 ms (from 1920 ms).

Change-Id: Iee00fd27978434ccac052e60a94534919dc29f43
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/981853
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2018-03-27 20:35:01 -07:00
Aseda Aboagye
46bd51a69a meowth: zoombini: Enable CONFIG_VSTORE.
CONFIG_VSTORE is needed as a part of the verified boot process.  When
the AP boots up, it hashes its FW and asks the EC to store this hash.
When resuming, the AP will ask the EC for this hash.

Meowth and Zoombini were missing this option which was a reason why
resume was failing.

This CL simply enables the VSTORE module and adds 1 VSTORE slot.

BUG=b:72472969
BRANCH=None
TEST=With updated AP FW with HAVE_ACPI_RESUME, verify that
suspend/resume works.

Change-Id: I07d0ce3ef426dc1924de6085703a4174f353f83d
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/982598
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Vaibhav Shankar <vaibhav.shankar@intel.com>
Tested-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-27 20:34:53 -07:00
Marius Schilder
62cd2cb56c g: add stream sniffing for DUT spiflash content.
Use the stream signing mechanism to hook outgoing spiflash content.
This is (only?) used by Mn50 during chip production flows.

BUG=None
BRANCH=none
TEST=make buildall -j8
Signed-off-by: mschilder@google.com

Change-Id: Iccfee173865f587f088a31fcbc7b939823884c31
Reviewed-on: https://chromium-review.googlesource.com/981892
Commit-Ready: Marius Schilder <mschilder@chromium.org>
Tested-by: Marius Schilder <mschilder@chromium.org>
Reviewed-by: Marius Schilder <mschilder@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2018-03-27 20:34:42 -07:00
Marius Schilder
e23e0cf3c0 g: add missing define for UART register UART_VAL.
Holds most recent 16 oversampled values of rx and cts inputs.

Signed-off-by: mschilder@google.com
TEST=buildall -j8
BUG=None
BRANCH=None
Change-Id: I798b8c2ba645712600d7634769f418d81dec5f79
Reviewed-on: https://chromium-review.googlesource.com/981775
Commit-Ready: Marius Schilder <mschilder@chromium.org>
Tested-by: Marius Schilder <mschilder@chromium.org>
Reviewed-by: Marius Schilder <mschilder@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@google.com>
2018-03-27 20:34:41 -07:00
Vadim Bendebury
da431a7898 cr50 release: use signer executable installed on chroot
A new ebuild allows to install codesigner as /usr/bin/cr50-codesigner,
let's make use of it instead of manually copied instance of the
signer.

BRANCH=none
BUG=b:74100307
TEST=verified that error message is generated if cr50-codesigner is
     not installed, and that signing succeeds once cr50-codesigner is
     installed.

Change-Id: I468803443e7b052a8ecb074ee80f63f588888985
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/982495
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2018-03-27 18:01:39 -07:00
Furquan Shaikh
0c780cf925 yorp: Enable VSTORE config options
This change enables VSTORE config option so that EC can support saving
of vboot hash from AP.

BUG=b:75276859
BRANCH=None
TEST=Verified that vboot hash save is successful in BIOS logs. Also,
suspend resume with S3 works fine.

Change-Id: Iafb952cd280265c7b4c6398616fc751d49bc09e3
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/981900
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
2018-03-27 11:59:38 -07:00
Wei-Han Chen
9ea406a2f8 driver/touchpad_st.c: implement touchpad fw update
BRANCH=none
BUG=b:70482333
TEST=make BOARD=whiskers
TEST=sudo ./extra/usb_updater/usb_updater2 -d 18d1:5030 -p <file>
Signed-off-by: Wei-Han Chen <stimim@chromium.org>

Change-Id: I6e3e73a01571ae4cf31891edca588c44e5f41194
Reviewed-on: https://chromium-review.googlesource.com/958896
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2018-03-27 08:06:03 -07:00
Todd Broch
ce4392e123 i2c: expose port num during unwedge console output.
Signed-off-by: Todd Broch <tbroch@chromium.org>

BUG=b:72837836
TEST=manual,
on Nami, 'echo mem > /sys/power/state'

From EC console see,
[4823.162371 I2C4 unwedge failed, SCL is held low

Change-Id: Ic66c7fe00442fdcef90b3a0e4c10bcddc73e04c6
Reviewed-on: https://chromium-review.googlesource.com/981450
Commit-Ready: Todd Broch <tbroch@chromium.org>
Tested-by: Todd Broch <tbroch@chromium.org>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
2018-03-26 23:33:38 -07:00
Jongpil Jung
d1716c502e nautilus: enable accel force mode mask on nautilus
With change(938146), we need to define CONFIG_ACCEL_FORCE_MODE_MASK
so that ec report sensor value to host.

BUG=b:76134274
BRANCH=master
TEST=compile, flash ec on DUT.
     check ectool motionsense, ectool motionsense lid_angle
     check if screen rotaion work or not.

Change-Id: Ib8985d1865baf7373d02e235d3ad32d4d0535398
Signed-off-by: Jongpil Jung <jongpil19.jung@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/979749
Commit-Ready: Jongpil Jung <jongpil19.jung@samsung.corp-partner.google.com>
Tested-by: Jongpil Jung <jongpil19.jung@samsung.corp-partner.google.com>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-26 23:33:37 -07:00
Wei-Han Chen
225e6815a9 whiskers: enable ST touchpad
BRANCH=whiskers
BUG=b:70482333
TEST=make BOARD=whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>

Change-Id: I8a5ef6796a60706da539dd80fb03a379f1aa8d38
Reviewed-on: https://chromium-review.googlesource.com/958895
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2018-03-26 23:33:33 -07:00
Wei-Han Chen
d8225540d9 ec: add driver/touchpad_st.c
Initial commit for ST touchpad.
This CL will support X/Y mode function.

BRANCH=none
BUG=b:70482333
TEST=make BOARD=whiskers
TEST=manually test touchpad function on whiskers
Signed-off-by: Wei-Han Chen <stimim@chromium.org>

Change-Id: I1669286ca764fbbd4a691171193415dd4999673f
Reviewed-on: https://chromium-review.googlesource.com/958894
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2018-03-26 23:33:33 -07:00
Jett Rink
6a7fb0d39b lpc: remove lpc_host_reset
No one is using this method and it implies that all chipset should
support the RCIN# Virtual Wire if using eSPI. Only large core chips
use RCIN#; small core chips don't.

This method was introduced for skylake and has since been replaced
since CL:575947 was merged.

BRANCH=none
BUG=none
TEST=build all

Change-Id: Ic541e3d61d1e0ecc64a0bb12385bdada40f0acf2
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/975904
2018-03-26 17:03:27 -07:00
Kaiyen Chang
b57ad0e1b8 Remove the unnecessary words of "Disable touchpad" in the comments
The control of trackpad from EC was entirely removed by CL:421275.
So remove the unnecessary words of disabling touchpad in the comment
of lid_angle_peripheral_enable().

BUG=none
BRANCH=poppy
TEST=none

Change-Id: Ie688d9dc98c5f6f60a9d3908945495f4b6fdb00d
Signed-off-by: Kaiyen Chang <kaiyen.chang@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/979572
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-03-26 14:41:41 -07:00
Elmo_Lan
33bac396c6 Nami: initial x,y,z-axis direction of lid and base g-sensor
Modify standard reference frame to fit Nami shell design.
(base_standard_ref and lid_standard_ref)

BUG=b:76392750
BRANCH=none
TEST=Use "watch -n 1 ectool motionsense" to check x,y,z-axis.
1. When x-axis face up, get x value of sensor0 and sensor1 more than 10000.
2. When y-axis face up, get y value of sensor0 and sensor1 more than 10000.
3. When z-axis face up, get z value of sensor0 and sensor1 more than 10000.

Change-Id: I8df24f6a48d2759938d17f8ec92b7b4536d71aaa
Signed-off-by: Elmo_Lan <elmo_lan@compal.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/980012
Commit-Ready: Raymond Chou <raymond_chou@compal.corp-partner.google.com>
Tested-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com>
Reviewed-by: Raymond Chou <raymond_chou@compal.corp-partner.google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Kaiyen Chang <kaiyen.chang@intel.com>
2018-03-26 14:41:37 -07:00
Marco Chen
67ee456782 sensor: bmi160/bma2x2: Fix the timeout value of compensation.
CL:957872 introduced "get_time().val + 400" as the deadline to perform
compensation and the comment in bma2x2.c mentioned the deadline should be
400ms. But the unit of val in timestamp_t is microsecond not milisecond
so only 400us is defined not 400ms.

BRANCH=none
BUG=b:76234078
BUG=b:76202592
TEST=test manually on the dut by performing calibrate.

Change-Id: I7a834ef6dcb0772569d2c8d6c507803deb5d2fc1
Signed-off-by: Marco Chen <marcochen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/979512
Commit-Ready: Gwendal Grignou <gwendal@chromium.org>
Tested-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
2018-03-26 14:41:34 -07:00
Jett Rink
9849d847e7 yorp: update virtual wire note for PLT_RST_L
BRANCH=none
BUG=b:74123961
TEST=none

Change-Id: I8d1a810a171685f98c6fe476234ec2e29e7c5854
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/978369
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
2018-03-26 14:41:30 -07:00
Jett Rink
aac3ae2983 bip: enable CONFIG_IT83XX_FLASH_CLOCK_48MHZ to support eSPI speed of 50Mhz
The FND clock must be greater than half the eSPI clock. Enabling this
option bumps the FND clock from 24Mhz to 48Mhz.

BRANCH=none
BUG=b:75972988
TEST=none

Change-Id: Ifbd82a5049c2cc88700100fda2b7cc0930425b91
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/978933
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Dino Li <Dino.Li@ite.com.tw>
2018-03-26 14:41:20 -07:00
Jett Rink
cd17195b0f bip: add UART interrupt to exit deep doze mode
Hook up UART RX pin to wake up ITE device when in deep doze mode.

BRANCH=none
BUG=b:76022415
TEST=none

Change-Id: Iabfd3ef51f9e63a6cbcca60fb916108528b0b294
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/978932
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-26 14:41:20 -07:00
Jett Rink
d5a2d1fdf4 bip: remove GPIO_HIB_WAKE_HIGH option GPIO
GPIO_HIB_WAKE_HIGH is not needed or honored by ITE EC controller.
The lower power state on the ITE still honors the GPIO_INT_BOTH option.

BRANCH=none
BUG=none
TEST=none

Change-Id: I9aba6713c6e4773dd9473705ae020be9d4bac74c
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/978871
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Dino Li <Dino.Li@ite.com.tw>
2018-03-26 14:41:19 -07:00
Edward Hill
36e7c2498c stoney: Rename PGOOD GPIOs
Rename stoney power signals for clarity:
SPOK -> S5_PGOOD
VGATE -> S0_PGOOD

BUG=none
BRANCH=none
TEST=power grunt on and off

Change-Id: Iee8307138600c10868981a22971beace2de1ca91
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/978952
Reviewed-by: Justin TerAvest <teravest@chromium.org>
2018-03-26 02:07:27 -07:00
Duncan Laurie
5c611cedbf Add config for boards that cannot distinguish reset type
We have a growing list of boards in chip/npcx/system.c that are
unable to distinguish a reset from a power-on or a reset-pin type.

Instead of being a temporary issue this is now solidified in the
design on some kabylake boards.

Instead of defining board-specific checks in the chip code this
change adds a config option that the relevant boards can define.

BUG=b:76232539
BRANCH=none
TEST=make -j buildall passes

Change-Id: I76e0f011d70ce6f778b1fb6a56c2779c39c3cbd6
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://chromium-review.googlesource.com/979575
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-26 02:07:24 -07:00
Duncan Laurie
245b494e14 keyboard: Add config option for refresh key row
The keyboards that have an assistant key also move the row that
the refresh key is on from 2 to 3.   The row is hardcoded and
used by the early boot key detection code to determine if
boot keys should be honored.

The fallout from not having the right refresh row defined was
not seen on Eve because that board has a different quirk where
it does not distinguish reset-pin vs power-on reset types so
the test in check_boot_keys() was not failing.

BUG=b:76232955
BRANCH=none
TEST=manual testing on Eve board

Change-Id: I5b94b4e32024afa1768bdf371a7eb951753014e8
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://chromium-review.googlesource.com/979574
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-26 02:07:23 -07:00
Vijay Hiremath
3e12d9af20 intel_x86: Move chipset reset logic to common code
Chipset reset logic chipset_reset() is same for APL, GLK,
SKL, KBL and CNL hence move it to common code.

BUG=b:72426192
BRANCH=none
TEST=make buildall -j

Change-Id: I289e9807d53e397e62d650289e80b6ce25fe399e
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/974471
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-25 00:50:40 -07:00
Vijay Hiremath
e94bf79f85 apollolake: Remove AP cold reset logic
In APL & GLK, cold reset code does a AP force shutdown (with board
specific AP shutdown code) by power sequencing the SOC all the way
to S5 and bring it back to S0. However there is no separate GPIO
in APL & GLK for doing AP cold reset hence removed the AP cold
reset logic.

BUG=b:72426192
BRANCH=none
TEST=make buildall -j
     Manually verified on GLKRVP, apreset cold & warm behave same

Change-Id: I6ee5e4c4df94e685acdabe31b8b5554295883792
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/974107
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-25 00:50:39 -07:00
Furquan Shaikh
286dfbd0c9 yorp: Switch on blue LED on boot-up
This is helpful during early debugging to identify if the EC is up and
running. This will be later cleaned up as part of LED support for
yorp.

BUG=b:74952719
BRANCH=None
TEST=Verified that blue led glows up on booting up EC.

Change-Id: I4670c210045c649a926e7c3f23c5d6097df69e3d
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/979270
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
2018-03-24 20:53:31 -07:00
Vijay Hiremath
3bd4e0de5e Code cleanup: Rename GPIO PCH_RCIN_L to SYS_RESET_L
Renamed GPIO PCH_RCIN_L to SYS_RESET_L so that all the Intel
chipset variants have same GPIO name for doing SOC internal reset.

BUG=b:72426192
BRANCH=none
TEST=make buildall -j

Change-Id: I931ce136743fa928dd7cf6f005c912db3b2da893
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/974241
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-24 07:32:29 -07:00
Philip Chen
f59290878e battery/max17055: Report the raw measured current
BUG=b:74321682
BRANCH=scarlet
TEST=battery command shows current change instantaneously when
AC charger is plugged/unplugged

Change-Id: Ic47efbdfc861355325ee2c69be09fbcfa1394654
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/977022
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2018-03-23 17:29:48 -07:00
Aseda Aboagye
8ea61bf52a meowth: Add GPP_B14_STRAP pins for both SKUs.
GPP_B14_STRAP is being moved due to a change in EC SKU.  We're not
currently using this pin, but if we decide to in the future, we can set
up the appropriate one based upon reading the Chip ID register.

BUG=b:71717245
BRANCH=None
TEST=Build and flash on both ECs, verify that they both boot up
normally.

Change-Id: Iaa25d5d77939bf55d6dc3991eec89ad5d6e92abb
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/978677
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-23 17:29:47 -07:00
Jett Rink
a63f6a6240 bip: add gpio definitions
BRANCH=none
BUG=b:75972988
TEST=none

Change-Id: I4c20103083dc224d449bdc659a2b359808218cb0
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/976526
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-03-23 14:51:06 -07:00
Jett Rink
ca204befd3 tcpc: rename CONFIG_USB_PD_TCPM_ANX74XX to CONFIG_USB_PD_TCPM_ANX3429
Since all of the uses of CONFIG_USB_PD_TCPM_ANX74XX are actually for
ANX3429, rename the option especially since the ANX7447
driver will not reuse the ANX74XX driver which is being introduced
in CL:956790.

Also adding the CONFIG_USB_PD_TCPM_ANX740X and
CONFIG_USB_PD_TCPM_ANX741X options to advertise which versions of the
ANX chip the anx74xx.c driver applies to.

BRANCH=none
BUG=chromium:824208
TEST=build all

Change-Id: Ib47f4661466e54ff2a0c52d517eb318d3bfd25a2
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/973558
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-23 14:50:51 -07:00
Scott Collyer
d1bb1da8e7 yorp: Add config option for VBUS detection
For your VBUS detection will rely on TCPCs since neither the intersil
charger nor the NX20P PPC do VBUS detection.

BUG=b:75975215
BRANCH=none
TEST=make -j BOARD=yorp and verify there are no errors.

Change-Id: I205e4e986e4d01c1098ab62cbccf2ab940f58eed
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/977325
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
2018-03-23 14:50:48 -07:00
Vadim Bendebury
c3e92e92bb makefile: fix build time warnings
Recently, when building images for Cr50 the following warnings started
being generated by make:

board/cr50/build.mk:98: warning: overriding recipe for target \
     'build/cr50/tpm2/libtpm2.a'
board/cr50/build.mk:98: warning: ignoring old recipe for target \
     'build/cr50/tpm2/libtpm2.a'

The reason for this turned out to be changes under
https://chromium-review.googlesource.com/954444

Let's make sure specific make file is not included in the build twice.

BRANCH=cr50, cr50-mp
BUG=none
TEST='make buildall -j' succeeded. Verified that there is no warnings
     reported in the make output.

Change-Id: I96924752eb91669957d2b514d8926ac843b2bf93
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/977021
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
2018-03-23 12:10:15 -07:00
Vadim Bendebury
4d959e92ca cr50: update manifests for both dev and prod versions
BRANCH=cr50, cr50-mp
BUG=none
TEST=none

Change-Id: I377aab1b5a729a0ca98e2340050300d938e51bd5
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/978541
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
2018-03-23 18:11:27 +00:00
Divya Sasidharan
aa4474d3b1 yorp: Enable lid, base accel and gyro sensor
This is initial configuration changes and
enable motion sensor task.

BUG=b:74129963,b:74132236
BRANCH=none
TEST=Verified "make buildall -j and make BOARD=yorp"

Change-Id: Ia45d6434a2c034c0ec650d7b46d6f664848f9153
Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/961459
Commit-Ready: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Tested-by: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
2018-03-22 20:53:38 -07:00
Mary Ruthven
6e18f8f981 rma_reset: fix ignored return value error
The fread return value was ignored in rma_reset.c. This caused clang
compilation to fail.

This change checks the return value.

BUG=b:76105747
BRANCH=none
TEST=clang compilation no longer fails

Change-Id: I710b367008b2e17a94c875ea3eae92bcc75546b0
Signed-off-by: Mary Ruthven <mruthven@google.com>
Reviewed-on: https://chromium-review.googlesource.com/976555
Commit-Ready: Mary Ruthven <mruthven@chromium.org>
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2018-03-22 20:53:26 -07:00
Mary Ruthven
e33c1d8de0 rma_reset: update Makefile to use different compiliers
BUG=b:76105747
BRANCH=none
TEST=compile for bob and reef. make sure it runs on both

Change-Id: I30004c9794c9619698889fecbf8746778ebbb48c
Signed-off-by: Mary Ruthven <mruthven@google.com>
Reviewed-on: https://chromium-review.googlesource.com/976554
Commit-Ready: Mary Ruthven <mruthven@chromium.org>
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2018-03-22 20:53:25 -07:00
Jett Rink
8b0f4b55c5 yorp: clean bug comments
Removing old comment and updating another to a more specific bug.

BRANCH=none
BUG=none
TEST=none

Change-Id: I7542b68e590facf9d8f7b98539cc4a161359c213
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/969649
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-22 18:16:53 -07:00
Divya Sasidharan
b9fbc80fa3 usb_mux: Fix incorrect revision check at init for ps874x
This patch fixes revision check for ps8xxx usb mux and
thereby removing print "Error initializing mux port(x)"
at bootup.
This is just a cosmetic change and should not affect any
functionality.

BUG=none
BRANCH=glkrvp
TEST=On glkrvp: Boot up the system to verify the
     error message setting mux is gone at init.

Change-Id: I0926077d50e818bd93aaa4214106b2f8067d9710
Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/846291
Commit-Ready: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Tested-by: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
2018-03-22 18:16:50 -07:00
Jett Rink
4c4d80ca5d yorp: update gpio alternate function parameter
The NPCX driver doesn't use anything but >= 0; make everything
consistent as to not imply something is different between UART and
everything else.

BRANCH=none
BUG=none
TEST=none

Change-Id: Ib98f56f7004df2405df7d2cc1847f1ed4b3ec558
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/976524
Reviewed-by: Edward Hill <ecgh@chromium.org>
2018-03-22 18:16:49 -07:00
Elthan_Huang
80c8ed8585 Nami: Add SENSOR_CONFIG_EC_S0 for ALS sensor
EC should sample ALS luminance in S0.
Add SENSOR_CONFIG_EC_S0 to let EC to
sample the ALS luminance in S0.

BUG=b:76115061
BRANCH=none
TEST=Verify ALS(OPT3001) luminance
can be read in S0 via ec console.

Change-Id: I34293c41086ac0228c2bb7f159193a1b59807a63
Signed-off-by: Elthan_Huang <elthan_huang@compal.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/974921
Commit-Ready: Gwendal Grignou <gwendal@google.com>
Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
Reviewed-by: Raymond Chou <raymond_chou@compal.corp-partner.google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Gwendal Grignou <gwendal@google.com>
2018-03-22 18:16:48 -07:00
Jett Rink
7742e06e45 bip: initial add of bip skeleton
BRANCH=none
BUG=b:75972988
TEST=build all

Change-Id: Ibfadaee3b9584a7e2c87f6f607be4cba20f338b7
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/972142
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
2018-03-22 18:16:47 -07:00
Gwendal Grignou
9304e2ac01 board: Add CONFIG_ACCEL_FORCE_MODE_MASK for ALS when needed
Some board did not configured the ALS in force mode.
We were lucky that their data was collected while scanning other
sensors, but that's not true anymore since CL:959112

BUG=b:75533383
TEST=Compile
BRANCH=poppy

Change-Id: I4c6f744756a90dd9f2d142bb56826e91b806d5dd
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/969627
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-22 15:24:44 -07:00
Vincent Palatin
0f32382760 meowth_fp: enable CONFIG_HOST_COMMAND_STATUS
Seems expected from the kernel side since we are using a SPI interface
for host commands.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>

BRANCH=none
BUG=b:71986991
TEST=run on Meowth, check kernel logs.
TEST=re-flash meowth_fp RW partition through the host command interface
e.g. flashrom -p ec:type=fp -i EC_RW -w meowth_fp.bin

Change-Id: I8455ba169d0fca7f99dc040c465693c73cebb6b3
Reviewed-on: https://chromium-review.googlesource.com/966022
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2018-03-22 15:24:42 -07:00
Wei-Han Chen
aab7366187 usb_update: check touchpad_info size at build time
Current protocol will not work if touchpad_info is more than 50 bytes.
Assert this constrain at build time.

BRANCH=none
BUG=b:70482333
TEST=make BOARD=hammer
Signed-off-by: Wei-Han Chen <stimim@chromium.org>

Change-Id: I9bf163f77f14c7d475fc8a2f422ce596dc89c61e
Reviewed-on: https://chromium-review.googlesource.com/958893
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2018-03-22 10:58:26 -07:00
Wei-Han Chen
9a8e4226c3 util/unpack_ftb.py: a script to convert FTB file into bin file
ST firmwares are released in FTB format, which can't be written to flash
directly.  This python script can convert a file in FTB format into
bin file.  Currently, we only support FTB files of whiskers touchpad
firmware.

BRANCH=none
BUG=b:70482333
TEST=manual
Signed-off-by: Wei-Han Chen <stimim@chromium.org>

Change-Id: I179de12663580881347a31f11b5b10659e00b879
Reviewed-on: https://chromium-review.googlesource.com/918603
Commit-Ready: Wei-Han Chen <stimim@chromium.org>
Tested-by: Wei-Han Chen <stimim@chromium.org>
Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
2018-03-22 10:58:26 -07:00
Gwendal Grignou
7dfb352adc board: In motion sensor array, remove more assignment to 0
BUG=none
TEST=Compile
BRANCH=none

Change-Id: I86ccc26d7fb6d482dca3275a4365729ff8644777
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/969626
2018-03-22 05:14:47 -07:00
Jagadish Krishnamoorthy
b073dba72a Eve: Enable usb device mode
For the dual data role, when the state is UFP
assert the otg pins to activate the usb device controller.
This will enable usb gadget mode and the board will act as
usb device instead of host.
For DFP state, de-assert the otg pins to activate the host mode.

BUG=b:74339386
BRANCH=NONE
TEST=Connect two Eve boards with the usb type c cable.
On ec console, type the command usb pd 0 swap data.
pd 0 state should return UFP mode.
Verify that the otg pins are high (USB2_OTG_ID and USB2_OTG_VBUSSENSE).

Change-Id: I0efb08ae3946ff09ce9dfeb89cff049e551fe000
Signed-off-by: Jagadish Krishnamoorthy <jagadish.krishnamoorthy@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/961381
Reviewed-by: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-by: Duncan Laurie <dlaurie@google.com>
2018-03-21 23:23:38 -07:00