summaryrefslogtreecommitdiff
path: root/board/copano
Commit message (Collapse)AuthorAgeFilesLines
* board: Sort header filesJeremy Bettis2022-12-012-11/+12
| | | | | | | | | | | | | | | | | | | | Sort all includes in board with the clang-format rules used by the zephyr project. BRANCH=None BUG=b:247100970 TEST=zmake build -a TEST=./twister --clobber -v -i TEST=make -j72 buildall_only runtests TEST=zmake compare-builds -a Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I6ad72b167cbb768a64c338fa633eb4bf5a401897 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4060360 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* tree: Enable warning for fallthrough in switch statementsTom Hughes2022-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | The EC code has generally been good about adding comments about intentional fallthrough in switch statements, but there were a few cases without comments (e.g., https://crrev.com/c/3949622). Enabling -Wimplicit-fallthrough generates a compiler warning if the fallthrough is not annotated with __attribute__((fallthrough)). For convenience, we add a "__fallthrough" macro for this attribute. See https://clang.llvm.org/docs/AttributeReference.html#fallthrough and https://gcc.gnu.org/onlinedocs/gcc/Statement-Attributes.html. BRANCH=none BUG=b:253644823 TEST=make buildall LOW_COVERAGE_REASON=legacy code Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I9f4d6049f4507a25ce706675d159b70e28b4b825 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3957420 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* volteer: usb_mux: Split struct usb_mux in volteer boardsTomasz Michalec2022-09-131-21/+31
| | | | | | | | | | | | | | | | Update volteer boards to use new struct usb_mux_chain. BUG=b:236274003 TEST=make buildall BRANCH=None Cq-Depend: chromium:3748785 Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Iaab1d2e718d19198e949df5ee84631cdca3568a2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3779620 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* Update license boilerplate text in source code filesMike Frysinger2022-09-128-8/+8
| | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* config: rename HOSTCMD_ESPI_* to HOST_INTERFACE_ESPI_*Michał Barnaś2022-09-091-1/+1
| | | | | | | | | | | | | | | Rename ESPI additional configs to match the name of base config that selects ESPI as HOST_INTERFACE. BUG=b:195416058 BRANCH=main TEST=zmake testall && make buildall Change-Id: I137449a1a58b1ea0d9794ebc0900e1b68413819d Signed-off-by: Michał Barnaś <mb@semihalf.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3291744 Reviewed-by: Sam Hurst <shurst@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* board/copano/board.h: Format with clang-formatJack Rosenthal2022-06-301-62/+54
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: Ia7e936e4e5e8911ef74da245415b1dd852280465 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728175 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* board/copano/led.c: Format with clang-formatJack Rosenthal2022-06-291-17/+26
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: Ibe6ad3a5385bb96cb42c80800d51fa832e7cc858 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728176 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* board/copano/sensors.c: Format with clang-formatJack Rosenthal2022-06-281-13/+9
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I3c4567387e5a339b95c25eb8126b021e758e75ec Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728156 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* board/copano/board.c: Format with clang-formatJack Rosenthal2022-06-281-9/+7
| | | | | | | | | | | BUG=b:236386294 BRANCH=none TEST=none Change-Id: I6c81488142b8bec2c6b3a2090c5bcca371e727b9 Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3728155 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* gpio: cleanup header usage for i2cKeith Short2022-02-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | i2c.h only requires the enum gpio_signal, so use gpio_signal.h instead of gpio.h. The builld doesn't compare due to an ASSERT() calls in i2c-stm32f4.c because the line numbers changed. Before this change: 80068b2: f240 2332 movw r3, #562 80068b6: 48a4 ldr r0, [pc, #656] 80068b8: f7fc fb1a bl 8002ef0 <panic_assert_fail> After this change: 80068b2: f44f 730d mov.w r3, #564 80068b6: 48a4 ldr r0, [pc, #656] 80068b8: f7fc fb1a bl 8002ef0 <panic_assert_fail> BUG=b:218856245 BRANCH=none TEST=compare_build.sh Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I0f9f428d5c575c444b9df69f71a0ed6c4b3e378c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3489094 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* ec: Rename GMR_TABLET_MODE_GPIO_L to GPIO_TABLET_MODE_LAndrew McRae2022-01-201-1/+0
| | | | | | | | | | | | | | Normalise the name of the tablet mode detection GPIO so that everyboard does not need to redefine it. BUG=none TEST=zmake testall; make buildall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ifb458e755d1e00c0cff66a02c78dfccaba2d070c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3397141 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* Volteer: Enable USB mux taskDiana Z2021-11-291-0/+1
| | | | | | | | | | | | | | Enable the USB mux task for volteer, since the virtual mux sets may take significant time to complete. BRANCH=None BUG=b:186777984 TEST=on voxel, pass tast typec.Mode*.manual Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I634a6ef8029b8810ed0e08e11d2ab923af320175 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3078418 Reviewed-by: Keith Short <keithshort@chromium.org>
* tree: Work around clang bugTom Hughes2021-11-051-27/+37
| | | | | | | | | | | | | | | | | | | | clang warns: error: initializer element is not a compile-time constant There is an upstream LLVM review with proposed fix: https://reviews.llvm.org/D76096. In the meantime, we will work around it. BRANCH=none BUG=b:172020503, b:202062363 TEST=./util/compare_builds.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I066e082870bcd726555a5f2461f09988d4e6ce55 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3237042 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* board: Rename RSMRST_L_PGOOD as PG_EC_RSMRST_ODLfirmware-chameleon-14280.B-mainDivya Sasidharan2021-10-121-1/+0
| | | | | | | | | | | | | | | | | GPIO_RSMRST_L_PGOOD is also used as GPIO_PG_EC_RSMRST_ODL creating redundancy. Removing it will help need for redefinitions for zephyr. Remove reference to GPIO_RSMRST_L_PGOOD in zephyr BUG=b:200975143 BRANCH=main TEST=make buildall -j, boot up on brya Change-Id: Iff46595174c54db347b69cff3ad9e266ba9fd535 Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3180808 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* tree: Fix TEMP_SENSOR3 GPIO declarationTom Hughes2021-10-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with clang, it reports: board/chronicler/gpio.inc:178:1: error: initializer overrides prior initialization of this subobject [-Werror,-Winitializer-overrides] ALTERNATE(PIN(F, 1), 0, MODULE_ADC, 0) /* TEMP_SENSOR3 */ This expands to: static const struct gpio_alt_func gpio_alt_funcs[] = { ... {GPIO_PORT_F, (1U << (1)), .func = (0), .module_id = (MODULE_ADC), .flags = (0)} }; The problem is that struct gpio_alt_func has the order "module_id, func, port, mask, flags", so in this case we are setting func to (1U << (1)) and then to (0). It looks like the intent was to use the PIN_MASK macro instead of PIN, which expands to: static const struct gpio_alt_func gpio_alt_funcs[] = { ... {.port = GPIO_PORT_F, .mask = ((1U << (1))), .func = (0), .module_id = (MODULE_ADC), .flags = (0)}, }; The code appears to be repeated in several boards, which were found with: git grep --name-only TEMP_SENSOR3 | grep gpio.inc | sort | uniq BRANCH=none BUG=b:172020503 TEST=make CC=arm-none-eabi-clang BOARD=chronicler Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: I66a097b761c0b15466a30e53a710d532cd48256c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3206478 Reviewed-by: Eric Yilun Lin <yllin@google.com>
* BB Retimer: Add new HPD callback to boardsDiana Z2021-09-161-1/+2
| | | | | | | | | | | | | | | Now that the BB retimer has its own HPD interface, add this interface to every board using the bb_usb_retimer driver. BRANCH=None BUG=b:195773400 TEST=on voxel, pass tast typec.Mode*.manual Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ia70d139431739e8f2c0577359cb3aaa7fb906d0a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3163930 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* zephyr: Add BB retimer emulatorTomasz Michalec2021-09-021-2/+1
| | | | | | | | | | | | | | | | | | Add BB retimer emulator on i2c bus. Emulator properties can be defined using device tree or runtime emulator API. Emulator checks if RO registers and reserved bits are accessed correctly. API allows to set custom read/write i2c messagess handlers to emulate complex behaviour. BUG=b:184856919 BRANCH=none TEST=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I4b641a90e6fb55e89aaee388c0ac04ab7bf367ba Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3110085 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org>
* lid_angle: Create a common callback for lid angle changesWai-Hong Tam2021-08-051-19/+0
| | | | | | | | | | | | | | | | | | | | | | 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: Use __override for keyboard_scan_configDaisuke Nojiri2021-07-231-1/+1
| | | | | | | | | | | | | | | | | Currently keyboard_scan_config is defined by each board using CONFIG_KEYBOARD_BOARD_CONFIG. This patch makes it defined as __override hence removes CONFIG_KEYBOARD_BOARD_CONFIG. BUG=None BRANCH=None TEST=buildall Change-Id: I53a356741ba4d00e829ca59b74ee6dc704188728 Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3044403 Tested-by: Gwendal Grignou <gwendal@chromium.org> Commit-Queue: Gwendal Grignou <gwendal@chromium.org> Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
* copano: gyro sensor add 2nd source icm-40608Jacky Wang2021-07-123-3/+76
| | | | | | | | | | | | | | | | gyro sensor add 2nd source icm-40608 BUG=b:193287286 BRANCH=firmware-volteer-13672.B TEST=make BOARD=copano 1. Set CBI SSFC 0x2 and using command "watch ectool motionsense lid_angle" for sensor icm-40608. 2. Using command "watch ectool motionsense lid_angle" for BMI160. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: I5964bd6e00c395da9ce8b8015137c3a9fdfb010c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3020128 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* copano: gyro sensor add 2nd source KX022Jacky Wang2021-06-112-2/+38
| | | | | | | | | | | | | | | | Gyro sensor add 2nd source KX022. BUG=b:190644307 BRANCH=firmware-volteer-13672.B TEST=make BOARD=copano 1. Set CBI SSFC 0x10 and using command "ectool motionsense" for sensor kxo22. 2. Using command "ectool motionsense" for sensor BMA253. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: I73a5b915dcb67df58780a01873f81fe5719299d0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2952286 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* copano: Modity PDO setting.Jacky Wang2021-06-081-2/+2
| | | | | | | | | | | | | | | | | 1. Modify PD_MAX_POWER_MW to 45000. 2. Modify PD_MAX_VOLTAGE_MV to 15000. BUG=b:187772157 BRANCH=firmware-volteer-13672.B TEST=make BOARD=copano 1. Connect 60W adapter and use command "ectool usbpdpower" to check. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: Id2ffb79abdea63c129deb8d5f247cda4f8030817 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2944307 Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* copano: Fine tune Keyboard backlight PWM frequencyJacky Wang2021-05-041-1/+1
| | | | | | | | | | | | | | | | Fine tune Keyboard backlight PWM frequency from 2.4kHz to 10kHz BUG=b:187096314 BRANCH=firmware-volteer-13672.B TEST=make BOARD=drobit 1. Verified pass by EE team. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: Ia3a05b5d8138f3961b7d9c0133da735ae7da1a94 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2870888 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@chromium.org>
* copano: Remove config for firmware qualJacky Wang2021-04-231-4/+0
| | | | | | | | | | | | | | | | | 1.Remove CONFIG_SYSTEM_UNLOCKED 2.Remove CONFIG_BYPASS_CBI_EEPROM_WP_CHECK BUG=b:183687873 BRANCH=firmware-volteer-13672.B TEST=make BOARD=coapno Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: Ia85de9121e3217730ebe2f21de814fe2dabd4b5f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2847711 Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@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>
* copano: Enable AP-driven alt mode entryMichael5 Chen12021-04-191-0/+2
| | | | | | | | | | | | | | | Wait for the AP to direct the EC to enter USB PD alternate modes. BUG=b:183773805 TEST=make buildall BRANCH=firmware-volteer-13672.B Signed-off-by: Michael5 Chen1 <michael5_chen1@pegatron.corp-partner.google.com> Change-Id: Ifc436f4043430f70ddba8563210b0a09cd5daf18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2835256 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Zhuohao Lee <zhuohao@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>
* Copano: Enable FRSEric Herrmann2021-03-252-0/+3
| | | | | | | | | | | | | | Set flag and configure GPIOs to enable Fast Role Swap. BUG=b:148144711 TEST=With an FRS device with power passed through, remove the power cord and check that the device doesn't re-enumerate. BRANCH=None Signed-off-by: Eric Herrmann <eherrmann@chromium.org> Change-Id: Ie3159c53a290b3aeed8c18a1cae19446b712791c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2754491 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* copano,drobit,elemi,lindar,voema: add CONFIG_BYPASS_CBI_EEPROM_WP_CHECKZhuohao Lee2021-03-041-0/+1
| | | | | | | | | | | | | | | In order to bypass the cbi eeprom write protection, we add the config CONFIG_BYPASS_CBI_EEPROM_WP_CHECK to bypass the write protection gpio check. BUG=b:169034911 BRANCH=volteer TEST=`ectool cbi set` is working Change-Id: Ibd1e8af4eb8f7ead506999c4ce3803fa0e341c10 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2719725 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* copano: Implement keyboard matrixJacky Wang2021-02-052-1/+26
| | | | | | | | | | | | | | | | Base on keyboard spec, modify the keyboard related setting. BUG=b:179098198,b:179224595 BRANCH=firmware-volteer-13672.B TEST=make BOARD=copano 1. Verify keyboard function behavior. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: Ia8e36461a29c9f184af185a76430fb6a91e1ec61 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2666562 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* copano: Config the GPIO setting for lid and tablet modeJacky Wang2021-02-031-2/+2
| | | | | | | | | | | | | | 1. Swap EC_LID_OPEN and TABLET_MODE_L GPIO setting. BUG=b:178953622 BRANCH=firmware-volteer-13672.B TEST=make BOARD=copano 1. Verified pass with factory test. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: I38181719d46a543a3a7580aa6c96bce608b18462 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2662233 Reviewed-by: Keith Short <keithshort@chromium.org>
* copano: Config the rotation matrix setting for X axis.Jacky Wang2021-02-021-2/+2
| | | | | | | | | | | | | | | | 1. Correct the rotation matrix for X axis direction. BUG=b:176393206 BRANCH=firmware-volteer-13672.B TEST=make BOARD=copano 1. Using "ectool motionsense" check x/y/z value. 2. Using "ectool motionsense lid_angle" check angle. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: Ic31b17419aed98a72eaa0a05a4b6f36127d62e39 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2662228 Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* config: Provide default VCONN Swap delayAbe Levkoy2021-01-221-1/+0
| | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | | | | 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>
* copano: Update LED behavior functionJacky Wang2021-01-141-2/+2
| | | | | | | | | | | | | | | Update LED behavior by Marketing spec. Modify DC mode S3 LED behavior to blinking white LED 1s on / 3s off. BUG=b:176434090 BRANCH=firmware-volteer-13672.B TEST=make BOARD=copano Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: I180e4896a503e39d681c7762a4fb2b317b16b1a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2626788 Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* copano: Config GPIO GPO66 settingJacky Wang2021-01-123-0/+14
| | | | | | | | | | | | | Base on schematics, update GPO66 USB_A_LOW_PWR_OD config setting. BUG=b:176832063 BRANCH=firmware-volteer-13672.B TEST=make BOARD=copano Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: I34ceb92b56ce4a697455e4b421d9e1b9b61cb360 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2612229 Reviewed-by: Keith Short <keithshort@chromium.org>
* copano: Config the G-sensor settingJacky Wang2021-01-074-20/+20
| | | | | | | | | | | | | | | | | | 1. Base on schematics, modify the motion sensor related setting to BMI160. 2. Modify base rotation matrix depend on schematics. BUG=b:176393206 BRANCH=firmware-volteer-13672.B TEST=make BOARD=copano 1. Using "ectool motionsense" check x/y/z value. 2. Using "ectool motionsense lid_angle" check angle. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: If82879f16e45d780c1fc8878d6a8f94dddaf0e3a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2607035 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* copano: Implement LED functionJacky Wang2020-12-304-84/+81
| | | | | | | | | | | | | | | | | | | Update LED behavior by Marketing spec. BUG=b:176434090 BRANCH=firmware-volteer-13521.B TEST=make BOARD=copano Verify LED behavior with below items 1. DC mode : S0/S5 2. AC mode : S0/S5 3. battery low : S0/S5 4. Battery Error : S0/S5 Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: I72445feb93113b38a4a0c7a42955b7cf9f5d658f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2606172 Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* TCPMv2: Update source-out configsDiana Z2020-12-241-6/+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>
* copano: Remove ALS function dependent on schematic.Jacky Wang2020-12-224-113/+5
| | | | | | | | | | | | | | Remove ALS function dependent on schematic. BUG=b:175932175 BRANCH=firmware-volteer-13521.B TEST=make BOARD=copano Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: Ide29770b6eb34b60d35daad00fed1c798b4676da Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2598300 Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* copano: Config the EC battery setting.Jacky Wang2020-12-182-41/+10
| | | | | | | | | | | | | | | | | Config the EC battery setting depend on battery spec. BUG=b:174969897 BRANCH=firmware-volteer-13521.B TEST=BOARD=copano 1. Check battery found on EC log. 2. Check battery cutoff function on EC console. 3. Check battery charging FET status when battery full. Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: I188d4c560cedd0d34e9ef6a95b1946a6aa9389ec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2596562 Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* copano: Initial TCPC configurationJacky Wang2020-12-142-6/+9
| | | | | | | | | | | | | | | Update TCPC configuration from TUSB422 to RT1715 BUG=b:175185468 BRANCH=firmware-volteer-13521.B TEST=make BOARD=copano Plug-AC and check EC log and pd state. Check EC console message "TCPC init ready". Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: If450047939bebf1315c729935380a998fccdac59 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2581698 Reviewed-by: Keith Short <keithshort@chromium.org>
* Mux: Program retimer mux mode firstDivya Sasidharan2020-12-101-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Configure BB retimer first and then TCSS mux for the following boards 1. Adlrvpp 2. Boldar 3. Copano 4. Drobit 5. Halvor 6. Lingcod 7. Malefor 8. Terrador 9. Tglrvpu/y 10.Todor 11.Trondo 12.Volteer 13.Voxel BUG=b:166300460 BRANCH=None TEST=Able to configure the BB retimer before the TCSS mux Change-Id: Ife3074e3f45f00d3263eb0c5c2bea713db67541b Signed-off-by: Divya Sasidharan <divya.s.sasidharan@intel.com> Signed-off-by: Ayushee Shah <ayushee.shah@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2506629 Reviewed-by: Keith Short <keithshort@chromium.org>
* copano : Config EC chipsetJacky Wang2020-12-072-1/+7
| | | | | | | | | | | | | | Base on schematic, change EC chip to npcx7m7fc from npcx7m6fc. BUG=b:174720060 BRANCH=firmware-volteer-13521.B TEST=make BOARD=copano Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: Iaf9d52636f6ffc14a9a15d776a3d65a0241a5ded Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2571135 Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* copano: Initial EC imageJacky Wang2020-12-028-0/+1234
Create the initial EC image for the copano variant by copying the terrador reference board EC files into a new directory named for the variant. (Auto-Generated by create_initial_ec_image.sh version 1.3.0). BUG=b:174413884 BRANCH=None TEST=make BOARD=copano Signed-off-by: Jacky Wang <jacky5_wang@pegatron.corp-partner.google.com> Change-Id: I463b3087d1a66ccf0325bc8ac369349fbb9ac307 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2565218 Reviewed-by: Michael5 Chen <michael5_chen1@pegatron.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>