summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* Jelboz: Dynamic charging current control.Jacky Wang2021-03-122-0/+90
| | | | | | | | | | | | | | | | | | 1. Limit Charging Current by thrmal sensor 0 temperature(Charger). 2. If temperature over or under 54C and keep 5s, Charging Current will change to next level. 3. Limit Charging Current table : 2200/1800/1700/1600 BUG=b:181085004 BRANCH=firmware-zork-13434.B TEST=make BOARD=shuboz 1. Verified pass by thermal team. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: Ic2526db54815759e52b56c662a364237ff6d878f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2716585 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* TCPMv2: Add support for disabling type-2 BIST modeScott Collyer2021-03-124-1/+25
| | | | | | | | | | | | | | | | | | | | | | This CL adds a TCPCI method to disable BIST mode for the case where the TCPC does not handle the duration automatically. This is required for the ucpd driver as once type-2 BIST mode is started, the ucpd peripheral needs to be reset to stop. This CL also reduces the timer value from 60 msec to 55 msec to ensure that there is enough time for BIST to be stopped and still be in spec. BUG=b:182436876 BRANCH=None TEST=verifed on Quiche that when type-2 BIST is started then it stops when the timer in PE expires. This fixes TDA.2.1.1.1: BMC-PHY-TX-EYE Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I59ee7ac0dead09ac3a1b5783cfa3fe9db238eb7e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2660803 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
* kconfig: Add CONFIG_USB_PD_TCPC_VCONNRob Barnes2021-03-123-0/+15
| | | | | | | | | | | | | | | | Add CONFIG_USB_PD_TCPC_VCONN to Kconfig.usb. Also add CONFIG_VBOOT_HASH_RELOAD_WATCHDOG to allow list since it's a temporary config (b/182499153). BUG=None TEST=Build BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: Idde220f7d89a719686b3afba83c94b9973deca9d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752431 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Guybrush: Don't read GPIO_EN_KB_BL as ioexRob Barnes2021-03-121-2/+2
| | | | | | | | | | | | | | GPIO_EN_KB_BL is being read as an ioexpander gpio. This was true on Zork but on Guybrush it's a regular EC GPIO. BUG=None BRANCH=None TEST=Build Change-Id: I1ced4ebbb8c5cbd2dfca0e12528dfcb8fa47f789 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2755194 Reviewed-by: Diana Z <dzigterman@chromium.org>
* brya: Enable tablet modeBoris Mittelberg2021-03-124-1/+11
| | | | | | | | | | | | | Enable GMR sensor and tablet mode for Brya. BRANCH=none BUG=b:181368071 TEST=buildall passes, manually tested with a magnet Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: I3d408e6b6bdd2bc5da81203c0c4e80c2ff367c05 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2737240 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* USB PD: Lower SinkWaitCap timerDiana Z2021-03-121-1/+1
| | | | | | | | | | | | | | | | | Currently, our SinkWaitCap timer is about 20 ms below the maximum. Lower an additional 25 ms to ensure we're hard resetting consistently in time during testing. This should still offer relatively generous time for the partner to begin sending source capabilities. BRANCH=None BUG=b:173027500 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I308ad2c5590aeeed8179ed482cf03a784a852840 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2728946 Reviewed-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
* TCPMv2: Detach before disabling PDAbe Levkoy2021-03-121-0/+1
| | | | | | | | | | | | | | | | Set TC state as if it were entering an Unattached state when entering an open state, so that accesses to TC state during open states return coherent results. BUG=b:182401047 TEST=Run ectool typecstatus with PD suspended; events are cleared BRANCH=firmware-volteer-13672.B-main Change-Id: I17d64459452c2671dddd8f4b6ff11124c09ace72 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752798 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* elemi: Remove CONFIG_SYSTEM_UNLOCKEDDevin Lu2021-03-121-2/+0
| | | | | | | | | | | | | Remove CONFIG_SYSTEM_UNLOCKED for firmware qual. BUG=none BRANCH=volteer TEST=make buildall Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Iba80311009ebd0b78dee68d7184e892564c43c40 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2744557 Reviewed-by: Keith Short <keithshort@chromium.org>
* elemi: Remove CONFIG_BYPASS_CBI_EEPROM_WP_CHECKDevin Lu2021-03-121-1/+0
| | | | | | | | | | | | | Remove CONFIG_BYPASS_CBI_EEPROM_WP_CHECK for firmware qual. BUG=none BRANCH=volteer TEST=make buildall Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ie3af6ba0b6a2661c071150908a3748e3220c305c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2744556 Reviewed-by: Keith Short <keithshort@chromium.org>
* kconfig: Alias EN_PWR_A to EN_PWR_S5Rob Barnes2021-03-124-4/+2
| | | | | | | | | | | | | EN_PWR_A should alias to EN_PWR_S5. EN_PWR_Z1 is PSL_OUT. BUG=b:182512084 TEST=Build BRANCH=None Signed-off-by: Rob Barnes <robbarnes@google.com> Change-Id: Iabec65bb573d200a12e727d281f8c97cf1ee0ec4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2753816 Reviewed-by: Diana Z <dzigterman@chromium.org>
* Mordin: Add one more SKUIDsDevin Lu2021-03-121-0/+1
| | | | | | | | | | | BUG=b:171755306 BRANCH=firmware-grunt-11031.B TEST=make buildall -j Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I45830335545206f665e84866e0b11a2c666d0101 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752572 Reviewed-by: Edward Hill <ecgh@chromium.org>
* brya: remove CONFIG_BRINGUPBoris Mittelberg2021-03-121-1/+0
| | | | | | | | | | | | | Remove BRINGUP flag to allow proper cold reboot BRANCH=none BUG=b:182443498 TEST=buildall passes, manual test via `ectool reboot_ec cold` Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: I5a9d25ea9125acdec3645a6566965988eedb3e94 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752436 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* brya: Enable LEDsBoris Mittelberg2021-03-124-2/+104
| | | | | | | | | | | | | Enable control of right and left LEDs, display charging status. BRANCH=none BUG=b:182329831 TEST=buildall passes, manual test with ectool Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: I1463102924a6300843f3381e1b66d88ae0096157 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752345 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* dedede/raa489000: Set LPM exit debounce to 100msAseda Aboagye2021-03-118-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | For some reason, when the RAA489000 TCPC exits low power mode, CC status doesn't appear changed when using a servo v4. This causes us to think no connection is present and immediately but the IC back into low power mode. If we wait 100ms before querying the CC status reg, it seems that then the right values are reported. This commit adds a workaround by setting the LPM exit debounce time to 100ms. BUG=b:182429150,b:181308089 BRANCH=dedede TEST=Build and flash a board, verify that servo v4 with an external charger is detected. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Ic0c2406fa20d0dad82adee865cd87c46d7126b9f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752250 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* zephyr: lazor: enable board version using GPIOJack Rosenthal2021-03-112-1/+7
| | | | | | | | | | | | | | | Lazor uses the Board ID pins to select the board version. Create the appropriate definitions in gpio_map.h and enable. BUG=b:102398910 BRANCH=none TEST=run "version" command, board version is 3 as expected for DVT Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ib2730e3fa6be01c1eacb2b986be72cd334b7ec76 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752343 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: add AP Kconfig options for Qualcomm SC7180Jack Rosenthal2021-03-112-0/+16
| | | | | | | | | | | | | | Add Kconfig options to enable support for Qualcomm SC7180 CPU. BUG=b:182398910 BRANCH=none TEST=compile for lazor Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ie3cf6b316f12af589cba3f2386a9d28d0d9c43ce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748279 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: lazor: enable external power presence detection via GPIOJack Rosenthal2021-03-112-3/+6
| | | | | | | | | | | | | | | Enable the extpower_gpio.c module and connect the corresponding GPIOs and interrupts. BUG=b:182398910 BRANCH=none TEST=observe host mmap change when connecting/disconnecting AC Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I6a25b859f26b5959871c5a2d948103f23aa13396 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749428 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: lazor: enable power buttonJack Rosenthal2021-03-112-2/+6
| | | | | | | | | | | | | | Enable the power button module and interrupt. BUG=b:182398910 BRANCH=none TEST=push power button, see UART print Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I7e3d1cdf30e49d5179e746c941b51772f50b5c80 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749426 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: lazor: enable lid switchJack Rosenthal2021-03-112-1/+4
| | | | | | | | | | | | | | Enable the lid switch GPIO and module. BUG=b:182398910 BRANCH=none TEST=open and close lid, observe UART prints Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I541eea9e6329aed5d89676c7f3937c7d73868535 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749425 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: lazor: enable PLATFORM_EC_HOSTCMDJack Rosenthal2021-03-111-1/+3
| | | | | | | | | | | | | | | | | | Enable host command support. This only enables the host command common code, which can currently compile. Further work may be required to get SPS interface with AP up and going. BUG=b:182398910 BRANCH=none TEST=flash on lazor, hcdebug command is present Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I82114fe63d962072339b466450f0820038992020 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749424 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* zephyr: lazor: populate gpiosJack Rosenthal2021-03-112-2/+310
| | | | | | | | | | | | | | | | | | Populate named-gpios dts from boards/lazor/gpio.inc. For the most part, util/gpios_to_zephyr_dts.c was used to generate this code. See the instructions in that file if you need to replicate this CL for another project. BUG=b:182398910 BRANCH=none TEST="gpioget" on lazor Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I195f428a5d1849e159f4468e57459a83571a133e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749768 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: add support for trogdor/lazorJack Rosenthal2021-03-1111-0/+227
| | | | | | | | | | | | | | | | | | | | | | | Initial bringup for Lazor, featuring just a UART console, flash access, and basic commands. I structured the directories to look a little more like what we discussed in last week's meeting (putting the Zephyr "board" directory to be common to the baseboard, and putting variants under a directory categorized by baseboard). I hope we can go back to volteer/delbin and re-adopt this layout there too, as it's much cleaner and leads to less repeated code. BUG=b:182398910 BRANCH=none TEST=flash on lazor, test out UART and basic commands ("gettime", "flashinfo", etc.) Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I411c47e9b9563d78349abbeebf71223ae41748a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749765 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: npcx: clock: add clock turbo/normal functionsJun Lin2021-03-111-0/+32
| | | | | | | | | | | | | | | | | | | | Implement the following functions in Zephyr: 1. clock_turbo 2. clock_normal 3. clock_enable_module With these, the CPU clock can speeds up when computing the hash value and goes back to normal when the computation is done. BRANCH=none BUG=b:182224114 TEST=Volteer no longer watchdog resets and can boot up to ChromeOS Signed-off-by: Jun Lin <CHLin56@nuvoton.com> Change-Id: I419cf68c4212fdc588b9fd2a08331c4e81ccf0a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748197 Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* servo_v4p1: Improve handling of DACs' faultsMichał Barnaś2021-03-111-18/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix handling CC2 line fault. CC2 line was not checked, instead, CC1 was used in both checks. Change message that appear on servo's console after detecting DACs' faults. Now, after detecting fault on CC lines, corresponding DAC will be disabled and fault will be cleared. BUG=b:168730704 BRANCH=main TEST=On servo's console execute commands as follows. For CC1: > i2cxfer w16 1 0x48 0x8 0x0080 > i2cxfer w 1 0x23 4 0x12 Short DUT_CC1 pin to ground. Message about CC1 DAC fault should appear on console. For CC2: > i2cxfer w16 1 0x49 0x8 0x0080 > i2cxfer w 1 0x23 4 0x22 Short DUT_CC2 pin to ground. Message about CC2 DAC fault should appear on console. Signed-off-by: Michał Barnaś <mb@semihalf.com> Change-Id: I32b727790dcc54355a5211a667c091287aa04b3e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2732017 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* charger: Add new APIs for measured charge valuesAseda Aboagye2021-03-115-25/+123
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some of the charger ICs can provide measurements for the charge voltage and the charge current. This information is needed by the OCPC module. Previously, the charge_get_current() and charge_get_voltage() functions were modified to provide this information. However, those functions are intended to provide the set voltage and current targets for the charger IC. This commit adds a new set of APIs, charge_get_actual_current() and charge_get_actual_voltage() which provides the actual charge current and voltage if the charger IC is able to provide that information. BUG=b:182018616 BRANCH=dedede TEST=Build and flash madoo, verify that `charger` EC console command shows the set current and voltage targets instead of the measured values. Check that the `chgstate` command shows the measured values for use with the OCPC module. TEST=Verify that charging from the sub board works. TEST=Verify that resistances are still calculated and seem reasonable. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I82565d18908d9ea0f54934787897937488e280e6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2750866 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* Metaknight: modify thermal sensor/table labelYu-An Chen2021-03-112-14/+17
| | | | | | | | | | | | | | TEMP_SENSOR_1 -> TEMP_SENSOR_MEMORY TEMP_SENSOR_2 -> TEMP_SENSOR_CPU BUG=None BRANCH=dedede TEST=check ec console temps, temperature is correct. Signed-off-by: yu-an.chen@quanta.corp-partner.google.com Change-Id: I8b47cc39ee2fc226b8f50b76fe440b0bd68d11af Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2751319 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Sasuke use RAA489000, and need more debounce time to exit low power mode.Jongpil Jung2021-03-111-0/+2
| | | | | | | | | | | | | | | | BRANCH=dedede BUG=b:182232263 TEST=verified Sasuke can be charged by dual power role dongle. verified Sasuke can use ethernet and power with type-c servo v4. Signed-off-by: Jongpil Jung <jongpil19.jung@samsung.com> Change-Id: I900cac732f0735715c08906fef5beb2990b0d30c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752566 Tested-by: Jongpil Jung <jongpil19.jung@samsung.corp-partner.google.com> Tested-by: Edward Doan <edoan@chromium.org> Reviewed-by: Edward Doan <edoan@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* collis: Initial EC imageMichael5 Chen12021-03-118-0/+1134
| | | | | | | | | | | | | | | | | | | Create the initial EC image for the collis variant by copying the copano reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.5.0). BUG=b:182227204 BRANCH=None TEST=make BOARD=collis Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: Idd409872bf244651d138dd2a102e084cc6349498 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747557 Reviewed-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: add a utility to convert gpio.inc to device treeJack Rosenthal2021-03-112-0/+120
| | | | | | | | | | | | | | | Add a developer-only utility for converting a gpio.inc file to DTS. I hope this gets deleted someday when we aren't doing PoCs anymore. BUG=none BRANCH=none TEST=compile/run instructions at top of file, BOARD=lazor Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I354c8917bac0b82f904e07c3e029806ecb67d6d2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752795 Reviewed-by: Simon Glass <sjg@chromium.org>
* docs: zephyr: add some documentation on PoC device bringupJack Rosenthal2021-03-112-0/+50
| | | | | | | | | | | | | | | | Add documentation on how to bring up new Zephyr OS devices for devices and platforms which already have a CrOS EC OS implementation. Based this on Lazor bringup. BUG=none BRANCH=none TEST=view in gitiles Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I1d7466bacdd35dc4c5f02e708e87ee748e097236 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752794 Reviewed-by: Simon Glass <sjg@chromium.org>
* isl923x: Fix the calculation formula in raa489000_get_input_current()Raymond Chung2021-03-111-2/+3
| | | | | | | | | | | | | | | | The adapter current value is in 22.2mA increments. So must be fix calculation formula. IADP = (222 * ADC_value) / 10 BUG=None BRANCH=None TEST=make BOARD=sasuke Signed-off-by: Raymond Chung <raymondchung@ami.corp-partner.google.com> Change-Id: I4124e2a9e3c95e1b07060cbac766197886210e8a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2751316 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* sasuke : lower input voltage on S0iXYongBeum.Ha2021-03-111-0/+22
| | | | | | | | | | | | | | Lower input voltage on S0iX to reduce power consumption BUG=b:182221344 BRANCH=None TEST=make -j BOARD=sasuke Change-Id: I96d7a9d48cc0f52910e80528fc8fec09818cd40a Signed-off-by: YongBeum.Ha <ybha@samsung.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747532 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* mancomb: Update mancomb compared to guybrushRob Barnes2021-03-114-456/+204
| | | | | | | | | | | | | | | | | | | | | Remove gpio not used by mancomb. Remove non required tasks. Remove keyboard functionality. Remove battery functionality. Add recovery buttons and BJ signals. Add DP and HDMI fault signals. Remove most charger functionality. Add USB hub signals. Remove hibernate support. BUG=b:174424094, b:181510382 TEST=Build BRANCH=None Change-Id: If956524a57db104abd399e25978298a828885dc2 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2727967 Reviewed-by: Diana Z <dzigterman@chromium.org>
* zephyr: don't make ec_features.c depend on ACPIJack Rosenthal2021-03-111-2/+2
| | | | | | | | | | | | | | | | ACPI is a concept of the x86 world only, but ARM devices require ec_features.c as well. Compile ec_features.c under the common CONFIG_PLATFORM_EC option. BUG=b:182398910 BRANCH=none TEST=compile lazor with host commands Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Ic06d6ed26015de9ef7e26f6f5554ac3fb4e92f47 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749423 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: include shim/chip/npcx directory for all npcx chipsJack Rosenthal2021-03-111-1/+1
| | | | | | | | | | | | | | CHIP_FAMILY only gets set for the npcx7m6fb chip, but all nuvoton chips appear to need this directory. BUG=b:182410932,b:182398910 BRANCH=none TEST=compile for lazor using npcx7m6fc chip configuration Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I9e6a152b8c31c1bcd3141591863a7b78e03e3766 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749422 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Add a step-by-step guideSimon Glass2021-03-111-0/+42
| | | | | | | | | | | | | | Add a guide to make it easier for people to add a new Kconfig. BUG=b:181253613 BRANCH=none TEST=none Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I2714c02f3541a07c18cfa1d4a40e6b75fb2aa4fa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749762 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* virtual_battery: add a few more propertiesIkjoon Jang2021-03-111-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | Recent version of kernel sbs-battery driver has properties currently unsupported by EC.This patch adds 4 more properties to remove annoying error messages from console: "power_supply sbs-12-000b: driver failed to report xxx" in kernel, "[3927380.033752 Unhandled VB reg 1b" in EC console. New properties added : - SB_AVERAGE_CURRENT(0xb): involves i2c transaction - SB_MAX_ERROR(0xc): returns a constant 3% - SB_CHARGING_CURRENT(0x14), SB_CHARGING_VOLTAGE(0x15): returns existing battery params BRANCH=none BUG=b:170921599 TEST=read properties from sbs sysfs knobs (current_avg capacity_error_margin constant_charge_current_max constant_charge_voltage_max) Change-Id: I681006899969da8466730eda155df935af22994f Signed-off-by: Ikjoon Jang <ikjn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747559 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Correct the config check scriptSimon Glass2021-03-111-3/+2
| | | | | | | | | | | | | | | | | | | | This currently looks for CONFIG options in the Kconfig files, but these all have a PLATFORM_EC prefix. Fix this. Also while we are here, combine the two sed expressions for config and menuconfig and don't allow trailing spaces, since these should not be present. BUG=b:181253613 BRANCH=none TEST=cherry-pick Rob's CL http://crrev.com/c/2659282 make BOARD=volteer -j30 See that it doesn't warn about CCD_USBC_PORT_NUMBER anymore Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Iddcd4aa7884a9f10a5260aa8e71b4131ba550389 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2749761 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* asurada: enable virtual mux for DPEric Yilun Lin2021-03-112-0/+15
| | | | | | | | | | | | | | EC needs to inform AP the DP mode status with virtual mux or ANX7625 might miss the status change. BUG=b:181942052 TEST=ensure EC_HOST_EVENT_USB_MUX is set when DP status change BRANCH=main Change-Id: I079debdd59d80912b1a4668582ed673bfc79cf8a Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2744809 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* servo_v4,servo_v4p1: filter Augmented PDO for pass-throughEric Yilun Lin2021-03-112-0/+9
| | | | | | | | | | | | | This is currently unsupported since servo-v4 uses PD2.0 (TCPMv1) stack. BUG=b:182219864 TEST=Ensure APDOs don't show in ada_srccaps cmd BRANCH=servo Change-Id: I4d10ac6a44d649281c5ae2fff665cc1fd0c590c9 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748194 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* Voxel: Enable FRSEric Herrmann2021-03-102-5/+20
| | | | | | | | | | | | | | | | | | Set flag and configure GPIOs to enable Fast Role Swap on Voxel. Clear the GPIOs passed to the PPC driver for boards which don't support FRS due to older PPC versions. BUG=b:148144711 TEST=With an FRS device with power passed through, remove the power cord and check that the device doesn't re-enumerate. Test with 5V and 20V wall adapters BRANCH=None Signed-off-by: Eric Herrmann <eherrmann@chromium.org> Change-Id: Ib60478d4f840967b1f08d0e621b74350c8f0658c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2733593 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Raa489000: Set Vbus Target Voltage lowerMike Lee2021-03-102-1/+2
| | | | | | | | | | | | | | | Set Vbus Target Voltage lower,so that meet power noise test. BUG=b:181801175 BRANCH=dedede TEST=test power noise pass, meet spec 4.75V--5.25V Signed-off-by: Mike Lee <mike5@huaqin.corp-partner.google.com> Change-Id: I7aa137b37acc678dfbba76d8e72733b8196f8c41 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2745181 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* brya: Enable MKBP supportFurquan Shaikh2021-03-102-0/+4
| | | | | | | | | | | | | | | | | | | | | | | This change enables MKBP support by selecting the following configs: * CONFIG_MKBP_EVENT * CONFIG_MKBP_USE_GPIO - This is selected instead of CONFIG_MKBP_USE_GPIO_AND_HOST_EVENT because GPIO_EC_INT_L is also the wake pin for brya. Additionally, GPIO_EC_INT_L is defined to allow mkbp driver to trigger interrupt to AP for tight timestamps. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: Ia755671d943576ecd8da3a76260c8b87d2ab35ef Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747460 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* brya: Add some AP related configsFurquan Shaikh2021-03-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | This change enables the following AP related configs: 1. CONFIG_CMD_AP_RESET_LOG: Enables support for reporting reset logs to AP. 2. CONFIG_HOSTCMD_AP_RESET: Enables host command that AP can use to request EC to trigger chipset reset. This was used on boards like Dedede and Volteer to address a cr50 strap change issue. This issue might not really apply to brya, but having this host command available shouldn't hurt. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: I44fda98999a93a3bb4a5414adc18c5d734dd6a4d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747711 Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* brya: add chargen to the set of CLI commandsFurquan Shaikh2021-03-101-0/+3
| | | | | | | | | | | | | | | | This is needed to support CCD testing of UART to USB bridging. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: Id183b96dd1f2689f03ed0c09b70d91ca5efccb94 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747708 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* brya: Control display backlight based on state of lid switchFurquan Shaikh2021-03-102-0/+10
| | | | | | | | | | | | | | | | | | This change enables CONFIG_BACKLIGHT_LID so that the EC disables the panel backlight when lid is closed. GPIO_ENABLE_BACKLIGHT is defined to allow common code to control the required GPIO. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: I3c54287d716b66696cb41ba4433a9d704f01f674 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747707 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* brya: Add workaround for CR50 double resetFurquan Shaikh2021-03-101-0/+3
| | | | | | | | | | | | | | | | | | | | | This change enables workaround required for cr50 double reset. Copying commit message from dedede: Hold the EC on the initial power on until the CR50 resets it; this preserves the power on flag for the first boot, which is important when we are deciding if we want to reset the USB-C PD contract. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: I2b3411fc540e54ecc185b46f7f9d7e3bb1075847 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747706 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* brya: Enable link time optimizationFurquan Shaikh2021-03-101-0/+1
| | | | | | | | | | | | | | | | | | This change enables link time optimization for brya by selecting CONFIG_LTO. This option saves ~10KiB of flash space in RO and RW each. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: I9891851e34af50b486f06ea48872513d9f39b75e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747419 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* brya: Enable verified boot related configsFurquan Shaikh2021-03-101-0/+5
| | | | | | | | | | | | | | | | | | | | | | This change enables the following verified boot related configs for brya: * CONFIG_VBOOT_HASH * CONFIG_VSTORE * CONFIG_VSTORE_SLOT_COUNT Since brya hasn't yet enabled EFS2, config for VBOOT_EFS2 is skipped. BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: I32c0986a48b427e2843a980a5fa534e029c8a709 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747418 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org>
* brya: Enable bringup related configsFurquan Shaikh2021-03-101-0/+3
| | | | | | | | | | | | | | | | | | This change enables bringup related configs: CONFIG_BRINGUP CONFIG_SYSTEM_UNLOCKED BUG=b:173575131 BRANCH=None TEST=make -j buildall Signed-off-by: Caveh Jalali <caveh@chromium.org> Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: I20256eca527ec11db9fd04ce84d960ad16d4401f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2747705 Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org>