summaryrefslogtreecommitdiff
path: root/board/boten
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-0511-1238/+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>
* boten: modify battery fet register definestabilize-ambassador-14268.43.B-ishstabilize-14324.72.B-ishstabilize-14324.62.B-ishstabilize-14324.41.B-ishstabilize-14324.13.B-ishstabilize-14321.B-ishstabilize-14312.B-ishstabilize-14285.B-ishstabilize-14268.67.B-ishstabilize-14268.52.B-ishstabilize-14268.51.B-ishstabilize-14267.B-ishrelease-R97-14324.B-ishrelease-R96-14268.B-ishfirmware-cr50-stab-mp-14300.B-ishfirmware-cr50-stab-14294.B-ishfirmware-chameleon-14280.B-ishfactory-ambassador-14265.B-isharthur.lin2021-09-291-9/+9
| | | | | | | | | | | | | | | Modify correct fet register define to fix vsys drop issue. BRANCH=dedede BUG=None TEST=make buildall -j flash on boten, verify that VSYS remains up. Signed-off-by: arthur.lin <arthur.lin@lcfc.corp-partner.google.com> Change-Id: I98cfdff1b1b2e7a64a38e92c4272605de0aaf453 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3193204 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* boten: Check pen detection on initarthur.lin2021-08-131-0/+7
| | | | | | | | | | | | | | | | | | | The Pen detection is detecting by interrupt. However, it will miss the event on init if stylus already into garage. This patch adds checking pen detection on init. BRANCH=dedede BUG=b:196258408 TEST=make buildall -j On Boten, Resume from battery cutoff or EC hibernate. Make sure stylus is charging. Signed-off-by: arthur.lin <arthur.lin@lcfc.corp-partner.google.com> Change-Id: Ie74f4c391d658c7b9fd886267b62d21a99de77df Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3093652 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* lid_angle: Create a common callback for lid angle changesWai-Hong Tam2021-08-051-3/+1
| | | | | | | | | | | | | | | | | | | | | | Each board defines its own callback lid_angle_peripheral_enable(). The implementation is very similar. Create a common implementation and reduce the duplicated code. This CL removes the board callbacks which are identifical to the common callback. If it is slightly different, keep it and add the __override tag. The check of TEST_BUILD is unnecessary as the board callback is not linked in the test build. BRANCH=None BUG=b:194922043 TEST=Build all the images. Change-Id: I73d381730f35b80eff69399cdfc5fb54f839aee0 Signed-off-by: Wai-Hong Tam <waihong@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3069175 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* dedede: Make scope of SSFC definition per boardParth Malkan2021-07-193-1/+97
| | | | | | | | | | | | | | | | | | | | | | SSFC bit definition started diverging between coreboot and EC. To avoid conflicts move the definitions of SSFC bits within EC to per board instead of at a baseboard level. Base sensor and Lid sensor components are common across all boards Base Sensor - bits 0-2 Lid Sensor - bits 3-5 In addition, Sasuke uses bits 6-8 for usb superspeed mux Cret board uses bits 9-11 in coreboot for audio codec BRANCH=firmware-dedede-13606.B BUG=b:187694527 TEST=make buildall Signed-off-by: Parth Malkan <parthmalkan@google.com> Change-Id: Ib0f732e5d41668135ff180c545ff4bb6a1cb1427 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3021932 Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Marco Chen <marcochen@chromium.org>
* dedede: Enable CONFIG_ASSERT_CCD_MODE_ON_DTS_CONNECTRob Barnes2021-07-021-1/+1
| | | | | | | | | | | | | | | | | | Enable CONFIG_ASSERT_CCD_MODE_ON_DTS_CONNECT on all dedede boards. This will assert GPIO_CCD_MODE_ODL when a debug device is connected to a CCD port. GPIO_CCD_MODE_ODL must be configured as an open drain so EC and Cr50 don't drive fight. BUG=b:190189242 TEST=Build dedede BRANCH=None Change-Id: I2d71312967f2d4a693ac9753279f49478e8c092c Signed-off-by: Rob Barnes <robbarnes@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2976759 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Diana Z <dzigterman@chromium.org>
* keeby/dedede: Gate temp sensor access by GPIOAseda Aboagye2021-06-291-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | On dedede and keeby boards, the thermistors are powered by the EC's GPIO_EN_PP3300_A pin. If the thermistors are read before they are powered then the EC may force a thermal shutdown due to the bad reading. This commit simply defines CONFIG_TEMP_SENSOR_POWER_GPIO along with a CONFIG_TEMP_SENSOR_FIRST_READ_DELAY_MS to ensure we don't get any false positive thermal shutdowns. BUG=b:192053176 BRANCH=dedede TEST=Build and flash lalala. Unplug AC charger from DUT, press refresh+power button to reset DUT, verify that DUT boots up automatically. TEST=Repeat above test with madoo. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I2a49e2f896c4120a8f01f440ea22c9b3763c6589 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2988364 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* boten: add USB-A power enable and disableamber.chen2021-04-283-1/+10
| | | | | | | | | | | | | | | | | | Enable CONFIG_USB_PORT_POWER_DUMB for enabling/disabling charging from USB-A ports. This change also enables disables the USB1 low power limit by default BUG=b:182753927 BRANCH=dedede TEST=make -j BOARD=boten TEST=Run "test_that -b dedede firmware_ECUsbPorts" Signed-off-by: amber.chen <amber.chen@lcfc.corp-partner.google.com> Change-Id: I0d9721469cdd9744f24c36da3cf6d9185e46e630 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2852365 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Henry Sun <henrysun@google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* boten: don't disable charger adc in hibernate.arthur.lin2021-04-281-1/+1
| | | | | | | | | | | | | | Fix AC not detect issue when charger in hibernate. BRANCH=dedede BUG=b:186552718 TEST=make buildall -j Signed-off-by: arthur.lin <arthur.lin@lcfc.corp-partner.google.com> Change-Id: I913c6c4b656a30e953b6e327a4e38574687f6230 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2853690 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* LED On/Off: Make battery LED optionalDiana Z2021-04-221-4/+5
| | | | | | | | | | | | | | | Currently, all boards using the LED On/Off module have battery LEDs. However, if we'd like to expand support to Chromeboxes then the battery LED must become optional. BRANCH=None BUG=b:185508707 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ieae098829ebe6c8b103f23d5abdbf70e7bcbdf2d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832692 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* LED On/Off: Remove power LED configDiana Z2021-04-222-3/+2
| | | | | | | | | | | | | | | | | | | | | | Move the LED on/off module towards using a more flexible LED support approach. Define a weak power LED table and setter for boards to override when needed. Note that during run-time these functions will not get called since led_auto_control_is_enabled() will return false for nonexistent LEDs. This consumes an average of 165 additional bytes of flash space on boards which do not use a power LED. BRANCH=None BUG=b:185508707 TEST=make -j buildall, load on guybrush (battery LED only) and confirm no errors are seen. Load on Boten (both LEDs) and confirm behavior appears normal Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iaa1e22a7f5d8be39eb8792ee13d358087d7f7482 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2832691 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* dedede/raa489000: Enable ASGATE when sourcingAseda Aboagye2021-04-011-1/+5
| | | | | | | | | | | | | | | | | | | | With the previous change to disable the ASGATE from the charger side, this actually ended up breaking sourcing VBUS. This commit enables the ASGATE when we are attempting to source VBUS. BUG=b:183220414 BRANCH=dedede TEST=Build and flash madoo, plug in a Type-C sink, verify that VBUS is sourced. TEST=Verify that DUT can PR_Swap with peripheral. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I1938f2b827e57a04ef72e2ad35ad6ff29ce18712 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2795073 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* Reland "dedede/raa489000: Disable ASGATE from READY state"Aseda Aboagye2021-04-011-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a reland of f7fbc629f0655229cc7ffdadfb18c9e13118e3d2 Original change's description: > dedede/raa489000: Disable ASGATE from READY state > > On the boards which use the RAA489000, we keep the ADC enabled while > giving VBUS control to the charger side. This can cause a situation > where VBUS is not quite zero volts when a charger is removed. This > commit uses the charger side registers to control the ASGATE when > selecting our active charge port. This is done in addition to the > existing implementation which uses the TCPCI registers to control > ASGATE. When we place the parts into low power mode, we move the VBUS > control from the TCPC side of the IC to the charger side. It should > be safe to issue both commands as if the TCPC side has control, the IC > ignores the setting from the charger side registers. > > BUG=b:183220414 > BRANCH=dedede > TEST=Build and flash madoo, plug in charger to port, unplug, verify > that VBUS falls to < 200mV and decays from there. > > Signed-off-by: Aseda Aboagye <aaboagye@google.com> > Change-Id: I8e8c8cc32575d18c9d3d1210ed3c5cf69ad5ca4b > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2793058 > Tested-by: Aseda Aboagye <aaboagye@chromium.org> > Reviewed-by: Diana Z <dzigterman@chromium.org> > Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Bug: b:183220414 Change-Id: I36db53f3e13ba848308cd7e0c94a1b5a3551c600 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2797549 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* Add a common header for board_is_sourcing_vbus()Simon Glass2021-03-311-1/+0
| | | | | | | | | | | | | | | | This function prototype is defined in lots of files, none of which is visible to Zephyr. Add a prototype in one place and remove the others. BUG=b:183296099 BRANCH=none TEST=make buildall Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ia324327a69b117483ab9ee5c85eba93c0fb5ad9c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2789799 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Revert "dedede/raa489000: Disable ASGATE from READY state"Aseda Aboagye2021-03-311-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f7fbc629f0655229cc7ffdadfb18c9e13118e3d2. Reason for revert: Breaks sourcing of VBUS. Original change's description: > dedede/raa489000: Disable ASGATE from READY state > > On the boards which use the RAA489000, we keep the ADC enabled while > giving VBUS control to the charger side. This can cause a situation > where VBUS is not quite zero volts when a charger is removed. This > commit uses the charger side registers to control the ASGATE when > selecting our active charge port. This is done in addition to the > existing implementation which uses the TCPCI registers to control > ASGATE. When we place the parts into low power mode, we move the VBUS > control from the TCPC side of the IC to the charger side. It should > be safe to issue both commands as if the TCPC side has control, the IC > ignores the setting from the charger side registers. > > BUG=b:183220414 > BRANCH=dedede > TEST=Build and flash madoo, plug in charger to port, unplug, verify > that VBUS falls to < 200mV and decays from there. > > Signed-off-by: Aseda Aboagye <aaboagye@google.com> > Change-Id: I8e8c8cc32575d18c9d3d1210ed3c5cf69ad5ca4b > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2793058 > Tested-by: Aseda Aboagye <aaboagye@chromium.org> > Reviewed-by: Diana Z <dzigterman@chromium.org> > Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Bug: b:183220414 Change-Id: Ibf6c161adca9981a065e969b6c3b73dd408ef1ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2796411 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
* dedede/raa489000: Disable ASGATE from READY stateAseda Aboagye2021-03-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | On the boards which use the RAA489000, we keep the ADC enabled while giving VBUS control to the charger side. This can cause a situation where VBUS is not quite zero volts when a charger is removed. This commit uses the charger side registers to control the ASGATE when selecting our active charge port. This is done in addition to the existing implementation which uses the TCPCI registers to control ASGATE. When we place the parts into low power mode, we move the VBUS control from the TCPC side of the IC to the charger side. It should be safe to issue both commands as if the TCPC side has control, the IC ignores the setting from the charger side registers. BUG=b:183220414 BRANCH=dedede TEST=Build and flash madoo, plug in charger to port, unplug, verify that VBUS falls to < 200mV and decays from there. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I8e8c8cc32575d18c9d3d1210ed3c5cf69ad5ca4b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2793058 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* genvif: Use VIF overrides by defaultAbe Levkoy2021-03-301-0/+3
| | | | | | | | | | | | | | Use board-specific override files when generating VIFs for boards. BUG=b:172276715 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I197365018ceb8197c22d631cebf4cbce1c0119f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2785506 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* boten: To correct base sensor's X-axis and Y-axis settingreno.wang2021-03-231-1/+1
| | | | | | | | | | | | | | | | The base sensor's rotation matrix is wrong and cause CTS verifier get failure result. After correct it, CTS verifier can pass. BRANCH=boten BUG=b:182320815 TEST=Verify CTS-Verifier's GyroscopeMeasurementTestActivity and AccelerometerMeasurementTestActivity pass Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: Ic5e8070fb3e9a43ef4bd088977f98060b2147d57 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2780462 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* boten: remove CONFIG_SYSTEM_UNLOCKEDreno.wang2021-03-231-3/+0
| | | | | | | | | | | | | | It's used for final firmware. BRANCH=boten BUG=b:182751677 TEST=make buildall Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: I8a451b14d89d55e378c277fd4ac074da37e259ad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2772410 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Henry Sun <henrysun@google.com>
* boten: Optimize EC power consumptionreno.wang2021-03-183-14/+4
| | | | | | | | | | | | | | | | | | | | | From Boten HW circuit, some GPIO in EC side is NC or unused. So, we can configure it as NC to optimize EC power consumption. 1. HDMI_EN_SUB_ODL (GPE0) 2. EC_SUB_IO_1 (GPF0) 3. EC_SUB_IO_1 (GPL3 4. EC_SUB_ANALOG (GPL0/ADC13) BUG=b:182973699 BRANCH=boten TEST=make buildall Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: I98875455a04ae58deb4a70a73ed2c73aafac0fe7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2767060 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Henry Sun <henrysun@google.com>
* boten: Increase the length of Battery Model stringreno.wang2021-03-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Two of battery in boten have same former 7-character mode name, just like below, but the last character is different. 1. 42WHRS: L20M3PG2 2. 47WHRS: L20M30P0 Current EC code limit battery string to 7-character plug NULL. It cause "hwid probe" cannot know the difference. It also need toolkit to Add ectool_battery probe function as below link CL:2747636 b:181650356#comment24 BUG=b:181650356 BRANCH=dedede TEST=Test "ectool battery", "power_supply_info", "hwid probe" in VT2 and "battery" command ec console, ex. servo board. Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: Ieaf87424bce04f29eabd86e1b84f7692f3520e5e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748206 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* boten: add 500ms debounce for pen detect pinarthur.lin2021-03-173-3/+22
| | | | | | | | | | | | | | | | Add 500ms debounce for pen detect pin, and new gpio PEN_DET_PCH. BRANCH=dedede BUG=b:175083024 TEST=make buildall -j 1. Plug out pen and check system can wake from S3. Signed-off-by: arthur.lin <arthur.lin@lcfc.corp-partner.google.com> Change-Id: Ib4b8b8a83cceef5ca77372170ffcad1c4771ab96 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2748207 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Will Lee <wwlee@google.com>
* dedede/raa489000: Set LPM exit debounce to 100msAseda Aboagye2021-03-111-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | For some reason, when the RAA489000 TCPC exits low power mode, CC status doesn't appear changed when using a servo v4. This causes us to think no connection is present and immediately but the IC back into low power mode. If we wait 100ms before querying the CC status reg, it seems that then the right values are reported. This commit adds a workaround by setting the LPM exit debounce time to 100ms. BUG=b:182429150,b:181308089 BRANCH=dedede TEST=Build and flash a board, verify that servo v4 with an external charger is detected. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Ic0c2406fa20d0dad82adee865cd87c46d7126b9f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2752250 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* Boten: Reroute EC_ENTERING_RW to GPC7stabilize-rust-13836.B-mainstabilize-13836.B-mainreno.wang2021-03-062-1/+16
| | | | | | | | | | | | | | | Refer CL-2719104, adds a new gpio, EC_ENTERING_RW2 for boten. BUG=b:181801177 BRANCH=dedede TEST=make buildall Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: I1330525eae0e39ae84689b6e487b63bb34f80e18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2734058 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Henry Sun <henrysun@google.com>
* Boten: Enable CONFIG_CMD_ACCELS and CONFIG_CMD_ACCEL_INFO for CTSreno.wang2021-02-241-0/+2
| | | | | | | | | | | | | | | | | | 1. When running CtsSensorTestCases, sensors report no event. 2. Enable CONFIG_CMD_ACCELS and CONFIG_CMD_ACCEL_INFO for CTS sensor test. BUG=b:178754465 BRANCH=dedede TEST=make buildall, read sensor data via accelinfo, accelrate, and accelread on EC console. Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: I86702bb4efe3d3fb85dc4e0631ac62c7fab7ec00 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2717343 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Evan Green <evgreen@chromium.org> Commit-Queue: Evan Green <evgreen@chromium.org>
* Boten: Use cached Vbus presence for Vbus checkDiana Z2021-02-011-4/+1
| | | | | | | | | | | | | | | | Use the TCPCI driver cached Vbus presence when checking for Vbus. This avoids unnecessary TCPC wakes when tasks are querying our Vbus presence. BRANCH=None BUG=b:178173274 TEST=on boten, watch EC console and observe TCPC does not show repeated wakeups when C0 is in low power mode Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I1cf13c1fad95c559d1fa999852efd4c162a85be2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2665007 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Dedede: Add RAA489000 output current settingDiana Z2021-01-291-0/+8
| | | | | | | | | | | | | | | | | Boards using the RAA489000 TCPC should set output current on their ports through the TCPC driver. This commit adds a board function to do this for every dedede board currently using the RAA489000. BRANCH=None BUG=b:178064507 TEST=on madoo, verify OCP occurs if more than 1.5A is drawn on a non-PD port, verify register is set to allow 3.0A for port partners requesting that current in their sink capabilities Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ieb7df916c122d5de1adaa7371a58ad5cf2954ee4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2658377 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Madoo: Fix main board charger can't wake from hibernateKo_Ko2021-01-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | In madoo's design, there is a protection IC between USB connector and TCPC. When EC is hibernate, the CC lines will be disconnected, which cause the result that TCPC can't detect AC power and Chromebook won't wake the system. Enalbing ADC for all modes by setting 0x4C bit 0 to 1 (to be more precise is that we don't clear bit 0 during hibernation) can prevent issue mention above. BUG=b:174971576 BRANCH=dedede TEST=flash code and make sure ac in can wake system from hibernation Signed-off-by: Ko_Ko <Ko_Ko@compal.corp-partner.google.com> Change-Id: I2a83c69e34cbc4bfdff90d760f32817a7924dc26 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2626803 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Ko Ko <ko_ko@compal.corp-partner.google.com> Tested-by: Ko Ko <ko_ko@compal.corp-partner.google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Boten: Increase stack sizesDiana Z2021-01-151-4/+4
| | | | | | | | | | | | | | Align boten's stack sizes with those chosen for drawcia, as there is sufficient space. BRANCH=Dedede BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I01691c1739039e3f984a5ead09f48afbe4bc9955 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2628897 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Move tcpic.h header into include/driverSimon Glass2021-01-071-1/+1
| | | | | | | | | | | | | | | | | | This header cannot currently be accessed by Zephyr since it is in a driver directory, not an include directory. This header has quite a bit of public stuff in it, so it seems reasonable to consider everything public. Move the header file and update all users. BUG=b:175434113 BRANCH=none TEST=make buildall -j30 build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ibba37f47a06783fafb5095f853f2a68d92b6df87 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607745
* Boten: Add raa489000_hibernate() to reduce G3 power consumptionreno.wang2021-01-071-0/+9
| | | | | | | | | | | | | | | 1. Boten adopt RAA48900 charge/tcpc. 2. Add raa489000_hibernate() function to reduce power power consumption when system enter G3 state. BUG=b:175361186 BRANCH=dedede TEST=make buildall, the Boten's power consumption in G3 can be reduced. Signed-off-by: reno.wang <reno.wang@lcfc.corp-partner.google.com> Change-Id: Idc6f0447610e5e01220570b074ebf732e8f237aa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2610536 Reviewed-by: Diana Z <dzigterman@chromium.org>
* Boten: Correct EN_BL_OD gpio attributejerry2.huang2020-12-281-1/+1
| | | | | | | | | | | | | | | | | | | | | 1. EN_BL_OD should be configured as Open Drain, not Push Pull because this gpio has external pull up. 2. In failure condition, EC configure it as Push Pull, and its power leakage, pass to Panel, across CPU, then to PP3300_A. 3. EC monitor PP3300_A power rail by EC_VSNS_PP3300_A, and base on it to control EC_AP_DPWROK. 4. Due to incorrect voltage level, and cause wrong power-off state. BUG=b:174798347 BRANCH=dedede TEST=make buildall, verify panel power leakage pass Signed-off-by: jerry2.huang <jerry2.huang@lcfc.corp-partner.google.com> Change-Id: I54ab12b8a74996d859b963e59568b706da36a729 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2603093 Reviewed-by: Justin TerAvest <teravest@chromium.org> Commit-Queue: Justin TerAvest <teravest@chromium.org> Tested-by: Justin TerAvest <teravest@chromium.org>
* boten: modify LED function to match SPECamber.chen2020-12-281-1/+2
| | | | | | | | | | | | | | | | modify LED function to match LED SPEC BUG=b:174806640 BRANCH=dedede TEST=make -j BOARD=boten Signed-off-by: amber.chen <amber.chen@lcfc.corp-partner.google.com> Change-Id: Id9e6e990e264b8bf1013cc49368ed100a1692ff8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2603085 Tested-by: Justin TerAvest <teravest@chromium.org> Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Justin TerAvest <teravest@chromium.org> Commit-Queue: Justin TerAvest <teravest@chromium.org>
* TCPMv2: Update source-out configsDiana Z2020-12-241-10/+0
| | | | | | | | | | | | | | | | | | | | Now that the DPM will be handling source-out decisions for TCPMv2, remove references to its old configuration options from TCPMv2 boards in order to avoid any confusion as to what code is running now. Also remove the charge manager notifications of sink attach/detach since the policy is being centralized into the DPM. Note that the previous configuration options only ever allocated one 3.0 A port, and so the default number of 3.0 A ports has been set to 1. BRANCH=None BUG=b:168862110,b:141690755 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ie452e3da32b04226503539daa67b6b9f4a58aa58 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2597431 Reviewed-by: Keith Short <keithshort@chromium.org>
* Boten: Share interrupt lines more gracefullyjerry2.huang2020-12-212-2/+42
| | | | | | | | | | | | | | | | | | | | | 1.Set up checking for interrupt line wedging, which may occur when interrupts from the charger/TCPC occur with similar timing to the BC 1.2 interrupts. 2.Enable TCPC dump BUG=b:175526824 BRANCH=firmware-dedede-13606.B-master TEST=make buildall, test multiple DUT-DUT connections and ensure neither system wedges its interrupt line low Signed-off-by: jerry2.huang <jerry2.huang@lcfc.corp-partner.google.com> Change-Id: I98ca5a347b47bf6fcbbd6ed27a203a3f0a33ca35 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2598299 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* boten: fix FAFT test item firmware_ECChargingStateamber.chen2020-12-161-1/+1
| | | | | | | | | | | | | | | | | modify for FAFT test item firmware_ECChargingState fail to make sure the charging state will be 0 or 1 BUG=b:160097052 BRANCH=firmware-dedede-13606.B-master TEST=make -j BOARD=boten test_that -b dedede IP firmware_ECChargingState Signed-off-by: amber.chen <amber.chen@lcfc.corp-partner.google.com> Change-Id: I17a65f80d6b4434607a11c1ca80716eaa290ad64 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2589146 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* task_set_event: remove the wait argumentDawid Niedzwiecki2020-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | There is an option in the task_set_event function which force the calling task to wait for an event. However, the option is never used thus remove it. This also will help in the Zephyr migration process. BUG=b:172360521 BRANCH=none TEST=make buildall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ic152fd3d6862d487bcc0024c48d136556c0b81bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2521599 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org>
* boten: fine tune motion sensor matricesjerry2.huang2020-11-251-3/+3
| | | | | | | | | | | | | | | fine tune lid and base accel sensor matrices BUG=b:172290264 BRANCH=none TEST=buildall, check the sreen rotation degree is correct on tablet mode and desktop mode Signed-off-by: jerry2.huang <jerry2.huang@lcfc.corp-partner.google.com> Change-Id: I5e3ba275484dc2ecc178ef114cc27c9dc6392745 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2556731 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* dedede/raa48900 boards: Apply 4% ICL reductionAseda Aboagye2020-11-201-2/+3
| | | | | | | | | | | | | | | | | | The RAA48900 charger IC seems to over draw its contract by roughly 4%. This commit simply modifies our input current limit to account for that. BUG=b:147463641 BRANCH=dedede TEST=Build and flash waddledoo, verify that input current limit is reduced and is under the contract. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I70ab15ea24d789a7a1696217efae784f537ca014 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548692 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* boten: add motion sensor interrupt config and matricesjerry2.huang2020-11-132-3/+18
| | | | | | | | | | | | | | | Add config for boten motion sensor's interrupt and matrices for rotate BUG=b:172290264 BRANCH=none TEST=buildall, flash ec to dut and boot to check the ectool command motionsense work normally. Signed-off-by: jerry2.huang <jerry2.huang@lcfc.corp-partner.google.com> Change-Id: I89e3f5d1c5e460ed26126c5d0489afde7c7843f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2515430 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* boten: enable stylus chargingjerry2.huang2020-10-082-1/+10
| | | | | | | | | | | | | | boten has garage stylus, this patch enables stylus charging when stylus present. BUG=b:155615390 BRANCH=none TEST=make buildall -j Signed-off-by: jerry2.huang <jerry2.huang@lcfc.corp-partner.google.com> Change-Id: I601bb9c746774f3a410f83f322706ef4fb225830 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2455786 Reviewed-by: Justin TerAvest <teravest@chromium.org>
* Dedede: Remove DAC for boards using ITE+SM combinationDiana Z2020-09-281-0/+3
| | | | | | | | | | | | | | | For boards which are using the SM charger chips, they will have a Psys offset register to generate the OCPC Psys output. BRANCH=None BUG=b:168783892 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ib963ed11f73a76dfeffa11d5ab4a81ccbbd71102 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2435746 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* boten: Modify battery parametersjerry2.huang2020-09-281-5/+5
| | | | | | | | | | | | | | | | | | Modify battery parameters: 1.SMP:precharge_current to 256,start_charging_max_c to 50 2.LGC:precharge_current to 256 3.SUNWODA:precharge_current to 186, start_charging_max_c to 50 BUG=b:167264077 BRANCH=none TEST=make buildall -j Signed-off-by: jerry2.huang <jerry2.huang@lcfc.corp-partner.google.com> Change-Id: I37dbcc176d22988a47fba5b59d82b3b3e2eb6b68 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2435169 Reviewed-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com> Tested-by: Henry Sun <henrysun@google.com>
* Dedede: Remove unnecessary RSMRST_PWRGD_L pull-upDiana Z2020-09-241-1/+1
| | | | | | | | | | | | | | | | There is an external pull-up on this signal, and so the EC pull-up is unnecessary and may cause an intermediate voltage when the system enters G3. BRANCH=None BUG=b:169179804 TEST=make -j buildall, boot to S0 on drawlat Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I82a513777018eb9a6cd86450612a5c943d7bd357 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2429385 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Dedede: Define GPIO_USB_C1_INT_ODL for all variantsDiana Z2020-09-091-0/+3
| | | | | | | | | | | | | | | | | Naming for the C1 interrupt line varies slightly between variants due to schematic name differences, and version or functional differences. This change ensures all boards have GPIO_USB_C1_INT_ODL defined for baseboard code to reference. BRANCH=None BUG=b:153684907 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I9303be2f9f142eed249da4f2f5e660985ceb7fdd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2391213 Tested-by: Divagar Mohandass <divagar.mohandass@intel.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Dedede: Move Discharge on AC config to baseboardDiana Z2020-08-271-1/+0
| | | | | | | | | | | | | | | | Now that the SM5803 has support for discharge on AC, move this configuration into the baseboard. BRANCH=None BUG=b:164256610 TEST=on drawlat with a charger in C0, ensure "ectool chargecontrol discharge" shows battery discharging and "ectool chargecontrol normal" shows battery charging again. Repeat on C1 Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ib058095330481fc4aa2f1016ccec6c77b047d8f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2376467 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Dedede: Move PWM to board levelDiana Z2020-08-211-0/+3
| | | | | | | | | | | | | | | | Move the PWM related defines and arrays into the board level, to allow customization of what PWM channels boards use (if they choose to use the PWM at all). BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Id417a7be079511c17de9f2e5d03c729467435804 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2358899 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Revert "power: Clear AP_IDLE when waking up by PB or LID"Daisuke Nojiri2020-08-011-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 27ee378bb78a299a0983379be83eb6d55860b4ae. Reason for revert: b/162508724 A wake-up source from hibernation needs to be determined only by RO. Reverting back to the original implementation: CL:2236589. Original change's description: > power: Clear AP_IDLE when waking up by PB or LID > > Currently, AP_IDLE is cleared when EC wakes up by the power button or > the lid open. > > This patch extends the logic from CONFIG_EXTPOWER_GPIO to > CONFIG_EXTPOWER so that the bug (chromium:1073960) can be also fixed > on the boards using non-GPIO method for extpower_is_present. > > Tested as follows on Trembyle: > 1. Put DUT in hibernation. > 2. Wake up DUT and observe: > a. When waking up by power button, AP is turned on. > b. When waking up by lid open, AP is turned on. > c. When waking up by AC, AP is left idle. > > BUG=b:157077589, chromium:1073960, b:159350276 > BRANCH=none > TEST=See above. > > Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> > Change-Id: I944aaac036ce58659e81b7021e52a3291f31e951 > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2283946 > Reviewed-by: Jett Rink <jettrink@chromium.org> Bug: b:157077589 Bug: chromium:1073960 Bug: b:159350276 Bug: b:162508724 Change-Id: Iaf9d0af2ca8c48bbf2529c4ba05493837dd76287 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2333106 Tested-by: Daisuke Nojiri <dnojiri@chromium.org> Auto-Submit: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Daisuke Nojiri <dnojiri@chromium.org>
* Dedede: Move extpower_is_present() to baseboardDiana Z2020-07-281-5/+0
| | | | | | | | | | | | | | | | | | | | This consolidates dedede boards to use a baseboard extpower_is_present() and also adds the condition to verify that the port is sinking, instead of providing Vbus. It also converts the RAA489000 boards to use the cached Vbus presence in pd_snk_is_vbus_provided(). BRANCH=None BUG=None TEST=on waddledoo and waddledee, verify "AC on" prints when a charger or charge-through servo v4 is plugged in, verify no "AC on" prints when a dongle is plugged in Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I5941da789a4e810f6d8cc40cef4d32a5a03c5662 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2317062 Tested-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* boten: define power and battery led behaviorxiong.huang2020-07-153-65/+98
| | | | | | | | | | | | | | | | Boten uses two types LED, battery LED and power LED. Battery LED uses dual-color LED, green and red. Power LED uses monochrome LED, white. BUG=b:160664441 BRANCH=none TEST=`ectool led battery red/amber/green/off` and `ectool led power white/off` work well. Cq-Depend: chromium:2296544 Signed-off-by: xiong.huang <xiong.huang@bitland.corp-partner.google.com> Change-Id: I6fb87d841ce837ebdc256154dc4b8557f6ed0401 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2282740 Reviewed-by: Diana Z <dzigterman@chromium.org>