Commit Graph

3764 Commits

Author SHA1 Message Date
Divya Sasidharan
d1d5dc162a yorp: Enable keyboard support
BUG=b:77487719
BRANCH=None
TEST=make buildall -j; on yorp test keyboard

Change-Id: Ieb3da871cfa6e2274a3e54274497846787edb796
Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/984385
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-04-04 20:55:34 -07:00
Furquan Shaikh
5bf954bedf nautilus: Lower VCCIO from 0.975V to 0.850V
CQ-DEPEND=CL:*602341
BUG=b:77496214
BRANCH=poppy
TEST=None

Change-Id: If04161615343f573d0de0881667564f7384c2605
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/996804
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-04-04 20:55:22 -07:00
Vadim Bendebury
f2eac533dc cr50: use run time generated public RMA key definition
Use RMA public key definition generated based on the binary blob
containing the key and key ID.

Key generation is controlled by the make file in common/, but actual
key blob comes from the board directory.

The structure holding the key and key ID is being modified to allow
initialization using a flat array.

No more need in defining CONFIG_RMA_AUTH_SERVER_PUBLIC_KEY and
CONFIG_RMA_AUTH_SERVER_KEY_ID.

BRANCH=cr50, cr50-mp
BUG=b:73296144, b:74100307
TEST='make buildall' still succeeds.
     test RMA server generated authentication codes are accepted when
     unlocking RMA.

Change-Id: I8ade94de6eb69b3e49bc5b948dbac20e59962acf
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/990783
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2018-04-04 18:52:03 -07:00
Dylan Lai
82a357a385 TCPM: Add TCPM driver for Analogix anx7447 chip
Driver implements TCPC for ANX7447 chip. Enable Type C
port for USB and DP alt mode.

BUG=b:73793947
BRANCH=NONE
TEST=tested compiled binary for pdeval-stm32f072 board with this patch.
Power contract establishment, port role swap, DP alt mode works fine.

Change-Id: Ic11e499fc5fb4aba7732c75e4cb2fee54828c616
Reviewed-on: https://chromium-review.googlesource.com/956790
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Scott Collyer <scollyer@chromium.org>
2018-04-03 21:40:51 -07:00
Vijay Hiremath
a9c7d6b0d7 Code cleanup: Remove cold reset logic
Majority of the chipsets do not have a dedicated GPIO to trigger
AP cold reset. Current code either ignores cold reset or does a warm
reset instead or have a work around to put AP in S5 and then bring
back to S0. In order to avoid the confusion, removed the cold reset
logic and only apreset is used hence forth.

BUG=b:72426192
BRANCH=none
TEST=make buildall -j
     Manually tested on GLKRVP, apreset EC command can reset AP.

Change-Id: Ie32d34f2f327ff1b61b32a4d874250dce024cf35
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/991052
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>
2018-04-03 18:47:12 -07:00
Vadim Bendebury
44c81deec4 cr50: prepare using blobs as RMA key sources
This patch brings in both prod and test RMA server public keys as two
binary files.

A bash script for converting binary blob into C definition is also
provided.

BRANCH=cr50, cr50-mp
BUG=b:73296144, b:74100307
TEST=none yet

Change-Id: I2edd78164b8c912408ac7eda2e0a3a0262a8e81f
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/990782
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
2018-04-03 18:47:04 -07:00
Jett Rink
aac3da46a0 yorp: add board version
Hard code value to 0 for now.

BRANCH=none
BUG=b:76448181
TEST=none

Change-Id: Iefe91fb02a958f40a1ff63c122792a390a545290
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/984517
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-04-02 22:42:48 -07:00
Nick Sanders
2c5f85f666 servo_v4: extend pd task stack
This works around the occasional garbage packet storm
found in coral, which causes a stack overflow.

BUG=b:77336824
TEST=loop power_state:rec on coral 200x
BRANCH=servo

Signed-off-by: Nick Sanders <nsanders@chromium.org>

