summaryrefslogtreecommitdiff
path: root/board/drawcia
Commit message (Collapse)AuthorAgeFilesLines
* board/drawcia/board.h: Format with clang-formatJack Rosenthal2022-07-071-2/+3
| | | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Tricium: disable Change-Id: I5dcfb3c1e34c451fadffd39f3664e96bf7601a5c Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749377 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* board/drawcia/usb_pd_policy.c: Format with clang-formatJack Rosenthal2022-07-011-2/+2
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I27e48e62e115de5845a530e18b21cd4197846268 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728255 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* board/drawcia/cbi_ssfc.c: Format with clang-formatJack Rosenthal2022-07-011-2/+2
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: Id8afbe92e64b7d16586dda803072eaf2c50772c6 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728253 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* board/drawcia/cbi_ssfc.h: Format with clang-formatJack Rosenthal2022-07-011-1/+0
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: Ie4c404ae4b0392f4fedf6f530b2bedaa81bfa84a Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728254 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* board/drawcia/board.c: Format with clang-formatJack Rosenthal2022-07-011-96/+80
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: Ic28a8b310785831a604b5cd1fc210deccb12c46a Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728237 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* board/drawcia/board.h: Format with clang-formatJack Rosenthal2022-06-281-22/+18
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: If1686339566fa82edbc8db8b3aa1feae1bef1b81 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728252 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* board/drawcia/led.c: Format with clang-formatJack Rosenthal2022-06-281-12/+9
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I0430ed3b68ed206c3bb6e8d812a475184c25ef4f Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728238 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* usbc: wrap task_set_event to have an explicit port argumentFabio Baltieri2022-05-271-2/+2
| | | | | | | | | | | | | | | | | Define an explicit function to set events for the usb charger tasks, so that the caller is not coupled to the internal task implementation, and we can use a single task on a later patch. BRANCH=none BUG=b:226411332 TEST=make buildall TEST=zmake testall TEST=cq dry run Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I7a1223642b800568bf4f9864f75b2b647c84d29f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3663746 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* board/baseboard: Remove ACCEL_INTERRUPTSGwendal Grignou2022-05-231-1/+0
| | | | | | | | | | | | | | Use a finer grain set of define, to allow some sensors to use interrupt when wired properly and some use force mode when not using interrupt. BUG=b:230401133 BRANCH=asurada,dedede,brya TEST=Build all. Check Zephyr with herobrine. Check on bugzzy. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: I9c7d50b88a0eaec017f4e5e2ccfdb80761d71fb3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3609121 Reviewed-by: Yuval Peress <peress@google.com>
* drawcia: Add SSFC field for 2nd source LID accel sensorDevin Lu2022-03-043-2/+42
| | | | | | | | | | | | | | This patch adds SSFC field to support the 2nd source LID accel sensor. BUG=b:222020163 BRANCH=none TEST=On Drawcia. Set SSFC and make sure the LID sensor works normally. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ia326dcf39fb78ed1d1f7432753020d09a502cb79 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3499960 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* gpio: cleanup header usage for chipset taskKeith Short2022-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | chipset.h only requires the enum gpio_signal, so use gpio_signal.h instead of gpio.h. The build doesn't compare due to an ASSERT() call in throttle_ap.c after the number of lines increased by 1. From prochot_input_deferred() before the change: 1009b592: 2158 movs r1, #88 ; 0x58 1009b594: f7fd ff76 bl 10099484 <panic_assert_fail> After the change 1009b592: 2159 movs r1, #89 ; 0x59 1009b594: f7fd ff76 bl 10099484 <panic_assert_fail> BUG=b:218856245 BRANCH=none TEST=compare_build.sh Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I30dcdec6985d51279512c25889f03b5f9b1955e9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3489093 Reviewed-by: Tristan Honscheid <honscheid@google.com>
* TCPM: Change the PS8xxx I2C flags name to match the driverSam Hurst2022-02-101-2/+2
| | | | | | | | | | | | | | | | Change the PS8xxx I2C flags name from PS8751_I2C_ADDR to PS8XXX_I2C_ADDR. BRANCH=main BUG=b:194432779 TEST=make -j buildall Signed-off-by: Sam Hurst <shurst@google.org> Change-Id: Ie8ac1c922c46bb425b7e7b1a39173872d48f6353 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3449669 Tested-by: Sam Hurst <shurst@google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com> Commit-Queue: Sam Hurst <shurst@google.com>
* motion_sensor: Remove |int_signal| fieldGwendal Grignou2021-12-141-4/+0
| | | | | | | | | | | | | | | | | | | | | |int_signal| was used to check interrupt signal to protect from interrupt coming while processing FIFO. Instead, use loop until all FIFO samples are processed, as used in linux kernel sensor fifo routine. [See for example see st_lsm6dsx_handler_thread() in driver/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c]. BUG=b:207055975,b:129159505 BRANCH="asurada atlas chameleon dedede drallion endeavour fpmcu grunt hatch icarus kalista keeby kukui mistral nami nocturne octopus poppy puff quiche rammus sarien trogdor volteer zork" TEST=testall, both cros_ec and zephyr. Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Change-Id: I3cfd63c73a7361522ddf42a686dcffdac38d8741 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3328808 Reviewed-by: Diana Z <dzigterman@chromium.org>
* drawcia: Don't report HDMI_HPD to CPU when power state S5Tommy Chung2021-12-031-3/+32
| | | | | | | | | | | | | | | | | | | | Since PP5000_HDMI is enabled by EN_PP5000_U, which means that it's still turned on when power state S5, VOLUP_BTN_ODL_HDMI_HPD will be asserted when HDMI is plugged in. If we report this to CPU through EC_AP_USB_C1_HDMI_HPD, there will be leakage current on CPU side which might lead to unabling to power on the system. BUG=none BRANCH=dedede TEST=make sure that EC_AP_USB_C1_HDMI_HPD is deasserted when power state S5 and HDMI plugged in, while it can work when system resume. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I67d1af60b74343611e0ca6f54773216cf4caa895 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3306791 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* tree: Fix LED enum typeTom Hughes2021-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | "enum ec_led_colors" was used here instead of "enum led_color". Fixes the following clang warning: error: implicit conversion from enumeration type 'enum led_color' to different enumeration type 'enum ec_led_colors' [-Werror,-Wenum-conversion] This is the same fix as commit 533640b6d2ce1189b8c0559ec69e1d64202d2c8b, but this should fix all instances. These usages were found with: git grep --name-only 'enum led_color' | xargs grep ec_led_colors As indicated by the TEST line, all boards match with this change, except for bloog since it uses the incorrect enum in two places. BRANCH=none BUG=b:172020503 TEST=CC=arm-none-eabi-clang BOARD=<affected board> TEST=./util/compare_build.sh -b all -j 120 => All match except bloog Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I75cff3769d5b3b82b9218bfb8584f449fb6a781f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3203936 Reviewed-by: 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>
* 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-9/+9
| | | | | | | | | | | | | | | 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>
* 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>
* drawcia: Add battery ATL GB-S20-4473A9-01H&020HTommy Chung2021-06-222-0/+34
| | | | | | | | | | | | | BUG=b:191726915 BRANCH=dedede TEST=Make sure battery charging, battery cutoff works. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: Ie5895499df9baea80b5966736c6d42a504ad68b1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2977863 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Diana Z <dzigterman@chromium.org>
* drawcia: Update fw_config_dbTommy Chung2021-05-261-6/+12
| | | | | | | | | | | | | | | | Update fw_config_db to meet cbi_fw_config table on drawcia. BUG=b:186393848 BRANCH=dedede TEST=on drawcia, make sure that all DB configs act correctly. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I1d123f6119911840f3ffae9d3746820ca3e5511d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2902071 Reviewed-by: Henry Sun <henrysun@google.com> Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Henry Sun <henrysun@google.com>
* Drawcia: Move C1 SM5803 processing to the PD_INT taskDiana Z2021-04-061-1/+15
| | | | | | | | | | | | | | | | Since the SM5803 shares an interrupt line with the TCPC, allow the PD_INT task for C1 to process interrupts for this chip. This will ensure that any interrupts from the charger are handled at a high priority and cannot leave the shared IRQ line low for extended periods. BRANCH=None BUG=b:182534117,b:173056845 TEST=on drawcia, confirm charger attach to C1 works reliably Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I6670c62ca6d59fc3f5db4151cf7142b2da1fec38 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2803462 Reviewed-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>
* 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>
* draw*: Add GPIO_EC_ENTERING_RW2Aseda Aboagye2021-02-252-0/+16
| | | | | | | | | | | | | | | | | | | This commit adds a new GPIO, GPIO_EC_ENTERING_RW2 which does the same thing as GPIO_EC_ENTERING_RW. However, it's on a pin that's more well behaved around init time. This commit also overrides the board_pulse_ec_entering_rw() function such that both lines can be pulsed. BUG=b:180965428,b:181051734,b:181085178 BRANCH=dedede TEST=Build and flash draw*, verify it boots. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Ia9cfba97b8fcad5975e412523686a7ba53ea7399 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2719104 Reviewed-by: Diana Z <dzigterman@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org>
* drawcia: Set gyroscope translation matrixEvan Green2021-01-261-1/+1
| | | | | | | | | | | | | | | | | | CTS tests are failing because sensor values from axis 1 and 2 are negated. When the test expects 360 degrees, -360 degrees gets reported. Set the standard base translation matrix to resolve this. BUG=b:175996778 TEST=Try CTS BRANCH=None Signed-off-by: Evan Green <evgreen@chromium.org> Change-Id: I9ede658cef042caf72b81d08e4c47de4c7b5e820 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2648730 Tested-by: Kazuhiro Inaba <kinaba@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org> Commit-Queue: Kazuhiro Inaba <kinaba@chromium.org>
* dedede: Add MKBP_EVENT to baseboardEvan Green2021-01-261-0/+3
| | | | | | | | | | | | | | | | | | 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>
* drawcia: Check pen detection on initDevin Lu2021-01-131-0/+4
| | | | | | | | | | | | | | | | | 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. BUG=none BRANCH=firmware-dedede-13606.B-master TEST=On Drawcia, Resume from battery cutoff. Make sure stylus is charging. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I2bdc3bf028d466ad1b6e391fdb6ee7ec9d00cb6a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2626787 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: 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
* 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>
* drawcia: Increase task stack sizesAseda Aboagye2020-12-141-4/+4
| | | | | | | | | | | | | | | | | | | After running the analyzestack target, I noticed that some of drawcia's stack usage may exceed the currently defined sizes. This commit simply increases those that were under the usage shown by the tool. BUG=None BRANCH=dedede TEST=Build and flash drawlat, verify that new task stacks sizes are present and that there is plenty of free RAM left. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I813ffe2463f9bece5047a9a633db22f2e1c61fa4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2587794 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* drawcia: Update OCPC PID constantsAseda Aboagye2020-12-101-2/+2
| | | | | | | | | | | | | | | | | | | | | This commit updates the PID constants for drawcia to help minimize the overshoot and to decrease steady state error more quickly. BUG=b:174167890 BRANCH=dedede TEST=Build and flash drawlat; verify that at low SOC, charging from the sub board results in lower overshoot and reduced time to correct steady state error. TEST=Cutoff battery, verify that battery is able to be revived from sub board. TEST=Verify DUT can still boot off of AC only. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Id15c226f9ac7bf85f4b427348640419565253d45 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2567036 Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* drawcia: Enlarge KEYSCAN taskDevin Lu2020-11-301-1/+1
| | | | | | | | | | | | | | | This commit enlarge keyboard scan task stack to prevent stack overflow. BUG=b:174190303 BRANCH=firmware-dedede-13606.B-master TEST=On drawcia. Make sure KEYSCAN is not overflow with volup+H+alt keys. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I99e180eca8e6665c5ab9f52d8bc7dcd5ec55e678 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2557772 Reviewed-by: Diana Z <dzigterman@chromium.org>
* Drawcia: Handle more DB FW_CONFIG optionsstabilize-rust-13613.B-masterDiana Z2020-11-211-4/+14
| | | | | | | | | | | | | | | | Ensure all reasonable values for the DB can be handled in the current board code. Note this does not cover a 2C DB, as supporting 3 type-c OCPC ports would require additional board and OCPC development. BRANCH=None BUG=b:171742626 TEST=load on drawcia and confirm correct number of PD ports up Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I781c40951a426766e346767447f6824f10655e4e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2548269 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* Drawcia: Remove CONFIG_SYSTEM_UNLOCKEDDiana Z2020-11-181-3/+0
| | | | | | | | | | | | | | | Drawcia has progressed enough in development that we no longer need to force an unlocked state on the EC. BRANCH=None BUG=b:171741987 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I3d3df9392c52652a17a0bb563990cceed73b7020 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2546027 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* drawcia: Add Batteries CFET mask & val fieldDevin Lu2020-11-161-0/+18
| | | | | | | | | | | | | | This commit add the charge FET (CFET) field for OCPC. BUG=b:173174333 BRANCH=none TEST=On Drawcia. Cutoff battery and verify that CFET disable status is reflected after attached charger. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ifcd6fcedd8422e3b7af292c473a17328edf3d5c6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2539228 Reviewed-by: Diana Z <dzigterman@chromium.org>
* drawlat: Add CosMX B00C4473A9D0002 batteryDevin Lu2020-11-162-0/+30
| | | | | | | | | | | BUG=b:173174333 BRANCH=none TEST=Test on charging/discharging/battery cut off pass. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ide3560ccbbbc0c65d5c3c72d8ed184d21271b860 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2537523 Reviewed-by: Diana Z <dzigterman@chromium.org>
* drawcia: Enable hardware charge rampDevin Lu2020-11-121-0/+1
| | | | | | | | | | | | | | BUG=b:172173517 BRANCH=none TEST=On drawcia. Plug in CDP, SDP, DCP, type-C and PD charger: 1. EC console chgsup to make sure voltage/current is indeed. 2. PDtrace to make sure we ramp current to a reasonable value. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: Ie8f2816cb1df1f6c885fe1d6c6d8bb8f0db84570 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2512628 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Drawcia: Add pull-ups to volume GPIOsDiana Z2020-11-051-2/+2
| | | | | | | | | | | | | | | The volume buttons require an internal pull-up, so add this to the GPIO configuration. BRANCH=None BUG=b:172471103 TEST=on drawcia, verify number of volume up and down prints match number of times the buttons are pressed Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Iea2338629693a95c845d2992c85ad81416894d65 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2520099 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* drawcia: Enable keyboard factory scanningDevin Lu2020-10-163-0/+31
| | | | | | | | | | | | | This patch add for factory keyboard connector test. BUG=b:170699805 BRANCH=none TEST=Short keyboard pins and make sure "ectool kbfactorytest" works. Signed-off-by: Devin Lu <Devin.Lu@quantatw.com> Change-Id: I7da348a36611f06da700787774bf1521360a0c66 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2469639 Reviewed-by: Diana Z <dzigterman@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: Check versus vSinkDisconnect on VBUS_REMOVEDstabilize-13505.1.B-masterDiana Z2020-10-021-1/+3
| | | | | | | | | | | | | | | | For variants using the charger Vbus ADC, add a check versus vSinkDisconnect to determine if the TC layer connection has been broken. BRANCH=None BUG=b:168831161 TEST=on waddledee, confirm we can reliably source 5V from a charger without erroneously detecting disconnect Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Icd06d91cd28db068c8cfa646152596d6eab80375 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2436581 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* waddledee/drawcia: Update default resistanceAseda Aboagye2020-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | The default combined Rbatt resistance is actually higher than what was currently specified. The wrong Rds(on) value was used as well as the sense resistor was missed. This commit updates the default resistances for these boards. BUG=none BRANCH=none TEST=Build and flash drawlat, verify default resistance is updated. Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I6b669dfcd1ec11cb2f456b19e83ac4c2783c0b8a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2441803 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: Remove DAC for boards using ITE+SM combinationDiana Z2020-09-281-3/+0
| | | | | | | | | | | | | | | 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>
* drawcia: Update OCPC PID constantsAseda Aboagye2020-09-281-6/+6
| | | | | | | | | | | | | | | | | | Since changing the approach of charging via the sub board on systems that use the SM5803, we need to update the PID constants to work with this new approach. This commit updates the constants for drawcia. BUG=b:168253008 BRANCH=None TEST=Build and flash drawcia and verify charging is working as expected. Change-Id: I8073aa240f90a0ba1ba3d2adabdc0e9fd12dfc6d Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2415512 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Diana Z <dzigterman@chromium.org>
* 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: Remove VSYNC sensorDiana Z2020-09-233-18/+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>