summaryrefslogtreecommitdiff
path: root/board/vilboz
Commit message (Collapse)AuthorAgeFilesLines
* USB MUX: Generalize mux ACKDiana Z2021-08-141-2/+11
| | | | | | | | | | | | | | | | | | | | Currently, only the virtual mux driver uses the mux ACK feature, but the actual wait for the host command ACK is a part of the usb_mux general code. Generalize this mux ACK wait so it's available if needed in the future for more muxes. Additionally, moving this wait out of the mux set will allow us to lock the muxes intelligently between tasks, without keeping the muxes locked during the inactive ACK wait. BRANCH=None BUG=b:172222942,b:186777984 TEST=tast typec.Mode*.manual on voxel Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I61a043425a482cc6f3170548c888d91ec20c2a82 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078411 Reviewed-by: Keith Short <keithshort@chromium.org>
* nct38xx: Split after-reset timestabilize-14151.B-mainDevin Lu2021-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Split after-reset time for NCT3807 and NCT3808, since the after-reset time is not the same. From the datasheet (section 4.4.2 Reset Timing) as following: * | Min | Max | * ----------------------+-------+-------+ * NCT3807 (single port) | x | 1.5ms | * ----------------------+-------+-------+ * NCT3808 (dual port) | x | 3ms | * ----------------------+-------+-------+ Currently the after-reset time for NCT3807 is zero. Change to 2ms to fit specification as well. BUG=none BRANCH=none TEST=On Redrix. Initial success with NCT3807. TEST=On Dirinboz. Initial success with NCT3807. TEST=make buildall. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I1f47f57c0d8955946b1c2522e1a1736739217f41 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3068492 Reviewed-by: caveh jalali <caveh@chromium.org>
* tablet_mode: Fix the race condition of setting the tablet modeWai-Hong Tam2021-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | There are 2 tablet mode triggers: * Lid: when the lid angle close to 360 degree, either detected by a GMR sensor or by the angle computed by 2 motion sensors. * Base: when the detachable base is detached. These 2 triggers set the tablet mode status, which as a boolean, resulting a race condition. This CL fixes the race condition. Each trigger updates its own bit. The final tablet mode status is the OR of all bits. BRANCH=Trogdor BUG=b:193873098 TEST=Attached the base, checked tablet_mode enabled; detached the base, checked tablet_mode disabled; flip base to 360 degree, checked tablet_mode disabled; move the base out of the lid, checked tablet_mode disabled. Change-Id: Ia9d9d2d66c194796c1039cc8b746c8d1f28a4496 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044414 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* vilboz: adjust dynamic changing charge currentSamsp_Liu2021-07-161-12/+11
| | | | | | | | | | | | | | | | | | | | | | | S0: This patch base on charger thermistor sensor temperature to dynamic changing charge current. S3/S5: Follow battery charge current. BUG=b:193758974 BRANCH=zork TEST=Verify the S0 status charge current can be changed when charger thermistor sensor temperature rises and drop. S3/S5 status follow battery charge current. Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Change-Id: Ia1ebf69a2ae1b8925240e9b3d043a71b445f8f2d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3033226 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* Zork: Update TCPC reset functions to notify NCT38xx driverDiana Z2021-06-171-9/+15
| | | | | | | | | | | | | | | The NCT38xx driver is now storing boot information which should be cleared whenever the TCPC is forcibly reset through the reset line. Add these reset calls to all zork boards. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I89089a32d4d17dc260df7928028c2dc5fef45aa2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2965846 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* LED On/Off: Make battery LED optionalDiana Z2021-04-221-4/+5
| | | | | | | | | | | | | | | Currently, all boards using the LED On/Off module have battery LEDs. However, if we'd like to expand support to Chromeboxes then the battery LED must become optional. BRANCH=None BUG=b:185508707 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ieae098829ebe6c8b103f23d5abdbf70e7bcbdf2d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832692 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* LED On/Off: Remove power LED configDiana Z2021-04-222-5/+2
| | | | | | | | | | | | | | | | | | | | | | Move the LED on/off module towards using a more flexible LED support approach. Define a weak power LED table and setter for boards to override when needed. Note that during run-time these functions will not get called since led_auto_control_is_enabled() will return false for nonexistent LEDs. This consumes an average of 165 additional bytes of flash space on boards which do not use a power LED. BRANCH=None BUG=b:185508707 TEST=make -j buildall, load on guybrush (battery LED only) and confirm no errors are seen. Load on Boten (both LEDs) and confirm behavior appears normal Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iaa1e22a7f5d8be39eb8792ee13d358087d7f7482 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832691 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* genvif: Use VIF overrides by defaultAbe Levkoy2021-03-301-0/+3
| | | | | | | | | | | | | | Use board-specific override files when generating VIFs for boards. BUG=b:172276715 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I197365018ceb8197c22d631cebf4cbce1c0119f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2785506 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* board/zork: Re-order includes so that enum definition comes before useTom Hughes2021-03-161-1/+2
| | | | | | | | | | | | | C++ doesn't allow forward enum references. BRANCH=none BUG=b:144959033 TEST=make buildall Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I7e1f8890005e05136eeb4e5084505988dbbb15b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2740566 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* COIL: Rename ioexpander i2c address variableDiana Z2021-02-241-1/+1
| | | | | | | | | | | | | | Rename ioexpander i2c address to match current conventions and update any calling locations. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iddad457f73d0dd0167496b794c00e274f8985615 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2697855 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* board: Remove HAS_TASK_MOTIONSENSE when always definedGwendal Grignou2021-02-221-4/+0
| | | | | | | | | | | | | | | ifdef HAS_TASK_MOTIONSENSE is only necessary for board that may not have sensor. Only oak board may be compiled without the sensor stack. BUG=none BRANCH=none TEST=compile. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: I7d8e4ff1a647e73251b91a185780025bfae78187 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2693915 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* board: Set Accelerometer range to 4gGwendal Grignou2021-02-131-1/+1
| | | | | | | | | | | | | | | | | For accelerometer presented to Android, set default range to 4g. Required by Android CDD - Section 7.3.1 - Paragraph C.1.4. mems_setup can correct it, but it is cleaner if the default setting is right. BUG=b:144004449 BRANCH=none TEST=compile Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: I781eafc003823e2595d46d7170f717aaee08dc6d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2657956 Reviewed-by: Alexandru M Stan <amstan@chromium.org>
* vilboz: dynamic changing charge currentSamsp_Liu2021-02-052-0/+83
| | | | | | | | | | | | | | | | | | | This patch base on charger thermistor sensor temperature to dynamic changing charge current. BUG=b:174720890 BRANCH=zork TEST=verify the charge current can be changed when charger thermistor sensor temperature rises and drop. Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Change-Id: I0ba4c17fcfa6b5b468778865ded53ab494eebe7e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2666554 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* vilboz: modify charger input current limit settingSamsp_Liu2021-02-011-0/+15
| | | | | | | | | | | | | | | | This patch modify charger input current setting as input current limit=adapter rating current*0.95 for vilboz. BUG=b:178681160 BRANCH=zork TEST=verify that charger input current limit by command charger. Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Change-Id: Ibb3e946ac3fd261158c38a31a584c31f9e27eb57 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2657910 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: SamSP Liu <samsp_liu@compal.corp-partner.google.com>
* vilboz: enable USB 3 mux for the LTE modemVincent Palatin2021-02-011-0/+19
| | | | | | | | | | | | | | | | | | | | | On Vilboz360, if an internal LTE modem is present, it is connected on the USB C1 port. In this case we need to ensure that the superspeed mux of the C1 port is in USB 3 position rather than in 'safe mode' where the LTE modem would enumerate only as USB 2.0 HS since the superspeed pairs would be disconnected. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=b:177389383 BRANCH=zork TEST=On vilboz360, see the L850-gl LTE modem enumerating as a superspeed device. Change-Id: I0f3e100077552a8712b2177b3a066e124e149dab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2645429 Tested-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Vincent Palatin <vpalatin@chromium.org>
* vilboz: replace obsolete dalboz config macrosPeter Marheine2021-01-291-49/+7
| | | | | | | | | | | | | | | | Vilboz inherited the mb and db type macros from dalboz when it was created by copying dalboz; replace it with correct definitions for vilboz in accordance with the project config. BUG=b:178457388 TEST=builds BRANCH=zork Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I00fb2948ba68e1d4d68499e35911eb9072d3e75d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2649897 Reviewed-by: Vincent Palatin <vpalatin@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zork: use MKBP GPIO & host event for wake on DPPeter Marheine2021-01-051-2/+0
| | | | | | | | | | | | | | | | | | | | | | | GPIO-only MKBP only works when the AP is awake; we need to use GPIO_AND_HOST_EVENT in order to support waking the AP in response to MKBP events; in particular DP_ALT_MODE_ENTERED. We also configure the MKBP wakeup mask so powerd can apply configuration at runtime per chromeos-config: if no mask is configured then the hostcmd to set the wakeup mask is not included in the firmware. Wake on MKBP (and thus wake on DP) also requires AP firmware support. https://review.coreboot.org/c/coreboot/+/48844 implements it for Zork. BUG=b:174121852 TEST=Generating DP event via EC console on morphius with patched AP firmware successfully wakes system from S3. BRANCH=zork Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: Ifb193399259674da17694aac5213bfd1f189ee59 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607026 Reviewed-by: Edward Hill <ecgh@chromium.org>
* vilboz: Adjust KB_BL_PWM frequencySamsp_Liu2021-01-041-2/+2
| | | | | | | | | | | | | | | | | | | The LED driver chip change to Silergy/SY7726, the frequency spec is 10kHz~100kHz. Current setting is 100Hz, so change frequency to 15kHz. BUG=b:176536577 BRANCH=Zork TEST=Test on SY7726, duty can be changed by ectool pwmsetkblight Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Change-Id: Ieb201985299da546ce64ca3fb03126d62b08ad9d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607211 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* Vilboz360: Add new Simplo battery informationelmo_lan2020-12-292-0/+32
| | | | | | | | | | | | | | | | | Add new Simplo(lishen) battery on Vilboz360. --SMP : L20M3PG3 BUG=b:176407339 BRANCH=Zork TEST=make BOARD=vilboz Signed-off-by: elmo_lan <elmo_lan@compal.corp-partner.google.com> Change-Id: I935ea70394d786e63613174cc82e567a08c12b17 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2598215 Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Tested-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com>
* vilboz: Enable LTE GPIO controlSamsp_Liu2020-12-152-8/+38
| | | | | | | | | | | | | | | | | | | | | Power-on and Resume form S3: Delay 10ms to pull high LTE_FCPO after LTE_EN is high. Suspend and Power-off: Delay 20ms to pull down LTE_FCPO after SLP_S3_L is low. Delay 100ms to pull down LTE_EN after LTE_FCPO is low. BUG=b:173490220 BRANCH=Zork TEST=Measure waveform for LTE_FCPO GPIO control Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Change-Id: I2dd66ea1030be805b376e6875a4570f2fea55a26 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2573663 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: SamSP Liu <samsp_liu@compal.corp-partner.google.com>
* task_set_event: remove the wait argumentDawid Niedzwiecki2020-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | There is an option in the task_set_event function which force the calling task to wait for an event. However, the option is never used thus remove it. This also will help in the Zephyr migration process. BUG=b:172360521 BRANCH=none TEST=make buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ic152fd3d6862d487bcc0024c48d136556c0b81bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521599 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* vilboz: Change power LED behaviorSamsp_Liu2020-12-141-1/+2
| | | | | | | | | | | | | | | | | Change Power LED from turn off to blink (500ms off/3s on) when system in S3 with DC only. BUG=b:175274739 BRANCH=Zork TEST=LED behavior test Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Change-Id: I2bea88fc626d9860d61d7604ffbc10467af57e10 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2584546 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: SamSP Liu <samsp_liu@compal.corp-partner.google.com>
* vilboz: Increase power button init timeoutSamsp_Liu2020-10-301-1/+6
| | | | | | | | | | | | | | | | | | | | Vilboz's battery takes serval seconds to come back from the cutoff state. Recorded about ~3 seconds, so bump the init timeout up to 4 second for some margin as well. BUG=b:169300349 BRANCH=zork TEST=Verify DUT will boot up from cutoff a few seconds after AC power is pluging in. Change-Id: If4b90a845d40fdc864f57b81cf396ab365886ee9 Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2507359 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* Vilboz: Add battery informationelthanhuang2020-10-072-28/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch makes EC configure battery parameters differently based on manufacturer name and device name. Vilboz/Vilboz360 --SMP : L20M3PG0 --LGC : L20L3PG0 --Celxpert : L20C3PG0 --Sunwoda : L20D3PG0 Vilboz14 --LGC : L20L3PG1 --SMP : L20M3PG1 --Sunwoda : L20D3PG1 BUG=b:161470405,b:170076693 BRANCH=Zork TEST=Verify Simplo/Celxpert/Sunwoda battery can be found via EC console. Battery can cut-off by cmd ectool batterycutoff. Change-Id: I9dc1f5c71455a65e2eee001b03a9009644de918c Signed-off-by: elthanhuang <elthan_huang@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2456246 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* vilboz: Enable LTE functionelthanhuang2020-10-072-0/+20
| | | | | | | | | | | | | | | | Enable LTE_EN(GPIO62) and LTE_W_DISABLE(GPIO40) when power-on. Disable LTE_EN and LTE_W_DISABLE when power-off. BUG=b:168960595 BRANCH=Zork TEST=WWAN card can be detect when power-on. Change-Id: I554fb75c07a3e631f5f59c4b8a9e7df685854271 Signed-off-by: elthanhuang <elthan_huang@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2456386 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Tested-by: Edward Hill <ecgh@chromium.org>
* zork: Re-Enable CONFIG_CHARGE_RAMP_SWEdward Hill2020-09-021-0/+1
| | | | | | | | | | | | | | | We would prefer to use CONFIG_CHARGE_RAMP_HW to enable legacy BC1.2 charging but that feature of ISL9241 is broken (b/160287056) so we have to use CONFIG_CHARGE_RAMP_SW instead. BUG=b:163864475,b:167257846 BRANCH=none TEST=ramp up to 1.5A from legacy charger Signed-off-by: Denis Brockus <dbrockus@chromium.org> Change-Id: I636e2bd6db57c11ce6da24cc2417b35bb59c6d07 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2388081 Reviewed-by: Edward Hill <ecgh@chromium.org>
* Revert "zork: Enable CONFIG_CHARGE_RAMP_SW"Denis Brockus2020-08-311-1/+0
| | | | | | | | | | | | | | | | | This reverts commit 8a768a06bc876f83427691d27b4e572418406875. Reason for revert: The code as it stands breaks PD charging, so no battery charging is functional when this is landed. BUG=b:163864475,b:167257846 BRANCH=none TEST=verify Zork PD charging works Change-Id: I2c8b006e6add2e328840647367068449be28f7a6 Signed-off-by: Denis Brockus <dbrockus@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2386024 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* zork: Enable CONFIG_CHARGE_RAMP_SWEdward Hill2020-08-301-0/+1
| | | | | | | | | | | | | | We would prefer to use CONFIG_CHARGE_RAMP_HW to enable legacy BC1.2 charging but that feature of ISL9241 is broken (b/160287056) so we have to use CONFIG_CHARGE_RAMP_SW instead. BUG=b:163864475 BRANCH=zork TEST=ramp up to 1.5A from legacy charger Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Iec0a4b82f42fd388d738362ce9a8de4d31c61054 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2382635
* Dalboz: Enable internal pull up for EC GPIOD4Josie Nordrum2020-08-121-1/+1
| | | | | | | | | | | | | | Add GPIO_PULL_UP to GPIOD4 for Dalboz and variants. BUG=b:162753456 TEST=None BRANCH=None Signed-off-by: Josie Nordrum <josienordrum@google.com> Change-Id: I8e261458ca31eed1b8284387546825f5e9e79bff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2347226 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* Vilboz: Add configuration for 57w batteryKangheui Won2020-08-072-0/+90
| | | | | | | | | | | BUG=b:161470405 BRANCH=none TEST=make buildall -j Change-Id: I43ee0c265cf039413b910b9ef3a4b11ea38e9391 Signed-off-by: Kangheui Won <khwon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2342177 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* USB PD: Move board FRS configuration out of TCPCIEric Herrmann2020-07-171-1/+1
| | | | | | | | | | | | | | | | | Board FRS configuration is more board-specific than TCPC-specific. Move the board FRS configuration from TCPCI to usb_common. Implementing the board-level frs configuration is optional for each project. BUG=b:148144711 TEST=Can build volteer image with CONFIG_USB_PD_TCPC set BRANCH=none Change-Id: I43d13ec0b23f71273807f58db35e7dd333089efa Signed-off-by: Eric Herrmann <eherrmann@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2290838 Reviewed-by: Keith Short <keithshort@chromium.org>
* vilboz: fix rotation matrixLu Zhang2020-07-141-1/+7
| | | | | | | | | | | | | | | BUG=b:161205155 BRANCH=none TEST=Using ec console 'accelinfo on' verified lid angle now goes from 0 to 360 and swtiches to tablet mode after crossing 180 threshold. Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: I1a0fcf524788bb72f739caec8c8d6e90f252b4c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2297065 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* Zork: Handle USB_Cx_SBU_FAULT_ODLEdward Hill2020-07-122-1/+6
| | | | | | | | | | | | | | Connect up USB_Cx_SBU_FAULT_ODL to pd_handle_overcurrent(). BUG=b:138600586 b:157058003 BRANCH=none TEST=USB-C sink and source still works, forcing USB_Cx_SBU_FAULT_ODL low is reported as fault. Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I59ae65eed169fc5e18f72539a68017bb73c7d93e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2293102 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Zork: Remove CONFIG_SYSTEM_UNLOCKEDEdward Hill2020-07-091-7/+0
| | | | | | | | | | | | | | Remove CONFIG_SYSTEM_UNLOCKED and CONFIG_I2C_DEBUG from all Zork boards. BUG=b:138601010 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I846335e8402b719bbbf5711aa805b727a0902919 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2288153 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* vilboz: Add power led and battery led support.Lu Zhang2020-07-081-11/+17
| | | | | | | | | | | | | BRANCH=none BUG=b:160758409 TEST=make buildall -j Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: Iee9219cc05321c7518e9ff374c802c0768ff497c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2287112 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* Revert "TCPMv2: make sure Vbus is not sourced in AttachWait.SRC"Denis Brockus2020-07-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | Commit sha 57b95363c05bdab7b7e57d553a9514128393247d Reverting a CL that was a temporary fix while a real solution was found. This will now be implemented with the following CLs https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2282691 https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2282699 https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2283697 BUG=none BRANCH=none TEST=make buildall Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I76b92388f5ee5bae4bdb945a82f18eb3df3ab1fd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2284728 Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* woomax: Update USB-A and FW_CONFIGEdward Hill2020-07-031-6/+10
| | | | | | | | | | | | | Remove USB-A1 and correct FW_CONFIG. BUG=b:160293750 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I6e415c3dac85905af812ac5ce26ad3bbf4fcf869 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2277212 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* TCPMv2: make sure Vbus is not sourced in AttachWait.SRCDenis Brockus2020-07-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | The TCPC on zork appears to enable Vbus sourcing some of the time when we come out of auto-toggle. It looks like about a 60ms delay before it is enabled. We then go to AttachWait.SRC and since the exit condition to get to Attached.SRC is a debounced/valid Attached.SRC CC and Safe0V, it has to be disabled manually in order to move to Attached.SRC BUG=b:160227699,b:160253746 BRANCH=none TEST=dut-control servo_v4_role:snk should attach Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I1dfc5d2536aaa4d7a5ffc7bbb52c647b15764196 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2276463 Tested-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org>
* Zork: Change 3AXIS_INT_L to GPIO_PULL_DOWNEdward Hill2020-06-191-1/+1
| | | | | | | | | | | | | | | | 3AXIS_INT_L is unused (we use polling not interrupt for reading lid accel), and defaults to low, so change to GPIO_PULL_DOWN for a small power saving. BUG=b:157243373 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I7f5f3af692d0958237f9876ac9ad65fdd3696d1f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2253059 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* vilboz: Remove battery HW V0Lu Zhang2020-06-151-17/+0
| | | | | | | | | | | | | | | | Remove battery HW V0 since vilboz doesn't have it. BUG=b:155214765 BRANCH=none TEST=make buildall -j Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: I2e4b8f96904daccf98a9ebd9e962448749b46057 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2245572 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Tested-by: Edward Hill <ecgh@chromium.org>
* zork/baseboard: move temperature sensors definition to board variantDevin Lu2020-06-151-0/+13
| | | | | | | | | | | | | | | | | There are some differences with temperature sensors for each zork variant. This patch move temperature sensors definition to board variant. BUG=b:157711232 BRANCH=none TEST=Verified console "temps" can read temperature. Build all zork board variant. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ib109ea5adc98e6b6825f8c91db19911dc682a52e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2227787 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Tested-by: Edward Hill <ecgh@chromium.org>
* vilboz: Remove ioex C1 and config the ioexpander gpioLu Zhang2020-06-114-39/+24
| | | | | | | | | | | | BUG=b:158125500 BRANCH=none TEST=make buildall -j Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: Ica8cdd8f0b14f612f17018a3a95df5a23a6ad43f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2239593 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* vilboz: Remove USBC1 portLu Zhang2020-06-104-128/+3
| | | | | | | | | | | | | | Remove C1 tcpc, ppc, bc12 BUG=b:158125500 BRANCH=none TEST=make buildall -j Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: Ifd472cea62a1ae9d1860cf84f46d8d02e7e2da95 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2235241 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* vilboz: Split mux to dalboz and vilbozLu Zhang2020-06-102-0/+87
| | | | | | | | | | | | BUG=b:158125500 BRANCH=none TEST=make buildall -j Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: I0836daf254f1c1c1fb2d7fd45868b55517689cf9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2235236 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* zork: Move tcpc,ppc,bc12 from baseboard to boardLu Zhang2020-06-052-0/+219
| | | | | | | | | | | BUG=b:158125500 BRANCH=none TEST=Build all zork boards Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: I86a21a049f97c42d330be6c1bfbecbda10e1ebb6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2230941 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* vilboz: Remove PCAL6408 entirely and enable HDMILu Zhang2020-06-053-32/+44
| | | | | | | | | | | | | BUG=b:157182792, b:158125500 BRANCH=none TEST=make BOARD=vilboz Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I71e38117309277c39ed245535643d601e8759d28 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2227782 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Commit-Queue: Lu Zhang <lu.zhang@bitland.corp-partner.google.com>
* vilboz: Initial EC imageLu Zhang2020-06-038-0/+843
Create the initial EC image for the vilboz variant by copying the dalboz reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.0.2). BUG=b:157499341 BRANCH=none TEST=make BOARD=vilboz Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: I511548fb432a0eb318b5f0281205c2c28ee1c7ae Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2224680 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>