Change-Id: I08faf333cb0e7b7bb7016956de44f43621b950ea
Reviewed-on: https://chromium-review.googlesource.com/989215
Commit-Ready: Nick Sanders <nsanders@chromium.org>
Tested-by: Nick Sanders <nsanders@chromium.org>
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
2018-04-02 16:26:45 -07:00
Shamile Khan
ba20a76660 yorp: Enable Trackpad power
Enable trackpad power when chipset is in S0 state. Keep
it disabled in other states.

BUG=b:73137125
BRANCH=master
TEST=On Octopus, kernel logs show ELAN enumerated

Change-Id: Ie1fd8ab777e82d900418127b4efee29fe65d1423
Signed-off-by: Shamile Khan <shamile.khan@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/984405
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-31 04:34:09 -07:00
Philip Chen
f319a80975 scarlet: Enable charge termination only when battery is present
If we enable charge termination when booting w/o battery,
charge termination would trigger and cut the power for max17055.

BUG=b:72697658
BRANCH=scarlet
TEST=Read rt946x reg 0x02, confirm charge termination is
disabled when booting w/o battery, and enabled otherwise.

Change-Id: I5780196ad993299ddfb37621bee5e941aa9b0d14
Signed-off-by: Philip Chen <philipchen@google.com>
Reviewed-on: https://chromium-review.googlesource.com/989314
Commit-Ready: Philip Chen <philipchen@chromium.org>
Tested-by: Philip Chen <philipchen@chromium.org>
Reviewed-by: Philip Chen <philipchen@chromium.org>
2018-03-31 01:56:32 -07:00
raymondchou
7c46ac84e1 Nami: Modify .output_settle_us of keyscan_config
Enable CONFIG_KEYBOARD_BOARD_CONFIG to set .output_settle_us
to 80us from 50us.

BUG=b:77182498
BRANCH=none
TEST=key in "ksstate on" in EC console, then to check
keyboard scan state after pressing each key.

Change-Id: I0c4d83dcbd382a832facb3e8508c5ddee04ac2e6
Signed-off-by: raymondchou <raymond_chou@compal.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/983653
Commit-Ready: Raymond Chou <raymond_chou@compal.corp-partner.google.com>
Tested-by: Raymond Chou <raymond_chou@compal.corp-partner.google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
2018-03-29 22:00:20 -07:00
Dino Li
defa59c6d1 cleanup: it83xx: don't enable non-essential modules at default
We let board-level code to enable them if needed.

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

Change-Id: I9369e33ee1821125cf8719a0c3526afaf294da80
Signed-off-by: Dino Li <Dino.Li@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/985346
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2018-03-29 19:51:48 -07:00
Scott Collyer
89f1ee5b5f yorp: Add tcpc alert handling
This CL adds required code to the tcpc_alert_event() and
tcpc_get_alert_status() functions. In addition, it adds
board_tcpc_init().

The ANX7447 does not have an EC controlled reset line. Other than that
modification the actions taken in tcpc_alert_event and
tcpc_get_alert_status are the same as what's been done of previous
projects using these TCPCs.

board_reset_pd_mcu still needs to be implemented, but is not related
to the tcpc_alert_event() and tcpc_get_alert_status() functions. Also,
at this point ANX7447 is not supported as that depends on the driver
landing.

BUG=b:74127309
BRANCH=none
TEST=Verifed that with external charger that USB PD state machine
advances to SNK_READY state. Note that port 0 does not work at all in
this version.

Change-Id: Ib887b4dba6bacb4b3fb6e03f634362e1c3aa4da2
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/982518
Commit-Ready: Scott Collyer <scollyer@chromium.org>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
2018-03-29 17:02:47 -07:00
Elthan_Huang
c00837e9a3 Nami: Multiple configurations of motion sensors
Nami and Vayne share the same EC image but with
different configuration of motion sensors .

Nami is w/ ALS, but Vayne is w/o ALS.

Create board_set_motion_sensor_count function to update
montion sensor count by oem id.

