summaryrefslogtreecommitdiff
path: root/baseboard
Commit message (Collapse)AuthorAgeFilesLines
...
* zork: Use CBI only and remove retimer probe codeDenis Brockus2020-07-172-12/+1
| | | | | | | | | | | | | | | | | | | Before CBI was being used, zork used I2C probing to detect basic hardware configuration. Now that CBI is supporting FW_CONFIG, this is being removed. BUG=b:151232257 BRANCH=none TEST=verify zork still boots with valid configuration Signed-off-by: Denis Brockus <dbrockus@google.com> Change-Id: I267d99f8f3894aff2f6301df167c470db373509e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2304380 Commit-Queue: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Tested-by: Denis Brockus <dbrockus@chromium.org> Auto-Submit: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* Dedede: Retrieve FW_CONFIG from CBI at higher priorityDiana Z2020-07-171-1/+1
| | | | | | | | | | | | | | | I2C is initialized before the HOOK inits now, so retrieve CBI FW_CONFIG as soon as possible for use in determining which chips are present. BRANCH=None BUG=None TEST=on waddledoo with HDMI DB, ensure charger init comes after FW_CONFIG is fetched Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ia813a480c5f0d0095a3f2e5442dde9541d368431 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2300687 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* dedede: add FW_CONFIG field for tablet mode present or notDevin Lu2020-07-172-0/+17
| | | | | | | | | | | | | This patch adds FW_CONFIG field for tablet mode present or not. BUG=none BRANCH=none TEST=make buildall -j Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I92432066dee14bb79d882daa9da5d09f4daaecb1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2299610 Reviewed-by: Diana Z <dzigterman@chromium.org>
* zork: Enable 65W/3.25A PD adapter.Lu Zhang2020-07-171-2/+2
| | | | | | | | | | | BUG=b:161400534 BRANCH=none TEST=make buildall -j Signed-off-by: Lu Zhang <lu.zhang@bitland.corp-partner.google.com> Change-Id: I50c82ea82260e3ef67f19229854bfcc86f11a350 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2304236 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Peter Marheine <pmarheine@chromium.org>
* USB PD: Move board FRS configuration out of TCPCIEric Herrmann2020-07-172-5/+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>
* boten: split CONFIG_LED_PWM out into boardsxiong.huang2020-07-151-2/+3
| | | | | | | | | | | | | It will be happy to define LED behavior in boards. BUG=b:160664441 BRANCH=none TEST=make buildall -j4 Signed-off-by: xiong.huang <xiong.huang@bitland.corp-partner.google.com> Change-Id: Ib81fe8d20fa3ab74064958fba3576a1618635e52 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2296544 Reviewed-by: Diana Z <dzigterman@chromium.org>
* dedede: Move adc channel to board variantDevin Lu2020-07-143-74/+0
| | | | | | | | | | | | | | Dedede family may have different temp sensors for other ADCs channel. This patch moves adc channel to board variant. BUG=none BRANCH=none TEST=make buildall -j Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Id34a924fc9431a553a1467068c6ccee6111102bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2289478 Reviewed-by: Diana Z <dzigterman@chromium.org>
* volteer: add workaround for CR50 double resetJett Rink2020-07-131-0/+1
| | | | | | | | | | BRANCH=none BUG=none TEST=tested on puff with same chip Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: I18db9450f0a1d16d0662e09f7d5e2c6c849ee13f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2278134
* zork: Enable CONFIG_I2C_UPDATE_IF_CHANGEDEdward Hill2020-07-131-0/+1
| | | | | | | | | | | | | | Enable CONFIG_I2C_UPDATE_IF_CHANGED to reduce I2C traffic a little. BUG=none BRANCH=none TEST=USB-C source and sink still work. Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Id7ec18df00e421570d3e7c897be810014bbbbb5e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2294002 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Zork: Handle USB_Cx_SBU_FAULT_ODLEdward Hill2020-07-123-0/+12
| | | | | | | | | | | | | | 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>
* Charger: Add dynamic charger chip countDiana Z2020-07-119-15/+0
| | | | | | | | | | | | | | | | Different DB options may cause different numbers of charger chips to be present on the system. Remove constant count for charger chips, and instead always call into the overridable function to query the count. BRANCH=None BUG=b:155963446 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I0e65b8af351ecabe6f7b823e0e56f1932cc280a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2277833 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Zork: remove pd_snk_is_vbus_providedEdward Hill2020-07-101-5/+0
| | | | | | | | | | | | | | | Zork uses CONFIG_USB_PD_VBUS_DETECT_TCPC and ppc_is_vbus_present() doesn't exist. BUG=none BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I7eebf598a6bc3caf636111545a4c5e9511662d8b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2290662 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* dedede: add workaround for CR50 double resetJett Rink2020-07-091-0/+3
| | | | | | | | | | | | | | | 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. BRANCH=none BUG=none TEST=doo hold on reset Signed-off-by: Jett Rink <jettrink@chromium.org> Change-Id: I6895be11309d2021436ce7b3aab915dbf27d9616 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2289058 Reviewed-by: Diana Z <dzigterman@chromium.org>
* volteer: disable ppc_dump command to save spaceKeith Short2020-07-091-1/+1
| | | | | | | | | | | | | | | Increases flash space on Volteer by 872 bytes. BUG=chromium:1101619 BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I1ffc34405a953fb21347cd41a29b1c0fcb96a501 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2290196 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Tested-by: Abe Levkoy <alevkoy@chromium.org>
* Zork: Remove CONFIG_HOSTCMD_SKUIDEdward Hill2020-07-082-18/+9
| | | | | | | | | | | | | | | Coreboot has changed to use CBI, so CONFIG_HOSTCMD_SKUID is no longer needed and can be cleaned up. BUG=b:138600504 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: Ib9fc1d190d994311f2efcae77821489eddf3cea7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2288152 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* Revert "TCPMv2: make sure Vbus is not sourced in AttachWait.SRC"Denis Brockus2020-07-081-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* kakadu: fix board-specific charge behaviorScott Chao2020-07-071-2/+2
| | | | | | | | | | | | | | | Request voltage always keep at 4320mV when cycle_count is over than 600. We need at a zone for it. BUG=b:153272421 BRANCH=kukui TEST=make -j BOARD=kakadu TEST=make buildall Signed-off-by: Scott Chao <scott.chao@bitland.corp-partner.google.com> Change-Id: I8d065a607226a39335e3a663ddf7a179ff73a0db Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2282739 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* Octopus: Disable vivaldi keyboardPatryk Duda2020-07-061-0/+1
| | | | | | | | | | | | | | Undef CONFIG_KEYBOARD_VIVALDI to fix function keys BUG=b:160269938 BRANCH=none TEST=Ctrl+Alt+F2 can enter VT2 Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: Ifdd1982892c25f1773336632d9594a95f44fdcc6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2279811 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* kakadu: add board-specific charge behaviorScott Chao2020-07-061-0/+52
| | | | | | | | | | | | | | | | | | | | | 1.If cycle count > 300, set Charge Voltage=4320, cycle count > 600, set Charge Voltage=4300, cycle count > 1000, set Charge Voltage=4250 2.If charging over 48 hours and Charge Voltage > 4.25V, set Charge Voltage = 4.25V 3.If charging over 2 hours,battery voltage over 4.1V and battery temperature over 45°C, switch to discharge mode and set Charge Voltage = 4.1V BUG=b:153272421 BRANCH=kukui TEST=make -j BOARD=kakadu TEST=make buildall Signed-off-by: Scott Chao <scott.chao@bitland.corp-partner.google.com> Change-Id: I4968308b984f08a58491586a90b0b239eec07328 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2280865 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* volteer: move ppc_chips[] from baseboard to boardDavid Huang2020-07-052-36/+0
| | | | | | | | | | | | | | | Move ppc_chips[] to board for board customize. BUG=b:151978872 BRANCH=master TEST=check ppc init succeed and switch source/sink correct with type c device. Change-Id: I287bbe44b163d72c19a3764dca431c84d86bbdec Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2275971 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* woomax: Update USB-A and FW_CONFIGEdward Hill2020-07-032-15/+0
| | | | | | | | | | | | | 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>
* dedede: it83xx: fix adc data structure orderDevin Lu2020-07-022-15/+48
| | | | | | | | | | | | | | | | This is a difference adc data structure order between it83xx and npcx7. The data structure must be in the exactly same order as in enum adc_channel. This patch fixes incorrect order for it83xx. BUG=none BRANCH=none TEST=adc command in EC console Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ibe7326e897814defb57196fd2213f8a3a5dea9db Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2275503 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* volteer: Move USB DB checks from baseboardKeith Short2020-07-023-125/+8
| | | | | | | | | | | | | | | | | | The FW_CONFIG fields share a common layout across the entire Volteer program, but the individual fields are defined on a project level. Move the USB DB fields from the baseboard program to the board project. BUG=b:155497872 BRANCH=none TEST=make buildall TEST=verify FW_CONFIG data on Volteer Cq-Depend: chromium:2248238, chromium:2248239, chromium:2248240 Cq-Depend: chromium:2248241, chromium:2248242, chromium:2252484 Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I7d4f27159907b1cec029d2b2ae867321e70b3326 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2247617 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* volteer: create common FW_CONFIG layoutKeith Short2020-07-025-76/+147
| | | | | | | | | | | | | | | Create a common FW_CONFIG layout and access functions for Volteer boards. BUG=b:155497872 BRANCH=none TEST=make buildall TEST=verify FW_CONFIG data on Volteer Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I1ec14db6c816d82115caa5e6179e0258f2904ec4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2247616 Reviewed-by: caveh jalali <caveh@chromium.org>
* Dedede: Set up baseboard FW_CONFIG parsingDiana Z2020-07-023-1/+63
| | | | | | | | | | | | | | | Set up basic files to use for parsing FW_CONFIG. Currently, this just has a function to return the DB enum value. BRANCH=None BUG=b:159246161 TEST=on waddledoo, FW_CONFIG print appears during boot with current value (tested 0, 3, and 4) Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Id9ef2ea5ed297bb662d8455123452b1aeb06ae39 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2274992 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* TCPMv2: make sure Vbus is not sourced in AttachWait.SRCDenis Brockus2020-07-011-2/+4
| | | | | | | | | | | | | | | | | | | | | | | 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>
* kukui: Remove crash command to save spaceKeith Short2020-06-301-0/+1
| | | | | | | | | | | | | | | Remove the crash command from RO images to increase RO flash space by 256 bytes on kodama. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I09ad7d4a62cb448db590e938febe894c8339f85a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2276142 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* volteer: Disable tcpci_dumpKeith Short2020-06-291-2/+0
| | | | | | | | | | | | | | | Volteer is very tight on space when building the TCPMv2 stack. Disable the tcpci_dump command to save about 1100 bytes of RW flash space. BUG=b:158572770 BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I6aa7c1116464778a29bdd52e9ae822ec71fc00fe Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2273552 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* kakadu: prevent OEM name show "unkn"Scott Chao2020-06-291-0/+12
| | | | | | | | | | | | | | | ectool battery need to show proper OEM name when using dump battery. BUG=b:159918228 BRANCH=kukui TEST=make -j board=kakadu TEST=make buildall TEST=ectool battery Signed-off-by: Scott Chao <scott.chao@bitland.corp-partner.google.com> Change-Id: I27e355881d6f6692edb2599fef7fb2c2c30a1062 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2269393 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* ps8xxx: patch ps8815 A1 chip Device IDCaveh Jalali2020-06-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | this adds a config option for the ps8815 to override the TCPCI Device ID field based on the chip hardware revision reported in vendor defined registers. early ps8815 A1 firmware still reports the same Device ID value as the A0 chip which makes the two chips indistinguishable using standard methods. so, we check a vendor defined register to distinguish the two parts and "patch" the Device ID. newer ps8815 firmware will correct this, so after we have flushed out early firmware, we can disable this override feature. BRANCH=none BUG=b:158857815,b:159289062 TEST=reflashed FW on ps8815 A0 and A1 Change-Id: I2db3150740c15a77836dea0e9db72e5d99fdc050 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2254992 Tested-by: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Swap system_jumped_to_this_image with system_jumped_latestabilize-quickfix-13310.91.B-masterstabilize-quickfix-13310.76.B-masterstabilize-quickfix-13310.73.B-masterstabilize-13310.99.B-masterstabilize-13310.94.B-masterstabilize-13310.83.B-masterstabilize-13310.74.B-masterstabilize-13310.72.B-masterrelease-R85-13310.B-masterDaisuke Nojiri2020-06-264-4/+4
| | | | | | | | | | | | | | | | | | | | EFS2 boards need to call system_jumped_late in HOOK_INIT to avoid running init code twice per boot. system_jumped_to_this_image and system_jumped_late are functionally equivalent for non EFS2 boards. This patch will prevent system_jumped_to_this_image from being used for EFS2 boards when code is copied from a past project. BUG=chromium:1072743 BRANCH=none TEST=buildall Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: I73fb5cedc5325d1c80825f9346954013046ee1df Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2267685 Reviewed-by: Keith Short <keithshort@chromium.org>
* berknip/morphius: update gpio S0_PWROK_ODZick Wei2020-06-252-24/+25
| | | | | | | | | | | | | | | This patch update S0_PWROK_OD for schematic change. BUG=b:150278507, b:152841287 BRANCH=none TEST=make buildall, verify EC code can power on rework MB. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: Iaf8f2458c2dfe49f40eada8dced1febe2c4c4687 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2255826 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Tested-by: Edward Hill <ecgh@chromium.org>
* volteer: reset the TCPCs on EC resetCaveh Jalali2020-06-251-2/+2
| | | | | | | | | | | | | | | | | | | | | | this fixes the ps8815 not being taken out of reset due to EFS2 interactions. when EFS2 is enabled, we sysjump to RW very early - before INIT_HOOKS run. any code in INIT_HOOK functions that is predicated by system_jumped_to_this_image() will either always run or never run. this is not the intended behavior. the solution is to use system_jumped_late() instead. BRANCH=none BUG=b:159769490 TEST=ps8815 no longer stays in reset after EFS2 sysjump Signed-off-by: Caveh Jalali <caveh@chromium.org> Change-Id: I6c2048f5caad8eb790dab8a5b44fc55da92baa48 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2263092 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: re-enable CONFIG_CMD_KEYBOARDKeith Short2020-06-231-1/+0
| | | | | | | | | | | | | | | | | CONFIG_CMD_KEYBOARD is needed by the FAFT tests. With this change Volteer still has 944 bytes RO and 772 bytes RW free with the TCPMv2 stack. BUG=b:158572770, b:159521752, b:159058351 BRANCH=none TEST=make buildall -j Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ieb85542e4eced938e509547b23ce130d6fd4e7bb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2261294 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Jes Klinke <jbk@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* npcx: Add a new flag to check for initial power-onAndrew McRae2020-06-232-8/+6
| | | | | | | | | | | | | | | | | | | | | The CR50 will reset the EC on some platforms after power-on. Add a reset flag to detect this and treat the second restart as a power-on restart rather than reset. Subsume the CONFIG_GPIO_INIT_POWER_ON_DELAY_MS config to make it clear what the behaviour will be. BUG=b:151329011 TEST=Confirm on dalboz, puff & variants that second reset is treated correctly. BRANCH=none Change-Id: Ib66de920403f08099b87d1eff797270606b44f8f Signed-off-by: Andrew McRae <amcrae@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2255830 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Andrew McRae <amcrae@chromium.org> Tested-by: Andrew McRae <amcrae@chromium.org>
* octopus: Enable TCPMv2Patryk Duda2020-06-231-1/+5
| | | | | | | | | | | | | | | | | | This patch enables TCPMv2 on octopus boards. Please note that due to bug in PS8751 (see b/148554997 for details) only PD2.0 specification level is enabled. BUG=none BRANCH=none TEST=Flash board from octopus family. Make sure that TCPMv2 is running. Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I9aabcbcd274964e4206e1d82324782dcf67793a4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2250685 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
* baseboard/octopus: Use PD port count obtained dynamicallyPatryk Duda2020-06-231-5/+7
| | | | | | | | | | | | | | | | | | | | Some boards from octopus family have only one USB-C port. Performing any operation on inexistent ports will always result in failure. BUG=b:154602760 BRANCH=none TEST=Flash casta board. Make sure that EC RW doesn't report: "Disabling C1 as sink failed" or "C1: sink path disable failed." Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: Ifc1da701bd862a74d1d434c3839511d5340c2fce Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2250684 Commit-Queue: Jett Rink <jettrink@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* dedede: npcx7: Toggle ADC interrupts to save powerAseda Aboagye2020-06-211-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to save EC power and allow deep sleep to be entered, this change disables the ADC interrupts after booting up into S0, and then enables them when the system is attempting to power on. (Via power button or lid open or something else). BUG=b:157887329 BRANCH=None TEST=Build and flash waddledoo. Boot DUT, verify it can boot to S0. Enter `apshutdown` command on the EC console, verify that DUT shuts down. Verify that 15s later all power signals indicate low. Press power button, verify DUT boots up again. Repeat shutdown but initiated from the AP, verify power button can boot DUT again. Repeat shutdown and verify that a lid open can wake the DUT. TEST=Verify that suspend and resume continue to work. Verify that ADC interrupts remain disabled in suspend. TEST=Setup an RTC wake and shutdown to S5. Verify that AP wakes up after RTC alarm and boots all the way back up. TEST=Verify that power consumption is reduced when ADC interrupts are disabled. Change-Id: Ib9f6c30533afe8f354d731bb0f30ea207b44c601 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2233847 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org>
* Zork: Don't KB_SCAN_DISABLE_LID_ANGLE in S0Edward Hill2020-06-201-2/+17
| | | | | | | | | | | | | | Keep keyboard scan enabled in tablet mode if the AP is in S0, so AP can decide whether to ignore input devices or not. BUG=b:159456704 BRANCH=none TEST=none Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I7e71e2b8d593732315caa73cf585e5d20e5eb9a8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2254981 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* baseboard/kukui: Do not consider FET states in battery presence checkIkjoon Jang2020-06-192-29/+3
| | | | | | | | | | | | | | | | | | | | | | When Juniper is powered up with fully drained LGC battery, its FET states indicates battery is disconnected even it's still i2c responsive. In MT8183 platform, !battery_is_presence() isn't blocking power on, this function does not need to return BP_NO when battery is i2c responsive but DFET state is off. This patch fixes the problem of sbs-battery probe fail from host side when a device is powered up from external power source with fully drained battery reporting DFET state is off. BUG=b:153710351 TEST=none BRANCH=none Signed-off-by: Ikjoon Jang <ikjn@chromium.org> Change-Id: I67b750b7586fcad149c65e88e73dcbd872ca76bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2247972 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* morphius: add ppc aoz1380Zick Wei2020-06-192-2/+2
| | | | | | | | | | | | | This patch add ppc aoz1380 on daughter board. BUG=b:156552519, b:159282505 BRANCH=none TEST=make buildall Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I5ca87a2d524ee265626e5b163754a33dcb31853d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2251127 Reviewed-by: Edward Hill <ecgh@chromium.org>
* boten: remove unused I2Cxiong.huang2020-06-191-0/+2
| | | | | | | | | | | | | Remove I2C4. BUG=b:157626290, b:158658777 BRANCH=none TEST=make buildall -j Signed-off-by: xiong.huang <xiong.huang@bitland.corp-partner.google.com> Change-Id: Id1af7591e2bfcc39175470b93c27df257a5dff1f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2245577 Reviewed-by: Diana Z <dzigterman@chromium.org>
* TCPMv2: Add pathway to enable FRS from PPC driverEric Herrmann2020-06-181-2/+2
| | | | | | | | | | | | | | | Some PPCs have integrated CC line detection to trigger FRS faster, but this needs to be enabled from the USBC policy engine only after the sink capabilities have been exchanged. BUG=b:148144711 TEST=make buildall BRANCH=none Change-Id: Iaa64f64845c5ffdd32fa66a3eb6f6251abb7c157 Signed-off-by: Eric Herrmann <eherrmann@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2056493 Reviewed-by: Keith Short <keithshort@chromium.org>
* Volteer: create new board target for TCPMv1Keith Short2020-06-181-8/+11
| | | | | | | | | | | | | | | | | | USB4 an Thunderbolt support is not complete in the TCPMv2 stack. Create a new board project called "volteer_tcpmv1" that can be used to continue developing USB4 and Thunderbolt support in the BIOS and kernel. BUG=b:145756626 BRANCH=none TEST=make buildall TEST=make BOARD=volteer, confirm image uses TCPMv2 stack TEST=make BOARD=volteer_tcpmv1, confirm image uses TCPMv1 stack Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I975f9c6af037dc344a0f4e4fb573a9400ca6bb49 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2243317 Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* mushu: Bring up F75303 temp sensorPuthikorn Voravootivat2020-06-161-1/+2
| | | | | | | | | | | | | | | | | | | | BRANCH=None BUG=b:158676970 TEST=Force fan off/run heavy workload Use temps command in ec console, see temp > temps CHARGER : 318 K = 45 C 64% 5V : 316 K = 43 C 61% GPU : 343 K = 70 C 100% F75303_Local : 331 K = 58 C F75303_GPU : 340 K = 67 C F75303_GPU_Power : 332 K = 59 C Change-Id: I0af47849cc606eb03eee652bb261fce11896e2ab Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2240512 Reviewed-by: Bob Moragues <moragues@chromium.org> Reviewed-by: Shelley Chen <shchen@chromium.org>
* volteer: cleanup thermal limitsKeith Short2020-06-151-4/+2
| | | | | | | | | | | | | | Cleanup the thermal limits based on information provided by hardware team. BUG=b:144941023, b:155336126 BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ibede2498cd36be6fc23748248e93d6a3fe1d8dad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2237908 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* berknip: add 5V regulator temperature sensorDevin Lu2020-06-152-2/+4
| | | | | | | | | | | | | | | Add a thermistor which near to 5V regulator. BUG=b:157711232 BRANCH=none TEST=Verified console "temps" can read temperature. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I0020fc74b9b4b3f16dae7a1263e793ec2783b665 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2234047 Commit-Queue: Edward Hill <ecgh@chromium.org> Tested-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* zork/baseboard: move temperature sensors definition to board variantDevin Lu2020-06-153-70/+48
| | | | | | | | | | | | | | | | | 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>
* boten: use charger/TCPC RAA48900xiong.huang2020-06-141-11/+0
| | | | | | | | | | | | | | | Use charger/TCPC RAA48900 instead of TCPC IT8320 + charger SM5803 combination at MB side. BUG=b:157626290, b:158023819 BRANCH=none TEST=make buildall -j Signed-off-by: xiong.huang <xiong.huang@bitland.corp-partner.google.com> Change-Id: Ibb97a41e1d280da7c92cf2c00202b5eb205f99b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2239599 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* Zork: Disable PI3HDX1204 when HDMI didn't connect.David Huang2020-06-132-2/+11
| | | | | | | | | | | | | | Disable PI3HDX1204 when HDMI didn't connect for saving 1W in S0. BUG=b:158136599 BRANCH=none TEST=check pi3hdx1204 register setting is correct. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I9170cf56b34d71abcdd430bd7d8d7f3839de2558 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2234046 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Vincent Wang <vwang@chromium.org>