summaryrefslogtreecommitdiff
path: root/board/volteer
Commit message (Collapse)AuthorAgeFilesLines
* ish: Trim down the release branchstabilize-wristpin-14469.59.B-ishstabilize-voshyr-14637.B-ishstabilize-quickfix-14695.187.B-ishstabilize-quickfix-14695.124.B-ishstabilize-quickfix-14526.91.B-ishstabilize-14695.85.B-ishstabilize-14695.107.B-ishstabilize-14682.B-ishstabilize-14633.B-ishstabilize-14616.B-ishstabilize-14589.B-ishstabilize-14588.98.B-ishstabilize-14588.14.B-ishstabilize-14588.123.B-ishstabilize-14536.B-ishstabilize-14532.B-ishstabilize-14528.B-ishstabilize-14526.89.B-ishstabilize-14526.84.B-ishstabilize-14526.73.B-ishstabilize-14526.67.B-ishstabilize-14526.57.B-ishstabilize-14498.B-ishstabilize-14496.B-ishstabilize-14477.B-ishstabilize-14469.9.B-ishstabilize-14469.8.B-ishstabilize-14469.58.B-ishstabilize-14469.41.B-ishstabilize-14442.B-ishstabilize-14438.B-ishstabilize-14411.B-ishstabilize-14396.B-ishstabilize-14395.B-ishstabilize-14388.62.B-ishstabilize-14388.61.B-ishstabilize-14388.52.B-ishstabilize-14385.B-ishstabilize-14345.B-ishstabilize-14336.B-ishstabilize-14333.B-ishrelease-R99-14469.B-ishrelease-R98-14388.B-ishrelease-R102-14695.B-ishrelease-R101-14588.B-ishrelease-R100-14526.B-ishfirmware-cherry-14454.B-ishfirmware-brya-14505.B-ishfirmware-brya-14505.71.B-ishfactory-kukui-14374.B-ishfactory-guybrush-14600.B-ishfactory-cherry-14455.B-ishfactory-brya-14517.B-ishJack Rosenthal2021-11-0512-1652/+0
| | | | | | | | | | | | | | | | | | | | | | In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* zephyr: shim: implement a generic led_get_brightness_rangeFabio Baltieri2021-09-221-1/+1
| | | | | | | | | | | | | | | | | | | Implement a generic led_get_brightness_range function using static values from the device tree. This is currently ignoring led_id, but no pwm_led based device is using it right now anyway, so this could cover all existing use cases. BRANCH=none BUG=b:177452529 TEST=called the function, verified the values in runtime Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: I67dc7564eb6724e401961261ff5cc5892899ad5f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3170401 Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: shim: define led_color_map from the devicetreeFabio Baltieri2021-09-221-1/+1
| | | | | | | | | | | | | | | | | | | This adds a set of properties for color mapping in the device tree for the pwm-leds device, and maps them to the internal "struct pwm_led_color_map". BRANCH=none BUG=b:177452529 TEST=compared the structure on gdb TEST=build and run on volteer Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ib3a704afccad40eab7115371dbf72c568f5602d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3170400 Reviewed-by: Yuval Peress <peress@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* led_pwm: split color map on a separate structureFabio Baltieri2021-09-211-2/+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>
* volteer: Disable apthrottle console commandAbe Levkoy2021-09-201-5/+4
| | | | | | | | | | | | | | Reduce flash usage by 128 bytes. BUG=none TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I7d026cbb332d6e84f8d6a3275f7c43b902c6b963 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3171333 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* BB Retimer: Add new HPD callback to boardsDiana Z2021-09-161-0/+1
| | | | | | | | | | | | | | | 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>
* USB MUX: Update mux HPD update interface to use mux_state_tDiana Z2021-09-161-1/+2
| | | | | | | | | | | | | | | | | Since the drivers are now taking a mux_state_t set of flags to update, go ahead and unify the usb_mux API this way as well. It makes the parameters more apparent than the 1/0 inputs, and aligns the stack to use the same parameters. BRANCH=None BUG=b:172222942 TEST=make -j buildall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ie943dbdf03818d8497c0e328adf2b9794585d96e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3095438 Commit-Queue: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* zephyr: shim: set pwm_led data from device treeFabio Baltieri2021-09-101-0/+2
| | | | | | | | | | | | | | | | Set up the pwm_leds data from the device tree, gets rid of most static map defines and sets CONFIG_LED_PWM_COUNT automatically. BRANCH=none BUG=b:177452529 TEST=build and run on volteer TEST=compared the built up pwm_leds structure with gdb Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Change-Id: Ib41faf86ae018f5a1ed8a1c96c4b6ec081e175d9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3154256 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Yuval Peress <peress@google.com>
* 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-233-27/+19
| | | | | | | | | | | | | | | | | 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>
* volteer: Remove console help commandAbe Levkoy2021-05-271-0/+3
| | | | | | | | | | | | | | Save 5268 B of flash on volteer_apmodeentry and 5268 B on volteer. BUG=b:189363246 TEST=make buildall BRANCH=firmware-volteer-13672.B-main Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I30a21260f7692be3288712b02625acd968994c60 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2920636 Reviewed-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org>
* volteer: add volteer_npcx797fc build targetKeith Short2021-05-122-0/+14
| | | | | | | | | | | | | | | | Add the volteer_npcx797fc build target to test Volteer boards reworked with the NPCX797FC EC. BUG=b:163910671 BRANCH=none TEST=make buildall TEST=Verify memory map of volteer_npcx797fc ELF file. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I188f1d2df5d570be8c49b717a4c64f4346f45ae4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2354804 Reviewed-by: caveh jalali <caveh@chromium.org> Commit-Queue: caveh jalali <caveh@chromium.org>
* volteer, voxel: Add VIF override filesAbe Levkoy2021-03-241-0/+114
| | | | | | | | | | | | | | | | | Override VIF contents that genvif generates by default to create accurate VIFs for volteer and voxel. BUG=b:172276715 TEST=genvif -b volteer -o /tmp -v build/volteer/vif_override.xml TEST=genvif -b voxel -o /tmp -v build/voxel/vif_override.xml TEST=Similar compliance results on Voxel to handwritten VIF BRANCH=firmware-volteer-13672.B-main Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I4c72744a5d8b08aa46ef966299f0661a50499e55 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2785505 Reviewed-by: Denis Brockus <dbrockus@chromium.org> Commit-Queue: Denis Brockus <dbrockus@chromium.org>
* volteer: convert sensor mutexes to use K_MUTEX_DEFINEJack Rosenthal2021-03-231-15/+2
| | | | | | | | | | | | | | Convert sensor mutexes to use K_MUTEX_DEFINE(), removing the requirement for runtime initialization on Zephyr. BUG=b:177677037 BRANCH=none TEST=zmake testall && make buildall Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I6d17673d56e9b2d64e7e21f21be1e46d69f6844c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2782239 Reviewed-by: Simon Glass <sjg@chromium.org>
* volteer: Enable button console commandMadhu M2021-02-191-0/+6
| | | | | | | | | | | | | | | | | | | | Enabled compiler switch for volteer board to simulate button operations. BUG=None BRANCH=None TEST=Tested on delbin/voxel board. From EC console, entered the below commands: $ button vup 1000 Observed volume UP key press on display $ button vdown 1000 Observed volume DOWN key press on display Signed-off-by: Madhu M <madhu.m@intel.corp-partner.google.com> Change-Id: I5ba3abfba25e29bbd96997c9321e3718b4b1c0bd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2686975 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Madhu M <madhu.m@intel.com> Commit-Queue: Keith Short <keithshort@chromium.org>
* retimer: PD port retimer firmware update supportli feng2021-02-051-6/+0
| | | | | | | | | | | | | | | | Added one field to struct usb_mux_driver, which returns true if retimer update is supported. Moved query function from usb_retimer_fw_update.c to usb_mux.c. BUG=b:162528867 BRANCH=none TEST=Tested on Voxel, together with related coreboot and kernel changes. EC returns correct port information to kernel. Signed-off-by: li feng <li1.feng@intel.com> Change-Id: I5cab34a14adbf0470cffe6a13234ad53b6f6a90c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2651866 Reviewed-by: Keith Short <keithshort@chromium.org>
* retimer: support retimer firmware updateli feng2021-02-051-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To support AP to update firmware during boot up, one byte EC RAM is allocated for AP <-> EC communication. AP queries PD port/requests EC to perform operations via EC_CMD_ACPI_WRITE; and fetches result from EC via EC_CMD_ACPI_READ. The flow is: 1. AP queries EC PD ports which port supports retimer firmware update. 2. AP queries current MUX. 3. a) If no device attached, AP requests EC to suspend PD task of the port. Then AP requests EC to set MUX to USB mode, Safe mode, TBT mode. After entering TBT mode, the OS can either enumerate the retimers or do firmware update on the enumerated retimers. Once done, AP requests EC to disconnect MUX and resume PD task. 3. b) If device attached, AP moves on as usual. Retimer firmware update is not performed. BUG=b:162528867 BRANCH=none TEST=Tested NDA case on Voxel board, together with coreboot and kernel changes. Coreboot changes are merged. Kernel patches list is: https://chromium-review.googlesource.com/c/chromiumos/ third_party/kernel/+/2670719 After power up, host scans retimers, in sysfs localhost ~ # ls /sys/bus/thunderbolt/devices/ 0-0 0-0:1.1 0-0:3.1 domain0 On PD port 1, manually update retimer firmware. Copy firmware to nvm_non_active1/nvmem, then authenticate it. Host starts flow to update firmware. After it's done, PD port 1 resumes. Hotplug DP dongle/TBT device, devices should function fully. TEST=Tested DA cases on Voxel board, together with coreboot and kernel changes. USB4/TBT devices function as usual. Signed-off-by: li feng <li1.feng@intel.com> Change-Id: Ie976e75f892d5caf48a948598a058a4f42e07eb3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2594492 Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: Split out keyboard config into its own fileSimon Glass2021-02-043-18/+27
| | | | | | | | | | | | | Move this out of board.c so that zephyr can build it. BUG=b:167405015 BRANCH=none TEST=make -j30 BOARD=volteer Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I556dfef96b608991697dbf298baa3e73ead051bc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2675238 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* volteer: Add LED support for zephyr buildKeith Short2021-02-012-10/+9
| | | | | | | | | | | | | | | | Add LED support to zephyr builds on Volteer. BUG=b:174851299 BRANCH=none TEST=make buildall TEST=zmake testall TEST=Verify power and charging LEDs on Volteer. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I5c39d407ee0d1aca91cbbd721b82073f0163f34f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2657402 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Volteer: Add support for FRS to C1Eric Herrmann2021-01-283-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Add support to C1, assign the gpio to put the PPC in FRS mode and add the config options. Volteer boards need the SYV682B rework to support FRS, but this will not break existing boards. FRS will be enabled but fail, and enter ErrorRecovery, enter Unattached.SNK, or successfully FRS depending on the situation. Volteer HW can supply 3A per port, so changes to reserve the FRS current aren't needed to enable it on Volteer. BUG=b:148144711 TEST=Check that FRS is functional. FRS devices should not re-enumerate after adapter power is removed. Test with the SYV682B and using both the PS8815 and RT1715 TCPCs. BRANCH=none Change-Id: I7a599f1c350529d910a331f1ebc78ab41ff44a24 Signed-off-by: Eric Herrmann <eherrmann@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2057495 Reviewed-by: Abe Levkoy <alevkoy@chromium.org>
* volteer: change mutex for ZephyrHyungwoo Yang2021-01-221-2/+15
| | | | | | | | | | | | | | | | Change mutex structure name so it can be used by both ECOS and Zephyr. BUG=b:173507858 BRANCH=none TEST=make buildall -j8 build volteer on zephyr Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com> Change-Id: I797bb3335cb481e1d471635e5c9f11d48f2d37f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2638911 Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> 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-2/+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>
* Zephyr: Create public headers for bmi260, bma2x2, and tcs3400Hyungwoo Yang2021-01-201-5/+4
| | | | | | | | | | | | | | | Separate out the public part of sensor headers so it can be included from Zephyr. BUG=b:175434113 BRANCH=none TEST=make buildall -j8 build volteer on zephyr Signed-off-by: Hyungwoo Yang <hyungwoo.yang@intel.corp-partner.google.com> Change-Id: I899e9aea99d6c7d56a1b6735538b280fe0735313 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2637251 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* volteer: Move USB-A charging info to usbc_configSimon Glass2021-01-162-7/+8
| | | | | | | | | | | | | | | | | | | Move this information into a file that can be built by Zephyr, so that it can enable USB-A charging. Note: This is not related to USB-C. Should we create a charger.c file in board/volteer? BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Type 'usbchargemode 0 on' on volteer and see it start charging the phone Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I6658ebba1e473cafed2c8ae05e4013207f26ef3d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2631098 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* volteer: Add USB4 PD support functionsSimon Glass2021-01-162-41/+41
| | | | | | | | | | | | | | | Add a few functions needed by the USB4 Power Delivery features. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Iaab8efe5d04617bb8641fb2939ddeeaa62dc2523 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2631097 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: Create volteer_apmodeentry board configAbe Levkoy2021-01-151-0/+8
| | | | | | | | | | | | | | Help partners debug AP-driven mode entry. BUG=b:177105656 TEST=make buildall; observe new build BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I14c9f52e859f561c80758754d8b88e15a8b41ef5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2633448 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* volteer: Move ppc_get_alert_status() to usbc_configSimon Glass2021-01-132-10/+10
| | | | | | | | | | | | | | | Move this function over so we can use it from Zephyr. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I31605b02803d54c0e75691f11ac57205b3600c01 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617370 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* volteer: Move board_tcpc_init() out into usbc_configSimon Glass2021-01-122-62/+65
| | | | | | | | | | | | | | Move this init to usbc_config.c so that it can be used by Zephyr. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Change-Id: I7cd506db300e9e2468e4efc5b203f7063f44385c Cq-Depend: chromium:2618661 Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617369
* volteer: Split out board CBI code into its own fileSimon Glass2021-01-123-14/+28
| | | | | | | | | | | | | | | Move this out of board.c so we can use it on volteer. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I95d3445f61e3cbeef167dbf03b5456908566be3f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617368 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* volteer: Move tcpc_get_alert_status() to usbc_configSimon Glass2021-01-122-15/+17
| | | | | | | | | | | | | | | | Move this function over so we can use it from Zephyr. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Id84781093ff518c29e1829dc3933cb1c31803995 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617365 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Yuval Peress <peress@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: Allow building Intel Burnside BridgeSimon Glass2021-01-111-2/+0
| | | | | | | | | | | | | | Add support for bringing this driver into Zephyr. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Cq-Depend: chromium:2618537 Change-Id: I9f0432e33a0efb35ccf66a5befe2e5e0fdc789a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617041
* volteer: Split out usb mux configSimon Glass2021-01-112-35/+38
| | | | | | | | | | | | | | | | Move this out into the usbc_config file so that we can build for on Zephyr. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I992de3acd47beb6db61e1523eedb508b5f905e22 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2617364 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Create a public header for pi3usb9201Simon Glass2021-01-092-15/+15
| | | | | | | | | | | | | | | | | Add a separate public header for this chip so we can include it from Zephyr. Update Volteer's usbc_config file to use that header, so it builds on Zephyr. BUG=b:175434113 BRANCH=none TEST=make BOARD=volteer -j30 With a zephyr-chrome CL, build volteer on zephyr Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I45bb196a3c6de9bebefd3d06125d1cedd33666a8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2615619 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Split out some USB-C config into new filesSimon Glass2021-01-095-187/+217
| | | | | | | | | | | | | | | | | | | | | | | | | The Zephyr build needs this information but cannot use the whole board.c file. It is pretty big anyway, so let's move some of the USB-C config info into a separate file. Add a header file for the part specific to this config. We can progressively move more as Zephyr is able to build it. This requires the addition of many Kconfig options, so will be done in stages. BUG=b:175434113 BRANCH=none TEST=make -j30 buildall With a zephyr-chrome CL, build volteer on zephyr Check for other boards: for b in $(grep volteer board/*/build.mk |awk -F/ '{print $2}'); do \ echo $b; grep -A5 "enum usbc_port" board/$b/board.h; done Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I2a4bb0af2b8571ce992cdbbc8362dec25176872e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2605277 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>
* Mux: Program retimer mux mode firstDivya Sasidharan2020-12-101-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* volteer: Configure additional unused signalsKeith Short2020-12-081-0/+4
| | | | | | | | | | | | | | | | | | | | Configure additional unused signals to save power on S0ix. Savings are about 200 uW. EC power consumption, averaged over 60 minutes: Before changes: Avg 5.07 mW, max 13.61 mW, min 3.68 mW With changes: Avg 4.84 mW, max 7.14 mW, min 3.54 mW BUG=b:155882590 BRANCH=none TEST=make buildall TEST=Use Volteer reworked with sweetberry and measure power. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I9f01b04b0c363a31a8c6f703666d65f00c79ad8c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2578932 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* volteer: Enable CONFIG_DEBUG_ASSERT_BRIEFKeith Short2020-12-031-0/+1
| | | | | | | | | | | | | | | | | Enable CONFIG_DEBUG_ASSERT_BRIEF to reduce image size. This saves 2368 bytes in RO and 2392 bytes in RW. Current free space: 2592 RO, 2608 RW BUG=none BRANCH=firmware-volteer-13521.B-master TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: If71acd83ad26a07e7277aadffaeedf4724364f4c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2569851 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* Volteer: Remove PRL stringsDiana Z2020-11-181-0/+3
| | | | | | | | | | | | | | | | Volteer is nearly out of flash on ToT, so remove the PRL strings from the build. Set the default debug level to 2, so RX messages will show up in logs automatically if they are needed. BRANCH=None BUG=None TEST=build on ToT, observe volteer has over 1k free flash now Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ie56ae6d8882fea4df8baa7443c14b7f8de82aae0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2547193 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* volteer: 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=none BRANCH=firmware-volteer-13521.B-master TEST=make buildall TEST=connect device that sinks 15W (5V, 3A), connect a second device and verify PD contract remains at 15W on the first device. Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ibc28a9ce4b445b43ceb55151fb64540a40045798 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2533488 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* usb: Remove references to usb23Caveh Jalali2020-11-062-14/+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>
* volteer: remove support for boards with board ID 0Keith Short2020-11-052-26/+6
| | | | | | | | | | | | BUG=b:149858568 BRANCH=firmware-volteer-13521.B-master TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: Ic639d4afad9133f510731b0efd9ec22cdae141cc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2519961 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* volteer: Fix spellingAbe Levkoy2020-10-231-1/+1
| | | | | | | | | | | | | | Tempurature -> temperature BUG=none TEST=make buildall BRANCH=none Change-Id: I3d8e307a572ad19b277222e9360d88b3ab94f04f Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2493414 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* volteer: Configure temperature sensor pinsAbe Levkoy2020-10-201-0/+4
| | | | | | | | | | | | | | | | Configure these pins as ADC0-3 (alternate function) instead of as GPIO inputs (default). This saves ~5 mW during S0ix. BUG=b:155882590 TEST=dut-power -p 9997 --vbat-rate 0 -t 30 TEST=Run temps on EC console; see temperatures change over time BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I32871375fe703553d702ba05ab72abb8aca92074 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2485898 Commit-Queue: Keith Short <keithshort@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
* volteer: remove volteer_tcpmv1Keith Short2020-10-161-15/+0
| | | | | | | | | | | | | | | The volteer_tpcmv1 AP image has been removed, so the EC build based on the TCPMv1 stack is no longer needed. BUG=b:170658751 BRANCH=none TEST=make buildall Signed-off-by: Keith Short <keithshort@chromium.org> Change-Id: I8c5c3ffc95a588d4f24846eac3558184add9a444 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2481224 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Commit-Queue: Abe Levkoy <alevkoy@chromium.org>
* volteer: Configure unused GPIOsAbe Levkoy2020-10-141-0/+3
| | | | | | | | | | | | | | | GPIOs 86 and 57 are only connected to test points. Configure them as inputs with internal pull-up to save power. BUG=b:170356370,b:155882590 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I33736ccbcbb38fba9db41384f435688d5b614eac Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2466863 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* volteer: move thermal setting to variantScott Chao2020-10-071-0/+52
| | | | | | | | | | | | | | | 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>