summaryrefslogtreecommitdiff
path: root/util/ec3po
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch cros/main into firmware-dedede-13606.B-masterAdam Mills2023-02-095-4/+12
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated by: util/update_release_branch.py -r --baseboard dedede --relevant_paths_file util/dedede-relevant-paths.txt firmware- dedede-13606.B-master Relevant changes: git log --oneline 4df9649461..61c3af6f41 -- baseboard/dedede board/beadrix board/beetley board/blipper board/boten board/bugzzy board/corori2 board/cret board/dibbi board/drawcia board/drawcia_riscv board/galtic board/kracko board/lantis board/madoo board/magolor board/metaknight board/pirika board/sasuke board/sasukette board/shotzo board/storo board/waddledee board/waddledoo board/wheelie common/charge_state_v2.c common/mkbp_* common/ocpc.c common/usbc/usb_tc_drp_acc_trysrc_sm.c common/usbc/usb_sm.c common/usbc/*_pd_* common/usbc/dp_alt_mode.c common/usbc/usb_prl_sm.c common/usbc/usb_pe_drp_sm.c common/usb_charger.c common/usb_common.c common/usbc_ocp.c driver/charger/sm5803.* driver/charger/isl923x.* driver/tcpm/raa489000.* driver/tcpm/it83* include/power/icelake.h include/intel_x86.h power/icelake.c power/intel_x86.c util/getversion.sh 7884deec9f TCPMv2: Gate DP module support on a CONFIG 787e649b99 it8xxx2: modify pd registers for it81202/it81302 Cx 1de8cd98a1 dibbi: Add PPC support 92ce270872 raa489000: never report ACOK when sourcing VBUS 2fb4880984 dibbi: Updating EC pinout based on latest schematics adc838c427 ocpc : Don't let voltage drop below voltage_min 277a05bb47 raa489000: support AC_PRESENT_CONTROL without OCPC 4527f51ccb RAA489000: support modify OCP level margin c9f629f547 charger/isl9238c: Add BUCK_PHASE_VOLTAGE config 7dc429e831 usbc-pd: Log with labels should honor debug level 4a475bcaf7 TCPMv2: Clear DPM state on disconnect b2720d5f14 TCPMv2: Add host command VDM:Attention retrieval a86aff466a TCPMv2: Queue Attention messages for consumption c7d5e1da9a TCPMv2: Rearrange VDM response HC contents 3f0f13bf48 raa489000: Support AC_PRESENT when OTG mode ca2ec79d63 common/mkbp_event: Fix EC_CMD_GET_NEXT_EVENT response a7eb8d5a50 TCPMv2: Add SOP minor revision to EC_CMD_TYPEC_STATUS 49abac3967 Default charger current derating to 5% f0436fe4c6 chgstv2: optimization battery protection for low voltage 8510a42afa TCPMv2: Update PE comments aeb757fd75 charger/isl9238c: enable force buck mode 602912a4ef TCPMV2: Handle errors in pe_send_alert_run 55a0acd279 usbc-pd: Use correct config item for AP pwr 44b10c0f6d Raa489000: Remove dependency on BC 1.2 3a705db54b TCPMv2: Make VDM ACKs available to the AP 53c21ecb2b usb_prl: support logging to a ring buffer 3a824dc622 ec: Support logging system boot time info 7510348192 TCPMv2: Pass NAK VDM headers to DPM 1b5fd24c11 usb_tc_drp_acc_trysrc_sm: add bound check 868032324f Revert "ec: Support logging system boot time info" c8325ba18b ec: Support logging system boot time info 2606632fda getversion.sh: Add private-mt-scp/... git hash for fingerprint c50046ad63 board: Sort header files 599c438e80 common: Sort header files e6da633c38 driver: Sort header files a0d94a2179 tcpmv2: dpm: Add DATA_RESET state 57b3256963 Rename CONFIG_CHARGER_INPUT_CURRENT to _CHARGER_DEFAULT_CURRENT_LIMIT da9a0ba6ad tcpmv2: dpm: Split DPM_READY to DFP/UFP specific states cbacb3e5d0 tcpmv2: pe: Add mux_set call following successful DATA_RESET a6dfae3836 dibbi: Update board specific power implementation bd967de4a3 magolor: delay one second when charger enter low power mode 43b53e0045 Add default implementation of board_set_charge_limit 667d7d7129 dp-alt-mode: add safety check 20b581f68a TCPMv2: Present as Sink/UFP in CTAttached.SNK 1063e0ff83 TCPMv2: Disallow VCONN Swap in CTAttached.SNK b75dc90677 Add CONFIG_CHARGER_MIN_INPUT_CURRENT_LIMIT 1c5c179db1 pirika: fix index check b3d7ad5e5e test: add missing coverage for mkbp_event.c eccb0c71b5 isl923x: fix index check ec31407993 Add CONFIG_CHARGER_INPUT_CURRENT_DERATE_PCT 9c52ce0b7c board/corori2: Free up flash space dee200cbf6 dibbi: Update power and recovery buttons 4d7c3314bc board/waddledoo: Free up flash space 0b7798dc00 pd console command: cflush fix 46ab913942 usb_pe: add PE state index in the comment eecd4959ca dibbi: Remove select unused features from waddledee fork 31cf129cb7 test: verify common paths for charge_prevent_power_on 4028694bc7 dibbi: Create initial EC image 8848a7d064 buggzy: Enable on/off body detection 004f930719 Nissa: OCPC PID Controller hasn't been tuned for each Nissa board 1736458970 tpcmv2: dpm: Rename attempt_mode_entry/exit functions 408ac447c3 usb_common: Remove pd_is_debug_acc 290a6ce0d4 tcpmv2: dpm: Convert dpm_run to a 1st class SM framework 339879506f zephyr test: usbc_ocp: Log during tests 41948753c4 test: verify battery_outside_charging_temperature() bafcc352e4 ec: Fix array access past end of array 1e0abfa71e TCPMv2: Add host command to send VDM REQ messages 4308b6756c build: clang workaround for LTO ed4a792d8f RAA48900 : Modify configuring trickle charge current code 2126767c8e isl923x: Add ISL9238C CMOUT latch disable function f0cd67d2e3 TCPMv2: Generalize VDM Attention send in DPM 1143be2741 TCPMv2: Cleanup unused flags f032746e06 usb-pd: Apply 2.5W limit during power transition 01835ef4b6 test: chg_ramp_is_detected() 95134ee0c7 test: chg_ramp_is_stable() 7caa72d2d1 RAA48900 : Allow configuring trickle charge current 650a67c64c board/corori2: Free up more flash space 31a2f3ee72 TCPM: Remove unreachable code 0d1b98c718 tree: Enable warning for fallthrough in switch statements eae5e48f0a power/icelake: add casts for power signals 7cb58895c4 zephyr: avoid collisions with board.h c6b3af73ed TCPMv2: modify default rp value when bist share mode 6d8bb5bebe TCPMv2: Add bist share mode console command 29de97bc3b typec: Clear stale hard reset event when ready 829435fca3 sm5803: disable sinking before other reconfiguration 52a51c53a0 ectool: support bist share mode enable/disable command 9d67377da2 Revert "test: EC_CMD_USB_PD_FW_UPDATE host cmd" 7c4b51d8bf TCPM: Move pd flash implementation to TCPMv1 55dabb1618 TCPM: Move pd_custom_vdm to TCPMv1 192450c603 TCPMv2: Remove PE_HANDLE_CUSTOM_VDM 35956e5930 usb_common: Fix/test EC_CMD_PD_HOST_EVENT_STATUS e60ea169df test: EC_CMD_USB_PD_FW_UPDATE host cmd b8214ebaf1 usbc: modified the DPM logic to match the DP module logic. 58bb9b518d charger: Detect the number of battery cells c42c1c6788 TCPMv2: Discover mode again after Data Reset 8bd196d17f test: Verify uncovered common OCP routines a5e6358f2f TCPMv2: Add PD suspend/resume console commands 6278fe9df7 USB Mux: Unify drivers for safe mode 2fbeb3eec6 Battery: align OS low battery shutdown behavior 055da16f46 zephyr: tests: Test host command EC_CMD_MKBP_INFO (mkbp_info.c) 5ea7789ecc zephyr: tests: Test force_mkbp_if_events() in mkbp_event.c ded9307b79 util/getversion.sh: Fix version when not in a git repo 1782a0e27b TCPMv2: Move TBT and USB4 code to modules BRANCH=None BUG=b:256707714 b:245531291 b:267742066 b:247635955 b:263691951 BUG=b:262663436 b:250015035 b:260912784 b:260095516 b:231401624 BUG=b:261736720 b:267415408 b:257377036 b:64477774 b:256182103 BUG=b:234772074 b:236799854 b:163093572 b:258110734 b:172020503 BUG=b:240458902 b:244253629 b:244467636 b:249574372 b:208884535 BUG=b:242477985 b:253644823 b:243189930 b:163093572 b:246424843 BUG=b:255357127 b:255967867 b:257341564 b:266879860 b:260774380 BUG=b:263691951 b:258143457 b:236075275 b:250015035 b:257833880 BUG=b:229692652 b:257377326 b:257851736 b:265862821 b:249163956 BUG=b:247100970 b:236074634 b:257370402 b:263996465 b:249616030 BUG=b:255697209 b:244756834 b:244749869 b:266714542 b:239515386 BUG=b:194504052 b:246839061 b:242957100 b:259155418 b:262663436 BUG=b:263691951 b:236075259 b:256539662 b:262462631 b:263921114 BUG=b:253154031 b:236075275 TEST=`make -j buildall` Force-Relevant-Builds: all Change-Id: I9705fd04870e22fb558ec4e5e2f95f99e9bd5011 Signed-off-by: Adam Mills <adamjmills@google.com> Cq-Depend: chromium:4127501
| * ec: Use chromite isort configJeremy Bettis2023-02-035-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove the .isort.cfg from platform/ec and use the one from chromite instead. This should be compatible with cros format. BRANCH=None BUG=b:267757300 TEST=Ran firmware_builder.py Change-Id: Ice4955b6995bd1f9380e97f58e89efb7c1e8aeb1 Signed-off-by: Jeremy Bettis <jbettis@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/4221928 Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* | Merge remote-tracking branch cros/main into firmware-dedede-13606.B-masterZhuohao Lee2022-09-137-7/+7
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated by: util/update_release_branch.py --baseboard dedede --relevant_paths_file util/dedede-relevant-paths.txt firmware-dedede-13606.B-master Relevant changes: git log --oneline a1c1b694ad..e8fdcaa03f -- baseboard/dedede board/beadrix board/beetley board/blipper board/boten board/bugzzy board/corori2 board/cret board/drawcia board/drawcia_riscv board/galtic board/kracko board/lantis board/madoo board/magolor board/metaknight board/pirika board/sasuke board/sasukette board/shotzo board/storo board/waddledee board/waddledoo board/wheelie common/charge_state_v2.c common/mkbp_* common/ocpc.c common/usbc/usb_tc_drp_acc_trysrc_sm.c common/usbc/usb_sm.c common/usbc/*_pd_* common/usbc/dp_alt_mode.c common/usbc/usb_prl_sm.c common/usbc/usb_pe_drp_sm.c common/usb_charger.c common/usb_common.c common/usbc_ocp.c driver/charger/sm5803.* driver/charger/isl923x.* driver/tcpm/raa489000.* driver/tcpm/it83* include/power/icelake.h include/intel_x86.h power/icelake.c power/intel_x86.c util/getversion.sh e8f7493381 dedede: usb_mux: Split struct usb_mux in dedede boards 953d4674e6 zephyr: tests: Test host command EC_CMD_GET_NEXT_EVENT in `mkbp_event.c` 71b2ef709d Update license boilerplate text in source code files 234a3fd7dd shotzo: Modify power led behavior when suspending BRANCH=None BUG=b:236274003 b:245531291 chromium:1098010 b:235791717 TEST=`make -j buildall` Signed-off-by: Zhuohao Lee <zhuohao@chromium.org> Change-Id: I77e992e4f74e2db18da629a88a2a15564c7c5ab2
| * Update license boilerplate text in source code filesMike Frysinger2022-09-127-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BRANCH=none BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icd3a1723c20595356af83d190b2c6a9078b3013b Signed-off-by: Mike Frysinger <vapier@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3891203 Reviewed-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* | Merge remote-tracking branch cros/main into firmware-dedede-13606.B-masterDiana Z2022-07-275-3315/+3543
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Generated by: ./util/update_release_branch.py --baseboard dedede --relevant_paths_file util/dedede-relevant-paths.txt firmware-dedede-13606.B-master -r Relevant changes: git log --oneline 103b6f9ff7..3805390c2f -- baseboard/dedede board/beadrix board/beetley board/blipper board/boten board/bugzzy board/corori2 board/cret board/drawcia board/drawcia_riscv board/galtic board/kracko board/lantis board/madoo board/magolor board/metaknight board/pirika board/sasuke board/sasukette board/shotzo board/storo board/waddledee board/waddledoo board/wheelie common/charge_state_v2.c common/mkbp_* common/ocpc.c common/usbc/usb_tc_drp_acc_trysrc_sm.c common/usbc/usb_sm.c common/usbc/*_pd_* common/usbc/dp_alt_mode.c common/usbc/usb_prl_sm.c common/usbc/usb_pe_drp_sm.c common/usb_charger.c common/usb_common.c common/usbc_ocp.c driver/charger/sm5803.* driver/charger/isl923x.* driver/tcpm/raa489000.* driver/tcpm/it83* include/power/icelake.h include/intel_x86.h power/icelake.c power/intel_x86.c util/getversion.sh 550176591c TCPMV2: Handle TBT mode entry 3524a1f7eb landrid: Set KB_BL PWM freq to 100Hz to fix flick 7e2d1e9d9c sm5803: disable GPADCs when in LPM 577c6ef6ac sm5803: prevent use when PD max voltage exceeds 15V 4354b58e59 dedede: limit PD voltage to 15V for boards with SM5803 4869e6f485 tree: Change non-standard "%pP" printf format to "%p" 4eed38ea2d usb_pd_dpm: fix sink_max_pdo_requested 524cba08cc mkbp: don't queue mkbp events in S3 0185e458d5 baseboard/dedede: Enable LTO c020eb91f1 TCPMV2: Add USB PD Power Button Support 9c452e6150 tree: remove unused P9221 wireless charger 94f92cd7f1 clang-format: Ran clang-format on all files again a2abb573b5 sm5803: slow clocks last when enabling LPM 0c40e309a7 common/usbc/usb_pd_timer.c: Format with clang-format 18f80aeb6f board/galtic/board.h: Format with clang-format 2a8141fd97 board/magolor/board.h: Format with clang-format c9a76aa00b board/corori2/board.h: Format with clang-format 9c181fc5fc board/drawcia_riscv/board.h: Format with clang-format 29dde07763 board/storo/board.h: Format with clang-format c36a2a6bf6 board/waddledoo/board.h: Format with clang-format 782068a5f4 board/boten/board.h: Format with clang-format 484252e707 board/shotzo/board.h: Format with clang-format d6190d3bb0 board/sasuke/board.h: Format with clang-format e85b6009b1 board/pirika/board.h: Format with clang-format a75640a1b2 board/beadrix/board.h: Format with clang-format 8dc256efde board/drawcia/board.h: Format with clang-format df6c7f601b board/bugzzy/board.h: Format with clang-format 51c9837902 common/charge_state_v2.c: Format with clang-format 6186f4534a board/kracko/board.h: Format with clang-format e68a546a56 board/waddledee/board.h: Format with clang-format ba1d706516 board/lantis/board.h: Format with clang-format 1c62a5b8ec board/madoo/board.h: Format with clang-format f78ba0618b beadrix: board_set_active_charge_port cleanup a63f393138 TCPMV2: Gate Alert USB PD 3.1 fields on partner revision 9dda866745 driver/charger/sm5803.c: Format with clang-format 1b59a8aee0 common/usbc/dp_alt_mode.c: Format with clang-format ca37567105 board/sasukette/usb_pd_policy.c: Format with clang-format c803fd7994 board/waddledee/cbi_ssfc.h: Format with clang-format 106afede0f board/shotzo/cbi_ssfc.h: Format with clang-format ec181c329d TCPMv2: Treat VDM response timeout as NAK 192839afdb TCPMv2: Synchronize DP and DPM states 2169211023 board/waddledee/led.c: Format with clang-format 59dd0a83a5 board/kracko/led.c: Format with clang-format 7cade92a67 board/pirika/board.h: Format with clang-format 180fdb3260 board/madoo/battery.c: Format with clang-format a49bbd01c2 board/boten/board.c: Format with clang-format b1579096c5 board/cret/board.c: Format with clang-format 63bbacdacb board/pirika/led.c: Format with clang-format 997c9ac51f common/usbc/usb_pd_console.c: Format with clang-format 778efec4f6 board/boten/cbi_ssfc.c: Format with clang-format ffc81b42b4 board/madoo/board.h: Format with clang-format 7fe8511843 board/galtic/cbi_ssfc.h: Format with clang-format 2d0dc5c970 board/shotzo/board.h: Format with clang-format 55346e35ec board/galtic/cbi_ssfc.c: Format with clang-format 73980b445a board/storo/board.c: Format with clang-format 6f389d6f56 board/beetley/cbi_ssfc.h: Format with clang-format 77a0e41075 board/drawcia/usb_pd_policy.c: Format with clang-format ab82ad436b board/kracko/cbi_ssfc.c: Format with clang-format 87c7f72c73 board/storo/board.h: Format with clang-format eed779395f board/lantis/cbi_ssfc.c: Format with clang-format 77f12b39d5 board/sasukette/cbi_ssfc.h: Format with clang-format 0ab24b6b5e board/shotzo/usb_pd_policy.c: Format with clang-format e0495d5e82 board/beadrix/board.c: Format with clang-format 963f4df974 board/magolor/usb_pd_policy.c: Format with clang-format 7a38ccf03f common/usbc/usb_pd_dpm.c: Format with clang-format 4dadad9587 board/magolor/cbi_ssfc.c: Format with clang-format 4e986ac1e7 board/galtic/board.h: Format with clang-format 28064b54d5 board/sasuke/led.c: Format with clang-format 7d589eae41 board/beetley/usb_pd_policy.c: Format with clang-format e7ff16a406 board/drawcia/cbi_ssfc.c: Format with clang-format b6468e2e9d common/ocpc.c: Format with clang-format a3ed759d27 board/drawcia/cbi_ssfc.h: Format with clang-format 2aefd00cda board/kracko/cbi_ssfc.h: Format with clang-format 784f1b2414 board/galtic/board.c: Format with clang-format 225a5b9797 board/drawcia/board.c: Format with clang-format 7f9697d7bf board/cret/usb_pd_policy.c: Format with clang-format 408056cbb5 common/usbc/usb_prl_sm.c: Format with clang-format fe7c249d0a board/metaknight/cbi_ssfc.h: Format with clang-format 79eb0a6ac2 board/madoo/usb_pd_policy.c: Format with clang-format af78dc683f board/corori2/board.c: Format with clang-format bebbe4997c board/storo/cbi_ssfc.h: Format with clang-format 60e28279fa board/corori2/cbi_ssfc.h: Format with clang-format db9740a65f board/sasukette/cbi_ssfc.c: Format with clang-format 8e8f98ddd9 board/waddledee/cbi_ssfc.c: Format with clang-format 8e736c8bf8 board/beadrix/usb_pd_policy.c: Format with clang-format 453a24c378 board/sasuke/board.c: Format with clang-format 0cd6d00d66 board/waddledoo/cbi_ssfc.h: Format with clang-format 44d9369d10 board/shotzo/led.c: Format with clang-format a434679bdb board/sasukette/board.h: Format with clang-format 27c21a9334 power/icelake.c: Format with clang-format 8626b6f857 board/kracko/board.h: Format with clang-format a1e1edfa93 board/wheelie/board.c: Format with clang-format 8eeb9f5986 board/shotzo/board.c: Format with clang-format 88222aad8f board/magolor/led.c: Format with clang-format 8293c2fec9 board/sasukette/battery.c: Format with clang-format 7c0b6e48f8 board/metaknight/usb_pd_policy.c: Format with clang-format 6f90db19d8 baseboard/dedede/cbi_fw_config.h: Format with clang-format 65f0a418dd common/usbc/usbc_pd_policy.c: Format with clang-format cc7f87c3c3 board/waddledoo/board.c: Format with clang-format 93116d385b board/waddledee/usb_pd_policy.c: Format with clang-format 3cac37c66f baseboard/dedede/baseboard.c: Format with clang-format 8d98f148c6 board/cret/battery.c: Format with clang-format 7a0cbb54fe board/boten/usb_pd_policy.c: Format with clang-format 3f5f9632cb board/lantis/board.c: Format with clang-format 6eb343c150 board/beetley/board.c: Format with clang-format dd43c278bc board/corori2/usb_pd_policy.c: Format with clang-format 7599215afe common/usbc/usb_sm.c: Format with clang-format 031c893beb common/usbc_ocp.c: Format with clang-format 52bf7a9ea4 board/drawcia_riscv/led.c: Format with clang-format 192072ce23 board/blipper/cbi_ssfc.c: Format with clang-format 0326b0ba04 board/blipper/cbi_ssfc.h: Format with clang-format dcbab4bbb3 board/lantis/usb_pd_policy.c: Format with clang-format 7f43631c38 board/beadrix/led.c: Format with clang-format 0843a77044 board/shotzo/cbi_ssfc.c: Format with clang-format 87ea38dd1a board/wheelie/usb_pd_policy.c: Format with clang-format 5f37310145 board/kracko/usb_pd_policy.c: Format with clang-format 44b5cf1df3 board/waddledoo/usb_pd_policy.c: Format with clang-format 9b8ac31c99 board/cret/cbi_ssfc.c: Format with clang-format 6ce7693cea board/waddledee/board.c: Format with clang-format 411dc5ddce chgstv2: Wake on HOOK_POWER_SUPPLY_CHANGE d32978f7d4 chgstv2: Support bypass mode BRANCH=None BUG=b:238433667 b:234181908 b:236430560 b:238433667 b:234304246 BUG=b:236386294 b:235984702 b:214057333 b:238057993 b:236022894 BUG=b:240128813 b:237697900 b:168591511 b:237697900 b:237336333 BUG=b:207522204 b:235984702 b:230712704 TEST=`make -j buildall` Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: If64ee2e77ed331e78adad95c0272eb9ff43d0010
| * ec: Switch black to 80 cols and reformat filesJeremy Bettis2022-07-264-45/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add pyproject.toml config file to set black to 80 columns. Remove column length overrides from other config files. Reformat python files to 80 cols. BRANCH=None BUG=b:238434058 TEST=presubmit/CQ Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I870a68f1bb751f4bad97024045f6e3075489e80f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3764071 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
| * ec: Fix some bad formatting and warningsJeremy Bettis2022-07-133-30/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The black formatting revealed some odd formatting. Fixed all errors from cros lint. find . \( -path ./private -prune \) -o -name '*.py' -print | \ xargs cros lint -v |& grep ": E" BRANCH=None BUG=b:238434058 TEST=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ia1d2e9cfb0cd2b7000d15b3b918d24881987673e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749249 Tested-by: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
| * ec: Format all python files with black and isortJeremy Bettis2022-07-125-3312/+3450
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | find . \( -path ./private -prune \) -o -name '*.py' -print | xargs black find . \( -path ./private -prune \) -o -name '*.py' -print | xargs ~/chromiumos/chromite/scripts/isort --settings-file=.isort.cfg BRANCH=None BUG=b:238434058 TEST=None Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: I63462d6f15d1eaf3db84eb20d1404ee976be8382 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3749242 Commit-Queue: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org> Tested-by: Jeremy Bettis <jbettis@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* | Merge remote-tracking branch cros/main into firmware-dedede-13606.B-masterAseda Aboagye2021-12-012-46/+46
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relevant changes: git log --oneline dd6dfe084..5d6dfc1e5 -- baseboard/dedede board/beetley board/blipper board/boten board/bugzzy board/cret board/drawcia board/drawcia_riscv board/galtic board/kracko board/lantis board/madoo board/magolor board/metaknight board/pirika board/sasuke board/sasukette board/storo board/waddledee board/waddledoo board/wheelie common/charge_state_v2.c common/mkbp_* common/ocpc.c common/usbc/usb_tc_drp_acc_trysrc_sm.c common/usbc/usb_sm.c common/usbc/*_pd_* common/usbc/dp_alt_mode.c common/usbc/usb_prl_sm.c common/usbc/usb_pe_drp_sm.c common/usb_charger.c common/usb_common.c common/usbc_ocp.c driver/charger/sm5803.* driver/charger/isl923x.* driver/tcpm/raa489000.* driver/tcpm/it83* include/power/icelake.h include/intel_x86.h power/icelake.c power/intel_x86.c util/getversion.sh d89e49b20 power: Introduce S4 as a real power state ba8a3c9c0 chgstv2: Use chipset_in_state instead of naming states 262172c84 i2c: Use declared initializers for i2c_ports: boards m-z b610600e9 bugzzy : disable LCD DCDC by pannel power status 35865dbec TCPMv2: Guard DATA_RESET using CONFIG_USB_PD_DATA_RESET_MSG d4d8243ed i2c: Use declared initializers for i2c_ports: baseboards eba8d0305 RAA489000: Fixed RAA489000 max charging current e78b83e0f TCPMv2: Delay Data Reset until mode entry request 6230e60fc TCPMv2: Support Data Reset as DFP, initiator 412246836 intel_x86: Apply chipset resume init and suspend complete hooks f2809b72c config: rename CONFIG_HOSTCMD_ESPI to CONFIG_HOST_INTERFACE_ESPI BRANCH=None BUG=b:205675485 b:208371172 b:204947672 b:208318528 b:207328258 BUG=b:195416058 b:141363146 TEST=`make -j buildall` Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: If1ab393cea39835edc2ec90f15ae0cd00dcf9400
| * util/ec3po: Update language for COILTom Hughes2021-11-292-46/+46
| | | | | | | | | | | | | | | | | | | | | | BRANCH=none BUG=b:163885307 TEST=./util/ec3po/run_tests.sh Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Idc25a8d3638e434c64e8c6a46661552047556eb2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3298873 Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
* | Merge remote-tracking branch cros/main into firmware-dedede-13606.B-masterAseda Aboagye2021-09-234-4/+0
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relevant changes: git log --oneline df222fb19..b5f74864d -- baseboard/dedede board/beetley board/blipper board/boten board/bugzzy board/cret board/drawcia board/galtic board/kracko board/lantis board/madoo board/magolor board/metaknight board/pirika board/sasuke board/sasukette board/storo board/waddledee board/waddledoo board/wheelie common/charge_state_v2.c common/mkbp_* common/ocpc.c common/usbc/usb_tc_drp_acc_trysrc_sm.c common/usbc/usb_sm.c common/usbc/*_pd_* common/usbc/dp_alt_mode.c common/usbc/usb_prl_sm.c common/usbc/usb_pe_drp_sm.c common/usb_charger.c common/usb_common.c common/usbc_ocp.c driver/charger/sm5803.* driver/charger/isl923x.* driver/tcpm/raa489000.* driver/tcpm/it83* include/power/icelake.h include/intel_x86.h power/icelake.c power/intel_x86.c util/getversion.sh 21a2d516b Blipper: Add beetley related configuration ad3c72d45 led_pwm: split color map on a separate structure BRANCH=None BUG=b:199479277 TEST=`make -j buildall` Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: Ia33b9a32c1cb92e3ddfcc3b71e1e9807a4e84ee0
| * Clean up cros-logging-import pylint attributesJaques Clapauch2021-09-204-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BUG=b:200542097 TEST=None BRANCH=None Signed-off-by: Chris McDonald <cjmcdonald@chromium.org> Change-Id: I1f6ac70c524dce56fde6c59f3c0129726cfc5761 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3171531 Commit-Queue: Jaques Clapauch <jaquesc@google.com> Commit-Queue: Chris McDonald <cjmcdonald@chromium.org> Tested-by: Jaques Clapauch <jaquesc@google.com> Auto-Submit: Jaques Clapauch <jaquesc@google.com> Reviewed-by: Chris McDonald <cjmcdonald@chromium.org>
* | Merge remote-tracking branch cros/main into firmware-dedede-13606.B-masterDiana Z2021-09-013-10/+16
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relevant changes: git log --oneline 7ee85de342..14b2c5df42 -- baseboard/dedede board/blipper board/boten board/bugzzy board/cret board/drawcia board/galtic board/kracko board/lantis board/madoo board/magolor board/metaknight board/pirika board/sasuke board/sasukette board/storo board/waddledee board/waddledoo board/wheelie common/charge_state_v2.c common/mkbp_* common/ocpc.c common/usbc/usb_tc_drp_acc_trysrc_sm.c common/usbc/usb_sm.c common/usbc/*_pd_* common/usbc/dp_alt_mode.c common/usbc/usb_prl_sm.c common/usbc/usb_pe_drp_sm.c common/usb_charger.c common/usb_common.c common/usbc_ocp.c driver/charger/sm5803.* driver/charger/isl923x.* driver/tcpm/raa489000.* driver/tcpm/it83* include/power/icelake.h include/intel_x86.h power/icelake.c power/intel_x86.c util/getversion.sh 61bbfcaa37 usbpd: support dynamic PDO selection 003ec08f8c TCPM: Rename enum tcpm_sop_type and its constants ced5a54432 bugzzy : control TSP_TA d31960945a bugzzy : Modify battery information 72c280f5e5 adc: Update board files to match adc.h refactor b4e7e05b7e usb_mux: Add function to enable USB3.1 mode for UFP BRANCH=None BUG=b:181271666 b:155476419 b:169532537 b:197776876 b:195042155 BUG=b:191505716 TEST=`make -j buildall` Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I680fffd9f5d4e60640d236a8370d2be899f241d8
| * ec3po: Update unittests to use ec3po.<module> import paths.Matthew Blecker2021-08-273-10/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | run_tests.sh no longer uses the Python unittest module's discovery functionality, which was forcing util/ec3po/ subdir to be directly in sys.path as a top-level module location, which is inconsistent with how ec3po modules are used outside of the tests. run_tests.sh no longer auto-discovers *_unittest.py files, instead they are individually listed as ec3po.<name>_unittest modules. It would be straightforward to implement test module autodiscovery, but probably isn't worth the complexity. BRANCH=none BUG=chromium:1031705,b:174894072,b:197618562 TEST=Within chroot, ran ./runtests.sh from within util/ec3po/ directory. Within chroot, ran ~/trunk/src/platform/ec/util/ec3po/run_tests.sh from a different directory. Verified use of the files-under-test (as opposed to the files installed in site-packages/) by adding broken code to console.py and then re-running both invoctions above. Both then failed as intended. Change-Id: I40c180f1d66a4d3befc548f4d763357e6cc24201 Signed-off-by: Matthew Blecker <matthewb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3123835 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* | Merge remote-tracking branch cros/main into firmware-dedede-13606.B-masterAseda Aboagye2021-08-191-2/+2
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Relevant changes: git log --oneline 84880fd4c3..7876375707 -- baseboard/dedede board/blipper board/boten board/bugzzy board/cret board/drawcia board/galtic board/kracko board/lantis board/madoo board/magolor board/metaknight board/pirika board/sasuke board/sasukette board/storo board/waddledee board/waddledoo board/wheelie common/ocpc.c driver/charger/sm5803.* driver/charger/isl923x.* driver/tcpm/raa489000.* driver/tcpm/it83* util/getversion.sh 8be18be723 sm5803: Replace is_acok method 59e395027a TCPM: Rename enum tcpm_transmit_type 37f4ef0585 dedede: moving buttons and switches to use MKBP 1f723e545e buggzy: disable console commands to save space f89340eed3 bugzzy: Update EC variant 3db59f2c94 cret: Add six battery parameter f3a5aa7ecd bugzzy: Initial EC image a20abd22d4 boten: Check pen detection on init BRANCH=None BUG=b:192521391 b:194554146 b:155476419 b:194990808 b:196998260 BUG=b:196943911 b:196258408 b:170966461 b:192521391 TEST=`make -j buildall` Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I36c294c90937c3e6ad82afa9f8e9b6bf43e16627
| * console: Fix logs printed for some commandsLukasz Hajec2021-08-131-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | E.g. in servod console there is always 'Disabling uart timestamps.' printed, no matter what we enter to dut-control - on/off. This patch fixes that issue. BRANCH=none BUG=b:173654272 TEST=Perform manual testing: "sudo servod --board=nocturne" "dut-control cr50_uart_timestamp:on" "dut-control cr50_uart_timestamp:off" observe proper logs in servod console. Signed-off-by: Lukasz Hajec <lha@semihalf.com> Change-Id: I52cde5e4a9cd70fdc3e9d9513f8aa4126c5f09f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3077540 Reviewed-by: Michał Barnaś <mb@semihalf.com> Reviewed-by: Matthew Blecker <matthewb@chromium.org>
* | OWNERS: Remove all OWNERS for this branchAseda Aboagye2021-08-191-3/+0
|/ | | | | | | | | | | | | | | | | None of the OWNERS apply for this firmware branch so remove them to prevent requiring OWNERS approval for merges. BUG=None BRANCH=firmware-dedede-13606.B TEST=None Signed-off-by: Aseda Aboagye <aaboagye@google.com> Change-Id: I714557df849574a9222d104a63a41591dea92e02 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3105728 Tested-by: Aseda Aboagye <aaboagye@chromium.org> Auto-Submit: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Craig Hesling <hesling@chromium.org> Commit-Queue: Craig Hesling <hesling@chromium.org>
* console: make sure eol check runs in python3Ruben Rodriguez Buchillon2021-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Indexing into a byte array returns an integer, which will return False when compared to a byte-array. This change makes sure we're comparing two characters (python2) or two integers (python3) BRANCH=None BUG=b:183642673 TEST=python3 b'hello\n'[-1]==b'\n' False TEST=python2.7 b'hello\n'[-1]==b'\n' True TEST=python3 b'hello\n'[-1]==b'\n'[0] True Change-Id: I26a4b1bde7acf733faae7ec355da228d76e261d0 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2809883 Reviewed-by: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org>
* ec3po: fix python3 related unittest failuresRuben Rodriguez Buchillon2021-01-231-2/+2
| | | | | | | | | | | | | | | | | The new way to open the ttys was making 2 tests fail. This change addresses that by aligning the expectations with the actual calls. BRANCH=None BUG=b:173654272 TEST=./util/ec3po/run_tests.sh Ran 44 tests in 0.089s OK Change-Id: Ib550ab31436a8da093ec0af2bb0c61bb345647b2 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2645699 Reviewed-by: Matthew Blecker <matthewb@chromium.org>
* ec3po: log with %r rather than %s for most areasRuben Rodriguez Buchillon2021-01-211-12/+12
| | | | | | | | | | | | | | | | | | | Mainly, this is about data and oobm coming through and logging it through repr (%r) for two reasons: - it handles formatting with ticks automatically - in py3 it can help highlight where strings are used rather than byte arrays BUG=b:173654272 BRANCH=None TEST=sudo servod -b scarlet // servod startup turns off the timestamps for CPU uarts, exhibiting this path Change-Id: I7954930b658afb5b41fe8915144005d2552f3ad8 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576141 Reviewed-by: Matthew Blecker <matthewb@chromium.org>
* ec3po: console log printing in py2 and py3Ruben Rodriguez Buchillon2021-01-211-9/+19
| | | | | | | | | | | | | | | | | | | | | The console log printing needs to work in py2 and py3. For this to work, the 'data' passed in needs to be treated equally in both cases. Since mostly what we care about is comparing it to other elements, we simply ensure that the data becomes a list of integers in both py2 and py3, and then we compare directly against the integer values of the characters we want to handle in a special way (\b, \t, etc). BUG=b:173654272 BRANCH=None // this shows all the correctly parsed log output from the MCUs (ec, v4, etc) in the logs TEST=sudo servod -b scarlet cat /var/log/servod_9999/latest.DEBUG Change-Id: Ibcbb95fd60619dc8234d7dd1f3d5d5c623542ce0 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576140 Reviewed-by: Matthew Blecker <matthewb@chromium.org>
* ec3po: open without a bufferRuben Rodriguez Buchillon2021-01-211-2/+9
| | | | | | | | | | | | | | | | | | pty's do not support seek (and tell), so we need to open with buffer=0 for this to work in py3 as well. Additionally, this requires us to use wb+ rather than ab+ (as 'a' as no meaning on a pty). BUG=b:173654272 BRANCH=None // this shown both communication to the uart and from the uart TEST=sudo servod -b scarlet dut-control ec_board ec_board:scarlet Change-Id: I7d9bff269dfda9d360ea44165c495ceab9c7f21a Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2576139 Reviewed-by: Matthew Blecker <matthewb@chromium.org>
* ec3po: make py3 and py2 compatible wrt importsRuben Rodriguez Buchillon2021-01-214-11/+7
| | | | | | | | | | | | | | This change uses absolute imports in the console, and the unittest files so that they work on py2 and py3 BUG=b:173654723 BRANCH=None TEST=sudo servod Change-Id: Ic4a8d567625108bbaee4b981016df55ba887da1d Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2575379 Reviewed-by: Matthew Blecker <matthewb@chromium.org>
* ec3po: run_tests.sh uses python3 to run unittestYilin Yang2020-09-261-1/+1
| | | | | | | | | | | BUG=chromium:1031705 BRANCH=master TEST=run_tests.sh pass Signed-off-by: kerker <kerker@chromium.org> Change-Id: I3be180f50db5ec84d0035dd558a2177e0ef1313c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2418193 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* ec3po: Migrate console.py to python2/3 compatibleYilin Yang2020-09-262-286/+234
| | | | | | | | | | | | | | BUG=chromium:1031705 BRANCH=master TEST=`python2 console_unittest.py` pass TEST=`python3 console_unittest.py` pass TEST=same with https://crrev.com/c/2418191 Signed-off-by: kerker <kerker@chromium.org> Change-Id: I9fb782923e68189f5526bf9e6b9e35c47facf2aa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2418192 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* ec3po: Migrate interpreter.py to python2/3 compatibleYilin Yang2020-09-263-49/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it python2/3 compatible. But because servod is still using python2 now, I can only make sure that this CL still works in python2. Try my best to make it work in python3, but need more test when servod can support python3 environment. BUG=chromium:1031705 BRANCH=master TEST=`python2 interpreter_unittest.py` pass TEST=`python3 interpreter_unittest.py` pass TEST=1. cros_workon --host start hdctools ec-devutils 2. sudo emerge hdctools ec-devutils 3. sudo servod -b kukui -m jacuzzi 4. dut-console -c ec, can see the ec console - `version`, `battery` works TEST=1. Disable software sync on dut 2. Define CONFIG_EXPERIMENTAL_CONSOLE in jacuzzi board.h 3. Build ec, and flash to dut 4. dut-console -c ec, can see the ec console - `version`, `battery` works Signed-off-by: kerker <kerker@chromium.org> Change-Id: I3f1dbdb4f88c029a44416021ea7b5f0caf242320 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2418191 Reviewed-by: Hung-Te Lin <hungte@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* ec3po: Stop suppressing exceptions in console and interpreter loops.Matthew Blecker2020-09-242-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | This removes catch-all "except:" blocks from ec3po console and interpreter loops. They catch nothing in my own servod usage and testing. If they are catching exceptions in some environments or workflows, let's find and fix the problems. BRANCH=none BUG=chromium:894870 TEST=servod starts servod stops cleanly via ctrl+c servod stops cleanly via SIGTERM EC, CR50, and Servo console PTYs function correctly for reading and writing Tested with: Atlas DUT + CR50 CCD + Servo v4 Krane DUT + CR50 CCD + Servo v4 Cave DUT + Servo Micro + Servo v4 Change-Id: I6422df9fc528aa446638a58ddfff05701c9688da Signed-off-by: Matthew Blecker <matthewb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2427638 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* ec3po: Adjust logging of binary uart output.Dana Goyette2020-09-231-13/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | The Cr50 UART has a spinner that contains backspace characters, which was causing the line buffer to end up very long. The string of noise would then end up glued onto whatever real line happened to come next. A long line buffer slows down the handling of incoming text, and can result in misleading error messages. For example, put a sleep in the '\b' branch, and the result will be "Cr50 is unresponsive." Now backspace characters are handled by trimming the line buffer, instead of adding them to the end. Since this requires iterating through the incoming data anyway, the method now also escapes each character, to avoid dumping binary into the log. BUG=b:168156948 BRANCH=none TEST=Run servod with the change, notice lack of backspace noise Signed-off-by: Dana Goyette <dgoyette@google.com> Change-Id: Ifb0067b72674b9a01ec973feb5f2f46d184b2a11 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2402430 Tested-by: Dana Goyette <dgoyette@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Commit-Queue: Dana Goyette <dgoyette@chromium.org>
* ec: change usage of dummySam Hurst2020-08-051-7/+7
| | | | | | | | | | | | | | | | | | Google is working to change its source code to use more inclusive language. To that end, replace the term "dummy" with inclusive alternatives. BUG=b:162781382 BRANCH=None TEST=make -j buildall `grep -ir dummy *` The only results are in "private/nordic_keyboard/sdk8.0.0" which is not our code. Signed-off-by: Sam Hurst <shurst@google.com> Change-Id: I6a42183d998e4db4bb61625f962867fda10722e2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2335737 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* console: add micro seconds in timestampsEric Yilun Lin2020-05-301-3/+15
| | | | | | | | | | | | | | | | | | | | | A more precise timestamp will be helpful while debugging with AP and EC uart logs. This CL adds extra 3 micro second digits in timestamps, and also uses 'yy' rather than 'YYYY' year format. BRANCH=none BUG=none TEST=sudo emerge ec-devutils; dut-control timestamp:on see cpu_uart_pty in such format: 20-05-27 15:50:36.034 Developer Console 20-05-27 15:50:36.038 20-05-27 15:50:36.038 To return to the browser, press: Change-Id: I782e6e080f38cbaaa31b0b96fac839e118619266 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2217493 Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
* ec3po: Add OWNERS file.Matthew Blecker2020-01-231-0/+3
| | | | | | | | | | | | | | This deliberately inherits from parent dirs, so this may be a no-op at the moment. BRANCH=none BUG=none TEST=none Change-Id: I13e15af246a47e9e740f5ad07de86764234767b4 Signed-off-by: Matthew Blecker <matthewb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2015350 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Unify #! use in python scriptsStefan Reinauer2019-10-013-3/+3
| | | | | | | | | | | | | | | | | | Right now we have several different versions of #! in our python scripts. Unify them all and specify that we are using python2. Signed-off-by: Stefan Reinauer <reinauer@chromium.org> BUG=none BRANCH=none TEST=make buildall Change-Id: Iab33a3f5d4b827451a55542bcee8837b00da7867 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1817948 Commit-Queue: Stefan Reinauer <reinauer@chromium.org> Tested-by: Stefan Reinauer <reinauer@chromium.org> Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
* ec3po: make debug logs more user-friendly to readRuben Rodriguez Buchillon2019-08-061-7/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change does two things: (1) it adds by default that both directions i.e. user to EC and EC to user get logged to debug at full lines (or line limit) (2) it hides the per interrupt print statements behind a command: raw-debug This is to allow servod logs to easily contain the MCU logs for all connected devices: servo(s), Cr50, EC, and more. BUG=chromium:932820 TEST=manual testing sudo servod -s 19 -d | grep LogConsole // observe console output (with logger overhead as prefix) with crrev.com/c/1688610: dut-control ec_uart_raw_debug:on // observe in the logs how messages like below return [...] - |DBG|-i->'an 0' Change-Id: I864ac3411a002385505a192db3f300eb7bd71b47 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1688363 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Mary Ruthven <mruthven@chromium.org>
* console: add support for disabling timestampsMary Ruthven2019-04-301-14/+23
| | | | | | | | | | | | | People may want to disable timestamps. Add a command to do that. BUG=none BRANCH=none TEST=none Change-Id: I702c41a214367b6c58f3d9b932310e1bb7e08b95 Signed-off-by: Mary Ruthven <mruthven@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1586588 Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
* console: add time stamp to EC logsTim Wawrzynczak2019-03-201-2/+28
| | | | | | | | | | | | | | | Prefix all EC log lines with the host's current time, in YYYY-MM-DD HH:MM:SS format BUG=b:111675966 BRANCH=none TEST=manual, verify functionality while connected to console via servod & miniterm Change-Id: I3ac26301e781a1992628d43c6d6add1eed0ac91f Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1515815 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* ec3po: use source name in loggerMary Ruthven2019-01-044-13/+19
| | | | | | | | | | | | | | | | Include the ec3po source name in the logger, so it is clear which console is logging the messages. BUG=none BRANCH=none TEST=none Change-Id: I8d3bb330c3928b8f05078fd90b0238c4b027d90b Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1376776 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
* ec3po: use a copy of the logger objectMary Ruthven2018-12-032-2/+8
| | | | | | | | | | | | | | | | | | | | | Use a copy of the console and interpreter logger objects, so modifying the log level for one console does not affect the others. With this change you can enable the debug log level on the cr50 console without enabling debug for the ec console. The ec console prints a lot more messages than cr50, so it can be difficult to debug cr50 console issues if both consoles are set to debug. BUG=none BRANCH=none TEST=verify setting cr50 loglevel does not affect the ec loglevel. Change-Id: I529bf686443bf9df004e209e880f811608eef6a8 Signed-off-by: Mary Ruthven <mruthven@google.com> Reviewed-on: https://chromium-review.googlesource.com/1355967 Commit-Ready: Mary Ruthven <mruthven@chromium.org> Tested-by: Mary Ruthven <mruthven@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
* ec3po: Update threadproc_shim.py to use threading-oriented implementations.Matthew Blecker2018-10-181-9/+7
| | | | | | | | | | | | | | | | | | | | This migrates ec3po from using subprocesses to threads. BRANCH=none BUG=b:79684405 CQ-DEPEND=CL:1279118, CL:1281997, CL:1282265 TEST=With a servo_micro connected to an octopus_ite, functionality involving the EC console continues to work. I tested dut-control ec_uart_pty, servo_console_pty (both tested with minicom), dut_i2c_mux, enable_ite_dfu, get_ite_chipid commands. Additionally, servod shutdown via either ctrl+c or SIGTERM still happens correctly, without any delay, leftover processes, or tracebacks. Change-Id: Ib59aa83400ee982a5cc4d1d9d1609197a1145514 Signed-off-by: Matthew Blecker <matthewb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1279145 Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
* ec3po console and interpreter: Handle EOFError from the pipes.Matthew Blecker2018-10-182-29/+70
| | | | | | | | | | | | | | | | | | | | | | | | EOF is expected sometimes upon shutdown, when one thread (console or interpreter) manages to close its write side of a pipe before the other thread receives the shutdown pipe unblocked notification. EOF is now considered another indication to shutdown. BRANCH=none BUG=b:79684405 TEST=With this change plus CL:1279145 to switch to threading, I am no longer able to reproduce the formerly occasional EOFError tracebacks upon shutdown, with either ctrl+c or SIGTERM. Basic servod functionality continues to work, including dut-control ec_uart_pty, servo_console_pty (both tested with minicom), dut_i2c_mux, enable_ite_dfu, get_ite_chipid. Testing performed with a servo_micro connected to an octopus_ite. I tested both without and with CL:1279145 i.e. both with subprocesses and with threads (though I only ever encountered EOFError with the latter). Change-Id: Iaa1ddc5f05a32ef806fa5f84d0ed0ad4739189ce Signed-off-by: Matthew Blecker <matthewb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1284509 Reviewed-by: Nick Sanders <nsanders@chromium.org> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
* ec3po: add missing traceback module import to interpreter.pyMatthew Blecker2018-10-181-0/+1
| | | | | | | | | | | BRANCH=none BUG=b:79684405 TEST=The import succeeds. Haven't repeated getting a traceback here yet. Change-Id: I720d93ea640c4bb13007b6a7c6e515b5871ef5c5 Signed-off-by: Matthew Blecker <matthewb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1286295 Reviewed-by: Nick Sanders <nsanders@chromium.org>
* ec3po: Add USING_SUBPROCS and DoIf() to threadproc_shim.py.Matthew Blecker2018-10-161-1/+40
| | | | | | | | | | | | | | These are for easing the subprocesses -> threads transition across the third_party/hdctools/ -> platform/ec/ boundary. BRANCH=none BUG=b:79684405 TEST="python threadproc_shim.py" executes without errors. CL:1282265 works correctly using the new function and constant added by this CL. Change-Id: Iab4d12fc0565b8375a1bd1adc9a2ec5e02d85e0b Signed-off-by: Matthew Blecker <matthewb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1282012
* ec3po: Update platform/ec/ side of ec3po to use threadproc_shim.py.Matthew Blecker2018-10-154-45/+47
| | | | | | | | | | | | | | | | | | | This removes direct use of multiprocessing module from the platform/ec/ side of ec3po. Once the third_party/hdctools/ side has been updated to use threadproc_shim.py as well, that library can be updated with threading-oriented implementations. BRANCH=none BUG=b:79684405 TEST=With a servo_micro connected to an octopus_ite, functionality involving the EC console continues to work. I tested dut-control ec_uart_pty (including using the UART with minicom), dut_i2c_mux, enable_ite_dfu, get_ite_chipid commands. Change-Id: I68eb2d8cd1d927d63b12696938169281e51de6fc Signed-off-by: Matthew Blecker <matthewb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1279153 Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
* ec3po: Add threadproc_shim.py library for subprocesses to threads transition.Matthew Blecker2018-10-152-0/+30
| | | | | | | | | | | BRANCH=none BUG=b:79684405 TEST="python threadproc_shim.py" executes without errors. Change-Id: I63b7eb01412a3e269dc1d47d7e3e89c6f958cdac Signed-off-by: Matthew Blecker <matthewb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1278502 Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
* ec3po: Add optional shutdown_pipe StartLoop() arguments.Matthew Blecker2018-10-152-40/+75
| | | | | | | | | | | | | | | | | | | | | | | | | When ec3po.console.StartLoop() or ec3po.interpreter.StartLoop() is given a shutdown_pipe file object, it will exit the loop when that file becomes readable (unblocked), and will close the file upon loop exit (as they do with the other files they poll). This will be used by the servod-side of ec3po (in hdctools repo) to replace use of multiprocessing.Process.terminate(), because that has no threading equivalent, and I am migrating ec3po to use threads instead of subprocesses. BRANCH=none BUG=b:79684405 TEST=With a corresponding servod-side change in hdctools to use shutdown_pipe args instead of terminate(), servod shutdown via either ctrl+c or SIGTERM still happens correctly, without any delay, leftover processes, or tracebacks. Testing performed with a servo_micro attached to an octopus_ite. Change-Id: I82db2fd60620ac2a05a4d09afe263a57c141c615 Signed-off-by: Matthew Blecker <matthewb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1277615 Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
* ec3po: Remove sys.exit() call from the end of StartLoop() functions.Matthew Blecker2018-10-122-11/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | This removes explicit process exit() from both console and interpeter ec3po StartLoop() functions. Use of exit() is incompatible with running these functions in threads instead of subprocesses. This should be a no-op, since letting execution finish in Python should be equivalent to sys.exit(). Since exit() in the finally: block effectively suppressed exceptions, the same behavior is now achieved in interpreter.StartLoop() by use of an except: block, same as console.StartLoop() already had. BRANCH=none BUG=b:79684405 TEST=All servod processes still exit promptly and without printing tracebacks, upon either ctrl+c from console where servod launched, or from SIGTERM to parent servod process. I confirmed that the new code was in use by adding an extra logging line on each of ec3po console and interpreter loop start (not present in uploaded patch). Testing performed with a servo_micro attached to an octopus_ite. Change-Id: Ie92610de88fea78f6c50f5e49b9d0940f209cd92 Signed-off-by: Matthew Blecker <matthewb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1278085 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* Revert "ec3po: quit console & interpreter loop when parent process changes."Nick Sanders2018-08-272-10/+6
| | | | | | | | | | | | | | | | | | This reverts commit 3b39bc56d38511e10871447392b709b3b8e65637. Reason: wedges consoles on servod. BRANCH=None BUG=b:113246887 TEST=reverting unbreaks servod Change-Id: I2f4dd65727347ce4757c4863664e3b2e46c826fc Signed-off-by: Nick Sanders <nsanders@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1191383 Tested-by: Raul E Rangel <rrangel@chromium.org> Tested-by: Simon Glass <sjg@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* ec3po: quit console & interpreter loop when parent process changes.Ruben Rodriguez Buchillon2018-08-242-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Right now, when the parent process dies ungracefully - say kill -9 - then the interpreter, and console processes remain active. This leads to bugs in the servod implementation from holding on to sockets, to reinitialization issues of a new instance on the same servod device. This change quits the loops inside console & interpreter as soon as the parent pid changes (i.e. the parent dies). BRANCH=None BUG=chromium:841121 TEST=sudo servod -b soraka ps aux | grep servod >xxxxx servod >xxxxy servod >xxxyx servod >xxxaa grep servod sudo kill -9 xxxxx ps aux | grep servod >xxxab grep servod Before this, just kill -9 on the main thread did not take the children with it. Change-Id: I547bd92bf8732bff8aef2b72840417c809ba27d6 Signed-off-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1186299 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Nick Sanders <nsanders@chromium.org>
* ec3po: console: Detect HUP from user consoleNick Sanders2018-04-181-13/+45
| | | | | | | | | | | | | | | | | | ec3po writes to the user pty, which may or may not be open. Since ptys have limited buffer space, we need to avoid writing to them if they will never be drained. ec3po now looks for HUP to indicate whether the pts is opened or closed, and reads/writes accordingly. BRANCH=None BUG=b:76111225 TEST=dut-control ec_board:fizz x 400 Change-Id: Icbecb2e42b261659a006eb1b9fc6dd73490a2218 Signed-off-by: Nick Sanders <nsanders@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1014792 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* servod: add command muxing in ec3poNick Sanders2018-03-192-10/+42
| | | | | | | | | | | | | | | | This creates a second pty for pty_driver to open, to prevent the need for freezing the user pty. This also allows the user pty to fully log and print all output. BRANCH=None BUG=b:74023102,b:73310923 TEST=servod is fast now, recovery works CQ-DEPEND=CL:958127 Change-Id: Ib369a5e64838ded98719d76f8159d71a97fe08ad Signed-off-by: Nick Sanders <nsanders@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/958128 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
* ec3po: less chatty debug printNick Sanders2017-03-012-8/+8
| | | | | | | | | | | | | | | ec3po had very, very chatty debug printing. Reduce some of this so that -d is a bit easier to read. BUG=None BRANCH=None TEST=sudo servod -b electro -d Change-Id: I163e1362dd1e90f374ca3c37e1f1e0aa7fd7a1e2 Reviewed-on: https://chromium-review.googlesource.com/441919 Commit-Ready: Nick Sanders <nsanders@chromium.org> Tested-by: Nick Sanders <nsanders@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>