summaryrefslogtreecommitdiff
path: root/board/careena
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-059-769/+0
| | | | | | | | | | | | | | | | | | | | | | In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* keyboard_scan: Add consts needed for factory test to headerRob Barnes2021-07-281-5/+0
| | | | | | | | | | | | | | | | | Add keyboard_factory_scan_pins and keyboard_factory_scan_pins_used to keyboard_scan header so they do not need to be declared as extern by individual boards. These constants need to be defined if CONFIG_KEYBOARD_FACTORY_TEST is enabled. BUG=None TEST=Build BRANCH=None Change-Id: I1a100f626b3cea251ca72703d17b2d27db0f8f28 Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3053101 Commit-Queue: Diana Z <dzigterman@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* cleanup: Fix Dynapack stringDevin Lu2021-07-212-7/+7
| | | | | | | | | | | | | | | The naming string should be DYNAPACK. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I32f2498d4e51a83bd323d313a862622b6e69967d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3038017 Reviewed-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-by: caveh jalali <caveh@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* careena: Deassert PROCHOT on sysjumpEdward Hill2021-07-091-0/+14
| | | | | | | | | | | | | | | The GPIO was an input in old RO images. On sysjump to new RW, the direction is changed to output but the level is not set, which results in the output driving low, which asserts PROCHOT incorrectly. BUG=chromium:1226694 b:185082703 BRANCH=grunt TEST=check PROCHOT is high after sysjump from old RO Signed-off-by: Edward Hill <ecgh@chromium.org> Change-Id: I81e6237d2643c58fa15672987b6ac815cbcd8211 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3016409 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* careena: Add thermal protectionDevin Lu2021-04-163-1/+23
| | | | | | | | | | | | | | This patch adds thermal protection to prevent AP runaway. BUG=b:185082703 BRANCH=firmware-grunt-11031.B TEST=Verify thermal halt/alert as expected. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I4fccc93b0cb89a2e5d2784dfc0a41aa866f691f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2822269 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* genvif: Use VIF overrides by defaultAbe Levkoy2021-03-301-0/+3
| | | | | | | | | | | | | | Use board-specific override files when generating VIFs for boards. BUG=b:172276715 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I197365018ceb8197c22d631cebf4cbce1c0119f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2785506 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* mordin: Add CosMX B00C4473A9D0002 batteryDevin Lu2020-11-182-0/+31
| | | | | | | | | | | | BUG=b:173343686 BRANCH=firmware-grunt-11031.B TEST=Test on charging/discharging/battery cut off pass. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I69f50259c25e3fe6774afe2660a65db820cdaead Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2539712 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* careena/barla: enable 2nd TCPC source PS8755 for port 1Devin Lu2020-09-113-0/+27
| | | | | | | | | | | | | | | | | | | | | | This patch adds one more TCPC PS8755 in the port 1. These two are all supported by ps8xxx.c and the board function board_get_ps8xxx_product_id is implemented to judge the source by checking TCPC ID pin. BUG=b:157298401, b:158983814 BRANCH=firmware-grunt-11031.B TEST=Verify DUT with PS8755 or PS8751 in the sub-board can work correctly in sink and source roles. Verify USBC charger is able to charging. Change-Id: I867e925ee5bb54597ba09539743a0048c220e298 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2393407 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org> (cherry picked from commit 09fd4554bfbc055f67a7a51a4858b27f6bebc878) Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2404907
* PD: Remove unnecessary PDCMD taskDiana Z2020-05-201-1/+0
| | | | | | | | | | | | | | | | | | | The PDCMD task is only pulling interrupts from the TCPCs on most boards, which is unnecessary since the PD_INT tasks handle this job now. Remove it from any boards using the PD_INT command which are not using the older CONFIG_HOSTCMD_PD functionality (ex. samus, oak). Located boards using: find -name "ec.tasklist" | xargs grep -l PD_INT | xargs grep PDCMD BRANCH=None BUG=b:154959596 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I29be8ab1d7a2616603fb55236aed4329ed8654f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2208221 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* thermal: rename AMD AP I2C port nameZick Wei2020-04-171-1/+1
| | | | | | | | | | | | | | | This patch rename AMD AP I2C port name for zork and grunt family. BUG=b:154189125 BRANCH=none TEST=make buildall and verify EC can get AP temperature through temps command in EC console on morphius board. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I846bf671983c9788ad1f42986bfbefda09d5c9b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2152032 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Grunt: Add GPIO_LOCKED to EC_RST_ODL PSL inputEdward Hill2019-10-221-1/+1
| | | | | | | | | | | BRANCH=grunt BUG=b:143095616 TEST=GPIO is locked as input Change-Id: I36b123ed068db268d1cd02e990dd720663eaae57 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1873008 Reviewed-by: Keith Short <keithshort@chromium.org>
* Barla: add simplo HIGHPOWER 996QA168H batteryDevin Lu2019-09-092-0/+31
| | | | | | | | | | | | BUG=b:140452269 BRANCH=grunt TEST=Test on charging/discharging/battery cut off pass. Change-Id: Iba19c113d94ed0c88372b5bd4317b333dee6d146 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1782398 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: Edward Hill <ecgh@chromium.org>
* common: Move fifo logic out of motion_sense.cYuval Peress2019-08-231-0/+1
| | | | | | | | | | | | | | | | | | | | This change is needed to allow better testing of the fifo behavior. Additionally, motion_sense_fifo.c will only be compiled if CONFIG_ACCEL_FIFO is defined. This behaviour requires a few small changes to several boards and baseboards to make sure that we only define CONFIG_ACCEL_FIFO when the MOTIONSENSE task is present (some times that may be only in one section RW or RO). BUG=b:137758297 BRANCH=None TEST=buildall and ran CTS on arcada Change-Id: I2f7e4e436ba9568a35b7a0b2c8d53a73f198ba73 Signed-off-by: Yuval Peress <peress@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1704163 Reviewed-by: Alexandru M Stan <amstan@chromium.org> Commit-Queue: Alexandru M Stan <amstan@chromium.org>
* Grunt/Treeya: Add ANX3447 variant for TCPC 0.Paul Ma2019-08-212-177/+2
| | | | | | | | | | | | | | | | | | | Merge common TCPC code into baseboard, and add choice of ANX3429 or ANX3447 for port 0 TCPC. Treeya uses ANX3447, all others use ANX3429. BUG=b:138744661 BRANCH=none TEST=build -j BOARD=treeya Change-Id: I66f84ae50be0b5fe80479dfdc699717427e4457c Signed-off-by: Paul Ma <magf@bitland.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1751302 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Martin Roth <martinroth@chromium.org> Tested-by: Martin Roth <martinroth@chromium.org> Commit-Queue: Martin Roth <martinroth@chromium.org>
* grunt: Wake from hibernate on EC resetEdward Hill2019-06-142-2/+15
| | | | | | | | | | | | | | | Add GPIO_EC_RST_ODL to hibernate_wake_pins[] for Aleena + Careena + Liara since the HW supports this as a PSL wake input. BUG=b:122833270 BRANCH=grunt TEST='dut-control cold_reset:on cold_reset:off' with ServoV2 Change-Id: I24a878be5e2c822b052a7d65b1964dcb6ed2ce94 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1658524 Reviewed-by: Raul E Rangel <rrangel@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* ec.tasklist: Consolidate duplicate commentsDaisuke Nojiri2019-04-081-14/+1
| | | | | | | | | | | | | | | | | | | | | | | It's simply a bad idea to describe a macro in multiple locations. It'll make it hard to change. It'll be difficult to keep all locations in sync. This patch replaces the comment duplicated in all ec.tasklist with a pointer to the CONFIG_TASK_LIST definition. The macro will be described in a single place (just like all/most other macros). Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> BUG=none BRANCH=none TEST=buildall Change-Id: Id658b9d68e742e4334c692b804d9c98c8de21313 Reviewed-on: https://chromium-review.googlesource.com/1551579 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* aleena: Enable GPIO-based MKBP event notificationEdward Hill2019-02-121-0/+2
| | | | | | | | | | | | | | Send MKBP events (for sensor data) over GPIO instead of host event. BUG=b:123750725 BRANCH=grunt TEST=MKBP events still received Change-Id: Ie1b02bbb8df44ade5ec6f1a4ba5dc4c5142e9f39 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1452936 Reviewed-by: Enrico Granata <egranata@chromium.org> Reviewed-by: Raul E Rangel <rrangel@chromium.org>
* USB PD: PPC: Add overcurrent handling.Aseda Aboagye2019-01-171-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Type-C Power Path Controllers provide overcurrent protection. This commit adds support into the USB PD task for overcurrent events while we are in source role. The USB PD 3.0 spec recommends that ports issue a hard reset when an overcurrent condition occurs on a port. Additionally, we'll allow a source port to overcurrent 3 times before latching off VBUS from the port entirely. The source path will be re-enabled after ~1s after each overcurrent event. BUG=b:69935262,b:114680657 BRANCH=None TEST=Boot to ChromeOS in grabbiter. No overcurrent events reported when the sink is drawing <= 3.20 A. Overcurrent events are reported when the sink is drawing > 3.25 A. After 3 reports, the port is latched off and power delivery is stopped. The port is re-enabled only after the sink is disconnected. Also when the sink is drawing current at 3.24 A, there is one report of overcurrent. The port gets disabled in response to that event. But the port is re-enabled after 1 second since overcurrent event is reported only once. After the port is re-enabled, the sink is able to draw the set current. When the overcurrent event is reported, I can see in the kernel logs that the overcurrent condition is detected by the kernel. EC Logs: [3391.984462 C1: PPC detected Vbus overcurrent!] [3391.984953 C1: overcurrent!] [3392.044935 C1: PPC detected Vbus overcurrent!] [3392.045425 C1: overcurrent!] [3392.061404 C1: PPC detected Vbus overcurrent!] [3392.061894 C1: overcurrent!] [3392.062142 C1: OC event limit reached! Source path disabled until physical disconnect.] [3392.077226 C1: PPC detected Vbus overcurrent!] [3392.077532 C1: overcurrent!] [3392.077891 C1: OC event limit reached! Source path disabled until physical disconnect.] [3392.092660 C1: PPC detected Vbus overcurrent!] [3392.092966 C1: overcurrent!] [3392.093213 C1: OC event limit reached! Source path disabled until physical disconnect.] Kernel Logs: [ 3356.560456] usb usb2-port1: over-current condition [ 3356.768434] usb usb2-port2: over-current condition [ 3356.976446] usb usb2-port4: over-current condition [ 3357.184441] usb usb2-port5: over-current condition [ 3357.392445] usb usb2-port6: over-current condition Change-Id: Ib070f261e98264cd88725ebce7d10e0798267e3b Signed-off-by: Aseda Aboagye <aaboagye@google.com> Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/1286300 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org> Commit-Queue: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/807633 Commit-Ready: Karthikeyan Ramasubramanian <kramasub@chromium.org> Tested-by: Karthikeyan Ramasubramanian <kramasub@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* grunt: Enable PWM_CONFIG_DSLEEP for keyboard backlightEdward Hill2018-12-061-1/+1
| | | | | | | | | | | | | | | | Enabling CONFIG_LOW_POWER_S0 (CL:1347014) caused the keyboard backlight to flash. Fix this by setting the PWM_CONFIG_DSLEEP flag. BUG=b:120400520,b:120447176 BRANCH=grunt TEST=Liara keyboard backlight no longer flashes Change-Id: I2808c40bc3f833acebd0246992f3763dab76a752 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1363673 Commit-Ready: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* aleena/kasumi: Add support for motion sensorsEdward Hill2018-12-051-5/+0
| | | | | | | | | | | | | | | | | | Adjust Grunt baseboard to allow for per-sku support for motion sensors. Use this to enable motion sensors for SKU 82 (Kasumi360). Only enable the interrupt if the sensor is present. BUG=b:119795894 BRANCH=grunt TEST=Kasumi360 `ectool motionsense lid_angle` shows correct angles. Change-Id: Icb34359d7ac4cd894776e134c2c1fb7032741f03 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1361987 Tested-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com> Reviewed-by: Ryan Zhang <ryan.zhang@quanta.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* grunt: Raise some task sizesJonathan Brandmeyer2018-10-051-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A rough early (and therefore liberal) analysis of grunt task stacks shows that some of them will overrun on some infrequently-executed debugging statements. Raise those task sizes to reduce the risk of an overflow. On Careena: Task: HOOKS, Max size: 320 (96 + 224), Allocated size: 800 Task: USB_CHG_P0, Max size: 548 (324 + 224), Allocated size: 672 Task: USB_CHG_P1, Max size: 548 (324 + 224), Allocated size: 672 Task: CHARGER, Max size: 844 (620 + 224), Allocated size: 928 Task: MOTIONSENSE, Max size: 588 (364 + 224), Allocated size: 928 Task: CHIPSET, Max size: 812 (588 + 224), Allocated size: 928 Task: KEYPROTO, Max size: 516 (292 + 224), Allocated size: 672 Task: PDCMD, Max size: 344 (120 + 224), Allocated size: 800 Task: HOSTCMD, Max size: 524 (300 + 224), Allocated size: 800 Task: CONSOLE, Max size: 484 (260 + 224), Allocated size: 928 Task: POWERBTN, Max size: 812 (588 + 224), Allocated size: 928 Task: KEYSCAN, Max size: 556 (332 + 224), Allocated size: 672 Task: PD_C0, Max size: 820 (596 + 224), Allocated size: 928 Task: PD_C1, Max size: 820 (596 + 224), Allocated size: 928 Task: PD_INT_C0, Max size: 296 (72 + 224), Allocated size: 672 Task: PD_INT_C1, Max size: 296 (72 + 224), Allocated size: 672 Note that '224' is conservative right now with CONFIG_FPU cleared on Grunt. BUG=b:116610278 TEST=buildall and analyzestack BRANCH=grunt Change-Id: Ibf721acc3250aa1d1195546e943031c5c8617b95 Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1262101
* grunt: Add minimal analyzestack configurationsJonathan Brandmeyer2018-10-051-0/+1
| | | | | | | | | | | | | | | | | Considerably more work is needed to support the various driver indirections that Grunt is using. This is a 'liberal' analysis, in the sense that it is failing to include some driver paths in its stack consumption analysis. BRANCH=grunt BUG=b:116610278 TEST=make BOARD=grunt analyzestack. Change-Id: I6ff034935a749049b1ce6b544ea627b1772c7a80 Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1262100 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* careena, liara, aleena: Remove motion sensing supportJonathan Brandmeyer2018-10-043-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | These members of the grunt family do not include any motion sensors. Remove them entirely, both to save space and to disable some factory tests. build/aleena/RW/space_free_flash grew by 12716 bytes: (62400 to 75116) build/aleena/RW/space_free_ram grew by 9888 bytes: (30272 to 40160) build/careena/RW/space_free_flash grew by 12864 bytes: (61664 to 74528) build/careena/RW/space_free_ram grew by 9856 bytes: (30304 to 40160) build/liara/RW/space_free_flash grew by 12724 bytes: (61364 to 74088) build/liara/RW/space_free_ram grew by 9856 bytes: (30272 to 40128) BRANCH=grunt BUG=b:115649135 TEST=boot Careena. Observe that `ectool motionsense` returns an INVALID COMMAND error, and that the EC console shows no attempt is made to communicate with the sensors. Change-Id: I322978fc80e36b999e77f9e3d54b175c6814fdcf Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1262099 Reviewed-by: Edward Hill <ecgh@chromium.org>
* grunt: Remove no longer needed GPIO_EN_PP5000Edward Hill2018-10-021-3/+0
| | | | | | | | | | | | | | | The BQ24392 driver was renamed to MAX14637 (CL:1250031) and no longer requires GPIO_EN_PP5000 to be defined (CL:1250032), so this can be removed from grunt-family gpio.inc. BUG=none BRANCH=grunt TEST=make -j buildall Change-Id: I186ece073e544760d487489f874659226c820bd8 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1257644 Reviewed-by: Scott Collyer <scollyer@chromium.org>
* bc12: rename bq24392 driver to max14637Scott Collyer2018-10-021-1/+0
| | | | | | | | | | | | | | | | | | | | The MAX14637 BC 1.2 USB charger detection chip is functionally similar to the bq24392 and can use the same driver. Rather than have 2 copies of the same driver, or a generic named driver than can be used for both chips, rename the existing bq24392 driver to max14637 as that's the BC 1.2 chip that our current designs are using. BUG=b:113267982 BRANCH=none TEST=make -j buildall Change-Id: I03cfb4918513d756c2a41341001a8162652a29b6 Signed-off-by: Scott Collyer <scollyer@google.com> Reviewed-on: https://chromium-review.googlesource.com/1250031 Commit-Ready: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* grunt family: Clear CONFIG_SYSTEM_UNLOCKEDJonathan Brandmeyer2018-09-271-2/+0
| | | | | | | | | | | | | | | | | | | Some factory tests are evaluating behavior that is sensitive to RO firmware behaving like a locked system image. Caveat: EC engineers will need to manually `sysjump rw` or use flashrom to update the entire system firmware image as described in the grunt care and feeding guide. TEST=buildall; flash and boot a Careena pre-release system. BRANCH=grunt BUG=b:114686468 Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Change-Id: Ida253bd9e0197a4a70abed3f3670b720fa0e33bb Reviewed-on: https://chromium-review.googlesource.com/1246268 Commit-Ready: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* Careena: Disable motion sensorsJonathan Brandmeyer2018-09-191-9/+2
| | | | | | | | | | | | | | | | | The body frame motion sensor will not be installed for Careena. BUG=b:115649135 TEST=observe that the EC does not attempt to initialize any of its motion sensors in the EC log. BRANCH=grunt Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Change-Id: I0e7c2e9e39d290c21f20b766da4347a2e2902942 Reviewed-on: https://chromium-review.googlesource.com/1231474 Commit-Ready: Jett Rink <jettrink@chromium.org> Tested-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* grunt: Use higher priority TCPC interrupt tasks.Jonathan Brandmeyer2018-09-072-17/+3
| | | | | | | | | | | | | | | | | | See also go/usb-pd-slow-response-time. Lift tcpc_alert_event interrupt handler to baseboard.c to reduce duplication. BUG=b:112848644, b:111909282 BRANCH=none TEST=Observe response time after SrcCap to Sink Request is 15ms on Careena and Grunt hardware after forcing a sysjump. Repeat test on Careena Port 0 with the DB disconnected (containing Port 1), also 15ms. Change-Id: I501bd86d84ba84eea0a705731e59e2431fc9a2ac Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1194669 Commit-Ready: Jett Rink <jettrink@chromium.org> Tested-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* careena: add simplo batteriesDevin Lu2018-08-152-0/+62
| | | | | | | | | | | | | | | | | This patch add two simplo batteries for careena, one is coslight pack, another one is ATL pack. BUG=b:111288497,b:111287943 BRANCH=none TEST=Check DUT can recognize this two batteries. Check software battery cutoff and hardware battery cutoff could be woke up after charger attached. Change-Id: If22be1e84c0dee28e4d12dc64c3102b7d80dacc4 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/1174145 Commit-Ready: Devin Lu <devin.lu@quanta.corp-partner.google.com> Reviewed-by: Edward Hill <ecgh@chromium.org>
* battery: Optionally prevent boot at low SOC with cell imbalance.Jonathan Brandmeyer2018-08-082-4/+11
| | | | | | | | | | | | | | | | | | | | Measure the cell imbalance with method dispatch to a per-battery method, such that families with a plurality of configurable batteries can support them all. By default, cell imbalance is taken to be 'zero' in case we don't support that battery's management IC. Provide a driver for reading cell voltages for the TI BQ4050 family. This IC is quite popular, but by no means universal. BUG=b:111214767 BRANCH=none TEST=Boot on Careena with a custom debug print statement, showing that we can measure the typical battery voltages during and after the boot at the battery status polling interval. Change-Id: I235389b252ac9c373aa9706dbd1066f7c0bbce71 Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1162663 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* grunt family: Provide pu/pd for port 1 BC1.2Jonathan Brandmeyer2018-07-311-2/+2
| | | | | | | | | | | | | | | | | | | Port 1 is provided by a daughterboard. In the event that the daughterboard is disconnected, these pins are floating. Pull them in the appropriate direction for their logic when the board is disconnected. BUG=b:111942717 BRANCH=none TEST=make -j buildall; Test startup on Careena hardware both with and without port 1 connected to the mainboard. Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Change-Id: Ica06ea16c2c76c624c542ba9b803197a4fd852bd Reviewed-on: https://chromium-review.googlesource.com/1155713 Commit-Ready: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Tested-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* careena: Correct baseboard IMU orientation.Jonathan Brandmeyer2018-07-311-0/+7
| | | | | | | | | | | | | | | | | | | | The Careena baseboard IMU principle axes are rotated relative to the Grunt reference design for manufacturability. Also, refactor common/spi_flash_reg.c to avoid a name collision with axis definitions in math_util. BRANCH=none BUG=b:111983307 TEST=make -j buldall; Observe `accelread 1` output with the base in orientations: flat, perturbed by rotation about +y, and perturbed by rotation about +x. Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Change-Id: Ib85d657ef47a89aaa63134b2bdf43920caf6c06e Reviewed-on: https://chromium-review.googlesource.com/1155628 Commit-Ready: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Tested-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org>
* careena: Correct GPIO_SYS_RESET_L pin definition.Jonathan Brandmeyer2018-07-191-2/+1
| | | | | | | | | | | | | | | | | | Caveat: Careena early generation hardware was reworked to a state which does not map SYS_RESET_L to any pin on the EC. This change updates the config to the next hardware gen. TEST=make -j buildall, schematic review BRANCH=none BUG=b:111593365, b:109874594 Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Change-Id: Icb1ca7ccbacd98f960e4f44041281d1b2ca94e6e Reviewed-on: https://chromium-review.googlesource.com/1142236 Commit-Ready: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Tested-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* careena: enable keyboard factory scanningDevin Lu2018-07-192-0/+24
| | | | | | | | | | | | | | This patch is referring to CL:332322. BUG=none BRANCH=none TEST=Short keyboard pins and make sure "ectool kbfactorytest" works. Change-Id: Ic943753c8cec8dde79842de48e5d21ff4dc01c00 Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/1114400 Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
* grunt, careena: Clean up GPIO alternate functions.Jonathan Brandmeyer2018-07-131-13/+13
| | | | | | | | | | | | | | | | The NPCX only supports two modes per pin: Peripheral function or GPIO. The chip and its driver do not support alternate peripheral functions. TEST=buildall -j BRANCH=none BUG=b:79686781 Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Change-Id: Ib5d7ba81b5224ed9c121887d664dac659962b2c2 Reviewed-on: https://chromium-review.googlesource.com/1136942 Commit-Ready: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Tested-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* careena, grunt: Enable pullup for the lid switch.Jonathan Brandmeyer2018-06-281-1/+1
| | | | | | | | | | | | | | | | | | | | | In the case that the lid switch becomes loose/disconnected, default to the 'lid open' state by pulling up the GPIO. Grunt is not affected, but we want to demonstrate best practices for the grunt family with its configuration. BUG=b:110836185 BRANCH=none TEST=disconnected lid switch on careena and observed lid state remained open and stable. Reconnected lid switch and observed lid state followed physical lid position. Change-Id: I951594ed7f6d98cf1b5258a894d0b95b6ca98ecc Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1115859 Commit-Ready: Martin Roth <martinroth@chromium.org> Reviewed-by: Edward Hill <ecgh@chromium.org> Reviewed-by: Martin Roth <martinroth@chromium.org> Reviewed-by: Jett Rink <jettrink@chromium.org>
* careena: Fix power-on with cut-off batteryEdward Hill2018-06-201-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove CONFIG_BATTERY_HW_PRESENT_CUSTOM, CONFIG_BATTERY_PRESENT_CUSTOM, and associated code in battery.c, and delay in board_tcpc_init. Add CONFIG_BATTERY_PRESENT_GPIO. This allows CONFIG_BATTERY_REVIVE_DISCONNECT to work correctly to revive a cut-off battery, using battery_get_disconnect_state(). Before this change, the call to battery_get_disconnect_state() in the main loop of charge_state_v2's charger_task would not be reached with cut-off battery, due to the earlier: "if (curr.batt.is_present == BP_NO) goto wait_for_it;" With this change, curr.batt.is_present changes to BP_YES based on the simple test of GPIO_EC_BATT_PRES_L. This allows charger_task to "try to wake battery", then call battery_get_disconnect_state() and "found battery in disconnect state". This succeeds in getting the battery out of the disconnect state. The delay in board_tcpc_init() is removed because TCPC init doesn't disturb the AC power supply. If it did, powering on with AC only (no battery) would fail. BUG=b:109894491 BRANCH=none TEST=these combinations on grunt and careena: grunt, unplug AC, cutoff battery, on AC plug: pass (AP boots) grunt, unplug AC, normal battery, on EC reboot: pass (AP boots) grunt, unplug AC, unplug battery, on AC plug: pass (AP boots) grunt, unplug AC, discharge battery to cutoff, on AC plug: pass (AP boots) careena, unplug AC, cutoff battery, on AC plug: pass (AP boots) careena, unplug AC, normal battery, on EC reboot: pass (AP boots) careena, unplug AC, unplug battery, on AC plug: pass (AP boots) careena, unplug AC, discharge battery to cutoff, on AC plug: pass (AP boots) Change-Id: Ieceaa51535b9fcabc8b42681472689bfa9d0e498 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1105338 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Furquan Shaikh <furquan@chromium.org>
* careena: Add batteries configurationDevin Lu2018-06-072-19/+110
| | | | | | | | | | | | | | | This patch add batteries configuration for careena. BUG=b:109638172 BRANCH=none TEST=Verified battery charging and discharging and that 'cutoff' EC console command works. Change-Id: Ia338efa5730e5039d9a2b1a0873ca90d13ff85fa Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/1088273 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Edward Hill <ecgh@chromium.org>
* stoney: Rename GPIO_PCH_RCIN_L to GPIO_SYS_RESET_LJonathan Brandmeyer2018-06-051-1/+1
| | | | | | | | | | | | | | Pin rename only; no functional changes. See also b/72426192 for earlier functional changes. BUG=b:77301519 TEST=make -j buildall BRANCH=none Change-Id: I18e71118e584a5b36ba001bac24951929d2c93ff Signed-off-by: Jonathan Brandmeyer <jbrandmeyer@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1087207 Reviewed-by: Edward Hill <ecgh@chromium.org>
* battery: Move fuel gauge code to commonEdward Hill2018-06-011-1/+1
| | | | | | | | | | | | | | | | | Move fuel gauge code to common to avoid duplication in octopus and grunt baseboards. BUG=b:79704826,b:74018100 BRANCH=none TEST=make -j buildall Change-Id: I58a615c9ed7906cb19b49c2baa36aaa619838cf1 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1072637 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Vijay Hiremath <vijay.p.hiremath@intel.corp-partner.google.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
* grunt: Board specific battery infoEdward Hill2018-06-014-1/+72
| | | | | | | | | | | | | | | | | | | Split battery info between baseboard and board, following the Octopus example. This will allow Grunt and Careena to define their own lists of supported battery types. This also adds CONFIG_BATTERY_REVIVE_DISCONNECT support, and checks the charge/discharge FET status. BUG=b:79704826,b:74018100 BRANCH=none TEST=Grunt still boots ok. Change-Id: I6e82ac5e48f9aabf59b63add253108513f0a6b60 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1072039 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Jett Rink <jettrink@chromium.org>
* careena: Change LED colorsEdward Hill2018-05-254-52/+147
| | | | | | | | | | | | | Careena has non-PWM White/Orange LEDs. BUG=b:79704826,b:79894166 BRANCH=none TEST=make -j buildall Change-Id: Ie85de84fbd6e4ac4c6139d8407a7a25b5f6d5e7e Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1072898 Reviewed-by: Jett Rink <jettrink@chromium.org>
* careena: Make GPIOs match hardwareEdward Hill2018-05-253-67/+14
| | | | | | | | | | | | | Update GPIO definitions for Careena to match hardware. BUG=b:79704826 BRANCH=none TEST=make BOARD=careena Change-Id: I755e5fd8123eefdfa8d30ca2314435c28340e488 Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1070989 Reviewed-by: Jett Rink <jettrink@chromium.org>
* grunt: Move common code to baseboardEdward Hill2018-05-256-0/+563
Move code that will be common to Grunt and Careena to baseboard to avoid duplication when creating the Careena board. Add Careena board files. These are currently just a copy of Grunt and will be modified for Careena next. BUG=b:79704826 BRANCH=none TEST=Grunt still boots ok. Change-Id: I6dd0035bdd62e92a7f3664120fc6ac3f23a0af4d Signed-off-by: Edward Hill <ecgh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1070988