summaryrefslogtreecommitdiff
path: root/board/waddledoo
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-1344/+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>
* led_pwm: split color map on a separate structureFabio Baltieri2021-09-211-1/+1
| | | | | | | | | | | | | | | | Currently color map is reusing the same structure as the channel and callback selection, which is a bit wasteful and somewhat confusing. Split it to its own struct with just three uint8_t fields. BRANCH=none BUG=none TEST=build only Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I56992fa9525db46980e450eb6569ba8291987b9b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3168864 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Yuval Peress <peress@google.com>
* waddledoo: disable console commands to save spaceBoris Mittelberg2021-08-101-0/+4
| | | | | | | | | | | | | Disabling accelspoof and battfake EC console commands BRANCH=main,dedede BUG=none TEST=make -j BOARD=waddledoo Signed-off-by: Boris Mittelberg <bmbm@google.com> Change-Id: Ib4f93185e6f4b63099ea7d600037b03fc306a56d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078052 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Waddledoo: Free up flash spaceDiana Z2021-08-051-0/+2
| | | | | | | | | | | | | | | Waddledoo is down around 200 bytes, so free up 7k in free flash space for it. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I53b463c42f50d1f53d696af5ea30f848593779ac Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3072870 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>
* waddledoo: Removes TCPC dump console commandDaisuke Nojiri2021-06-251-1/+0
| | | | | | | | | | | | | | This patch removes the TCPC dump console command to create ROM space. BUG=None BRANCH=None TEST=make BOARD=waddledoo Change-Id: I85d3c652b8ffb2fe15cd4d9e12bcb38f030caae5 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2986847 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* dedede/raa489000: Enable ASGATE when sourcingAseda Aboagye2021-04-011-0/+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/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2/+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-6/+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/+6
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* 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>
* magolor and friends: Adjust OCPC PID constantsAseda Aboagye2021-02-171-19/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | Thus far, it seems that boards that use the same OCPC PID constants behave similarly. Therefore, this commit updates the constants that were most recently used on madoo to the other OCPC boards that use the same charger IC such that the behaviour meets the criteria at go/ocpc-testing. - Converges around the target current. - Average steady state error is less than 4% of target. - Current is reduced to target level in less than 5s when load is suddenly released. BUG=None BRANCH=dedede TEST=Build and flash magolor. Verify that battery can charge to 100%. Verify that it meets or exceeds the constraints above. TEST=Verify that DUT can come out of battery cutoff from sub board. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I206854c097c307b941a64547f9b74c8259a7d499 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2691585 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>
* 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>
* dedede: Add MKBP_EVENT to baseboardEvan Green2021-01-261-3/+0
| | | | | | | | | | | | | | | | | | CtsSensorTestCases is failing on Drawcia because it requests 100 events from accelerometer and gyroscope but gets zero. We can read sensor events just fine, but they never seem to push to the kernel. Add CONFIG_MKBP_EVENT into the baseboard, and then clean up all the one-off variants that have added this themselves. Also, add some accel commands specific to drawcia for easier debugging. BUG=b:171939568 BRANCH=none TEST=Use amstan's script, which amounts to cat /dev/iio:deviceN Signed-off-by: Evan Green <evgreen@chromium.org> Change-Id: Ia796ec2f9a08d3628dcabb4b5fca425693af4099 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2638636 Reviewed-by: Diana Z <dzigterman@chromium.org>
* config: Provide default VCONN Swap delayAbe Levkoy2021-01-221-0/+1
| | | | | | | | | | | | | | | | | Almost every relevant board copy-pastes 5000 us. Make that the default and get rid of the redundant definitions. This is the approximate result of this command: find . -type f -name *.h | xargs sed -i -E \ '/#define CONFIG_USBC_VCONN_SWAP_DELAY_US[[:space:]]+5000[[:space:]]/d' BUG=b:144165680 TEST=make buildall BRANCH=none Change-Id: Ife86f9752971abcd7ab5ad5a5e607eb2ccbde2ba Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2628132 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* config: Make VCONN Swap delay a documented optionAbe Levkoy2021-01-221-2/+2
| | | | | | | | | | | | | | | | | | | | | Replace PD_VCONN_SWAP_DELAY with CONFIG_USBC_VCONN_SWAP_DELAY_US. This is the approximate result of the following command, run from platform/ec: find . -type f -\( -name '*.c' -o -name '*.h' -\) | \ xargs sed -iE 's/PD_VCONN_SWAP_DELAY/CONFIG_USBC_VCONN_SWAP_DELAY/g' Fix some latent formatting errors in usb_pd_protocol.c, because they were preventing pre-upload hooks from passing. BUG=b:144165680 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Icaf3b309c08fdcd162e960cf5dc88185016b5d2d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2628131 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Madoo: Fix main board charger can't wake from hibernateKo_Ko2021-01-221-2/+2
| | | | | | | | | | | | | | | | | | | | | | | 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>
* waddledoo: Add guards for 5V GPIO remapAseda Aboagye2021-01-131-14/+19
| | | | | | | | | | | | | | | | | | | | | Early versions of waddledoo had to have their 5V GPIO remapped between versions. As variants of waddledoo are created, they end up copying the same code which is not applicable to their board. This commit restricts the remap to the waddledoo board only. BUG=None BRANCH=dedede TEST=Copy code to a waddledoo variant, verify that board builds and 5V still works. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I6de5ffc9bf7eb5d35f5778cc2c798519af3b18c9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2625794 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* waddledoo: Check Type-C interrupt lines at initAseda Aboagye2021-01-061-11/+4
| | | | | | | | | | | | | | | | | | After a sysjump, it could be possible that the Type-C interrupt lines are asserted. This commit simply has the EC check the interrupt lines after init and handle them if necessary. BUG=b:143166332 BRANCH=dedede TEST=`make -j BOARD=waddledoo` Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I16eef9827ca37cec4b04442a50352795b9652592 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2601777 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@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>
* task_set_event: remove the wait argumentDawid Niedzwiecki2020-12-141-2/+2
| | | | | | | | | | | | | | | | | | | | 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>
* Waddledoo: Share interrupt lines more gracefullyDiana Z2020-12-101-11/+70
| | | | | | | | | | | | | | | | | 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. BRANCH=dedede BUG=b:143166332 TEST=on waddledoo, test multiple DUT-DUT connections and ensure neither system wedges its interrupt line low Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Id36de654c6af5c22801e3dee9446e35bf32cf63e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576452 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Waddledoo: Reduce flash usageDiana Z2020-12-081-0/+1
| | | | | | | | | | | | | | Define CONFIG_DEBUG_ASSERT_BRIEF for waddledoo to save flash space. BRANCH=dedede BUG=None TEST=make -j buildall; observe waddledoo is back over 2k free flash Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I90223c6c46067aa23dd9722377cbaf3202a32e52 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576451 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@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>
* waddledoo: Fix VBUS and VCONN timingsAseda Aboagye2020-11-201-0/+9
| | | | | | | | | | | | | | | | | VBUS and VCONN transition times were measured therefore this commit is simply updating these values. BUG=b:147314141 BRANCH=dedede TEST=Build and flash waddledoo, verify that PD peripherals still work ok including power role swaps. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I86654981e0a44345c273efce3d50068d8419432b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548690 Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* Waddledoo: Define CONFIG_CHIP_INIT_ROM_REGIONDiana Z2020-11-171-4/+7
| | | | | | | | | | | | | | | | Waddledoo is almost out of space on ToT, so move the init data region to free up some flash. BRANCH=None BUG=None TEST=make -j buildall; see that we report 1.6k free flash space for Doo now Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I9eb713777c9767475933a603dd57e88fa33ea46a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2540388 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Dedede: Leave 5V on when jumping in S5Diana Z2020-10-081-1/+2
| | | | | | | | | | | | | | | | PP5000_U shouldn't be turned off until G3, so if a sysjump occurs during S5 leave this rail on. BRANCH=None BUG=b:166787955,b:167996216 TEST=on drawcia, run full resets with a forced sysjump in S5 and ensure that the DUT can get to S0 after the reset Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I00fb44903aa109bbc525fb512ab4035a94649c68 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2458841 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Dedede: Remove VSYNC sensorDiana Z2020-09-233-16/+0
| | | | | | | | | | | | | Remove VSYNC sensor, and related GPIOs and configs. BRANCH=None BUG=b:169056723 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ib37e648ea04b5da3ed9ce6a660fcd60f2bfe264a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2424891 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Dedede: Define GPIO_USB_C1_INT_ODL for all variantsDiana Z2020-09-091-0/+8
| | | | | | | | | | | | | | | | | 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>
* Revert "Waddledoo: Add thermistors"Sooraj Govindan2020-09-092-27/+0
| | | | | | | | | | | | | | | | This reverts commit e834efc7488bc98211084f54fad9da9b584daec1. Reason for revert: DUT fails to enter G3 state on shutdown BUG=b:164202851, b:163486924 BRANCH=None TEST=Verify DUT entering into G3 after shutdown. Change-Id: I67876ec7ed22526770ac38e261b5b1903bcb6476 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2397934 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>
* WADDLEDOO: Use common battery codeSam Hurst2020-08-272-90/+65
| | | | | | | | | | | | | | | Use common battery fuel gauge code BRANCH=none BUG=b:152067066 TEST=make -j buildall Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I25a97614e6ba5dc601812f59739bd9cb7ce572e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2283852 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-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>
* waddledoo/magolor: Add check for CFET disabledAseda Aboagye2020-08-261-0/+14
| | | | | | | | | | | | | | | | | This commit adds the function to check whether the charge FET (CFET) is disabled or not for waddledoo and magolor. BUG=b:160918663 BRANCH=None TEST=`make -j buildall` Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I843d3a2d25c42d861ac86964a3e0ec8d557d97f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2370043 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>
* Dedede: Move PWM to board levelDiana Z2020-08-212-0/+28
| | | | | | | | | | | | | | | | 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>
* waddledoo: Configure unused GPIOs as inputsBrian J. Nemec2020-08-191-0/+12
| | | | | | | | | | | | | | | | | Configure unused GPIOs as inputs to save power in deep sleep states. BUG=b:162318932 BRANCH=none TEST=make buildall TEST=flash waddledoo put device into S0iX or other low power state measure system and EC power consumption Signed-off-by: Brian Nemec <bnemec@chromium.org> Change-Id: Ie29c15d1c4947fe3d6665c66df476ac6b9ed943d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2358903 Reviewed-by: Evan Green <evgreen@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* Waddledoo: Add thermistorsSooraj Govindan2020-08-112-0/+27
| | | | | | | | | | | | | | | | This change adds temperature sensors for waddledoo. BUG=b:163486924 BRANCH=None TEST=Verify console "temps" can read temperature. Check ectool tempsinfo all and ectool temps all. Signed-off-by: Sooraj Govindan <sooraj.govindan@intel.com> Change-Id: Icce66d8b57af7932a9737d8d74a2d2139ba82371 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2348744 Tested-by: Sooraj Govindan <sooraj.govindan@intel.corp-partner.google.com> Reviewed-by: Justin TerAvest <teravest@chromium.org> Commit-Queue: Justin TerAvest <teravest@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-10/+1
| | | | | | | | | | | | | | | | | | | | 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>
* Waddledoo: Only set HDMI enable when HDMI DB is presentDiana Z2020-07-161-2/+4
| | | | | | | | | | | | | | When HDMI DB isn't present, the HDMI enable line is the SCL line for DB i2c and shouldn't be changed. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I0146d31c6a1ae0bacd7475fb923f52ad4ac0764f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2300685 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* boten: split CONFIG_LED_PWM out into boardsxiong.huang2020-07-151-0/+1
| | | | | | | | | | | | | It will be happy to define LED behavior in boards. BUG=b:160664441 BRANCH=none TEST=make buildall -j4 Signed-off-by: xiong.huang <xiong.huang@bitland.corp-partner.google.com> Change-Id: Ib81fe8d20fa3ab74064958fba3576a1618635e52 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2296544 Reviewed-by: Diana Z <dzigterman@chromium.org>
* dedede: Move adc channel to board variantDevin Lu2020-07-141-0/+33
| | | | | | | | | | | | | | Dedede family may have different temp sensors for other ADCs channel. This patch moves adc channel to board variant. BUG=none BRANCH=none TEST=make buildall -j Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Id34a924fc9431a553a1467068c6ccee6111102bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2289478 Reviewed-by: Diana Z <dzigterman@chromium.org>
* Waddledoo: Enable HDMI daughterboardDiana Z2020-07-134-22/+103
| | | | | | | | | | | | | | | | | | | | | Sub-board GPIOs are connected to different signals when the HDMI daughterboard is attached. This change uses the CBI FW_CONFIG field to determine if the HDMI DB should be present, and re-configures the GPIO modules and flags accordingly. This change also switches waddledoo to use the run-time determination for maximum type-c ports. BRANCH=None BUG=b:155963446 TEST=on waddledoo with type-c DB, C1 still works on waddledoo with HDMI DB and FW_CONFIG set to 0x0003 HDMI plug-ins are detected and the USB-A port functions Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ie093706e3bf515efa53223aec761714062f2f427 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2274993 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Charger: Add dynamic charger chip countDiana Z2020-07-111-1/+0
| | | | | | | | | | | | | | | | Different DB options may cause different numbers of charger chips to be present on the system. Remove constant count for charger chips, and instead always call into the overridable function to query the count. BRANCH=None BUG=b:155963446 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I0e65b8af351ecabe6f7b823e0e56f1932cc280a6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2277833 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* DEDEDE: Increase board PD stack sizesSam Hurst2020-07-071-4/+4
| | | | | | | | | | | | | Increase dedede board PD stack sizes to prevent overflow. BRANCH=none BUG=b:155813111 TEST=make -j buildall Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I061bf8e53c0f2dfe8ca5617f562bd99ed510d467 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2283693 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* boten: use charger/TCPC RAA48900xiong.huang2020-06-141-0/+10
| | | | | | | | | | | | | | | 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>
* boten: remove DB type-C port and peripheral chipsxiong.huang2020-06-111-0/+7
| | | | | | | | | | | | | | | | | 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>