summaryrefslogtreecommitdiff
path: root/baseboard/intelrvp
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-0524-2601/+0
| | | | | | | | | | | | | | | | | | | | | | In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* adlrvp: Support EC_CMD_BATTERY_GET_STATIC version 1poornima tom2021-09-171-0/+8
| | | | | | | | | | | | | | | | | | | Support for EC_CMD_BATTERY_GET_STATIC version-1 is added to prevent an ioctl error, on entry of ectool battery command. BUG=none BRANCH=none TEST=Verify on adlrvp using ectool battery command ectool battery command returned correct battery information without any ioctl error. Signed-off-by: poornima tom <poornima.tom@intel.com> Change-Id: I359241e8696da0f83e649a920953bc25a88bb0a9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3156318 Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* adlrvp: Remove retimer support for N SKUpoornima tom2021-09-172-0/+17
| | | | | | | | | | | | | | | | | | Type-C ports of ADL-N based RVP SKU do not have retimers. Hence, removed the reference for retimers based on board id of the ADL-N platform at run time. BUG=none BRANCH=none TEST=Tested on ADL-N Signed-off-by: poornima tom <poornima.tom@intel.com> Change-Id: I0e57fc199cc4a0192056eff35ba10fbac457cf4f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3143407 Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org> Tested-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Commit-Queue: caveh jalali <caveh@chromium.org>
* BB Retimer: Add new HPD callback to boardsDiana Z2021-09-161-0/+6
| | | | | | | | | | | | | | | Now that the BB retimer has its own HPD interface, add this interface to every board using the bb_usb_retimer driver. BRANCH=None BUG=b:195773400 TEST=on voxel, pass tast typec.Mode*.manual Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ia70d139431739e8f2c0577359cb3aaa7fb906d0a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3163930 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* intelrvp: Add MECC1.1 supportVijay Hiremath2021-09-081-2/+19
| | | | | | | | | | | | | | | | | MECC1.1 is defined for ADL+ platforms. To simplify the the BOM stuffing options and also to remove dependency on H1 by MECC vendors, H1 is added on RVP as AIC. BUG=b:197659347 BRANCH=none TEST=make buildall -j Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Change-Id: I5c3b4b2b2a116ec8dc5a7448c71a6b8654a78bba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3114218 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Li Feng <li1.feng@intel.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: Add BB retimer emulatorTomasz Michalec2021-09-021-1/+2
| | | | | | | | | | | | | | | | | | Add BB retimer emulator on i2c bus. Emulator properties can be defined using device tree or runtime emulator API. Emulator checks if RO registers and reserved bits are accessed correctly. API allows to set custom read/write i2c messagess handlers to emulate complex behaviour. BUG=b:184856919 BRANCH=none TEST=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I4b641a90e6fb55e89aaee388c0ac04ab7bf367ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3110085 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* mchp: Support RPM-PWM Fan controlmartin yan2021-08-201-1/+5
| | | | | | | | | | | | | | | | | | | Support RPM based Fan Control Algorithm via RPM-PWM hardware block BUG=none BRANCH=none TEST=Tested on ADL RVP and MCHP1727 MECC system via UART console faninfo, fanduty and fanset 1: Verify fan RPM from 3000 to 9000; 2: Verify 2-pole fan expected tach output (100Hz~300Hz) per RPM setting; 3: Verify expected PWM duty (3%~100%) per PWM duty setting; 4: Limit: can not reach 10000 RPM since RPM reaches 9000 in max as PWM duty is set as 100%; Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com> Change-Id: Ib41a06a734821c9f70a45e25e2020c6492c61563 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3100926 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* adlrvp: Enable TCPC low power modeVijay Hiremath2021-08-171-0/+3
| | | | | | | | | | | BUG=b:195406641 BRANCH=none TEST=ADLRVP type-C ports can enter low power mode Change-Id: I0b457758ba67328c139c85dce977603e305715d0 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3088162 Reviewed-by: caveh jalali <caveh@chromium.org>
* adlrvp: enable AP driven mode entryli feng2021-07-291-0/+2
| | | | | | | | | | | | | | | | | BUG=none BRANCH=none TEST= 1. make BOARD=adlrvpp_ite pass 2. on ADL-P RVP, connect USB4 device to port 0, AP requests to enter mode USB4; EC set up USB4 successfully, and enumeration in sysfs is correct. Signed-off-by: li feng <li1.feng@intel.com> Change-Id: Ia6e503c19871928b3b9cc5049079fb40778a6bea Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2999438 Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* keyboard: Use __override for keyboard_scan_configDaisuke Nojiri2021-07-234-4/+4
| | | | | | | | | | | | | | | | | Currently keyboard_scan_config is defined by each board using CONFIG_KEYBOARD_BOARD_CONFIG. This patch makes it defined as __override hence removes CONFIG_KEYBOARD_BOARD_CONFIG. BUG=None BRANCH=None TEST=buildall Change-Id: I53a356741ba4d00e829ca59b74ee6dc704188728 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044403 Tested-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* adlrvp: Add custom board ID reading functionVijay Hiremath2021-07-143-1/+7
| | | | | | | | | | | | | | | ADLRVP has a I/O expander + EEPROM based board ID reading implementation hence added overridable custom board ID reading function. BUG=none BRANCH=none TEST='ectool version' gives intended result Change-Id: I98e49de710f54683b8fbe9f6e9615b7de0aeb4ed Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3024669 Reviewed-by: AndreX Andraos <andrex.andraos@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* system: Clean up system_get_board_version()Philip Chen2021-07-091-1/+0
| | | | | | | | | | | | | | | | | | | Refactor system_get_board_version() a bit so that we can remove CONFIG_BOARD_VERSION_CUSTOM and CONFIG_BOARD_VERSION from config.h. BRANCH=None BUG=b:186264627 TEST=make buildall -j TEST=zmake testall Cq-Depend: chromium:3015243 Change-Id: Id5ab809493c297b7d330ea13dcd6934ec00042a6 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3004112 Commit-Queue: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* adlrvp: Fix the change in cbi config nameThejaswani Putta2021-07-081-1/+1
| | | | | | | | | | | | | | | | | | Rename CONFIG_CROS_BOARD_INFO to CONFIG_CBI_EEPROM in adlrvp to allign with other boards and get cbi utility working. BRANCH=none BUG=none TEST=build ec image and flash on adlrvp, cbi set/get works fine. Signed-off-by: Thejaswani Putta <thejaswani.putta@intel.corp-partner.google.com> Change-Id: I787bb5e874daa930787c2010a551c8f9e494de96 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2999432 Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Anil Kumar K <anil.kumar.k@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* mchp: Add MEC1727 MECC board: adlrvpp_mchp1727martin yan2021-06-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Add new board, adlrvpp_mchp1727 using MEC1727-SZ with integrated 512KB SPI flash and based upon the intelrvp baseboard. BRANCH=none BUG=b:190638460 TEST=Build MEC1727SZ MECC and ADL-P board. Tested basic functions: 1: Power on sequence: G3->S5->S3->S0 2: ESPI enumeration / VW / FC 3: Temperature measurements 4: Smart battery information acquisition 5: Type C Port 0 and 1 - enter ALT mode 6: UART console 7: Sleep / wake / hibernate - woken by powerbtn 8: Powerbtn override Signed-off-by: martin yan <martin.yan@microchip.corp-partner.google.com> Change-Id: Ib474e1134a47a6fa219d741fc5c094cf2f4a560c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2891908 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* chgstv2: Unify power-on and shutdown battery thresholdsDaisuke Nojiri2021-06-231-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, power-on battery SoC and shutdown battery SoC are independently configured by each board. This patch will unify the setting as follows: CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON = 2 (don't boot if soc < 2%) CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE = 2 (shutdown if soc <= 2%) BATTERY_LEVEL_SHUTDOWN = 3 (shutdown if soc < 3%) CONFIG_BATTERY_EXPORT_DISPLAY_SOC = Y (removed) CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON_WITH_AC = 1 This allows us to show the low battery alert whenever we can because EC doesn't inhibit power-on even if it knows the host would immediately shut down. With CONFIG_BATTERY_EXPORT_DISPLAY_SOC, boards will start using the CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE = 2% as the low battery threshold (and the SoC will be agreed between the EC and Powerd). Boards with CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON = 1 will keep the same threshold. This is for avoiding degrading the UX by increasing the power-on threshold (even though a question that 1% may not be enough for soft sync to finish consistently remains to be answered). Boards with CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON > 2 will have a lower threshold but we think 2% is enough to finish the software sync. A lower threshold also improves the UX by showing the low battery alert in the situation where otherwise the system would leave the user uninformed by not responding to a power button press. BUG=b:191837893 BRANCH=None TEST=buildall Change-Id: If6ff733bc181f929561a3fffb8a84e760668ce37 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2981468 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* adlrvp: Cache BB retimer's power stateVijay Hiremath2021-06-191-0/+14
| | | | | | | | | | | | | | | | | | | Ports with cascaded retimers share common load switch and reset pin hence no need to set the power state of retimer again if the 1st retimer's power status has already changed. Otherwise, it will add additional delay to enable the 2nd retimer. Thus, added code to cache the power state of the retimer per port instead of individual retimer. BUG=none BRANCH=none TEST=Tested on ADL-P-DDR5 board that has cascaded retimer topology, no delay added when enabling SOC side retimer. Change-Id: I4b67b6aca96bf20776424b3e56f382b021d4084d Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2954730 Reviewed-by: caveh jalali <caveh@chromium.org>
* bb_retimer: cleanup: Change the power handler func name & paramsVijay Hiremath2021-06-181-2/+2
| | | | | | | | | | | | | | Changed the power handler function name from bb_retimer_power_handle() to bb_retimer_power_enable() and on_off param to enable. BUG=none BRANCH=none TEST=make buildall -j Change-Id: Ifad4c71a5d76b4841ea369a991160e221c051ec5 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2973375 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* adlrvp: enable retimer firmware updateli feng2021-06-151-0/+1
| | | | | | | | | | | | BUG=b:189974129 BRANCH=none TEST=make BOARD=adlrvpp_ite pass Signed-off-by: li feng <li1.feng@intel.com> Change-Id: I06e85f651b6aada465b990215d2cde7c3ecc282c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2954731 Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* bb_retimer: Return status from bb_retimer_power_handle()Caveh Jalali2021-06-121-1/+2
| | | | | | | | | | | | | | | | | | | | | | | This allows the implementation of bb_retimer_power_handle() to return a status value indicating whether the request was successful. The default implementation simply controls a GPIO and is expected to succeed unconditionally. More complex implementations may run into failure cases that leave the BB unreachable. When this happens, device initialization returns an error so the caller can take mitigating action. USB MUX operations tend to be called from timing sensitive code paths in the TCPM, so careful error handling helps avoid cascading problems like PD negotiation failures. BRANCH=none BUG=b:181743576,b:188826559 TEST=buildall passes, PD still works on brya Change-Id: If79078be26e47d758e2cd6cc385ff2b34fecff63 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2954198 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Boris Mittelberg <bmbm@google.com>
* adlrvp: Enable CBI utilityAnil Kumar2021-06-091-0/+7
| | | | | | | | | | | | Branch=none Bug=b:190523663 Test=build ec image and test on adlrvp. cbi set/get works OK Change-Id: I51cae596a389a3859dccbb893495bb9b25172098 Signed-off-by: Anil Kumar <anil.kumar.k@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2947901 Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* adlrvp: Add dual retimer configurationPoornima Tom2021-05-272-0/+42
| | | | | | | | | | | | | | | | DDR5 based sku has dual retimer based topology for port0 & port1. Identify DDR5 board & reconfigure usbmux at run time to support dual retimer topology. BUG=b:189190982 BRANCH=none TEST=Able to configure the retimers and TBT is detected. Signed-off-by: Poornima Tom <poornima.tom@intel.com> Change-Id: I0ff859f7770a6c55931d413b2ea366d4f6aafe84 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2712214 Reviewed-by: caveh jalali <caveh@chromium.org>
* adlrvpp_mchp1521: Add code for ADL-P-DDR4 RVP using Microchip ECPoornima Tom2021-05-201-1/+1
| | | | | | | | | | | | | | | | | | | ADL-P-DDR4 RVP has on board Microchip EC-MEC1521. This code enables RVP powering ON using this on board EC, instead of Mica EC. As this onboard EC doesn't have internal flash memory, EC binary of 512KB size generated is flashed to external SPI Flash1(32MB size) available on RVP over SPI using servo.This image from flash1 is then bootloaded by MEC1521, when powered ON. BUG=b:186669325 BRANCH=none TEST=ADL-P-DDR4 board with Microchip 1521 EC booted to S0. Signed-off-by: Poornima Tom <poornima.tom@intel.com> Change-Id: I39f937f60e2f79b0d2de195621084e3276e36bf2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2755363 Tested-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* Specify type for forward-declared enumsTom Hughes2021-05-061-1/+2
| | | | | | | | | | | | | C++ does not allow enums to be forward declared unless they have a type. BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I6fcdedc81f2b60a44b750554939e60552a4c6a77 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2740567 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* adlrvp: Add TBT & USB4 overridable functionVijay Hiremath2021-04-292-2/+32
| | | | | | | | | | | | | | | | Type-C ports are not symmetrical on RVP to test various combinations. ADL-P-LP5 RVP doesn't have a platform level AUX & LSx MUX on port-2 hence do not perform USB4 & TBT operations on port-2. BUG=none BRANCH=none TEST=Connected TBT3 device on Port-2 of ADLRVP_P_LP5 board, only DP+USB is selected as expected. Change-Id: I52bbd4b8518d040cad637559cad0fd3533fcd5ea Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2791780 Reviewed-by: caveh jalali <caveh@chromium.org>
* ADLRVP: Make code robust for validating TCPC vendorsVijay Hiremath2021-04-264-5/+26
| | | | | | | | | | | | | | | | | Intel Reference Validation Platform is designed to test multiple combinations of hardware thus help enable vendors seamlessly. Added task based TCPC code enablement so that TCPC vendors can easily hook their hardware, make the code changes and validate their TCPC. BUG=none BRANCH=none TEST=make buildall -j Change-Id: I989b6a35c6ff3f96150d09de11458886f9642d1f Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2823167 Reviewed-by: Sooraj Govindan <sooraj.govindan@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* adlrvp: Use PCA9675 I/O expander driver structureVijay Hiremath2021-04-233-80/+98
| | | | | | | | | | | | | Updated the code use PCA9675 I/O expander's standard driver structure. BUG=b:169814014 BRANCH=none TEST=ADLRVP can configure retimer & CCD works Change-Id: I61eef08214a64382338321f4a2dae9f7cfd980da Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2845014 Reviewed-by: caveh jalali <caveh@chromium.org>
* thermisor: move header to include dirDawid Niedzwiecki2021-04-221-1/+1
| | | | | | | | | | | | | | | | Move the "thermistor.h" header to the include/driver/temp_sensor directory. It is used by the Zephyr shim, so the change is useful to include the header. BUG=b:180403276 BRANCH=none TEST=make buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I0e83df97e50a3b324440b65ddb900ddf135f2439 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2843323 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* adlrvp: initialise over current indicationSooraj Govindan2021-04-061-1/+3
| | | | | | | | | | | BUG=none BRANCH=none TEST=ADL-P-RVP boots to OS Signed-off-by: Sooraj Govindan <sooraj.govindan@intel.com> Change-Id: I398c6d642c0cfac48e647878e9b06f164b17db60 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2804000 Reviewed-by: caveh jalali <caveh@chromium.org>
* adlrvpm: add battery configSooraj Govindan2021-03-233-1/+53
| | | | | | | | | | | | BRANCH=none BUG=none TEST=Board booted to OS with battery connected. Signed-off-by: Sooraj Govindan <sooraj.govindan@intel.com> Change-Id: I3f6eca92023aa16a1449b805cdf28964f12bc3c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2755361 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* ADLRVP-NPCX: Enable code for ADL-RVP using NPCX MECCVijay Hiremath2021-03-192-1/+4
| | | | | | | | | | | | | | | | | | | | Using the NPCX MECC following features are tested on ADL-P RVP. 1. Boot to OS 2. Type-C devices 3. Servo functionalities 4. FAN control 5. Battery & Charging 6. Temperature sensors BUG=b:181967246 BRANCH=none TEST=ADL-P-RVP boots to OS Change-Id: I0f5c30067e579c40f532b0df7cabf22e6481f71e Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2632805 Reviewed-by: Sooraj Govindan <sooraj.govindan@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* intelrvp: Add support for NPCX EC configsVijay Hiremath2021-03-194-2/+121
| | | | | | | | | | | | | | | Added base code to support NPCX EC on Intel RVP. Respective board files can reference these configs for easier integration. BUG=b:181967246 BRANCH=none TEST=make buildall -j Change-Id: I4bf7570093c267ca4edb45d115585982f62d4623 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2770179 Reviewed-by: Poornima Tom <poornima.tom@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* intelrvp: cleanup: Shuffle the codeVijay Hiremath2021-03-196-74/+107
| | | | | | | | | | | | | | | | | | | Shuffled the code to cleanup following 1. Moved the temperature sensor code from CONFIG_FANS to CONFIG_TEMP_SENSOR to avoid build errors when the FAN is disabled. 2. Moved ADC code to respective EC chip code as the ADC structure is not same for all the EC chip variants. 3. Moved PD reset code from EC chip to MECC files so that PD specific code can be added if needed. BUG=none BRANCH=none TEST=make buildall -j Change-Id: I614ce0c011f5080e46cd1095a534884925c13b2c Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2762806 Reviewed-by: caveh jalali <caveh@chromium.org>
* adlrvp: Select retimer USB MUX config at runtimePoornima Tom2021-03-022-1/+30
| | | | | | | | | | | | | | | | Different SKU of ADL RVP have different retimer USB MUX hence select the retimer USB MUX based on the board SKU at runtime. BUG=none BRANCH=none TEST=Able to detect USB3.0 drive on Port-2 without retimer Change-Id: I34d70749db98ff45ca3c3ed09720ba9ad9df62a4 Signed-off-by: Poornima Tom <poornima.tom@intel.com> Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2718534 Reviewed-by: Sooraj Govindan <sooraj.govindan@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* adlrvp: cleanup: Move common files to baseboardVijay Hiremath2021-02-224-0/+523
| | | | | | | | | | | | | | | | | Moved the ADLRVP specific common files to baseboard so that the RVP variants with multiple MECC clients can leverage these files without copying them over to board files. BUG=none BRANCH=none TEST=make buildall -j Change-Id: I19739a189aa29c198422f1e2013d59f5da97b02f Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2706259 Reviewed-by: Sooraj Govindan <sooraj.govindan@intel.com> Reviewed-by: Poornima Tom <poornima.tom@intel.com> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* mchp: Add MEC152x SKL RVP boardScott Worley2021-02-104-1/+88
| | | | | | | | | | | | | | | | | | | | Add a MEC152x board based upon SKL-RVP using the intelrvp baseboard. We use the fusb307 USB PD as a placeholder for an actual USB PD. Added MCHP EC module to the intel RVP baseboard. BRANCH=none BUG=b:177463787 TEST=Booted skylake RVP to Chrome OS Signed-off-by: Scott Worley <scott.worley@microchip.corp-partner.google.com> Change-Id: I4ea2e8ca27efa5b0624e751a06fcec8a1bf65456 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2673020 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Ravin Kumar <ravin.kumar@microchip.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Ravin Kumar <ravin.kumar@microchip.com>
* docs: Run mdformat on all .md filesTom Hughes2021-01-281-29/+26
| | | | | | | | | | | BRANCH=none BUG=b:178648877 TEST=view in gitiles Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I0ac5581ba7bc512234d40dbf34222422afa9c725 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2650551 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* config: Fix inconsistent VBUS measurement configAbe Levkoy2021-01-221-1/+0
| | | | | | | | | | | | | | | | | | Remove CONFIG_USB_PD_VBUS_MEASURE_NOT_PRESENT from boards that define CONFIG_USB_PD_VBUS_MEASURE_CHARGER. This change is a no-op, because charge_manager.c is the only place where CONFIG_USB_PD_VBUS_MEASURE_NOT_PRESENT is checked, and it is only checked if CONFIG_USB_PD_VBUS_MEASURE_CHARGER is not defined. BUG=b:178102402 TEST=make buildall TEST=Build sizes before and after change are the same BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ia3caa57a8531a5cba549b64c9087c337996af9c5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2642892 Reviewed-by: Diana Z <dzigterman@chromium.org>
* config: Provide default VCONN Swap delayAbe Levkoy2021-01-221-1/+0
| | | | | | | | | | | | | | | | | Almost every relevant board copy-pastes 5000 us. Make that the default and get rid of the redundant definitions. This is the approximate result of this command: find . -type f -name *.h | xargs sed -i -E \ '/#define CONFIG_USBC_VCONN_SWAP_DELAY_US[[:space:]]+5000[[:space:]]/d' BUG=b:144165680 TEST=make buildall BRANCH=none Change-Id: Ife86f9752971abcd7ab5ad5a5e607eb2ccbde2ba Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2628132 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* config: Make VCONN Swap delay a documented optionAbe Levkoy2021-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | Replace PD_VCONN_SWAP_DELAY with CONFIG_USBC_VCONN_SWAP_DELAY_US. This is the approximate result of the following command, run from platform/ec: find . -type f -\( -name '*.c' -o -name '*.h' -\) | \ xargs sed -iE 's/PD_VCONN_SWAP_DELAY/CONFIG_USBC_VCONN_SWAP_DELAY/g' Fix some latent formatting errors in usb_pd_protocol.c, because they were preventing pre-upload hooks from passing. BUG=b:144165680 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Icaf3b309c08fdcd162e960cf5dc88185016b5d2d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2628131 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Intelrvp: Enable power configs.Deepti Deshatty2021-01-211-0/+9
| | | | | | | | | | | | | | | Don't allow the system to boot to S0 when the battery is low and unable to communicate on locked systems which haven't PD negotiated. BRANCH=none BUG=none TEST=ADLRVP-P booted to OS with only battery connected. Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.corp-partner.google.com> Change-Id: Ia9855fcd095dabb10051d9f70bfca9f600d68326 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2635876 Reviewed-by: caveh jalali <caveh@chromium.org>
* Move tcpic.h header into include/driverSimon Glass2021-01-073-3/+3
| | | | | | | | | | | | | | | | | | This header cannot currently be accessed by Zephyr since it is in a driver directory, not an include directory. This header has quite a bit of public stuff in it, so it seems reasonable to consider everything public. Move the header file and update all users. BUG=b:175434113 BRANCH=none TEST=make buildall -j30 build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ibba37f47a06783fafb5095f853f2a68d92b6df87 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607745
* TCPMv2: Update source-out configsDiana Z2020-12-244-12/+6
| | | | | | | | | | | | | | | | | | | | Now that the DPM will be handling source-out decisions for TCPMv2, remove references to its old configuration options from TCPMv2 boards in order to avoid any confusion as to what code is running now. Also remove the charge manager notifications of sink attach/detach since the policy is being centralized into the DPM. Note that the previous configuration options only ever allocated one 3.0 A port, and so the default number of 3.0 A ports has been set to 1. BRANCH=None BUG=b:168862110,b:141690755 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ie452e3da32b04226503539daa67b6b9f4a58aa58 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597431 Reviewed-by: Keith Short <keithshort@chromium.org>
* ADLRVP:Support for 100w typeC power adapterPoornima Tom2020-12-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | ADL SOC has a TDP of 45W and the RVP can support up to 200W power.Hence, increased the power support to 100W. BRANCH=None BUG=b:173081793 TEST=use chgsup command and list charger type negotiated values. Tested below on ADL: When Typec Charger connected to Port3: > chgsup port=3, type=0, cur=3000mA, vtg=20000mV, lsm=1 when TBT dock connected to Port1: > chgsup port=1, type=0, cur=4500mA, vtg=20000mV, lsm=1 when AC charger connected: > chgsup port=4, type=3, cur=5263mA, vtg=19000mV, lsm=0 Signed-off-by: Poornima Tom <poornima.tom@intel.com> Change-Id: I0677519a68013dbc593539b692bad5016b52654f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2531771 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* Intelrvp:Separate battery configuration into board specific filesAyushee Shah2020-11-253-119/+0
| | | | | | | | | | | | | | | | | | This CL adds the battery configuration from interlrvp baseboard to board specific file for Alderlake, Tigerlake and jasperlake platform so that same manufacturer battery but with different config params can be used on intended platforms. BUG=b:174129818 BRANCH=None TEST=Able to see correct battery configuration in "battery" EC command and can see the battery charging and discharging. Signed-off-by: Ayushee Shah <ayushee.shah@intel.com> Change-Id: I639eb4466c49dbdc01d31feb4ace8844a6b1ac87 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2557763 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* Intelrvp:Supports boards without DC jackAyushee2020-11-073-1/+21
| | | | | | | | | | | | | | | This commit checks if the dedicated port count is greater than 0 for the charger specific files while keeping the code common for both DC jack supported and non DC jack supported boards. BUG=b:172642304 BRANCH=None TEST=make buildall -j Signed-off-by: Ayushee <ayushee.shah@intel.com> Change-Id: I138d33802c2df586963e244f18b787ccce60b8f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2523294 Reviewed-by: Keith Short <keithshort@chromium.org>
* usb: Remove references to usb23Caveh Jalali2020-11-061-1/+0
| | | | | | | | | | | | | | | | | The TCSS port mapping is not used by the EC and the higher layers no longer query the EC for this mapping. We can remove this feature and disable CONFIG_INTEL_VIRTUAL_MUX which was added to enable it. BRANCH=none BUG=b:153941950 TEST=buildall passes Change-Id: I2d7f51212f3e64d74827d7f82654eb93534b8db4 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427632 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* COIL: Rename CONFIG_I2C_CONTROLLERDiana Z2020-11-051-1/+1
| | | | | | | | | | | | | Rename CONFIG_I2C_CONTROLLER and related comments. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ied6a1829bf54a5c9a32e6772982a4b8aa31aaf23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518659 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* ADLP-RVP: Config to enable TBTPoornima Tom2020-11-031-0/+2
| | | | | | | | | | | | BRANCH=None BUG=b:171409539 TEST=Able to enter TBT mode Signed-off-by: Poornima Tom <poornima.tom@intel.com> Change-Id: I81fb01ac9e537ded25cfffc8a9691c173ed41a49 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2490900 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* intelrvp: Keep PPC specific code generic in baseboardVijay Hiremath2020-10-312-1/+3
| | | | | | | | | | | | BUG=none BRANCH=none TEST=PPC interrupt is invoked on ADL-RVP Change-Id: Ib41be079d0d5731627193d15b66bb9949bd2722f Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2508156 Reviewed-by: Sooraj Govindan <sooraj.govindan@intel.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* adlprvp: add Alderlake RVP supportPoornima Tom2020-10-285-0/+198
| | | | | | | | | | | | | | | | | | | | | | | Following features are enabled and verified. 1. Power sequencing 2. Host communication 3. USB TYPE-C - TCPC over PD AIC 4. H1 Close Case Debug 5. LED 6. Keyboard BRANCH=None BUG=b:169551130 TEST=Build, flash and boot the Alderlake RVP platform to OS make BOARD=adlrvpp_ite -j; sudo util/flash_ec --board=adlrvpp_ite --image=<path> Signed-off-by: Poornima Tom <poornima.tom@intel.com> Change-Id: I9d85e0cb93bc94f042f902b73ebd96a354d0f365 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2435177 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Sooraj Govindan <sooraj.govindan@intel.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org>