summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* test: EC thinks AP can boot on low battery capstabilize-15117.86.B-mainstabilize-15117.48.B-mainstabilize-15117.111.B-mainrelease-R107-15117.B-mainAaron Massey2022-09-141-0/+41
| | | | | | | | | | | | | | | | | Verify that the EC can still determine if the AP is bootable on a low battery capacity while there is a charger connected. Also verify that the EC thinks it can't boot when it's on low battery without a charger connected. BRANCH=none BUG=b:246335162 TEST=twister --coverage --clobber -i -s zephyr/test/drivers/drivers.default Signed-off-by: Aaron Massey <aaronmassey@google.com> Change-Id: I02be9616fe3bee9fedd716f46ccb862b2f1ef0e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3892500 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* ps8xxx: Cache get_chip_info for all portsSam Hurst2022-09-141-24/+24
| | | | | | | | | | | | | | | | | | | | | Cache get_chip_info for all ports instead of just the first port. BUG=b:245748784 TEST=Herobrine does not boot loop on updating the TCPC ps8805.0: vendor 0x1da0 product 0x8805 device 0x0002 fw_rev 0x16 ps8805.1: vendor 0x1da0 product 0x8805 device 0x0001 fw_rev 0x15 BRANCH=main LOW_COVERAGE_REASON=This is a time sensitive change and code coverage will be increased in a separate CL and is tracked by BUG=b:246762616 Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I05647a2d118dce5204f710605afab83a42652ba5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3888227 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Wai-Hong Tam <waihong@google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* mock: Fix format for 2-dimensional arraysFiras Sammoura2022-09-142-21/+34
| | | | | | | | | | | | | | | | | Define default_fake_fp_positive_match_salt and trivial_fp_positive_match_salt explicitly as 2-dimensional arrays with dimensions FP_MAX_FINGER_COUNT and FP_POSITIVE_MATCH_SALT_BYTES. Include driver/fingerprint/fpsensor.h to define FP_MAX_FINGER_COUNT. BRANCH=None BUG=b:242720387 TEST=make run-fpsensor_state TEST=make runhosttests Signed-off-by: Firas Sammoura <fsammoura@google.com> Change-Id: Iaae2280179e99bd5098928976727aa9b3cca9954 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3893046 Reviewed-by: Craig Hesling <hesling@chromium.org>
* twister: Update checking if in chrootYuval Peress2022-09-141-1/+1
| | | | | | | | | | | | | | | Check the cros_chroot_version file instead of the environment variable as directed in chat. BRANCH=none BUG=b:246461298 TEST=twister -c -v Signed-off-by: Yuval Peress <peress@google.com> Change-Id: I6b83c403e0ed3eea8c7ffb8e201c64bf1390d7ec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3893083 Reviewed-by: Tristan Honscheid <honscheid@google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* board: change Google USB vendor infoMike Frysinger2022-09-1422-22/+22
| | | | | | | | | | | | | | Use updated legal name. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: I526bea449364cbe44adf83cca1375d47c514dd70 Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3893391 Reviewed-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* board/hyperdebug: Update pin assignmentJes B. Klinke2022-09-143-209/+204
| | | | | | | | | | | | | | | The OpenTitan project has decided to use the four Nucleo connectors CN7-10 instead of the larger ones CN11-12, which are unpopulated from the factory. This required a reassignment of all the IO signals. BUG=b:192262089 TEST=Manually apply voltage to each physical pin in turn, observing gpioget. Change-Id: I2aaba0298d84370d0cdf5d5f3d19bee77c3c9b5f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3892574 Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org> Commit-Queue: Jes Klinke <jbk@chromium.org> Tested-by: Jes Klinke <jbk@chromium.org>
* Craask: Fix lid rotation parameters for CraaskbowlSue Chen2022-09-142-0/+48
| | | | | | | | | | | | | | | | | The placement of the LID sensor is spin 180' on xy plane for Craaskbowl. Use fw_config bit8 to describe Lid sensor orientation: 0: original placement 1: rotate 180' on xy plane BUG=none BRANCH=none TEST=table mode and rotation work fine on Craaskbowl Signed-off-by: Sue Chen <sue.chen@quanta.corp-partner.google.com> Change-Id: Ifa3d22ca2e1c90dfebb8ad8a7eca676b84c07191 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891565 Code-Coverage: Andrew McRae <amcrae@google.com> Reviewed-by: Andrew McRae <amcrae@google.com>
* magikarp: initial gpioelmo_lan2022-09-141-3/+7
| | | | | | | | | | | | | | initial board specific gpio.. BUG=b:243631595 BRANCH=none TEST=zmake build magikarp --clobber Signed-off-by: elmo_lan <elmo_lan@compal.corp-partner.google.com> Change-Id: I3176ec0858cc983b45cfafd26b37f5a4b3c8012c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3892080 Reviewed-by: SamSP Liu <samsp_liu2@compal.corp-partner.google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* magikarp: initial g-sensorelmo_lan2022-09-142-2/+2
| | | | | | | | | | | | | | initial g-sensor direction and cbi mapping. BUG=b:242929666 BRANCH=none TEST=zmake build magikarp --clobber Signed-off-by: elmo_lan <elmo_lan@compal.corp-partner.google.com> Change-Id: Ie5ba0735de781af7926b7be7abfeea2f7f5e783a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3892079 Reviewed-by: SamSP Liu <samsp_liu2@compal.corp-partner.google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org>
* magikarp: add supported batteryelmo_lan2022-09-143-2/+50
| | | | | | | | | | | | | | Setup battery for magikarp. BUG=b:242937675 BRANCH=none TEST=zmake build magikarp --clobber Signed-off-by: elmo_lan <elmo_lan@compal.corp-partner.google.com> Change-Id: I63f4193d3df7b5c9f402e72c42fcfc0c9c4ceb40 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891553 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Reviewed-by: SamSP Liu <samsp_liu2@compal.corp-partner.google.com>
* krabby: dts: move rt9490 bc12 node to i2c0Ting Shen2022-09-141-7/+7
| | | | | | | | | | | | | | | | | | It's not under i2c4. (Actually this is a no-op change because rt9490 driver only requires that the i2c config in charger node is correct) BUG=none TEST=bc12 detection on c1 port still works BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Id905cbf1a45fe3be0232f42a9c964930fd689467 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3893811 Reviewed-by: Eric Yilun Lin <yllin@google.com> Tested-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Ting Shen <phoenixshen@chromium.org>
* nivviks: Add keyboard config for recovery modeAndrew McRae2022-09-141-0/+3
| | | | | | | | | | | | | | Add keyboard configs to enable entering recovery mode via 'Esc'/'Refresh'/power-btn. BUG=b:246657903 TEST=zmake build nivviks; flash & run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I79a6589ed693deedcf88841051c44e495d70196b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3893304 Reviewed-by: Reka Norman <rekanorman@chromium.org>
* yaviks: update thermistor namingZick Wei2022-09-141-6/+6
| | | | | | | | | | | | | BUG=b:241964549 BRANCH=none TEST="ectool temps all" thermistor name is intended. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I97206424eb6ed9db913d4e78a1f91e01e4994242 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3893689 Reviewed-by: Andrew McRae <amcrae@google.com> Commit-Queue: Andrew McRae <amcrae@google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* zephyr: add temperature sensor nameZick Wei2022-09-141-0/+1
| | | | | | | | | | | | | | | Add TEMP_SENSOR_5V_REGULATOR to enum names. BUG=none BRANCH=none TEST=none Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I196d10cc6108824297401f2145a88bf1f070e9de Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891563 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Commit-Queue: Andrew McRae <amcrae@google.com> Reviewed-by: Andrew McRae <amcrae@google.com>
* TCPM: Remove unused VPD functionsAbe Levkoy2022-09-142-125/+0
| | | | | | | | | | | | | | | Remove VPD support functions that are not used anywhere. Reduce coverable lines of code. BUG=b:246363751 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Idf51827ff3b0abdc2b202c5eaae02ead23df6656 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891684 Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* TCPMv2: Move TBT and USB4 code to modulesAbe Levkoy2022-09-146-303/+295
| | | | | | | | | | | | | | | | | | | | | | | No-op refactor: Move code implementing Thunderbolt alt mode and USB4 mode from usb_pd_alt_mode_dfp.c to tbt_alt_mode.c and usb_mode.c. Guard usages of this code so that only boards with Thunderbolt or USB4 enabled call it. Somewhat reduce code size and coverable lines for non-Thunderbolt, not-USB4 boards. LOW_COVERAGE_REASON=This commit only moves existing code. The bulk of the uncovered delta supports USB4 entry. b:236868055 blocks coverage of this code. BUG=b:244467636 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I5aaa60d276c7b44305a238bbfba30cf092063564 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3887967 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
* brask: Config-guard TBT UFP codeAbe Levkoy2022-09-141-0/+2
| | | | | | | | | | | | | | Only build Thunderbolt UFP config for boards that support Thunderbolt. Reduce code size and avoid linker errors. BUG=b:244467636 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ia6bf6785cc2def57cbcd65eeb25565a15a5c1484 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3887966 Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
* brya: Config-guard TBT UFP codeAbe Levkoy2022-09-141-0/+2
| | | | | | | | | | | | | | | Only build Thunderbolt UFP config for boards that support Thunderbolt. Reduce code size and avoid linker errors. BUG=b:244467636 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I9d78c527ee35501add7d0e8ab3974647f1e4d9a7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3887965 Reviewed-by: Boris Mittelberg <bmbm@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* volteer: Config-guard TBT UFP codeAbe Levkoy2022-09-141-0/+2
| | | | | | | | | | | | | | Only build Thunderbolt UFP config for boards that support Thunderbolt. Reduce code size and avoid linker errors. BUG=b:244467636 TEST=make buildall BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I31b6ff121663a73e46e1eddace59dbb14140ef55 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3887964 Reviewed-by: Keith Short <keithshort@chromium.org>
* mithrax: Remove Burnside Bridge configAbe Levkoy2022-09-141-1/+0
| | | | | | | | | | | | | | | | mithrax does not use Burnside Bridge. Reduce image size and avoid linker errors when building without TBT and USB4 functions, which mithrax also does not use. BUG=b:244467636 TEST=make BOARD=mithrax BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I6945656f8a63412420d729f08ecace66fec2be18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3887963 Reviewed-by: Boris Mittelberg <bmbm@google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* TCPMv1: Remove cable discovery supportAbe Levkoy2022-09-142-153/+10
| | | | | | | | | | | | | | | | | TCPMv1 cable discovery support has not been used for some time. Remove it to facilitate refactoring TBT and USB4 code. LOW_COVERAGE_REASON=TCPMv1 is known to be buggy but is deprecated; its behavior is hard to describe but should not be changed. BUG=b:244218024 TEST=make BOARD=careena; DP monitor behavior same as ToT BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I6500f56418a860c343e8159f33151e765512067c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3887962 Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* TCPMv1: Remove TBT and USB4 supportAbe Levkoy2022-09-143-553/+5
| | | | | | | | | | | | | | | | | TCPMv1 has not been used for TBT or USB4 for some time. Remove this support to make it easier to refactor TBT and USB4 code. LOW_COVERAGE_REASON=TCPMv1 is known to be buggy but is deprecated; its behavior is hard to describe but should not be changed. BUG=b:244218024 TEST=make BOARD=careena; DP monitor behavior same as ToT BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Ia02ce7a2500b83e3147ec5737134a009a59ea288 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3887961 Reviewed-by: Diana Z <dzigterman@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* Update license boilerplate text in source code filesMike Frysinger2022-09-133-3/+3
| | | | | | | | | | | | | | | | 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: I1cf3efcd52510ddf4cc2b8fe43a0abd2b6a71c77 Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3893390 Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* rex: Add support for C0 FRS_EN to the PPCScott Collyer2022-09-132-0/+6
| | | | | | | | | | | | | | | | | This CL adds the config option to indicate that FRS swap detection will be done by the PPC. FRS_EN is controlled by the TCPC ioexpander and this signal was not being configured. BRANCH=none BUG=b:244874682 TEST=zmake build rex Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I21b2495cf398d503111654d24043edf05bd7d49e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3873653 Tested-by: Scott Collyer <scollyer@chromium.org> Commit-Queue: Scott Collyer <scollyer@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* rex: Remove USB_PD_DISCHARGE_TCPC configScott Collyer2022-09-131-1/+1
| | | | | | | | | | | | | | | | | Both USB_PD_DISCHARGE_PPC and USB_PD_DISCHARGE_TCPC configs were being selected. This causes the PPC to leave force discharge enabled and keeps VBUS low. BRANCH=none BUG=b:244874682 TEST=Verifed that VBUS is supplied when the PPC source path is enabled. Signed-off-by: Scott Collyer <scollyer@google.com> Change-Id: I35ae2c5d4360a89a1d3242906820feabd79936e6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3877664 Commit-Queue: Scott Collyer <scollyer@chromium.org> Tested-by: Scott Collyer <scollyer@chromium.org> Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* ec_commands: Add flexible array member support for C and C++Tom Hughes2022-09-131-13/+21
| | | | | | | | | | | | | | This change allows us to use flexible array members in both C and C++. BRANCH=none BUG=b:234181908 TEST=./util/compare_build.sh -b all -j 120 => MATCH Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ia62b27507cebbe14c9f5f618a6cf1133859cbe92 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3893044 Reviewed-by: Yuval Peress <peress@google.com>
* comm-usb: Make ec_command_usb return response data sizeDaisuke Nojiri2022-09-131-9/+18
| | | | | | | | | | | | | | | | | | | | | | | ec_command_usb currently returns the out data size (i.e. request packet size) but ec_command_proto is supposed to return a response data size (excluding the response header size). This is causing comm_init_buffer always fail to set ec_max_insize to the value expected by the EC. This patch fixes ec_command_usb to fix the issue. This patch also fixes the followings: * Check libusb_bulk_transfer's return value strictly (0 for success). * Make debug() write to stderr. BUG=b:233404167 BRANCH=None TEST=Vell. Run ectool --device 18d1:5022 console. Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org> Change-Id: Ifb33c76d65f033a3f68018fb77f492b65493e155 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891677 Commit-Queue: Parth Malkan <parthmalkan@google.com> Reviewed-by: Parth Malkan <parthmalkan@google.com>
* charger: fix up the charge_get_percent default return valueZhuohao Lee2022-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | The charge_get_percent should return zero when the HW design doesn't include a battery(ie. no CONFIG_BATTERY). The reason is that the function handle_new_power_state in usb_tc_drp_acc_trysrc_sm.c will check the battery status (via pd_is_battery_capable) to determine whether the device needs to issue DPM_REQUEST_HARD_RESET_SEND or not. If we return 100, the pd_is_battery_capable() will return true and that makes the PD do the HARD_RESET and cause the device to reboot endlessly. BUG=b:242949656 BRANCH=None TEST=make buildall flash the ec.bin to the device and check the typec pd is working Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Change-Id: I59d24c4f58bed3538b70eeba5eff11566bd5f455 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891810 Reviewed-by: Diana Z <dzigterman@chromium.org>
* yaviks: update led behaviorZick Wei2022-09-137-67/+248
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | yaviks has charge leds on left side and right side, each side have two colors: amber and white. The led behavior define as following: Charging led: led on with charging port active, other port is off. Charging: Amber. Discharging: Off. Battery Error: Blinking amber on both side (0.5 sec on, 0.5 sec off) Fuel < 10%: Blinking amber on both side (1 sec on, 1 sec off) Force idle for factory: Blinking amber (1 sec on, 1 sec off) System suspend with non-charging state: Blinking both side LED white (1 sec on, 1 sec off) BUG=b:246414045 BRANCH=none TEST=verify led behavior as intended, verify VT2 command: ectool led left/right auto/white/amber/off. Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I7d7ecaba5f1a78609d9093b94b67a23a40d62812 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3878626 Commit-Queue: Andrew McRae <amcrae@google.com> Reviewed-by: Andrew McRae <amcrae@google.com> Code-Coverage: Andrew McRae <amcrae@google.com> Reviewed-by: Peter Marheine <pmarheine@chromium.org> Reviewed-by: Devin Lu <devin.lu@quantatw.com>
* zephyr: Add alternative usb_mux_chain config for nissaTomasz Michalec2022-09-137-25/+32
| | | | | | | | | | | | | | | | | | Add alternative USB mux configuration in DTS for nissa. LOW_COVERAGE_REASON=no test for nissa board yet BUG=b:234482311 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Id367005334cc378c7495b615bab5333a72d39bf8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3875325 Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Adam Mills <adamjmills@google.com>
* zephyr: Add alternative usb_mux_chain config for corsolaTomasz Michalec2022-09-135-7/+22
| | | | | | | | | | | | | | | | | Add alternative USB mux configuration in DTS for corsola. LOW_COVERAGE_REASON=missing PS8743 emulator to introduce kingler baseboard_x_ec_gpio2_init test BUG=b:234482311 TEST=zmake build -a BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I82e8bbf7da49ba927eb2dfc151db046f5c88cb77 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3875324 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com>
* zephyr: shim: Move BB retimer controls to separate fileTomasz Michalec2022-09-133-27/+43
| | | | | | | | | | | | | | | Move bb_controls[] array generation to separate file. BUG=None TEST=zmake build -a BRANCH=None Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Id875840806593d75c4eebde273b1dff583281d10 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3875323 Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Check if BB retimers are configured properlyTomasz Michalec2022-09-132-8/+73
| | | | | | | | | | | | | | | | | | Check at compile time, that all BB retimers on the same USB-C port have the same reset and LS_EN pin configuration. This is required because of single entry in bb_controls array for each USB-C port. BUG=none TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I46b04385df99467b1ff1d4a484be5bb016c8a2d5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3748786 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com>
* zephyr: Add alternative usb_mux_chain config for adlrvpTomasz Michalec2022-09-133-29/+30
| | | | | | | | | | | | | | | | | Add alternative USB mux configuration in DTS for adlrvp. LOW_COVERAGE_REASON=no test for adlrvp board yet BUG=b:234482311 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Ibecdaf47bbda5835412787a1f0387b0bc0d19c45 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3700331 Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Support alternative usb_mux_chain config in DTSTomasz Michalec2022-09-133-8/+91
| | | | | | | | | | | | | | | | | | | | | Add support for alternative usb_mux configuration from the devicetree. Alternate USB mux chain is created by adding "cros-ec,usb-mux-chain" in DTS with alternative-chain property. To enable alternate configuration, USB_MUX_ENABLE_ALTERNATE_NODE macro has to be used at runtime. BUG=b:234482311 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=none Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I0ae8889b225800d8741f01f8ea70c5f4f5547065 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3700330 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: test: usb_mux: Split struct usb_mux in testsTomasz Michalec2022-09-136-94/+132
| | | | | | | | | | | | | | | | | | Update tests to use new struct usb_mux_chain. BUG=b:236274003 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=None Cq-Depend: chromium:3779618 Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I393fe86a94816a98eaf413244884e6aa082f906a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780421 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* zephyr: rex: usb_mux: Split struct usb_mux in rex boardTomasz Michalec2022-09-131-1/+5
| | | | | | | | | | | | | | | | | Update rex board to use new struct usb_mux_chain. BUG=b:236274003 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=None Cq-Depend: chromium:3779618 Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I8b197640263cd71a6b0b79bf316f4d2ee3b87622 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3858650 Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: trogdor: usb_mux: Split struct usb_mux in trogdor boardTomasz Michalec2022-09-131-7/+13
| | | | | | | | | | | | | | | | | | Update trogdor board to use new struct usb_mux_chain. BUG=b:236274003 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=None Cq-Depend: chromium:3779618 Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Ib44dde43d4221c90d5aa8509c41e07d7e5cfaa86 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780420 Commit-Queue: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com>
* zephyr: skyrim: usb_mux: Split struct usb_mux in skyrim boardTomasz Michalec2022-09-132-80/+118
| | | | | | | | | | | | | | | | | | | Update skyrim board to use new struct usb_mux_chain. LOW_COVERAGE_REASON=no test for skyrim yet and missing required usb mux emulators (PS8818, ANX7483) BUG=b:236274003 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=None Cq-Depend: chromium:3779618 Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Ia572fa040a220b5f7129026c210be986edccb061 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780419 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Tested-by: Tomasz Michalec <tmichalec@google.com>
* zephyr: brya: usb_mux: Split struct usb_mux in brya boardTomasz Michalec2022-09-131-3/+14
| | | | | | | | | | | | | | | | | Update brya board to use new struct usb_mux_chain. BUG=b:236274003 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=None Cq-Depend: chromium:3779618 Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Icccb0299cea28c21656ab2faf8dac10309ae07ea Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780418 Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: nissa: usb_mux: Split struct usb_mux in nissa boardsTomasz Michalec2022-09-139-40/+77
| | | | | | | | | | | | | | | | | | Update nissa boards to use new struct usb_mux_chain. BUG=b:236274003 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=None Cq-Depend: chromium:3779618 Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: Icf0dbef327d8cc5172fef960b6cecb792e1eb887 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780417 Reviewed-by: Keith Short <keithshort@chromium.org> Code-Coverage: Zoss <zoss-cl-coverage@prod.google.com> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: intelrvp: usb_mux: Split struct usb_mux in intelrvp boardsTomasz Michalec2022-09-133-33/+73
| | | | | | | | | | | | | | | | | | Update intelrvp boards to use new struct usb_mux_chain. LOW_COVERAGE_REASON=no test for adlrvp board yet BUG=b:236274003 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=None Cq-Depend: chromium:3779618 Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I6f69cc3d4ce99837a0db6bb12d55b71551a0d577 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780416 Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: herobrine: usb_mux: Split struct usb_mux in herobrine boardsTomasz Michalec2022-09-134-8/+32
| | | | | | | | | | | | | | | | | Update herobrine boards to use new struct usb_mux_chain. BUG=b:236274003 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=None Cq-Depend: chromium:3779618 Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: If664fd0815a9227e1c2d5aa848944cad655f739a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780415 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* zephyr: corsola: usb_mux: Split struct usb_mux in corsola boardsTomasz Michalec2022-09-136-14/+40
| | | | | | | | | | | | | | | | | | | Update corsola boards to use new struct usb_mux_chain. LOW_COVERAGE_REASON=missing PS8743 emulator to introduce kingler board_usb_mux_init test BUG=b:236274003 TEST=zmake build -a TEST=./twister -T zephyr/test BRANCH=None Cq-Depend: chromium:3779618 Signed-off-by: Tomasz Michalec <tm@semihalf.com> Change-Id: I120e759c95b77d88dc5adfb4ed3006c487ca839a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780414 Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* test: usb_mux: Split struct usb_mux in testsTomasz Michalec2022-09-139-16/+37
| | | | | | | | | | | | | | | | Update tests 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: I2d01d35d1155a6cdec558bedf06b09e0b00aa642 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780413 Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* servo_v4p1: usb_mux: Split struct usb_mux in servo_v4p1 boardTomasz Michalec2022-09-131-8/+14
| | | | | | | | | | | | | | | | Update servo_v4p1 board 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: I46492672691f12b249ed37c6f52dcc18b1b40cd4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780412 Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* pdeval-stm32f072: usb_mux: Split struct usb_mux in pdeval-stm32f072Tomasz Michalec2022-09-131-6/+9
| | | | | | | | | | | | | | | | Update pdeval-stm32f072 board 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: I350f336f61e089460efc14312dac80c3764d61c3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780411 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* mchpevb1: usb_mux: Split struct usb_mux in mchpevb1 boardTomasz Michalec2022-09-131-9/+15
| | | | | | | | | | | | | | | | Update mchpevb1 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: Ib6bb181fcf462b32bdf291dfc04d78f5e197a211 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780410 Reviewed-by: Keith Short <keithshort@chromium.org> Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* ambassador: usb_mux: Split struct usb_mux in ambassador boardTomasz Michalec2022-09-131-4/+6
| | | | | | | | | | | | | | | | Update ambassador board 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: I927d460fad0b0ac578213c0647ac891443f838c0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780409 Tested-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Tomasz Michalec <tmichalec@google.com>
* goroh: usb_mux: Split struct usb_mux in goroh boardTomasz Michalec2022-09-131-14/+21
| | | | | | | | | | | | | | | | Update goroh board 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: I978b1174f8ab2f3274c242c460243c5d97067496 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3780408 Tested-by: Tomasz Michalec <tmichalec@google.com> Commit-Queue: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Keith Short <keithshort@chromium.org>