BUG=b:74608262
BRANCH=none
TEST=Change oem id to check the ALS function whether disable in Vayne.

Change-Id: I86481f8313adaf2585a781e5ad2dafe38008d2ab
Signed-off-by: Elthan_Huang <elthan_huang@compal.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/948882
Commit-Ready: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
2018-03-28 23:23:47 -07:00
Mary Ruthven
ed13cb82b6 cr50: use system_rollback_detected to detect rollback
system_rollback_detected is used to determine if the system rolledback
in the rest of the system code base and it's state is saved longer. This
change switches board.c to use that to determine the sysinfo output
instead of using the reset count.

The reset count is cleared when the system boots. Depending on how fast
the system boots it may be difficult to read sysinfo before the reset
counter is cleared. In these cases it is difficult to tell whether an
image has been rejected entirely or the image caused a rollback.

BUG=b:71804463
BRANCH=cr50
TEST=boot the device. Make sure sysinfo shows there's no rollback.
Rollback and make sure sysinfo shows the system has rolledback

Change-Id: Ic29b105c758d0984e47482b9384cf00fe202b716
Signed-off-by: Mary Ruthven <mruthven@google.com>
Reviewed-on: https://chromium-review.googlesource.com/984393
Commit-Ready: Mary Ruthven <mruthven@chromium.org>
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2018-03-28 23:23:35 -07:00
Nicolas Boichat
b3ecc19cb3 charge_state_v2: Hibernate base in S5 with no AC
Tell the base to hibernate when we are in S5, and no AC is connected.
Also, wake the base when AC status changes (S5), and when the system
transistions out of S5.

BRANCH=none
BUG=b:71874971
TEST=1. Lid EC console: apshutdown => Check that Base EC hibernates
     2.a. Lid EC console: powerb; => Check that base reconnects
     2.b. Connect/disconnect adapter: check that base disconnects
          and reconnects

Change-Id: I5e9a4afc64a07ad92f37d171a78a914d26f07c8e
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/958814
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2018-03-28 23:23:32 -07:00
Nicolas Boichat
bb1a079a62 wand: Fix second UART module, remove unneeded internal pull-up
MODULE_UART should be used for console UART, and MODULE_USART for
all secondary ones (like EC-EC side channel).

BRANCH=none
BUG=b:66575472
TEST=Flash wand, EC-EC communication works

Change-Id: I241bad7902c2e7228783ae1aa9cc33ad5da2c8a2
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/958813
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-28 19:34:19 -07:00
Scott Collyer
fc5a03fef9 yorp: Add support for LG and Panasonic batteries
This CL adds support for the LG and Panasoninc battery for yorp along
with the infrastructure to support multiple battery types.

BUG=b:74132235
BRANCH=none
TEST=make -j BOARD=yorp and make -j buildall

Change-Id: Idc0d0d29fb6f60eea962102cb096b97ada9d7eb6
Signed-off-by: Scott Collyer <scollyer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/978619
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Divya S Sasidharan <divya.s.sasidharan@intel.com>
Tested-by: Scott Collyer <scollyer@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Jett Rink <jettrink@chromium.org>
2018-03-28 16:40:53 -07:00
Jett Rink
ffa4054760 usbc: add default I2C addresses
Add hard coded I2C addresses as defined by datasheet.

BRANCH=none
BUG=none
TEST=none

Change-Id: Ia69cc4da7474a9c1f8a994d33db88e0a405f02b7
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/982561
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
2018-03-28 16:40:40 -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
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
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
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
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
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
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
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
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
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
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
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
Jett Rink
a615f3c7d3 yorp: Enabling power in both USB-A ports in S0
BRANCH=none
BUG=b:74388692,b:75986973
TEST=build all

Change-Id: Ief74b3e1a18ca90cb8fbf76c51780f659e4caf61
Signed-off-by: Jett Rink <jettrink@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/974310
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2018-03-21 20:48:39 -07:00