summaryrefslogtreecommitdiff
path: root/baseboard
Commit message (Collapse)AuthorAgeFilesLines
...
* intelrvp: Move board specific changes to respective board filesName2020-10-078-151/+3
| | | | | | | | | | | | | | | | | Move board specific GPIO definitions and TCPC configuration from baseboard to JSL/TGL boards to accommodate changes in MECC spec 0.9 vs 1.0. BRANCH=None BUG=b:169551130 TEST=make buildall -j Signed-off-by: pandeyan <anshuman.pandey@intel.com> Change-Id: I53a0545674f22e6cba05f777a4095909c231cfd2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2435174 Commit-Queue: Poornima Tom <poornima.tom@intel.com> Tested-by: Poornima Tom <poornima.tom@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* intelrvp: Add battery "Getak SMP-HHP-408"Sooraj Govindan2020-10-072-0/+32
| | | | | | | | | | | | | | BRANCH=none BUG=b:169551130 TEST=make buildall -j Signed-off-by: Sooraj Govindan <sooraj.govindan@intel.com> Change-Id: Ieabae7bb8e4d0645ad480dd16026e5d8414362b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2435173 Commit-Queue: Poornima Tom <poornima.tom@intel.com> Tested-by: Poornima Tom <poornima.tom@intel.com> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: move thermal setting to variantScott Chao2020-10-071-53/+0
| | | | | | | | | | | | | | | Since each variant may have different thermal sensor placement. Move thermal params and configs from baseboard to variant. BUG=b:170143672 BRANCH=none TEST=make -j BOARD=eldrid TEST=make buildall Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: Ie12f4cecad5f93c491e51a5fadfe856829f5b2e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2449510 Reviewed-by: Keith Short <keithshort@chromium.org>
* core: rename atomic_clear to atomic_clear_bitsDawid Niedzwiecki2020-10-063-3/+3
| | | | | | | | | | | | | | | | | | Change the name of atomic_clear to atomic_clear_bits to make to name more clear - the function clears only selected bits, but the name may suggest that it clears the whole variable. It is done as a part of porting to Zephyr, where atomic_clear zeros the variable. BUG=b:169151160 BRANCH=none TEST=buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I7b0b47959c6c54af40f61bca8d9baebaa0375970 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2428943 Reviewed-by: Jett Rink <jettrink@chromium.org>
* npcx: add ADC support for NPCX9 and remove the deassertion thresholdWealian Liao2020-10-051-2/+0
| | | | | | | | | | | | | | | | | | | 1. Two more ADC channels are added to NPCX9. 2. Remove the three de-assertion threshold detectors in the ADC module because this function is not very useful from the application point of view. 3. Add three more threshold event detectors (from 3 to 6.) BRANCH=none BUG=b:165777478 TEST=pass "make buildall" TEST=Read all ADC channels by the console command 'ADC'. Signed-off-by: Wealian Liao <whliao@nuvoton.corp-partner.google.com> Change-Id: I64cc9caf8be7e7546e161931ed42d0ea4dda4b47 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2434603 Tested-by: CH Lin <chlin56@nuvoton.com> Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: CH Lin <chlin56@nuvoton.com>
* volteer: Enable SW charge rampingKeith Short2020-10-012-1/+25
| | | | | | | | | | | | | | | | Enable CONFIG_CHARGE_RAMP_SW because hardware based charge ramping doesn't work on the ISL9241. BUG=b:169350714, b:168960587 BRANCH=none TEST=make buildall TEST=Connect 1.5A CDP device to Volteer and verify charge ramp from 0.5A to 1.5A over about 7 seconds. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I81e8a3913bd776d0d3fda6d294fdeabbde5df62a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2438912 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* zork: Workaround VBUS=0 for charge_ramp_swEdward Hill2020-09-301-3/+22
| | | | | | | | | | | | | | | | | The ISL9241 sometimes incorrectly reports 0 for unknown reason, causing ramp to stop at 0.5A. Workaround this by ignoring 0. This partly defeats the point of ramping, but will still catch VBUS below 4.5V and above 0V. BUG=b:168569046 BRANCH=zork TEST=EC reboot with no battery and 65W charger, ramp to 3.25A @ 20V Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I2c08cc548b1fd67507865e7339e8168b0e53e628 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2438934 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Dedede: Remove requirement for >15W to boot with no batteryDiana Z2020-09-291-1/+0
| | | | | | | | | | | | | | | Allow dedede boards to boot with only a 15W charger present. BRANCH=None BUG=b:166003337,b:168730307 TEST=on waddledoo and waddledee, confirm board can boot to S0 and remain there with a 15W charger in C0 or in C1 and no battery Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I24f8f2f13bb2b2ba92ba6e2b87db569bd023e5c7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2438670 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* tree: rename atomic_* functions to deprecated_atomic_*Jack Rosenthal2020-09-293-6/+6
| | | | | | | | | | | | | | | | We will move to an API compatible with Zephyr's API. See the bug for complete rationale and plan. BUG=b:169151160 BRANCH=none TEST=buildall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: Id611f663446abf00b24298a669f2ae47fef7f632 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427507 Tested-by: Dawid Niedźwiecki <dn@semihalf.com> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* kukui/baseboard: enable CONFIG_HOSTCMD_AP_SET_SKUIDDevin Lu2020-09-291-0/+1
| | | | | | | | | | | | | | CL:2321689 already sent SKUID to EC. This patch enable AP set SKUID to EC to distinguish platform factor. BUG=b:161767717 BRANCH=firmware-kukui-12573.B TEST=make buildall -j and boots to Burnet Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I5f92c293a26c0612b3a61bf009961217e17e8f3d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2386691 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* Kukui/baseboard: free flash spaceDevin Lu2020-09-291-0/+7
| | | | | | | | | | | | | Disable PD log and enable GPIO short name to save ~800 bytes for RO. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I326199411a3728b0ff6f5dc9531ad054245b31b5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2432226 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* Revert "Zork: Workaround for bad ISL9241 CONTROL1 read"Edward Hill2020-09-291-30/+0
| | | | | | | | | | | | | | | | This reverts commit 61d40d6eaa88437d48e06fba9b773f7eb99f6ecc. Revert the workaround since CL:2393404 solved the problem. BUG=b:163076059 BRANCH=zork TEST=none Change-Id: I0397141b5b4e15736172474cb073842e18c3a71d Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2437194 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* berknip: Remove sensorsEdward Hill2020-09-291-0/+2
| | | | | | | | | | | | | | Remove motion sense (gyro + accel) drivers, since HW has none. BUG=b:166183179 BRANCH=zork TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I954bf491dd7cecf8a76d28b02ea100a0decb12d6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2437191 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* honeybuns: Enable I2C feature and CBI supportScott Collyer2020-09-292-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This CL adds config options and tables required to pull in i2c support for honeybuns. In addition, config options for CBI were added to facilitate i2c testing. BUG=b:148493929 BRANCH=None TEST=ran i2cscan on quiche > i2cscan Scanning 0 usbc................. 0x18. 0x19. 0x1a. 0x1b. 0x1c. 0x1d. 0x1e. 0x1f. 0x20. 0x21. 0x22. 0x23. 0x24. 0x25. 0x26. 0x27........................... 0x42.............................. 0x60....................... Scanning 1 usb_mst. 0x08. 0x09. 0x0a. 0x0b. 0x0c. 0x0d. 0x0e. 0x0f. 0x10. 0x11. 0x12. 0x13. 0x14. 0x15. 0x16. 0x17.......................................... 0x41................................ 0x61......... 0x6a............. Scanning 2 eeprom......................................... 0x30................................ 0x50....................................... Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: Ib1b8b795a2a07a5b1cbe167b17c3f70a8d9703b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2213943 Commit-Queue: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* quiche: Add EC console supportScott Collyer2020-09-291-15/+8
| | | | | | | | | | | | | | | | | | | | | | | This CL adds the configs required to enable EC console. BUG=b:148493929 BRANCH=None TEST=verfied ec console works on quiche > help Known commands: chan gpioget md sysinfo crash gpioset panicinfo sysjump flashinfo help reboot syslock flashwp hibernate rw taskinfo gettime history shmem timerinfo HELP LIST = more info; HELP CMD = help on CMD. Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: Ie78965483a1c70368e4375e63ddf33a423bb7776 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2399622 Commit-Queue: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* quiche: Add power sequencingScott Collyer2020-09-292-0/+47
| | | | | | | | | | | | | | | | | | This CL adds a function in baseboard that will sequence through a list of gpio controlled power rails and chip resets. The table includes a delay prior to executing the next entry. The table is intended to be in board.c as the rails and delays can very much be board specific. BUG=b:167430750 BRANCH=None TEST=Verified that power rails come up and status LED is on. Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I830dee9eb28d4648d274d8cbc49b6972cd70dba5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2213837 Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
* Revert "volteer: Move USB PID to board files"Abe Levkoy2020-09-281-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6ed9b65ae38977118f0d5f02d6f5c61da23c5f24. Reason for revert: Historically, Octopus variants used the baseboard VID and PID. Original change's description: > volteer: Move USB PID to board files > > Add TODOs to update variants boards. > > BUG=none > TEST=make buildall > BRANCH=none > > Signed-off-by: Abe Levkoy <alevkoy@chromium.org> > Change-Id: If0d8d0dd544c06114f355dcf281b2841a8397aee > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2417348 > Reviewed-by: Keith Short <keithshort@chromium.org> BUG=b:168826898,b:168827570,b:168827133,b:168827128,b:168827420 BUG=b:168827418,b:168826886,b:168826868,b:168827029,b:168826914 Change-Id: I5b9b1cee25e34a4b922fd604b49deabc9591b4e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431687 Tested-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* Dedede: Remove DAC for boards using ITE+SM combinationDiana Z2020-09-281-2/+0
| | | | | | | | | | | | | | | For boards which are using the SM charger chips, they will have a Psys offset register to generate the OCPC Psys output. BRANCH=None BUG=b:168783892 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ib963ed11f73a76dfeffa11d5ab4a81ccbbd71102 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2435746 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* dedede: Set CONFIG_BATTERY_REQUESTS_NIL_WHEN_DEADAseda Aboagye2020-09-281-0/+1
| | | | | | | | | | | | | | | | | | Some dedede batteries have a charge request of (0,0) when the battery is completely depleted. Enable this config option to help revive those batteries. BUG=None BRANCH=None TEST=Build and flash drawcia, drain battery until it's dead, plug in a charger on C1 and verify that the battery can be revived. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I9206120a0c36813cbcd5618fe595faf57741ac47 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431696 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* Trogdor: Enable CONFIG_BOARD_RESET_AFTER_POWER_ON to get correct reset flagsWai-Hong Tam2020-09-231-0/+8
| | | | | | | | | | | | | | | | | | | | | | | Need this config to save the reset flags across double EC reset on the first power-on. On power-on, H1 releases the EC from reset but then quickly asserts and releases the reset a second time. This means the EC sees 2 resets: (1) power-on reset, (2) reset-pin reset. This config will allow the second reset to be treated as a power-on. BRANCH=None BUG=b:169188750 TEST=Tested on a Trogdor board that the first power-on has the "power-on" reset flag. > --- UART initialized after reboot --- > [Image: RO, pompom_v2.0.5526+3b3e20008 2020-09-23 12:00:19 ...] > [Reset cause: power-on] Change-Id: I2cccb94d8fac938b4c70984f1a4e4c49b97a8b7b Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427102 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* zork: Ignore input current and always rampEdward Hill2020-09-231-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | CONFIG_CHARGE_RAMP_SW is designed to stop ramping if we are not using enough current (so we are actually testing that the supplier can give the current we ramp to). But this is checked using charge_is_consuming_full_input_current(), which only tests for battery charge between 2% and 95%. This fails to accurately reflect desire for input current, because the low battery might want to charge faster, and the AP might want extra power even with full battery. For zork, change charge_is_consuming_full_input_current() to always return true. This means we will always ramp. If we are not using the full input current, and the supplier cannot deliver it when we do, then we will detect the voltage drop and re-ramp, which seems fine. BUG=b:168569046 BRANCH=zork TEST=ramp with full battery Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Ic7c9b93bdd3856c9b05bd3a13e8c2a78aa883755 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2426950 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* zork: Update PS8802/PS8818 IN_HPD to match HW changesEdward Hill2020-09-232-4/+7
| | | | | | | | | | | | | | | | Add a global variable board_usbc1_retimer_inhpd that boards can set to IOEX_USB_C1_HPD_IN_DB or GPIO_USB_C1_HPD_IN_DB_V1 depending on board version, that is then used by board_ps8802/ps881_mux_set to enable/disable IN_HPD on the DB retimer. BUG=b:168884674 BRANCH=zork TEST=morphius dali + picasso USB-C1 display works Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Ifca733ce05a72cc095463b2b9365857232784d34 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2426959 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zork: Disable CONFIG_KEYBOARD_VIVALDIEdward Hill2020-09-231-0/+1
| | | | | | | | | | | | | | | | | Disable Vivaldi keyboard for all Zork devices since Vivaldi currently does not allow for side volume buttons to be distinguished from keyboard volume F9/F10 keys. This is necessary so that Chrome can ignore F9/F10 in tablet mode, but side volume buttons still work. BUG=b:164207227 BRANCH=zork TEST=side buttons + F9/F10 in clamshell + tablet modes Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Ia3d9fa89e54e637e7cf61ac318e7cfe928923ab1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2426120 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* dedede/variant_it8320: increase uart tx buffer sizeDino Li2020-09-231-0/+3
| | | | | | | | | | | | | | | | This change increased console output buffer to avoid losing output message since we have the memory space available (17832 bytes in RAM still available on drawcia). BUG=none BRANCH=none TEST=more console message is visible on drawcia after ec reset. Signed-off-by: Dino Li <Dino.Li@ite.com.tw> Change-Id: I660f0114bc2c569b74d35bdbbd63e5819979555b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2423647 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* eldrid: limit input current to 90%Scott Chao2020-09-231-1/+1
| | | | | | | | | | | | | | | Protect adapter provide overcurrent. And follow OEM charger policy to set 90% input current limit when S0. BUG=b:169025944 BRANCH=none TEST=make -j BOARD=eldrid TEST=make buildall Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: Idc5aa532aaf5f4c7db45d9db2e1ce66032611a53 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2413810 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* zork: move HDMI retimer setting to variantZick Wei2020-09-221-7/+0
| | | | | | | | | | | | | | This CL move HDMI retimer(pi3hdx1204) setting to variant. BUG=none BRANCH=zork TEST=make buildall Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I5b50058c44ccb9fd5d9403939d5f4ea9a9670b7c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2421391 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* volteer: encode the keyboard backlight and numeric pad to fw_configZhuohao Lee2020-09-222-8/+44
| | | | | | | | | | | | | | | | In order to support the keyboard backlight and numeric pad switching, we need to encode the keyboard backlight and numeric pad feature to the fw_config. BUG=b:166707536 BRANCH=None TEST=flash the ec.bin to the DUT and checked the keyboard function. Change-Id: I2f85377acd85a0dae635d7bf4fe36c47ce01e9d7 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2397933 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* Trogdor: Update the min operating power dataWai-Hong Tam2020-09-211-2/+2
| | | | | | | | | | | | | | | To reflect the number we measured, set the min operating power to 10W. BRANCH=None BUG=b:152647632 TEST=Using Pompom without battery, * checked AP auto-boot when plugged a PD charger (>10W); * checked AP not auto-boot when plugged a SuzyQ (7.5W). Change-Id: I5f4c2a4befb5f231d8f62acf15e103c155c4b956 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2417003 Reviewed-by: Matthias Kaehlcke <mka@chromium.org>
* eldrid: fix battery cutoffScott Chao2020-09-212-0/+28
| | | | | | | | | | | | | | | | | | | Eldrid's battery need to apply charging voltage input>3V and aleast 2 sec to let C/D FET will turn on. So add board_battery_is_initialized to check battery initialization. And try to provide pre-charge current to battery when battery have no response. BUG=b:165780074 BRANCH=none TEST=make -j BOARD=eldrid TEST=make buildall Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: I4265538b5a789b76a85d21a1459d19142a86106e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2409712 Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: Move USB PID to board filesAbe Levkoy2020-09-181-7/+0
| | | | | | | | | | | | | Add TODOs to update variants boards. BUG=none TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: If0d8d0dd544c06114f355dcf281b2841a8397aee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2417348 Reviewed-by: Keith Short <keithshort@chromium.org>
* zork: Adjust AP power limitsEdward Hill2020-09-171-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | Adjust EC config settings that control how much battery charge and AC power is required to allow AP to boot, to align with how much power the HW actually needs. EC will boot AP to depthcharge if: (BAT >= 4%) || (AC >= 50W) CONFIG_CHARGER_LIMIT_* is not set, so there is no additional restriction on Depthcharge to boot OS. BUG=b:162938720 BRANCH=zork TEST=boot with: - various battery and AC levels, - plugged/unplugged battery, - locked/unlocked EC, - swsync GBB disabled/enabled Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I78aa84b8b0b18429d1301085ab878c62a4afd687 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2415629 Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* Trogdor: Move the I2C config to the board levelWai-Hong Tam2020-09-171-18/+0
| | | | | | | | | | | | | | | | | Move the I2C config to the board level such that they can have different configs. Also add the extra I2C bus for WLC on Coachz. The device on this I2C bus supports fast-mode plus, 1Mbit/s. BRANCH=None BUG=b:167884598 TEST=Built all Trogdor variants. Change-Id: Ibcb0e110e1b2c67f8ba843c2dc08efabeb5fe9ba Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2412821 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Coachz: Reflect the GPIO changeWai-Hong Tam2020-09-171-0/+1
| | | | | | | | | | | | | | | | | Rename the GPIOs to reflect the netnames. Add the GPIOs for the hall sensors, not implemented yet. Add the GPIOs for the base detection, not implemented yet. Add the GPIOs and I2C bus for the stylus, not implemented yet. BRANCH=None BUG=b:167884598 TEST=Built the Coachz image. Change-Id: If30e00d8ede0b6ca2e9a4f9efe474c22a8a16933 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2411507 Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Coachz: Remove the keyboard backlight supportWai-Hong Tam2020-09-171-1/+0
| | | | | | | | | | | | | | | | Coachz doesn't has an internal keyboard. Move the CONFIG from baseboard to board, as the keyboard backlight is not a common feature. BRANCH=None BUG=b:167884598 TEST=Built the Coachz image. Change-Id: Idd5937da9ad6a3ab1be277e537bbd2e70e2b1d9a Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2410855 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Trogdor: Remove the references to BC1.2 VBUS detection GPIOWai-Hong Tam2020-09-161-6/+1
| | | | | | | | | | | | | | | We switched to use the TCPC to detect the VBUS, instead of the BC1.2, from CL:2086092. But the BC1.2 VBUS detection GPIOs are still used. Remove these references. BRANCH=None BUG=b:150682632, b:167884598 TEST=Built the affected Trogdor boards. Change-Id: I66d59b16cd93b1dbf460a56a9bc97268d571f6d1 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2410851 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* Trogdor: Move GPIO aliases from baseboard to boardWai-Hong Tam2020-09-161-2/+0
| | | | | | | | | | | | | | Move some GPIO aliases from baseboard to board such that they can be customized to use different names. BRANCH=None BUG=b:167884598 TEST=Built the affect Trogdor boards. Change-Id: Id8d68d9b03d43010a81565f7625b8033aab14594 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2410850 Reviewed-by: Stephen Boyd <swboyd@chromium.org>
* dedede: add FW_CONFIG field for Keyboard Type supportLeo-Tsai2020-09-162-0/+11
| | | | | | | | | | | | | | | This patch add FW_CONFIG field for Keyboard Type Support BUG=none BRANCH=none TEST=none Signed-off-by: Leo-Tsai <leocx_tsai@compal.corp-partner.google.com> Change-Id: Idb9a352f40abab791e3162470efe8fe242027af5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2402461 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* Octopus: Add SSFC field for PPCDevin Lu2020-09-102-3/+20
| | | | | | | | | | | | | | Octopus already supported SSFC with CL:2377058. This patch extends SSFC field of CBI for PPC. BRANCH=firmware-octopus-11297.B BUG=none TEST=EC log of Meep device can output value of SSFC in CBI. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I1d0815a29673d535e53fdb7efe6b756999bc9f3a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2396096 Reviewed-by: Marco Chen <marcochen@chromium.org>
* Volteer: Add support for RT1715Eric Herrmann2020-09-091-0/+1
| | | | | | | | | | | | | | | | | | | Add support for replacing the TUSB422 with the RT1715. Since they are pin-to-pin compatible and currently only used with a rework, make the decision of which to use at runtime. The logic is to check if the RT1715 is both on the I2C bus and the vendor ID matches. If either fail, default to the TUSB422 address and driver. BUG=b:162617664 TEST=make buildall TEST=check both TUSB422 functionality and RT1715 functionality BRANCH=none Change-Id: I8306f086bf030ddd7238532b1f12aa259cb72422 Signed-off-by: Eric Herrmann <eherrmann@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2343734 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Dedede: Disable pull-ups on C0 and C1 interrupts before z-stateDiana Z2020-09-091-0/+4
| | | | | | | | | | | | | | | | Disabling pull-ups on the C0 and C1 interrupt lines before z-state prevents EN_PP3300_G_L from being pulled down. BRANCH=None BUG=b:153684907 TEST=on waddledee, verify EN_PP3300_G_L is no longer pulled down as z-state is entered Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ia5614bf32fe1a77255d990bc610fe2f09cf502c4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2391214 Tested-by: Divagar Mohandass <divagar.mohandass@intel.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* baseboard/dedede: Enable PD control command handlerKarthikeyan Ramasubramanian2020-09-091-0/+1
| | | | | | | | | | | | | | To enable PD Firmware update, enable PD control command handler. BUG=b:159832325 BRANCH=None TEST=Build and ensure that the PD control command is enabled. Change-Id: I3bd12e29b65575bca08fede9544dff409ba38004 Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2382552 Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* pompom: Remove TCPC port1 configurationAlvinCC_Hsu2020-09-043-1/+10
| | | | | | | | | | | | | | | | This patch removes configurations (I2C, GPIO, TASK and Interrupt...) about TCPC port1 for pompom. BUG=b:167476139 BRANCH=none TEST=power on after flashing FW and it works normal. Signed-off-by: AlvinCC_Hsu <alvincc_hsu@compal.corp-partner.google.com> Change-Id: I1275c1ef7e7d3e65d695dace834a9bcbb4e66dcc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2391022 Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Wai-Hong Tam <waihong@google.com> Tested-by: Wai-Hong Tam <waihong@google.com>
* volteer: Add missing #includeAbe Levkoy2020-09-031-0/+1
| | | | | | | | | | | | | | uint32_t comes from stdint.h. BUG=none TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I44ae7c9bf5011a67f34967554da67ad5f7e7c89b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2390995 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* intelrvp: Enable runtime control over PD debug levelMadhu M2020-09-021-1/+0
| | | | | | | | | | | | | | | | Enable runtime control of the PD debug level on intelrvp boards. This change reduces intelrvp flash space by 1404 bytes. BUG=none BRANCH=none TEST=make buildall TEST=Manually run pd dump 3 and ensure more pd protocol logs Signed-off-by: Madhu M <madhu.m@intel.corp-partner.google.com> Change-Id: I03dddaf9aca8d44236fc015643d14bc18c690380 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2387127 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* kukui: remove CONFIG_TABLET_MODE for kukui detachablesTing Shen2020-09-021-2/+1
| | | | | | | | | | | | | | | BUG=b:156177127 TEST=On Kodama, verify 1) console command `tabletmode` removed. 2) Still able to switch between tablet / clamshell UI. BRANCH=kukui Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ibdd4dc637d03c1f632a72c97f7daef16a5477bea Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2386647 Reviewed-by: Nicolas Boichat <drinkcat@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>
* volteer: Support board-specific keyboard_configSamsp_Liu2020-09-021-17/+0
| | | | | | | | | | | | | | | | | | | Separate keyboard_scan_config keyscan_config from volteer baseboard to each project board. To meet different configurations on each board. BUG=b:149536282 BRANCH=none TEST=make buildall Change-Id: I9070953c02ff7d3eb4950191db6505b635371792 Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2383359 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: SamSP Liu <samsp_liu@compal.corp-partner.google.com>
* zork: Re-Enable CONFIG_CHARGE_RAMP_SWEdward Hill2020-09-022-0/+27
| | | | | | | | | | | | | | | 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-312-27/+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: Remove debug printEdward Hill2020-08-311-1/+0
| | | | | | | | | | | | | | Remove print accidentally left in board_is_vbus_too_low in CL:2382635. BUG=b:163864475 BRANCH=zork TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I261e634fb0ddf7edf4484906d01cbf4c251aac2b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2384532 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Volteer:enable runtime control over PD debug levelMadhu M2020-08-311-1/+0
| | | | | | | | | | | | | | | | | | | Enable runtime control of the PD debug level on Volteer boards. This change reduces Volteer flash space by 1472 bytes, leaving 3400 bytes free. BUG=none BRANCH=none TEST=make buildall TEST=Manually run pd dump 3 and ensure more pd protocol logs Signed-off-by: Madhu M <madhu.m@intel.corp-partner.google.com> Change-Id: I9b3094ed6e2e888037b137efd3387d836bac54da Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2381894 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>