summaryrefslogtreecommitdiff
path: root/baseboard
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* volteer: Disable vSave0V direct checksKeith Short2020-06-131-1/+1
| | | | | | | | | | | | | | | | The vSafe0V bit isn't working in the PS8815 TCPC. BUG=b:158520242 BRANCH=none TEST=make buildall TEST=Volteer, confirm that SNK devices can be detected with TCPMv2 stack. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I7760fda39cac4c73d58a82c63aff85dfdef9eb3e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2244018 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* extpower: Add helper function extpower_handle_updateFurquan Shaikh2020-06-121-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a helper function extpower_handle_update() that performs all the necessary actions that need to be done on external power state change: 1. Call hook_notify with AC_CHANGE 2. Update memmap_batt_flags to update EC_BATT_FLAG_AC_PRESENT 3. Set host event for EC_HOST_EVENT_AC_CONNECTED or EC_HOST_EVENT_AC_DISCONNECTED. Step#2 above is important because it ensures that the memory map flag is correctly updated when host reads it. Before this change, it was observed that EC_BATT_FLAG_AC_PRESENT is updated only when static/dynamic battery information gets updated. This could result in host reading the wrong AC state if battery information did not update before host acts on the host event bit getting set for AC connect/disconnect. BUG=b:157752693 BRANCH=None TEST=Verified on trembyle that EC ASL routines read the correct state of AC present flag on receiving host event. Signed-off-by: Furquan Shaikh <furquan@google.com> Change-Id: I077de1135320654f571e5cf87ced6f08cbf23876 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2242353 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Auto-Submit: Furquan Shaikh <furquan@chromium.org>
* damu: set charging current to 0 when enable charger OTGScott Chao2020-06-121-0/+2
| | | | | | | | | | | | | | When enable charger OTG, we need to set charging current to 0 BUG=b:158542099 BRANCH=kukui TEST=make -j BOARD=damu TEST=make buildall Signed-off-by: Scott Chao <scott.chao@bitland.corp-partner.google.com> Change-Id: I9aed83084b8382d80dc266cce5243eba0233e536 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2239588 Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* volteer: Remove PPC config TODOAbe Levkoy2020-06-121-2/+0
| | | | | | | | | | | | | | | | board_set_active_charge_port appears to work correctly. BUG=b:140561826 TEST=Attach 2 chargers; chgoverride -2 disables VBUS sink on active PPC TEST=chgoverride 0 enables VBUS sink on port 0 and disables it on port 1 TEST=chgoverride 1 enables VBUS sink on port 1 and disables it on port 0 BRANCH=none Change-Id: If9664a57709d65289d00477102c454d68b931ea7 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2242393 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* TCPMv2: Support mode entry for SOP' and SOP''Abe Levkoy2020-06-114-4/+4
| | | | | | | | | | | | | | | | | | | | | | Add a transmit type parameter to functions involved in mode entry; also add such a parameter to various functions calling those functions. For DisplayPort-specific definitions or calls, specify SOP; we do not currently support DisplayPort mode for cable plugs. For TCPMv1-specific code, specify SOP. TCPMv1 generally assumes that the discovery/mode structures are 1-dimensional, as they were previously, and changing that is outside the scope of this CL. BUG=b:155890173 TEST=Enter DP mode on Volteer with TCPMv2 TEST=Enter DP mode on Volteer with TCPMv1 TEST=Enter TBT mode on Volteer with TCPMV1 BRANCH=none Change-Id: I8afc75b3f3be8939c4645058ac4a31f24c88fb9e Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2229279 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* vilboz: Remove ioex C1 and config the ioexpander gpioLu Zhang2020-06-113-19/+21
| | | | | | | | | | | | 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>
* boten: remove DB type-C port and peripheral chipsxiong.huang2020-06-111-7/+0
| | | | | | | | | | | | | | | | | Remove chips: Charge chip - SM5803 TCPC and USB mux chip - ANX7447 USB retimer chip - TUSB544 BC1.2 chip - PI3USB9201 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: Iac30f683774368b2b5706c5f804caf549a54139a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2235238 Reviewed-by: Diana Z <dzigterman@chromium.org>
* dedede: npcx7: Enable TCPC Low Power ModeAseda Aboagye2020-06-111-1/+1
| | | | | | | | | | | | | | | | | | This commit enables TCPC low power mode for the npcx7 dedede variants. BUG=b:158218613 BRANCH=None TEST=Build and flash waddledoo, verify that DUT boots, TCPCs enter low power mode, and no watchdog resets are seen. Additionally, verify that PD sinks and sources continue to work. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I988a98f778e5f2c4a2fe8257ea27256d7a70b429 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2239484 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* octopus: enable CONFIG_CMD_CHARGENNamyoon Woo2020-06-101-0/+1
| | | | | | | | | | | | | | | | | | BUG=b:1568477297 BRANCH=octopus TEST=On firmware-octopus-11297.83.B, cherry-picked this patch along with related preceding patches, and tested the built image on fleex. Cq-Depend: chromium:1679710 Cq-Depend: chromium:1554198 Cq-Depend: chromium:1688134 Cq-Depend: chromium:2080933 Cq-Depend: chromium:2217112 Change-Id: I7bc4269d2e2799160ef3dfd96f9a94c8a4636902 Signed-off-by: Namyoon Woo <namyoon@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2236872 Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org>
* dedede: Pull ALL_SYS_PWRGD low when SLP_S3_L is assertedSooraj Govindan2020-06-101-0/+6
| | | | | | | | | | | | | | | | | | ALL_SYS_PWRGD is an AND of DRAM PGOOD, VCCST PGOOD, and VCCIO_EXT PGOOD. SLP_S3_L is a qualifying input signal to ALL_SYS_PWRGD logic. This patch ensure ALL_SYS_PWRGD remains LOW during SLP_S3_L assertion. BUG=b:158188385 BRANCH=none TEST=run cold reboot tests Signed-off-by: Sooraj Govindan <sooraj.govindan@intel.com> Change-Id: I1bcfbab508220b78df5d21001ecfdb8dcb022022 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2237490 Tested-by: Sooraj Govindan <sooraj.govindan@intel.corp-partner.google.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* charger/isl9238c: enable slew rate controlTing Shen2020-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Enable charge current and maximum system voltage slew rate control on ISL9238C by default for better charger stability. Since the control is only available on ISL9238C, not on A/B, and there's no way to distinguish C and A/B in software side, introduce a new config CONFIG_CHARGER_ISL9238C for 9238C users. BUG=b:155366741 TEST=1) on asurada, verify the register configured correctly 2) verify the waveform looks better BRANCH=kukui Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I577db3eebcad0ed3793f4b7d525e4246515f8503 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2231725 Tested-by: Hsu Alvis <alvishsu@google.com> Tested-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* vilboz: Split mux to dalboz and vilbozLu Zhang2020-06-104-91/+18
| | | | | | | | | | | | 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>
* volteer: remove VSYNC sensorstabilize-lazor-13278.B-masterKeith Short2020-06-091-5/+0
| | | | | | | | | | | | | | | Remove VSYNC sensor support from all volteer boards. BUG=b:146452722 BRANCH=none TEST=make buildall TEST=Boot Volteer, run "ectool motionsense" Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I1662f510901fb99a45999f46b854e7ceb3874f03 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2238671 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* kukui: Disable TCPMv1 state names in ROKeith Short2020-06-091-0/+4
| | | | | | | | | | | | | | | | | | | Disable CONFIG_USB_PD_TCPMV1_DEBUG to save 900 bytes of RO flash space. This is to keep kukui buildig at ToT - do not pick this onto a release branch. BUG=b:156398243 BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I7bc9d84a0cd172e20399b51eb7cd73c89119a574 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2236866 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* volteer: add USB overcurrent notification to APKeith Short2020-06-051-1/+9
| | | | | | | | | | | | | | | Enable the USB C0 and USB C1 overcurrent signals to the AP. BUG=b:140561826 BRANCH=none TEST=make buildall TEST=Force overcurrent event by manually setting PPC current limit below PD contract. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I5eea4812c212496f1c483c4149697b2d53a16a37 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2222960 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Ezkinil: modify some gpio definitionSue2020-06-052-22/+0
| | | | | | | | | | | | | | | | | | | rename GPIO F4: DP1_HPD -> EC_DP1_HPD remove IOEX 10 HDMI_CONN_HPD_3V3_DB add GPIO 75: DP1_HPD_EC_IN move hdmi_hpd_interrupt and hdmi_hpd_handler from baseboard to board BUG=b:152512560, b:153397667, b:155797182 BRANCH=none TEST=make buildall -j Change-Id: I5cdbb42a8284c85104dbbbe7b3d557d51a11a074 Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2224693 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> Tested-by: Edward Hill <ecgh@chromium.org>
* zork: Move tcpc,ppc,bc12 from baseboard to boardLu Zhang2020-06-053-212/+210
| | | | | | | | | | | 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>
* volteer: Enable CONFIG_USB_PD_USB32_DRDAyushee2020-06-051-0/+3
| | | | | | | | | | | | | BUG=b:148528713 BRANCH=None TEST=On connecting Gatkex Creek with DUT as UFP, the DUT enter into USB3 mode. Change-Id: I98d83ed14d92431b9e0392ffceb4e37792dde9f1 Signed-off-by: Ayushee <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2225602 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* vilboz: Remove PCAL6408 entirely and enable HDMILu Zhang2020-06-054-78/+25
| | | | | | | | | | | | | 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>
* baseboard/kukui: lower pd max voltage to 15V for jacuzziTing Shen2020-06-051-1/+2
| | | | | | | | | | | | | | | | Charging performance is better at 15V than 20V, see the analysis result in issue link below. BUG=b:157116471 TEST=make BRANCH=kukui Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I8113809372fc2e1e92be901025ee1ed4bd588a80 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2230219 Reviewed-by: Eric Yilun Lin <yllin@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org>