summaryrefslogtreecommitdiff
path: root/board
Commit message (Collapse)AuthorAgeFilesLines
* rammus: Disable HC debug by defaultGwendal Grignou2022-02-171-0/+8
| | | | | | | | | | | | | | | | | | | | | | Similar to commit 27e8d040b368 ("nocturne: Disable HC debug by default"). When sensors are in use, host queries EC often. BUG=b:205354460 TEST=compile. Apply change in rammus branch, check on DUT that host command messages are gone. BRANCH=rammus Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: Ia828428ab940a0c7faa627fa3655b4f7ce5cd9b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3456704 Reviewed-by: Ricardo Quesada <ricardoq@chromium.org> (cherry picked from commit d059ea64ba23dff66392677367cf70c26e20cf6a) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3466430 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Ricardo Quesada <ricardoq@chromium.org> Tested-by: Ricardo Quesada <ricardoq@chromium.org> Auto-Submit: Ricardo Quesada <ricardoq@chromium.org>
* rammus: gryo sensor add 2nd source ICM40608Michael5 Chen12021-09-285-2/+97
| | | | | | | | | | | | | | | | | | | gryo sensor add 2nd source icm40608 BUG=b:192817920 BRANCH=rammus TEST=make BOARD=rammus Set CBI SSFC 0x10 and using command "watch ectool motionsense lid_angle" for icm-40608. Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: If64ee373c0c63e074b11b8a37c9d67c70d409f40 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3180700 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Gwendal Grignou <gwendal@chromium.org> (cherry picked from commit 9fc70659ae9cc8350e8734471bcffb55b2580f74) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3189456 Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>
* board: nucleo-f411re: create icm426xx development platformJean-Baptiste Maneyrol2021-09-274-18/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use icm426xx chip instead of bmi. Add SPI slave + interrupt to interface with AP (SPI1 + PA1). Add SPI master interface using SPI2 for the sensor (optional). Fix board init hook priority to be run after motionsense init. Increase task stack sizes. Conflicts: board/nucleo-f411re/board.c: Just change i2c address, SPI and frequency support not in this branch. board/nucleo-f411re/board.h: CONFIG_ACCEL_FIFO_SIZE does not exist. BUG=chromium:1117541, b:192817920 BRANCH=rammus TEST=ectool && tast run hardware.SensorRing Cq-Depend: chromium:3099546, chromium:3121867 Signed-off-by: Jean-Baptiste Maneyrol <jmaneyrol@invensense.com> Change-Id: I860b669fd3d2ee196a66e5c80cdc0835b4e5bc73 (cherry picked from commit a4b8af57d15111440893759acd5d90bfc21d8c58) Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3121866 Reviewed-by: JuHyun Kim <jkim@invensense.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: JuHyun Kim <jkim@invensense.com> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org> Auto-Submit: JuHyun Kim <jkim@invensense.com> Tested-by: JuHyun Kim <jkim@invensense.com>
* rammus: Add accelerometer 2nd source KX022.Michael5 Chen12021-09-135-2/+116
| | | | | | | | | | | | | | | | | | Add accelerometer 2nd source KX022. BUG=b:197005105 BRANCH=rammus TEST=make BOARD=rammus Using command "watch ectool motionsense lid_angle". Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: Iea7fee7766730a8c054217877abb76facb55976a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3102685 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org> (cherry picked from commit e7de2313be106dc09fdc2c67eda7c190be5fa3e4) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3156305
* Clear OWNERS for factory/firmware branchBrian Norris2021-09-101-2/+0
| | | | | | | | | | | | BUG=none TEST=none Change-Id: I0f03f432ada1064ffba9595be78ca7ab4d25ecd1 Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3155231 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Owners-Override: Jora Jacobi <jora@google.com> Tested-by: Jack Rosenthal <jrosenth@chromium.org>
* BACKPORT: mkbp_event,include/config.h: Clarify MKBP delivery method.Yilun Lin2021-09-1013-20/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we have two MKBP delivery methods: 1. define CONFIG_MKBP_USE_HOST_EVENT to notify via host event 2. undef CONFIG_MKBP_USE_HOST_EVENT to notify via GPIO interrupt It may become more complicated if new notification methods introduced. e.g.: mt_scp uses IPI, rather than host event and GPIO interrupt. This CL does: 1. add CONFIG_MKBP_USE_GPIO to explicilty declare that MKBP event are sent via GPIO interrupt. 2. CONFIG_MKBP_USE_CUSTOM for boards which have custmized methods. 3. Remove weak attribute in mkbp_set_host_active (which can be done with CONFIG_MKBP_USE_CUSTOM now. 4. Removes mkbp_set_host_active function in board Nocturne. It only deliver MKBP events through GPIO interrupt now. BRANCH=rammus BUG=b:120808999,b:139001152 TEST=grep -rn "CONFIG_MKBP_USE_GPIO\|EC_INT_L" board/ baseboard/ and see the result is reasonable: 1. EC_INT_L must be 1-to-1 mapped to define CONFIG_MKBP_USE_GPIO in every board, except that meep, yorp, ampton which are defined in baseboard octopus. 2. undef CONFIG_MKBP_USE_GPIO in bip and casta, which use host event, but also have baseboard octopus. Conflicts: octupus boards not updated. Signed-off-by: Yilun Lin <yllin@google.com> Reviewed-on: https://chromium-review.googlesource.com/1490794 Commit-Ready: Jett Rink <jettrink@chromium.org> Tested-by: Yilun Lin <yllin@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> (cherry picked from commit 8b1b74c10a87c8477bc65b7be1f6943676bd56bb) Change-Id: I4af6110e4fd3c009968075c3623ef2d91cbd770b Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1776337
* rammus: Set input voltage to 9V when batt fullMichael5 Chen2019-09-201-0/+29
| | | | | | | | | | | | | | | | | | To reduce our power consumption in our lowest power state, we should reduce the charger's input voltage down to 9V when the battery is full and we are no longer charging it. This commit will trigger a PD negotiation to select a 9V source cap. BUG=b:139429471 BRANCH=firmware-rammus-11275.B TEST=Manual Power team check power consumption under S5. Change-Id: I88517255b196ca56660441270fe01143f97f4f4d Signed-off-by: Michael5 Chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1772576 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>
* rammus/shyvana: lower the maximum allowed ODR to 100HzEnrico Granata2019-07-181-0/+3
| | | | | | | | | | | | | | | | | | | | | Some tests are failing on Shyvana at the highest ODR. This is likely due to Shyvana not having a dedicated GPIO path for MKBP events, instead relying on the ACPI path which is known to have lower latency guarantees than we expect. Lowering the ODR allows the tests to pass more reliably. BUG=b:123477920 TEST=run failing CTS test cases on Shyvana Signed-off-by: Enrico Granata <egranata@chromium.org> Change-Id: I864b90f26017c382e48adf976ecf5d6500480037 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1440030 Reviewed-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Enrico Granata <egranata@chromium.org> Tested-by: Enrico Granata <egranata@chromium.org> Auto-Submit: Enrico Granata <egranata@chromium.org>
* Leona: Add Leona non-touch SKU ID for LED controlmichael5 chen2019-07-041-1/+1
| | | | | | | | | | | | | | | Add Leona non-touch SKU ID for LED control BUG=b:136691314 BRANCH=firmware-rammus-11275 TEST=Manual Check LED behavior. Check ectool led command. Change-Id: I047df18b37d6b5de9e980119bb4c4d7ddb617f70 Signed-off-by: michael5 chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1686918 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* Leona: Implement LED function for Leonamichael5 chen2019-05-071-8/+36
| | | | | | | | | | | | | | | | | Implement LED function for Leona BUG=b:131048101 BRANCH=firmware-rammus-11275 TEST=Manual Check LED behavior on power-off, power-on and suspend. Check LED behavior for AC/DC mode. Using ectool led command. Change-Id: I5cf1f78918049b6e5e73be63ac1a19d8c382b25e Signed-off-by: michael5 chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1583480 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>
* Leona: Fix bug keyboard and touch pad no function issue.michael5 chen2019-04-291-0/+1
| | | | | | | | | | | | | | | | | | | | Because tablet mode always setting to 1. It will cause keyboard and touch pad disabled. Set tablet mode to zero (Disable). BUG=b:131124248 BRANCH=firmware-rammus-11275 TEST=manual In S0, check keyboard and touch pad is workable. Change angle more than 180 and check keyboard and touch pad is workable. Using console command "ksstate" and check keyboard scan disable mask is 0x00000000. Change-Id: I6c42973ab96ccc266984f21730c58ef12036d0ca Signed-off-by: michael5 chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1575888 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>
* rammus: Enabled/Disabled G-sensor by SKU IDmichael5 chen2019-04-182-4/+20
| | | | | | | | | | | | | | | | | | Disabled G-sensor function for Leona (SKU ID: 0x2863). BUG=b:129375329 BRANCH=firmware-rammus-11275 TEST=Manual On Leona, rotate the system and check system can not change to tablet mode. On Shyvana and Shyvana-m, check function is ok. Using EC console command accelinfo and accelrate to check sesnor status. Checking motion senor count. Change-Id: Ib97e9e872e7cbc8cd2513f695170c44547815a76 Signed-off-by: michael5 chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1559526 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>
* rammus: Disable tight timestampsEnrico Granata2019-03-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | Rammus boards do not have a dedicated GPIO for MKBP events between EC and AP. On boards without this hardware support, the tight timestamps feature cannot be reliably supported due to issues with the performance of the ACPI SCI chain, compared to a dedicated interrupt. Disabling tight_timestamps restores legacy behavior that is known to fare better with sensors events over SCI. BUG=b:123700100 BRANCH=rammus TEST=tight_timestamps is 0, ran CtsSensorTestCases Change-Id: I459f2673abad7ff75ba9e8a844b7702dee1ef8c0 Signed-off-by: Enrico Granata <egranata@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1524667 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Alexandru M Stan <amstan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1524663
* rammus: turn the USB type-a charging off by default in suspend modeZhuohao Lee2019-02-111-0/+13
| | | | | | | | | | | | | | | | | | | | | | This patch turns the USB type-a charging off by default in suspend mode. If the DUT power on with connecting a USB device, the OS must send an event to clear inhibit_charging_in_suspend. Otherwise, the USB device will lost the power in suspend mode, and the wakeup event won't be generated if the device is a wakeup source (eg. USB keyboard or mouse). BUG=b:121438672 BRANCH=firmware-rammus-11275 CQ-DEPEND=CL:1423758 TEST=Power on DUT without connecting USB, then suspend the DUT. Verfied the USB type-a charging off. Change-Id: I39a0f85d7033b798a80e80cc302a2c72cebae8d6 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1424042 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> (cherry picked from commit c2ebb5e88be7493a07a78533a28a2f1d51be719c) Reviewed-on: https://chromium-review.googlesource.com/c/1460293
* rammus: fix incorrect power mode configuration for the USB Type-AZhuohao Lee2019-02-111-0/+2
| | | | | | | | | | | | | | | | | | | On Rammus, the power mode of the USB Type-A is CDP. However, the default configuration is SDP2. We don't meet any problem on previous setting because of missing CONFIG_USB_PORT_POWER_SMART_INVERTED. This patch fixes the incorrect CONFIG in board.h. BUG=none BRANCH=firmware-rammus-11275 TEST=make -j buildall connect phone to type-a port, CDP works Change-Id: I19a6f2c01faa452131fa036a28be2fc37ce06e58 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1424039 Reviewed-by: Jett Rink <jettrink@chromium.org> (cherry picked from commit 62118f0130fbd11c9f55c98988bede2cbaab7da4) Reviewed-on: https://chromium-review.googlesource.com/c/1460290
* rammus: Reduce adapter charger current limit settingmichael5 chen2019-01-291-2/+2
| | | | | | | | | | | | | | | | Modify adapter charger current limit to 92% of adapter current to reduce charge current. BUG=b:123379983 BRANCH=firmware-rammus-11275 TEST=Manual Using ectool i2cread to check charger setting. (0xac0) ASUS check charge current less than 3A. The test result is pass. Change-Id: I49bb8e5007df1b10fc63c9577a82f4ceb174d118 Signed-off-by: michael5 chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/1436716 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* rammus: Reduced keybaord backlight PWMmichael5 chen2019-01-171-0/+1
| | | | | | | | | | | | | | | Reduced keyboard backlight PWM to 80% by customer request. BUG=b:120813003 BRANCH=None TEST=Manual Flash EC FW and check keyboard backlight. Using tool ectool pwmgetduty kb get value 52428 (80%). Change-Id: I879c4900846f5c4dc2a2a44e39396b76f167c9fa Signed-off-by: michael5 chen <michael5_chen@pegatroncorp.com> Reviewed-on: https://chromium-review.googlesource.com/c/1400086 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* motion_lid: Use CONFIG_TABLET_MODEFurquan Shaikh2018-12-267-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change updates motion_lid driver to use CONFIG_TABLET_MODE to decide if device requires reporting of tablet mode. This basically makes the config options CONFIG_LID_ANGLE_INVALID_CHECK and CONFIG_LID_ANGLE_TABLET_MODE obsolete. Now that EC will always report tablet mode aligned with Chrome (at 180 degree), any device that supports tablet mode and uses motion lid driver will require this by default and should not require boards to individually select any special config options. Thus, it also gets rid of unused CONFIG_LID_ANGLE_TABLET_MODE and CONFIG_LID_ANGLE_INVALID_CHECK. BUG=b:120050761 BRANCH=octopus TEST=make -j buildall Change-Id: Ib73af66ca1c17d4033cf54f0b4b86bf41793f3a3 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1350470 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1379414 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Tested-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Commit-Queue: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com>
* tablet_mode: Introduce hall sensor specific handlingFurquan Shaikh2018-12-2618-21/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change performs the following renaming: 1. CONFIG_TABLET_SWITCH -> CONFIG_HALL_SENSOR Indicates if a device has hall sensor 2. TABLET_MODE_GPIO_L -> HALL_SENSOR_GPIO_L Provides the interrupt line from hall sensor to EC. 3. tablet_mode_isr -> hall_sensor_isr Interrupt routine that gets control on hall sensor interrupt. 4. tablet_mode_init -> hall_sensor_init Init routine for initializing hall sensor interrupt. 5. tablet_switch_disable -> hall_sensor_disable Disable hall sensor interrupt and tablet mode sub-system. This is done to separate hall sensor interrupt from tablet mode handling. It is another step towards aligning tablet mode detection on EC with Chrome. Hall sensor interrupt occurs when the lid is in 360-degree flipped mode. If tablet mode is not already triggered by lid motion driver, then hall_sensor_isr will set tablet mode and take necessary actions to disable input peripherals. CQ-DEPEND=CL:1351518 BUG=b:120050761 BRANCH=octopus TEST=make -j buildall Change-Id: I5841f6875d538a624cb888bc048f252397ab457c Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1350469 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1379413 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Tested-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Commit-Queue: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com>
* Ampton: enable the interrupt for GPIO_BASE_SIXAXIS_INT_LJames_Chao2018-12-242-1/+7
| | | | | | | | | | | | | | | | | | | BUG=none BRANCH=none TEST=accelinfo on Change-Id: I04764b0ce3f963f12f7977b08c89a375c2319d00 Signed-off-by: James_Chao <james_chao@asus.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/1335292 Commit-Ready: James Chao <james_chao@asus.corp-partner.google.com> Tested-by: James Chao <james_chao@asus.corp-partner.google.com> Reviewed-by: James Chao <james_chao@asus.corp-partner.google.com> Reviewed-by: Marco Chen <marcochen@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1379411 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Tested-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Commit-Queue: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com>
* rammus: reconfig the PS8751 i2c port according to the board versionZhuohao Lee2018-12-192-2/+27
| | | | | | | | | | | | | | | | | | | | On Shyvana, we found that if we put the Parade PS8751 and Analogix ANX3447 on the same i2c bus, the ANX3447 would be broken because of PS8751 i2c bus error. To avoid this kind of problem, we decided to separate the TCPC i2c bus starting from board version >= 2. The new assignment are ANX3447:i2c_0_0, PS8751:i2c_0_1. This patch also adds a new config CONFIG_USB_PD_TCPC_RUNTIME_CONFIG for enabling runtime switching the TCPC setting. BUG=b:118063849 BRANCH=firmware-rammus-11275 TEST=verified on DUT with board_version <= 1 verified on reworked DUT with board_version >= 2 Change-Id: I0bdc930c1a5e691239f5f5c256d380d0111eed91 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1379418
* rammus: Lock the ECZhuohao Lee2018-11-302-7/+1
| | | | | | | | | | | | | | | This patch removes the CONFIG_SYSTEM_UNLOCKED to lock the EC and adds the CONFIG_USB_PD_COMM_LOCKED to enable USB PD only when EC is in RW. BUG=b:111816190,b:119929973 BRANCH=master TEST=make buildall -j pass Change-Id: Id812a4036b9a72e60d72a67d4cf4541aa84d5940 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/1355644 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* cr50: Add board strapping options for Sarien/ArcadaKeith Short2018-11-162-8/+47
| | | | | | | | | | | | | | | | | | | | | Add 2 new board properties: * BOARD_WP_DISABLE_DELAY - forces an additional delay after detecting battery removal before disabling write protect * BOARD_CLOSED_SOURCE_SET1 - enables custom CR50 options for Sarien/Arcada boards that use a closed source EC Add Sarien/Arcada to board_cfg_table. BUG=b:118688072 BRANCH=none TEST=make buildall, flashed RW Cr50 firmware onto Careena board and verified boots new version Change-Id: Ic9ffdf4861c2239a1e68eb682152c70fb1f9bfc3 Signed-off-by: Keith Short <keithshort@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1310093 Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* Liara: Add LGC batteryEdward Hill2018-11-162-0/+32
| | | | | | | | | | | | | | BUG=b:113823864 BRANCH=grunt TEST=Boot Liara with LGC battery; "cutoff" EC command succeeds; Plug in AC => boot to OS login. Change-Id: If2ea7bd1a6888b7bbe5f4eb0dd3217073d32e346 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1337468 Tested-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
* phaser: update gpio based on next revJett Rink2018-11-162-11/+21
| | | | | | | | | | | | | | | | | | The reset pin for ANX3447 was added. This pin used to be a 1.8V signal and it now a 3.3V signal, so we need to take care to ensure that older boards don't try to drive 3.3V into the SoC. Other changes are just renames. BRANCH=none BUG=none TEST=current phaser (ID=2) works Change-Id: Ife0a1617f94e4f4a40d43b16328d5540ea35b3ff Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1334031 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
* Nami: Supply power up to 3A + 1.5ADaisuke Nojiri2018-11-161-0/+1
| | | | | | | | | | | | | | | | | | This change allows Nami to supply 3A on one port and 1.5A to the other without changing the max current of the currently active port. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b:115291657 BRANCH=none TEST=Charge Pixel phone on one port and a USB fan on the other. Verify the current provided to the phone does not drop. Change-Id: I38208feedc616e363c9095f273ea926ea8ebbb12 Reviewed-on: https://chromium-review.googlesource.com/1322070 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* meep: set PD on unused interruptJett Rink2018-11-161-8/+5
| | | | | | | | | | | | | | | If the SKU does not populate the base accel, then we should not enable the interrupt and add a pull down to keep the line from floating. BRANCH=none BUG=none TEST=verfied similar change on bobba Change-Id: I29b4367905dadb741916bc5b9bb045bfc6b784ea Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1336289 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
* fleex: set PD on unused interruptJett Rink2018-11-161-8/+5
| | | | | | | | | | | | | | | If the SKU does not populate the base accel, then we should not enable the interrupt and add a pull down to keep the line from floating. BRANCH=none BUG=none TEST=verfied similar change on bobba Change-Id: I85fdfc001bcafdf4d56a2459837c2f4f4f0b64fa Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1336288 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
* phaser: set PD on unused interruptJett Rink2018-11-161-8/+5
| | | | | | | | | | | | | | | If the SKU does not populate the base accel, then we should not enable the interrupt and add a pull down to keep the line from floating. BRANCH=none BUG=none TEST=verfied similar change on bobba Change-Id: Ifd3ef029a18484a4c227db6fcc4312ea3a8603db Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1336287 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
* bobba: add PD to unused lines to prevent floatJett Rink2018-11-161-11/+11
| | | | | | | | | | | | | | | | | | | | Depending on the model, we do not stuff the base accel or the camera. When we detect those SKU, do not enable the interrupt and add a pull down resistor to prevent the line from floating since there isn't an external pull BRANCH=none BUG=none TEST=Verified that sensors/board still work on Bobba360 and Bobba, also verified that power stayed the same or slightly lower (11.32mW on PP3300_ec_mw to 11.29mW over 10 sec average on bobba. 13.62mW->13.56mW for bobba360). Change-Id: I36b01dd79a0f493a2bf9d3cbae54e9863773a056 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1335686 Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org>
* Meep: update EC GPIOs for board version 1Diana Z2018-11-152-13/+20
| | | | | | | | | | | | | | | | | | | | Between board versions 0 and 1, meep added the Analogix reset GPIO. This line should never be driven high on proto boards, so it's set to open drain on board version 0. Other changes include reallocation of the previous WoV pins, and a renaming of the CCD_MODE pin. BRANCH=None BUG=None TEST=imaged meep proto to verify C0 reset was low, imaged meep EVT and verified default GPIO levels Change-Id: I22b40883b8677327887b92922d63d421e1a27596 Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1334531 Reviewed-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* Nami: Apply full factor to full capacityDaisuke Nojiri2018-11-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This change applies 'full factor' to the battery full capacity. It makes the rest of the system see consistent charge percentage behavior. More concretely, with this change we can get rid of 'full factor' from Powerd because it sees the current charge equal to the full capacity. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> CQ-DEPEND=CL:1314048 BUG=b:109954565,b:80270446 BRANCH=none TEST=Verify display percentages printed by EC and power_supply_info move up synchronously on charge and the LED and the taskbar icon turn to full at the same time. Change-Id: Ic16463d457a6c5c2860b97476c78bdafb9021572 Reviewed-on: https://chromium-review.googlesource.com/1315411 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* atlas: clean up ROP PMIC registersCaveh Jalali2018-11-151-17/+28
| | | | | | | | | | | | | | | | | this replaces some ROP PMIC register magic numbers with their actual names. corrected a few comments about the bits we're writing into these registers along the way. BUG=b:75070158 BRANCH=none TEST=boots on atlas Change-Id: If3be6b4c1d550d7e0770450e9f713282835656b5 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1278096 Commit-Ready: Caveh Jalali <caveh@google.com> Tested-by: caveh jalali <caveh@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Ampton: add sku id for convertible skuJames_Chao2018-11-151-2/+3
| | | | | | | | | | | | | | | | According to b:112290350, the convertible sku is 1,2,3,4 BUG=b:112290350 BRANCH=none TEST=build Change-Id: I2de55eb070741f3a0058fd390f897a863562f762 Signed-off-by: James_Chao <james_chao@asus.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/1335290 Commit-Ready: James Chao <james_chao@asus.corp-partner.google.com> Tested-by: James Chao <james_chao@asus.corp-partner.google.com> Reviewed-by: James Chao <james_chao@asus.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
* cheza: Enable CONFIG_HOSTCMD_AP_RESET for debug usageWai-Hong Tam2018-11-151-0/+1
| | | | | | | | | | | | | | | | | | | Enable the host command to issue AP reset. BRANCH=none BUG=b:119261783 TEST=Manually tested as follow: Flashed EC image. Copied the compiled ectool to Cheza. Ran "ectool apreset". Checked EC console: [6698.093141 chipset_reset(4)] [6698.093753 power off 5] ... the power state changing S0 -> S5 -> S0 Change-Id: I2d3e425f7bd7dcb319f039ab4866b2a25197f499 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/1327842
* eve: Enable support for multi-profile DPTFFurquan Shaikh2018-11-152-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | This change enables support for multi-profile DPTF on eve, which uses a hall sensor. Thus the following changes are made: 1. Select config CONFIG_DPTF_MULTI_PROFILE 2. Set profile number based on the TABLET_MODE_L GPIO state (input from the hall sensor indicating completely flipped mode). This change is being done only as a reference for future boards with hall sensors to enable multi-profile DPTF. DO NOT cherry-pick this to any eve branch. CQ-DEPEND=CL:1295851,CL:1295852 BUG=b:117844490 BRANCH=None (Do not cherry-pick to any eve branch) TEST=make -j buildall Change-Id: I71e2078d8f63cc4d5939b76ffca962f041a48e42 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1313471 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@google.com>
* soraka: Enable multi-profile DPTFFurquan Shaikh2018-11-152-0/+10
| | | | | | | | | | | | | | | | | | This change enables multi profile DPTF for soraka by selecting CONFIG_DPTF_MULTI_PROFILE and setting appropriate profile numbers based on base attach/detach state. CQ-DEPEND=CL:1295851,CL:1295852 BUG=b:17844490 BRANCH=None TEST=make -j buildall Change-Id: I7b48025f8eeca9fd585099dc5dce011963780117 Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1313470 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@google.com>
* nautilus: Enable multi-profile DPTFFurquan Shaikh2018-11-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | This change enables multi-profile DPTF by selecting the following config options: 1. CONFIG_DPTF_MULTI_PROFILE: Set appropriate profile number based on mode. 2. CONFIG_DPTF_MOTION_LID_NO_HALL_SENSOR: Indicate board does not have a hall sensor and hence profile numbers are updated by motion_lid driver. CQ-DEPEND=CL:1295851,CL:1295852 BUG=b:117844490 BRANCH=None TEST=make -j buildall Change-Id: Ib6f146d4465e815f7f008cc3e2682e412acc32bb Signed-off-by: Furquan Shaikh <furquan@google.com> Reviewed-on: https://chromium-review.googlesource.com/1313469 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Duncan Laurie <dlaurie@google.com>
* usb-c: use higher priority task for interruptsJett Rink2018-11-1416-102/+134
| | | | | | | | | | | | | | | | | This should be the last step to make all boards on ToT follow go/usb-pd-slow-response-time. Theses boards all have the higher priority tasks, but they aren't being used since the tcpc interrupt wasn't scheduling calls on it. BRANCH=none BUG=b:112088135 TEST=builds Change-Id: I2c39e661e804f88edd5b34636b93e6e63a5af57f Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1283452 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* SN5S330: treat interrupts as level-sensitiveDiana Z2018-11-132-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | The SN5S330 PPC will pull its /INT pin low until all interrupts are cleared. Since the interrupt pin is treated as edge-sensitive, its handler needs to provide level-checking before exiting. Otherwise, if not all interrupts are cleared before the handler exits, the EC won't see another edge to call the handler again. Boards which share the PPC interrupt pin with other sources may choose to implement their own callback, if they are able to determine which chip was the source of the interrupt. BUG=b:118846062 BRANCH=None TEST=performed several power swaps and unplugs on a pair of Careenas, verifying that in instances where the handler had to loop around we correctly cleared the interrupts and the "ectool usbpdpower" output was normal Change-Id: Iccbe40976a746d109d67b9a91f8fbd81898f9b3f Signed-off-by: Diana Z <dzigterman@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1327123 Reviewed-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* Delan: LED PWM Channel Changekoko2018-11-131-2/+2
| | | | | | | | | | | | | | | | | | | | | Changing Delan led channel amber to pwm channel 2 white to pwm channel 0 BUG=b:118418060 BRANCH=none TEST=test on delan by 1. ectool led command 2. ettool pwmsetduty command 3. led behavior in S0, charging/discharging mode Change-Id: Ie0d5b9bc994556271ec7ab971da528a60d0e31f3 Signed-off-by: koko <ko_ko@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/1326283 Commit-Ready: Elmo Lan <elmo_lan@compal.corp-partner.google.com> Tested-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com> Reviewed-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com>
* touchpad_st: update logical maximum of y valueWei-Han Chen2018-11-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | To make X and Y have the same resolution (ratio between logical coordinate and physical coordinate), the logical maximum of y is changed to 1573. This change requires ST firmware v36.0 (0x24) or above. If this is used on older ST firmware, it will still work, but the Y movement will be scaled. BRANCH=nocturne BUG=b:118363768, b:119236031 TEST=make buildall -j64, test on whiskers Signed-off-by: Wei-Han Chen <stimim@chromium.org> Change-Id: Ic6c5db496c28a2f0febb8a4073d738cd9ba45087 Reviewed-on: https://chromium-review.googlesource.com/1297870 Commit-Ready: Wei-Han Chen <stimim@chromium.org> Tested-by: Wei-Han Chen <stimim@chromium.org> Reviewed-by: Tai-Hsu Lin <sheckylin@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
* Nami: Use display battery percentage to control LEDDaisuke Nojiri2018-11-081-20/+27
| | | | | | | | | | | | | | | | | | | | | | | Currently, remaining capacity read from a battery is converted first by ACPI and then by powerd. Without knowing the conversion, EC is not able to control LEDs synchronously to the number on the display. This patch makes Nami EC use display percentages to control LEDs. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=b:109954565,b:80270446 BRANCH=none TEST=Verify charge LED changes to white (full) on Sona synchronously to the display percentage. TEST=Verify charge LED changes to blinking white (low) on Sona within 30 seconds synchronously to the display percentage. Change-Id: I5d451a24bed3a136dee4d7ac27a57caf75fcb856 Reviewed-on: https://chromium-review.googlesource.com/1309035 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* Jerry: Remove keyboard console commandDaisuke Nojiri2018-11-081-0/+1
| | | | | | | | | | | | | | | | This patch removes keyboard console command to create space. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=none BRANCH=none TEST=build Change-Id: Ie662ef7cf5d02b815a04283c11e883db2f78edcb Reviewed-on: https://chromium-review.googlesource.com/1313476 Commit-Ready: Daisuke Nojiri <dnojiri@chromium.org> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* cheza: Make USB mux handled by TCPC chips and HPD handled by APWai-Hong Tam2018-11-072-4/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Cheza design, the USB mux (switching USB lanes to DP and/or USB SS) is handled by TCPC chips and the HPD is handled by AP (DP PHY). The CL adds some custom drivers to override the get() function (Linux extcon driver uses it to check the USB mux and HPD IRQ) by checking the virtual driver and redirect the other functions to the TCPC drivers. BRANCH=none BUG=b:118898133 TEST=Manually added a new console command to issue a HPD IRQ. +static int command_hpd_irq(int argc, char **argv) +{ + char *e; + int port; + const struct usb_mux *mux; + + if (argc != 2) + return EC_ERROR_PARAM_COUNT; + + port = strtoi(argv[1], &e, 10); + if (*e || port >= CONFIG_USB_PD_PORT_COUNT) + return EC_ERROR_PARAM1; + + mux = &usb_muxes[port]; + mux->hpd_update(port, 0, 1); + return EC_SUCCESS; +} +DECLARE_CONSOLE_COMMAND(hpd_irq, command_hpd_irq, + "[port]", + "Issue a HPD IRQ"); In EC console, typed "hpd_irq 0" and checked the result on AP: localhost ~ # ectool usbpdmuxinfo 0 Port 0: USB DP HPD_IRQ Port 1: USB INV Checked it again and HPD_IRQ should be cleared. localhost ~ # ectool usbpdmuxinfo 0 Port 0: USB DP Port 1: USB INV Change-Id: I4ddc274a637393391dd654c9ee75de7646746ad5 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/1316370 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* cheza: Apply the fix to handle two or more HPD eventsWai-Hong Tam2018-11-071-5/+0
| | | | | | | | | | | | | | | | | | | | | Apply the following fix to Cheza: http://crrev.com/c/388737 Some Type-C to DP adapters generate two or more HPD events while others generate only one HPD event. Currently hotplugging only works with the former adapter. Now hotplugging is triggered on one or more HPD events. BRANCH=none BUG=b:118838389 TEST=Plugged and unplugged a USB-C hub with HDMI port to port-0. Plugged and unplugged a HDMI monitor cable to the above hub. Checked the "typec 0" command showing proper results. Change-Id: If03e3db049fb3ba4de0f52b5084fd0457e3703d5 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/1313473 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* cheza: Don't mux the DP lines until HPD level goes highWai-Hong Tam2018-11-071-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is no dedicated GPIO in the SoC to HPD detection. To follow the previous design, the DP PHY should be powered on/off using the EXTCON_DISP_DP cable state. The EXTCON_DISP_DP cable state is set iff the DP mux is enabled. So EC should not enable the DP mux until the HPD level goes high. The hpd_update() is used for HPD_IRQ only. BRANCH=none BUG=b:118838389 TEST=Plugged a USB-C hub with HDMI port to port-0. Checked: > typec 0 Port C0: polarity:CC1 Superspeed USB1 TEST=Plugged a HDMI monitor cable to the above hub. Checked: > typec 0 Port C0: polarity:CC1 Superspeed DP1+USB1 TEST=Unplugged the HDMI monitor cable. Checked: > typec 0 Port C0: polarity:CC1 Superspeed USB1 TEST=Plugged a USB-C to HDMI dongle to port-0. Checked: > typec 0 Port C0: polarity:CC1 No Superspeed connection TEST=Plugged a HDMI monitor cable to the above dongle. Checked: > typec 0 Port C0: polarity:CC1 Superspeed DP1 TEST=Unplugged the HDMI monitor cable. Checked: > typec 0 Port C0: polarity:CC1 No Superspeed connection Change-Id: I9d3ac705913dd1829931def0e4c141da13fbc07c Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/1313472 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Project Delan: Update Battery Parametersamsp_liu2018-11-072-18/+75
| | | | | | | | | | | | | | | | | | This patch makes EC configure battery parameters differently based on manufacturer name BUG=b:118141617 BRANCH=none TEST=1.Verify BYD/LGC/Simplo battery can be found via EC console. 2.Battery can be charged and discharged +-5%. 3.Key in "ectool batterycutoff",then waiting 10 seconds plug-in AC and press power boutton can boot into os. Change-Id: I93431b524d59b905eca0cb83e4638d95abf68433 Signed-off-by: samsp_liu <samsp_liu@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/1295892 Commit-Ready: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Tested-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org>
* Liara: Update LED behaviorJosh Tsai2018-11-071-5/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is no power status indicator LED in customer UX spec, so LED only shows the charging status. The LEDs status defined as below a lookup table. Charging Amber on Full Charged White on Discharging Off Error Amber, 250 ms on / 250 ms off BUG=b:116081524 BRANCH=none TEST=manual 1. Check charge led Amber on when battery is charging. 2. Check charge led White on when battery is full. 3. Check charge led is off when battery is discharge. 4. Check charge led amber on 250ms off 250ms when battery off. Change-Id: Id3e1741b5cc88014ce169cb44229072c80e1bcc4 Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/1285929 Reviewed-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-by: Raymond Chou <raymond_chou@compal.corp-partner.google.com> Reviewed-by: Ruby Lee <ruby_lee@compal.corp-partner.google.com>
* Cr50: Add valid PCR value for pinweaverIgor2018-11-071-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to bind the PIN authentication to PCR4, required for additional security, a set of valid PCR criteria is added as metadata in the leaf of the tree. Each criteria has a bitmask of PCR indexes and the digest sha256 that should be obtained from concatenation of PCR values for the respective indexes. Pinweaver will handle both types of requests, in old and the new format. For migration of old leaves that don't have the new field, the process expects cryptohome to detect that the leaf needs migration based on protocol used, leaf version and if the list of PCR criteria is empty. In case the leaf needs migration, cryptohome should insert a new leaf with the same data and remove the old one. The PCR criteria set is created on Chrome OS side. Details of that implementation is in https://chromium-review.googlesource.com/c/chromiumos/platform2/+/1124856 BRANCH=none BUG=chromium:812165 TEST=sudo V=1 make run-pinweaver -j pinweaver_client selftest Deploy old image on a device and create an account setting a PIN code as well. Deploy the new image and new CR50 build. Login and check that the migration works well. Also try to put device to sleep and unlock. Check that a new credential creation with new version works as well and sleep + unlock work as expected. Extend PCR4 on device and check that login/unlock works only for the user which obfuscated_username was used to extend the PCR. Also check that authentication works with cases when old cryptohome and new pinweaver is deployed, or old pinweaver and new cryptohome. CQ-DEPEND=CL:1124856 Change-Id: If778c4e46b9945afadfd2af7d58353005624d668 Signed-off-by: igorcov@chromium.org Reviewed-on: https://chromium-review.googlesource.com/1112014 Commit-Ready: Igor <igorcov@chromium.org> Tested-by: Igor <igorcov@chromium.org> Reviewed-by: Igor <igorcov@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Reviewed-by: Andrey Pronin <apronin@chromium.org>