summaryrefslogtreecommitdiff
path: root/board/terrador
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Terrador: Free up flash spaceDiana Z2021-11-041-0/+1
| | | | | | | | | | | | | | Terrador is nearly out of flash space, so remove the help strings. BRANCH=None BUG=None TEST=build, observe terrador now has about 4.8k in free flash Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ifd27849f20ec403018b9e5076921edb163bc2107 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262583 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@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>
* Terrador: Free up flash spaceDiana Z2021-10-121-0/+3
| | | | | | | | | | | | | | | Terrador is nearly out of flash space, so remove the PRL debug strings from its build. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ieeda2cbf3772f3218cccfe530a2cf3c8f12a0b99 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3218368 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>
* 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>
* BB Retimer: Add new HPD callback to boardsDiana Z2021-09-161-0/+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>
* 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>
* terrador: add USB-A power enable and disableBernardo Perez Priego2021-03-013-0/+14
| | | | | | | | | | | | | | | | | Enable CONFIG_USB_PORT_POWER_DUMB for enabling/disabling charging from USB-A ports. This change also enables disables the USB1 low power limit by default. BUG=b:181152435 BRANCH=volteer TEST=make buildall TEST=Run "ectool usbchargemode 0 0" and verify USB VBUS turns off, then run "ectool usbchargemode 0 4" and verify USB VBUS turns back on. Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.corp-partner.google.com> Change-Id: I54e76802a555652666f379eef32ac2407ec84e90 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2715679 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>
* 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>
* 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>
* terrador: Enabling sourcing of 4.5A on type-C portsKeith Short2020-11-121-0/+6
| | | | | | | | | | | | | | | To support USB4, source a total of 4.5A on the type-C ports. This ensures that if the first device requests 3A (15W), the chromebook continues to source 3A even after a second device is connected. BUG=b:172710638 BRANCH=firmware-volteer-13521.B-master TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I9ca2314ca18d298e9dd6158eff7b7e1e2d673cf4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2533513 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* usb: Remove references to usb23Caveh Jalali2020-11-062-13/+0
| | | | | | | | | | | | | | | | | The TCSS port mapping is not used by the EC and the higher layers no longer query the EC for this mapping. We can remove this feature and disable CONFIG_INTEL_VIRTUAL_MUX which was added to enable it. BRANCH=none BUG=b:153941950 TEST=buildall passes Change-Id: I2d7f51212f3e64d74827d7f82654eb93534b8db4 Signed-off-by: Caveh Jalali <caveh@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427632 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* COIL: Rename CONFIG_I2C_CONTROLLERDiana Z2020-11-051-1/+1
| | | | | | | | | | | | | Rename CONFIG_I2C_CONTROLLER and related comments. BRANCH=None BUG=None TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ied6a1829bf54a5c9a32e6772982a4b8aa31aaf23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2518659 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* terrador: Configure temperature sensorsAbe Levkoy2020-10-231-0/+3
| | | | | | | | | | | | | | Enable the ADC alternate function to reduce power usage. BUG=b:155882590 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I813868e9380dc1a1c20a3425cd198ab568becf53 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2493410 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* volteer: move thermal setting to variantScott Chao2020-10-071-0/+54
| | | | | | | | | | | | | | | Since each variant may have different thermal sensor placement. Move thermal params and configs from baseboard to variant. BUG=b:170143672 BRANCH=none TEST=make -j BOARD=eldrid TEST=make buildall Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com> Change-Id: Ie12f4cecad5f93c491e51a5fadfe856829f5b2e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2449510 Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: Enable SW charge rampingKeith Short2020-10-011-0/+1
| | | | | | | | | | | | | | | | Enable CONFIG_CHARGE_RAMP_SW because hardware based charge ramping doesn't work on the ISL9241. BUG=b:169350714, b:168960587 BRANCH=none TEST=make buildall TEST=Connect 1.5A CDP device to Volteer and verify charge ramp from 0.5A to 1.5A over about 7 seconds. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I81e8a3913bd776d0d3fda6d294fdeabbde5df62a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2438912 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* Revert "volteer: Move USB PID to board files"Abe Levkoy2020-09-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 6ed9b65ae38977118f0d5f02d6f5c61da23c5f24. Reason for revert: Historically, Octopus variants used the baseboard VID and PID. Original change's description: > volteer: Move USB PID to board files > > Add TODOs to update variants boards. > > BUG=none > TEST=make buildall > BRANCH=none > > Signed-off-by: Abe Levkoy <alevkoy@chromium.org> > Change-Id: If0d8d0dd544c06114f355dcf281b2841a8397aee > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2417348 > Reviewed-by: Keith Short <keithshort@chromium.org> BUG=b:168826898,b:168827570,b:168827133,b:168827128,b:168827420 BUG=b:168827418,b:168826886,b:168826868,b:168827029,b:168826914 Change-Id: I5b9b1cee25e34a4b922fd604b49deabc9591b4e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2431687 Tested-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: YH Lin <yueherngl@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* volteer: Move USB PID to board filesAbe Levkoy2020-09-181-0/+2
| | | | | | | | | | | | | Add TODOs to update variants boards. BUG=none TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: If0d8d0dd544c06114f355dcf281b2841a8397aee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2417348 Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: Support board-specific keyboard_configSamsp_Liu2020-09-021-0/+18
| | | | | | | | | | | | | | | | | | | Separate keyboard_scan_config keyscan_config from volteer baseboard to each project board. To meet different configurations on each board. BUG=b:149536282 BRANCH=none TEST=make buildall Change-Id: I9070953c02ff7d3eb4950191db6505b635371792 Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2383359 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Elthan Huang <elthan_huang@compal.corp-partner.google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: SamSP Liu <samsp_liu@compal.corp-partner.google.com>
* terrador: Modify led color configDavid Huang2020-08-313-13/+13
| | | | | | | | | | | | | | Switch LED color Red and Green for proto 2. BUG=b:165158580 BRANCH=master TEST=Check LED color correct on proto 2 board. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I9d41576af35fff126c044470191cbcda042fb6d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2359624 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: caveh jalali <caveh@chromium.org>
* volteer: Support board-specific TCPC configSamsp_Liu2020-08-262-1/+133
| | | | | | | | | | | | | | | | | | Separate tcpc_config from volteer baseboard to each project board. To meet different configurations on each board. BUG=b:153705222 BRANCH=none TEST=make buildall Change-Id: Iea59518123a542ebe38be195eaf71b4a8f796550 Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2342183 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: Support board-specific currentSamsp_Liu2020-08-261-0/+4
| | | | | | | | | | | | | | | | | | | Separate CONFIG_CHARGER_SENSE_RESISTOR and CONFIG_CHARGER_SENSE_RESISTOR_AC from volteer baseboard to each project board. To meet different configurations on each board. BUG=b:158257062 BRANCH=none TEST=make buildall Change-Id: Ib8290bd54d45054b82d7849e84119d419cbc8586 Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2346088 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: SamSP Liu <samsp_liu@compal.corp-partner.google.com>
* bb retimer: Use mutex to lock the access to shared NVMVijay Hiremath2020-08-251-1/+0
| | | | | | | | | | | | | | | | | | | If the BB retimer has a shared NVM we need 40ms delay after releasing the RESET line to synchronize, load and initialize both the retimers. On a non-shared NVM we need 20ms delay to load and initialize. In order to synchronize, instead of 40ms delay this CL uses a MUTEX to lock the access of another retimer by not releasing the RESET line until the first retimer completes initialization. BUG=b:165895649 BRANCH=none TEST=Tested on volteer(non shared NVM), tglrvpu_ite (shared NVM) Retimer is able to initialize (DP, USB, TBT, USB4 are detected) Change-Id: I709377c2e6401faa26871289143d71665ee516d1 Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2368223 Reviewed-by: Keith Short <keithshort@chromium.org>
* BB retimer: Remove FORCE_PWR GPIO from EC driverVijay Hiremath2020-08-192-4/+0
| | | | | | | | | | | | | | | | | | FORCE_PWR GPIO is used for keeping the BB retimer in active state during f/w updating. On TGLRVP, control to enable the FORCE_PWR GPIO was given to EC to support the I2C based F/W updating. I2C based f/w updating is deprecated and the LSx interface is POR hence the FORCE_PWR GPIO control is given to AP now. Thus, removing the FORCE_PWR GPIO from EC driver. BUG=b:165214747 BRANCH=none TEST=make buildall -j Change-Id: If9bb7199a68c93f704f698552e5594a58bd68f7c Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2363334 Reviewed-by: Ayushee Shah <ayushee.shah@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* terrador: modify gpio for mb/db typec FRS_ENDavid Huang2020-08-171-0/+2
| | | | | | | | | | | | | | Add FRS_EN default low for mb/db typec port. BUG=b:163167407 BRANCH=master TEST=Check system can power on with AC only. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: Ie63b0804fed15d006b578bbfd5303196a9168634 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2359610 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* terrador: Remove LED_SIDESEL_4_L function and config.David Huang2020-08-173-36/+1
| | | | | | | | | | | | | | Remove LED_SIDESEL_4_L function and config. BUG=b:163167407 BRANCH=master TEST=make buildall success. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I91fa57f08b2d6033d4153ed6867bb95fb3811173 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2352957 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* terrador: support TBT/USB4 for C0/C1 portDavid Huang2020-08-171-26/+0
| | | | | | | | | | | | | Enable C0/C1 port BUG=b:160741783 BRANCH=none TEST=Check TBT and USB4 are working at Gen3 speed. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I4e1dd919a0ca35277a95b86eba0ae58db837d31d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2342947 Reviewed-by: Keith Short <keithshort@chromium.org>
* Terrador: Modify gpio to support proto 2 boardDavid Huang2020-08-122-9/+9
| | | | | | | | | | | | | | Follow HW change to modify gpio config to support proto 2 board. BUG=b:151978872 BRANCH=master TEST=make buildall -j pass. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I9a91c8d7a3f2515fce2a03631786261ce9669c52 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2341196 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* volteer: Support board-specific power parametersSamsp_Liu2020-08-111-0/+13
| | | | | | | | | | | | | | | | | | Separate usb pd power config from volteer baseboard to each project board. To meet different configurations on each board. BUG=b:159282888 BRANCH=none TEST=halvor test Change-Id: I5aba9c7c59ababd34e51906365b1ae2a28c256ea Signed-off-by: Samsp_Liu <Samsp_Liu@compal.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2312001 Tested-by: SamSP Liu <samsp_liu@compal.corp-partner.google.com> Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* Terrador/Todor: Add the CCD_MODE_ODL to gpio.incZhuohao Lee2020-08-041-0/+1
| | | | | | | | | | | | | | | From the schematics, the GPIOE5 is connected to CCD_MODE_ODL. Adds this setting for reading the CCD_MODE_ODL through the gpioget BUG=b:161762948 BRANCH=None TEST=gpioget CCD_MODE_ODL Change-Id: I3abfb97d031b8423d09948e6a6a2c9f75c388be7 Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2335096 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* terrador: Remove power sequencingAbe Levkoy2020-07-314-219/+0
| | | | | | | | | | | | | | | The board/AP can handle power sequencing without EC intervention. This support was already disabled by default in configuration. BUG=b:143375057 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I935be206780a562d6a6e3829905811c9449f2484 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2330574 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Terrador: Add new batteryDavid Huang2020-07-082-0/+29
| | | | | | | | | | | | | | new battery: LGC KT0030G020 BUG=none BRANCH=master TEST=Make sure battery can cutoff by console "cutoff" or "ectool cutoff" Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I57ce7ec1a7a28111953d823a68bbf4b2a59943a8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2284508 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* Terrador: supports bb_retimer for C0/C1 portDavid Huang2020-07-073-9/+47
| | | | | | | | | | | | | | | add bb retimer for C0/C1 port BUG=b:151978872 BRANCH=master TEST=Use console "i2cscan" get usb_0_mix/usb_0_mix and bb to read bb retimer register. Change-Id: I832265a69b30beca6e49840f90333abd6b297ec7 Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2282724 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* Terrador: remove fan related function.David Huang2020-07-073-52/+1
| | | | | | | | | | | | | Terrador is fan less, remove fan function. BUG=b:151978872 BRANCH=master TEST=make buildall success. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: Iebb74fac4ae60d20ce16073df6539df544ba7fc0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2279151 Reviewed-by: Keith Short <keithshort@chromium.org>
* Terrador: Add EC_KB_BL_EN to enable/disable keyboard backlightDavid Huang2020-07-062-1/+13
| | | | | | | | | | | | | Add EC_KB_BL_EN to enable/disable keyboard backlight when enter S0/S3. BUG=none BRANCH=master TEST=check keyboard backlight can on/off when in S0/S3.. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I54399eda3c4b313f3ccc7af91f966042e3f8cebd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2280862 Reviewed-by: Keith Short <keithshort@chromium.org>
* Terrador: Change ppc port0 to syv682xDavid Huang2020-07-052-6/+4
| | | | | | | | | | | | | | | Terrador use syv682a on port0. Change to syv682x driver. BUG=b:151978872 BRANCH=master TEST=check ppc init succeed and switch source/sink correct with type c device. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I341dc2794b5e6a1dbb5e01ba0f7a5c6023df939c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2276126 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: move ppc_chips[] from baseboard to boardDavid Huang2020-07-052-0/+40
| | | | | | | | | | | | | | | Move ppc_chips[] to board for board customize. BUG=b:151978872 BRANCH=master TEST=check ppc init succeed and switch source/sink correct with type c device. Change-Id: I287bbe44b163d72c19a3764dca431c84d86bbdec Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2275971 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* terrador: Move USB DB checks from baseboardKeith Short2020-07-022-14/+19
| | | | | | | | | | | | | | | | Update Terrador USB daughterboard options to match project configuration. BUG=b:155497872 BRANCH=none TEST=make BOARD=terrador Cq-Depend: chromium:2247617, chromium:2248238, chromium:2248239 Cq-Depend: chromium:2248242, chromium:2248242, chromium:2252484 Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I42930d92b247848f9359f22992d9aeb5b39b20b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2248240 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* volteer: Only disable keyscanning when not in S0.Jes Klinke2020-06-121-9/+13
| | | | | | | | | | | | | | Duplicate of: https://chromium-review.googlesource.com/1089823 We should find the source of the copy-pasting, and also fix that. TEST=Flash volteer proto1 (ripto), open recovery firmware screen, verify that keypresses are recognized. Change-Id: I8f4a9851446120a5a89c604fc00ecb6371eadc0f Bug: b:157080964 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2242352 Tested-by: Jes Klinke <jbk@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Jes Klinke <jbk@chromium.org>
* volteer: remove VSYNC sensorstabilize-lazor-13278.B-masterKeith Short2020-06-093-16/+0
| | | | | | | | | | | | | | | Remove VSYNC sensor support from all volteer boards. BUG=b:146452722 BRANCH=none TEST=make buildall TEST=Boot Volteer, run "ectool motionsense" Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I1662f510901fb99a45999f46b854e7ceb3874f03 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2238671 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* volteer: add USB overcurrent notification to APKeith Short2020-06-051-0/+2
| | | | | | | | | | | | | | | Enable the USB C0 and USB C1 overcurrent signals to the AP. BUG=b:140561826 BRANCH=none TEST=make buildall TEST=Force overcurrent event by manually setting PPC current limit below PD contract. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I5eea4812c212496f1c483c4149697b2d53a16a37 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2222960 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>