summaryrefslogtreecommitdiff
path: root/board/kracko
Commit message (Collapse)AuthorAgeFilesLines
* board/kracko/board.c: Format with clang-formatJack Rosenthal2022-06-291-101/+83
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: Ifdec68b1d0d30d3dac7b439497cb4b4426704bff Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728566 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>
* 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>
* 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-6/+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>
* 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>
* kracko: Tuning standard reference matrix of lid accel kx022Tommy Chung2021-06-171-2/+2
| | | | | | | | | | | | | | BUG=none BRANCH=dedede TEST=on kracko mockup, make sure that with "ectool motionsense", correct matrix values are reported under corresponding orientation. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I6a268d5c2d71d47bbad4dd0eec87db58b017aae0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2966692 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* kracko: Add second source lid accel kx022Tommy Chung2021-06-162-0/+44
| | | | | | | | | | | | | | | | To avoid shortage, we add second source of lid accel kx022 for kracko. BUG=none BRANCH=dedede TEST=on kracko, make sure that lid accel kx022 works with related SSFC value. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I4b5a270ad609982355bab36ed3f0d18a2d033d10 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2962193 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* kracko: Update fw_config_dbTommy Chung2021-05-261-6/+12
| | | | | | | | | | | | | | | Update fw_config_db to meet cbi_fw_config table on kracko. BUG=b:189131006 BRANCH=dedede TEST=on kracko, make sure that all DB configs act correctly. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I0a2ccd9a90127a51042c115176e382900c396bf4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2902075 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Henry Sun <henrysun@google.com> Commit-Queue: Henry Sun <henrysun@google.com>
* 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>
* kracko: Update battery configTommy Chung2021-04-202-230/+6
| | | | | | | | | | | | | | | Updates the battery config on kracko. BUG=b:183664617, b:178092096 BRANCH=dedede TEST=Make sure battery charging, battery cutoff works. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: Icc00f8bc23f73e9f7287a0f6980667c166bcba57 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2784330 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* kracko: Move C1 SM5803 processing to the PD_INT taskTommy Chung2021-04-091-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. (This CL aligns with CL:2803462) BUG=none BRANCH=dedede TEST=On kracko, confirm charger attach to C1 works reliably. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: I21622c1ca06db9b600079487053f6efdaa8cf88e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2817138 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: 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>
* 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>
* kracko: Update LED configTommy Chung2021-03-243-176/+48
| | | | | | | | | | | | | | | | | On Kracko, we have one blue/amber LED which indicates different charging and power states. BUG=b:178092096 BRANCH=dedede TEST=make sure that LED acts correctly. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: Ic220b4505fd613790a81f19dc4fd684c2a4c1408 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2763603 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* kracko: Add GPIO_EC_ENTERING_RW2Tommy Chung2021-02-262-0/+16
| | | | | | | | | | | | | | | | This commit syncs with crrev.com/c/2719104 on kracko. BUG=b:181262149 BRANCH=dedede TEST=Build and flash kracko, verify it boots. Signed-off-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Change-Id: Iaecc91d1cad7f3872b6761ae2ca619c00dfd3b7b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2719785 Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* kracko: Initial EC imageTony Huang2021-02-038-0/+1638
Create the initial EC image for the kracko variant by copying the drawcia reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.5.0). BUG=b:178092096 BRANCH=None TEST=make BOARD=kracko Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com> Change-Id: Ib76db1a171dd5075140ab61b3c49de3ee558c3b0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2670603 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Diana Z <dzigterman@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Tested-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>