summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* tarlo: De-feature G sensorstabilize-14469.9.B-mainstabilize-14469.8.B-mainamber.chen2022-01-201-0/+3
| | | | | | | | | | | | | De-feature G sensor BRANCH=main BUG=b:214317519 TEST=make -j BOARD=taeko Signed-off-by: amber.chen <amber.chen@lcfc.corp-partner.google.com> Change-Id: I226041c1e52230b444e4d8c48d1785fd3106c918 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3403359 Reviewed-by: caveh jalali <caveh@chromium.org>
* zephyr: kingler: enable keyboardEric Yilun Lin2022-01-201-2/+10
| | | | | | | | | | | | | BUG=b:203739613 TEST=keyboard is working BRANCH=none Change-Id: I12469b59cf4f0d7035061b8d1604bd2a728c1a01 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3325630 Tested-by: Eric Yilun Lin <yllin@google.com> Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* zephyr: flash: it8xxx2: lower cros_flash priorityTim Lin2022-01-201-1/+1
| | | | | | | | | | | | | | | | CL:3398577 changed driver layer priority, so cros_flash_it8xxx2 should be lowered. BUG=none BRANCH=none TEST=Boot normally on it8xxx2_evb and hayato. zmake -lDEBUG configure -b zephyr/projects/it8xxx2_evb/ zmake -lDEBUG configure -b zephyr/projects/asurada/hayato/ Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com> Change-Id: I3509508c85d2fd55b74596c87e27d1bf4044e50d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3400761 Reviewed-by: Denis Brockus <dbrockus@chromium.org>
* zephyr: brya: Add config to override led colorRajesh Kumar2022-01-201-0/+4
| | | | | | | | | | | | | | | | | | Add configuration to override LED color when: 1. Charge state near full 2. SoC On 3. SoC suspend 4. Battery Low BUG=b:200974848 BRANCH=none TEST=zmake configure -B ~/tmp/brya/ brya -b Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: Ibad1049b0b3b6275149afed1b9bf372de6d59882 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3322174 Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com> Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: brya: Enable LED support using shimRajesh Kumar2022-01-203-0/+50
| | | | | | | | | | | | | | This enable PWM LED using zephyr shim layer BUG=b:200974848 BRANCH=none TEST=EC console command "pwmduty" Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Cq-Depend: chromium:3218111 Change-Id: I6144b25098c1c5330c958b2578a3fe79f5c09adb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3200231 Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
* nissa: Disable TEMP_SENSOR_3 until channels availableAndrew McRae2022-01-201-0/+11
| | | | | | | | | | | | | | | Disable the use of ADC13 until all the channels are available in the SOC configuration. BUG=b:215449005 TEST=zmake configure -b nereid; Confirm removal from DTS. BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Ice38039e75127ece1516b6b4f74f3282ad55a06b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3403362 Reviewed-by: Peter Marheine <pmarheine@chromium.org> Tested-by: Scott Chao <scott_chao@wistron.corp-partner.google.com>
* krabby: enable i2c3Ting Shen2022-01-201-7/+3
| | | | | | | | | | | | | | | | | Enable i2c3 on gpf2/f3. BUG=b:210800948 TEST=ectool motionsense BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ic238b60602437d53ca105733a861310cc040938a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3398189 Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com> Commit-Queue: Ting Shen <phoenixshen@chromium.org> Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org>
* zephyr: brya: Enable charger and type-c chargingRajesh Kumar2022-01-2013-9/+471
| | | | | | | | | | | | | | | | | This enables the configuration for charger and their dependencies like power delivery and usb typec. BUG=b:202701454 BRANCH=none TEST=Tested feature by using Console command: 1. charger 2. chgstate 3. chgsup Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I0cbc4d74de0f86b18b1e9a881c6a0076aba8118e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3218111 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: charger: support zephyr compilationRajesh Kumar2022-01-201-1/+2
| | | | | | | | | | | | | | This change requires to avoid redefination of macro CONFIG_CHARGER_BQ25710_PKPWR_TOVLD_DEG for zephyr. BUG=none BRANCH=none TEST=make buildall Signed-off-by: Rajesh Kumar <rajesh3.kumar@intel.com> Change-Id: I6c77047913bfc3c2b2aa1b29ac973934dd7b00da Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3403307 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* ocpc: Do not report invalid charger if CHARGE_PORT_NONEAndrew McRae2022-01-201-1/+5
| | | | | | | | | | | | | | Do not report an invalid charger if there is no charger. BUG=b:215253447 TEST=zmake configure -b nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I23b1d7861065c32b438e43198c2fa1cc2a515f5b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3403358 Reviewed-by: Aseda Aboagye <aaboagye@chromium.org> Commit-Queue: Aseda Aboagye <aaboagye@chromium.org>
* zephyr test: Remove ISL9241 configurationAbe Levkoy2022-01-202-8/+0
| | | | | | | | | | | | | | This charger chip is not defined in the device tree and is not used by existing tests. BUG=b:209907297 TEST=zmake configure --test zephyr/test/drivers BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: I29e2c5a164aca04ca0fcd2f8c59ab65b054c0dc7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3402341 Reviewed-by: Aaron Massey <aaronmassey@google.com>
* zephyr test: Set TCPC revision 1.0 during PD testAbe Levkoy2022-01-201-0/+1
| | | | | | | | | | | | | | | Avoid TCPC I2C errors in USB-C integration test. BUG=b:209907297 TEST=zmake configure --test zephyr/test/drivers; TCPC transactions succeed BRANCH=none Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Change-Id: Id3e6a679508b6b0d0cd7a0168caae0d509161ec8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3379466 Reviewed-by: Tomasz Michalec <tmichalec@google.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Sweetberry: Update the powerlog command to use sudo.Michael Pishchagin2022-01-191-1/+1
| | | | | | | | | | | | | | | | | | Without sudo powerlog failed with "Access denied (insufficient permissions)". BRANCH=None BUG=None TEST=None Signed-off-by: Michael Pishchagin <mblsha@chromium.org> Change-Id: I1aeaf20f13179f49814a6b74074dcf9dd1103c45 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3400760 Tested-by: Michael Pishchagin <mblsha@google.com> Auto-Submit: Michael Pishchagin <mblsha@google.com> Reviewed-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Commit-Queue: Ruben Rodriguez Buchillon <coconutruben@chromium.org> Tested-by: Ruben Rodriguez Buchillon <coconutruben@chromium.org>
* zephyr: Add details for generating code coverageAl Semjonovs2022-01-191-0/+7
| | | | | | | | | | | | | | Add details for generating code coverage BRANCH=none BUG=b:201602829 TEST=none Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: I6273f998daba811fd8f404cadbc4c41a585d678d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3387813 Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Yuval Peress <peress@google.com>
* zephyr: drivers: Improve code coverage of ps8xxx.cAl Semjonovs2022-01-193-0/+27
| | | | | | | | | | | | | | Add test cases to improve code coverage of ps8xxx.c. BRANCH=none BUG=b:201602829 TEST=zmake -D configure --coverage --test zephyr/test/drivers/ Signed-off-by: Al Semjonovs <asemjonovs@google.com> Change-Id: Ie9e7677cb50c7e22bb6a7ae56cd3b8e6a4271e4f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3383616 Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Yuval Peress <peress@google.com>
* zephyr test: Check EC_CMD_TYPEC_STATUS resultsAbe Levkoy2022-01-191-0/+20
| | | | | | | | | | | | | | | After attaching emulated PD charger, using EC_CMD_TYPEC_STATUS to verify USB default charging state. BUG=b:209907297 TEST=zmake configure --test zephyr/test/drivers BRANCH=none Cq-Depend: chromium:3368262 Change-Id: Iaa414a8b459b453ffde64f303f584eeaba7e6871 Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3379467 Reviewed-by: Yuval Peress <peress@google.com>
* gitlab: Generate html reports with branch coverageJeremy Bettis2022-01-193-4/+7
| | | | | | | | | | | | | | | | | Lcov was already being run with branch coverage, but include that in the html reports also. BRANCH=None BUG=None TEST=Ran commands locally Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ia64d120ec13ef7e741ba78bc6d05621f1b045215 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3399900 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Yuval Peress <peress@google.com> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* chip/stm32: Move IRQ_TIM to registers.hPatryk Duda2022-01-193-3/+2
| | | | | | | | | | | | | This macro is used in many places, so let's move it to common location. BUG=b:200828093 BRANCH=none TEST=make -j buildall Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I55ec4f7776f494cbb976d50c91e6809c1827820f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3398913 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* stm32/hwtimer32: Check if interrupts are disabled when setting timestampPatryk Duda2022-01-191-5/+15
| | | | | | | | | | | | | | | | | | | | CL:3347658 introduces disabling interrupts when setting new timestamp to the timer. To make sure that __hw_clock_source_set() won't be used with enabled interrupts let's add ASSERT which will check that. This patch also adds explaination, why clearing all status bits in the timer is correct. BUG=b:200828093 BRANCH=none TEST=Compile EC with CONFIG_CMD_FORCETIME enabled. Use 'forcetime' command to set time, then use 'timerinfo' to check if correct time is set. Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: I2945edbe71e4e9991b4e8eaa462d8c1d08a22d23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3395878 Reviewed-by: Tom Hughes <tomhughes@chromium.org>
* stm32/hwtimer: Clear status register after counter is setPatryk Duda2022-01-191-4/+28
| | | | | | | | | | | | | | | | | | | | | Whenever a timer interrupt occurs, the status register is checked for overflow and the overflow status is passed to process_timers(), which increments clksrc_high. When setting the clock to a new time, we don't want the previous overflow state to trigger this process. To avoid this problem, just clear status register when new value is assigned to counter. To avoid race between updating counter and clearing status, operation is performed when counters are disabled. BUG=b:200828093 BRANCH=none TEST=make -j buildall Signed-off-by: Patryk Duda <pdk@semihalf.com> Change-Id: Ifa3f2ff293483e167b5c7b6ff136708a876e8054 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3378344 Reviewed-by: Tom Hughes <tomhughes@chromium.org> Reviewed-by: Bobby Casey <bobbycasey@google.com>
* nissa: Configuration changes for nivviksAndrew McRae2022-01-192-1/+7
| | | | | | | | | | | | | | | | Adjust stack sizes to provide some head room. Add USB-C VBUS charger measurement option. 'kernel stacks' now reports free memory in the stacks. BUG=b:214881978 TEST=zmake configure -b nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: Icad59032f8afe2159fad3d024039e7c2e7611640 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3397885 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* nissa: Use no-auto-init for optional GPIOsAndrew McRae2022-01-192-8/+8
| | | | | | | | | | | | | | | | | For GPIOs that are specific to sub-boards, mark them as no-auto-init so that they are not initialised. They will be initialised depending on which sub-board is configured. BUG=b:212490923 TEST=zmake configure -b nivviks BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I3a6e47b90951cfd7e3ffa5a1da4fcd8875353f74 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3398221 Reviewed-by: Peter Marheine <pmarheine@chromium.org>
* taniks: Remove G sensor/motionsense supporttony.tang2022-01-191-1/+4
| | | | | | | | | | | | | Remove G sensor/motionsense support BRANCH=brya BUG=b:211078551 TEST=make buildall -j Signed-off-by: tony.tang <tony.tang@lcfc.corp-partner.google.com> Change-Id: Ia130b58bf500a0e387761d28392ee24e355e062a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3397560 Reviewed-by: caveh jalali <caveh@chromium.org>
* zephyr: kingler: move GPIO_EN_USB_C1_SINK control to rt1718s hookEric Yilun Lin2022-01-192-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | PPC NX20P3483 needs EN_SNK asserted to sink. This isn't a issue on most cases except for the dead battery case. When dead battery happens, the nx20p3483_init tries to enable sink from VCHG, but however, the EN_SNK was controlled by the RT1718S's universal GPIO, and the control was tight to charge_manager:board_set_active_charger_port(). The charge_manager wasn't ready at the very beginning moment of boot up, and also the NX20P3483 won't response to I2C command when it was in dead battery mode, so it has difficulty to interact to charger_manager from PPC driver. So when NX20P3483 exits dead battery mode, due to the EN_SNK was not asserted, the board is browned-out. This CL moves the control from charge_manager to TCPC driver so it's easier for NX20P3483 to ask RT1718S to enable EN_SNK pin. BUG=b:214146359 TEST=Boot Kingler without battery with sinking from C1. BRANCH=none Change-Id: I032c020a958bd9d1cec1a6b10766c90ebd102f3b Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3386982 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com>
* tcpm/rt1718s: add board hook for set_snk_ctrl()Eric Yilun Lin2022-01-192-1/+27
| | | | | | | | | | | | | | | | | | | RT1718S provides 3 GPIO for universal uses, and one of the use is making one of the GPIO a SNK enable pin. For such case, we add a board hook for board customization, so the board can control the pin as their needs. BUG=b:214146359 TEST=ensure the board hook is called BRANCH=none Change-Id: I15955e07bfcd192ea79ab891da58021a2ec153c6 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3386981 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com>
* taniks: De-feature volume up/down button on IO board in EC codetony.tang2022-01-192-1/+18
| | | | | | | | | | | | Taniks does not have volume up and volume down button in IO board, and we will need to remove the EC code. BRANCH=brya BUG=b:215033684 TEST=make buildall -j Signed-off-by: tony.tang <tony.tang@lcfc.corp-partner.google.com> Change-Id: Id1b819236880e3bcc5b6627951c1628f1d41b4e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3397555 Reviewed-by: caveh jalali <caveh@chromium.org>
* taniks: Run TCPC1/PPC1 I2C at 1 MHz on taniks boardstony.tang2022-01-192-2/+9
| | | | | | | | | | | | BRANCH=none BUG=b:211080526 TEST=make buildall -j Signed-off-by: tony.tang <tony.tang@lcfc.corp-partner.google.com> Change-Id: I4f5278daa1bdab95c8cfdcb3b4e9870d0ac77127 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3386985 Reviewed-by: Parth Malkan <parthmalkan@google.com> Reviewed-by: caveh jalali <caveh@chromium.org>
* krabby: configure ledTing Shen2022-01-191-11/+21
| | | | | | | | | | | | | | | | | Add basic LED implementation for Krabby. BUG=none TEST=ectool led (power|battery) <color> manually verify BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: I6117e44b404c21ab81126b8e0c317f07f4814e79 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3389068 Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* krabby: increase shell history buffer sizeTing Shen2022-01-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | Since we still have some spare memory, increase the buffer size to improve QoL. Before: RAM: 50608 B 56 KB 88.25% After: RAM: 50992 B 56 KB 88.92% BUG=None TEST=make BRANCH=none Signed-off-by: Ting Shen <phoenixshen@google.com> Change-Id: Ia0f6b5908a9fb5acc792627c2e27052989a07a5c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3388607 Tested-by: Ting Shen <phoenixshen@chromium.org> Auto-Submit: Ting Shen <phoenixshen@chromium.org> Reviewed-by: Eric Yilun Lin <yllin@google.com> Commit-Queue: Eric Yilun Lin <yllin@google.com>
* zephyr: Instantiate all GPIOs in gpio_config listAndrew McRae2022-01-193-17/+40
| | | | | | | | | | | | | | | | | Instantiate all GPIOs in the common gpio_config list. For GPIOs with no enum-name property, create an internal enum name from the ordinal. Test by checking that all GPIOs are seen via gpioget BUG=b:214316663 TEST=zmake configure -b nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: If6193e25123d6e3cc85c89a2349e4fd384d27080 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384979 Reviewed-by: Keith Short <keithshort@chromium.org>
* agah: rename draco to agahZick Wei2022-01-1918-18/+18
| | | | | | | | | | | BUG=b:210970640 BRANCH=none TEST=make BOARD=agah Signed-off-by: Zick Wei <zick.wei@quanta.corp-partner.google.com> Change-Id: I8556de9a8fc2c827cb136eb90ca09e6df8c6c51a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3367356 Reviewed-by: caveh jalali <caveh@chromium.org>
* zephyr: kingler: enable DB detectionEric Yilun Lin2022-01-191-1/+1
| | | | | | | | | | | | | | | | Enable detection of Type-C and HDMI daughter boards. BUG=b:207802869 TEST=Ensure the DB is detected BRANCH=none Change-Id: Ib85c3ca9511e8889e2a355bdbed797539a024599 Signed-off-by: Eric Yilun Lin <yllin@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3319981 Reviewed-by: Ting Shen <phoenixshen@chromium.org> Commit-Queue: Eric Yilun Lin <yllin@google.com> Tested-by: Eric Yilun Lin <yllin@google.com> Auto-Submit: Eric Yilun Lin <yllin@google.com>
* zephyr: support CONFIG_CHARGER_RUNTIME_CONFIGPeter Marheine2022-01-192-0/+15
| | | | | | | | | | | | BUG=b:213996924 TEST=nivviks builds with runtime charger configuration enabled BRANCH=none Signed-off-by: Peter Marheine <pmarheine@chromium.org> Change-Id: I9ba13e53db404df30e81c2f38f2e09b1f4670629 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3386974 Reviewed-by: Andrew McRae <amcrae@google.com> Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* zephyr: Detect unsorted config_allowedSimon Glass2022-01-191-1/+7
| | | | | | | | | | | | | | When the file is not sorted the check fails, but this is not obvious. Add an explicit message. BUG=b:195718112 BRANCH=none TEST=make buildall -j32 Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: Ib8b049d985c96567308d6240462a539cbf8b596a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3388358 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* tree: Replace asm for disabling interrupts with functionTom Hughes2022-01-198-17/+17
| | | | | | | | | | | | | | | | | | | | | | Most of the code is already using interrupt_enable/disable, so this makes it consistent. Commands used: git grep --name-only 'cpsid i' |\ xargs sed -i 's#asm volatile("cpsid i");#interrupt_disable();#g' git grep --name-only 'cpsie i' |\ xargs sed -i 's#asm volatile("cpsie i");#interrupt_enable();#g' git checkout core/cortex-m/task.c core/cortex-m0/task.c BRANCH=none BUG=b:213601206 TEST=make buildall -j Signed-off-by: Tom Hughes <tomhughes@chromium.org> Change-Id: Ic9fc4d5adaf7254f7432685dea68611d9d535b9a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3373621 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: docs: Temperature SensorsTristan Honscheid2022-01-193-0/+209
| | | | | | | | | | | | | Add Markdown documentation for adding new temperature sensors. BUG=b:208436220 BRANCH=None TEST=N/A Signed-off-by: Tristan Honscheid <honscheid@google.com> Change-Id: I76c7284673c54f85d926be5f447146f03eeb18ed Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384016 Reviewed-by: Keith Short <keithshort@chromium.org>
* zephyr: Rename named-chi-fw-config to cros-ec,cbi-fw-configAndrew McRae2022-01-185-17/+17
| | | | | | | | | | | | | Fix naming of FW_CONFIG DTS bindings BUG=b:212758472 TEST=zmake testall BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I0a73ae0623a0a327068b341d8c809cee6c8a8944 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3391503 Reviewed-by: Jeremy Bettis <jbettis@chromium.org>
* flash_fp_mcu: Update for herobrine-rev1Douglas Anderson2022-01-181-8/+16
| | | | | | | | | | | | | | | | | herobrine-rev1 has things hooked up totally differently than -rev0. We don't really care about -rev0 anymore and we can't autodetect the SPI bus because of b/179533783, so this will effectively kill -rev0 support in this script, but nobody should mind. BRANCH=None BUG=None TEST=flash_fp_mcu on Herobrine -rev1 Change-Id: Id71ae1010566075fe310d86a1e34a59a889f1658 Signed-off-by: Douglas Anderson <dianders@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3344724 Reviewed-by: Stephen Boyd <swboyd@chromium.org> Commit-Queue: Stephen Boyd <swboyd@chromium.org>
* zephyr: Avoid calling task_get_current except in tasks.Andrew McRae2022-01-181-1/+1
| | | | | | | | | | | | | | | | | | task_get_current is being called in in_deferred_context(), which may be invoked in initialisation code before the tasks have been started (so shimmed_tasks_dyn was not initialised). This fix avoids the use of any data that requires the EC tasks to have been initialised or started. BUG=b:213996924 TEST=zmake configure -b nivviks; flash and run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I0bd1a13a8d5bbf8b3204695b7f9977fe99f63437 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3397883 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zmake: Run lcov after testJeremy Bettis2022-01-183-118/+113
| | | | | | | | | | | | | | | | | | | | | | Change lcov & test to run sequentally, not in parallel. Also cleaned up function that is only called in one place. zmake coverage was broken by crrev/c/3385775 BRANCH=None BUG=b:214323409 TEST=zmake coverage build/zcoverage zmake configure --coverage zephyr/test/drivers && \ zmake test --coverage build/zephyr/test-drivers Signed-off-by: Jeremy Bettis <jbettis@google.com> Change-Id: Ic0789b377f4be43afce50bab67bee7e17f79cd8f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3388356 Tested-by: Jeremy Bettis <jbettis@chromium.org> Auto-Submit: Jeremy Bettis <jbettis@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Jeremy Bettis <jbettis@chromium.org>
* Fix sort order in config_allowedSimon Glass2022-01-181-1/+1
| | | | | | | | | | | | | | | | | | | | This file got out of sorted order. Fix it. This problem was introduced by: f92bca665 hostcmd: Implement I2C_CONTROL host command which added to the list, but in the wrong place. BUG=b:195718112 BRANCH=none TEST=make buildall -j32 Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I5fa9e7390d1e15696fc549e7b46ad22b85a18b91 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3388357 Reviewed-by: Keith Short <keithshort@chromium.org> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* zephyr: flash: clean up the shim layerDawid Niedzwiecki2022-01-1810-68/+62
| | | | | | | | | | | | | | | | | | | | | | | Investigate if there is a possibility to call Zephyr flash drivers directly in the shim layer, not via CrosEC drivers. Unfortunately, it is possible only for the read operation. Other operations require additional actions depending on the chip type e.g. splitting into smaller parts or refreshing watchdog. Also, move locking of physical flash operations to the CrosEC drivers from the shim layer. BUG=b:205175314 TEST=zmake testall && make sure SoftwareSync works to verify flash operations BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I9c947d46244a255573ebde9a5cd7432a3ee9389c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3389268 Tested-by: Dawid Niedźwiecki <dn@semihalf.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr: docs: add ADC documentationDawid Niedzwiecki2022-01-183-0/+199
| | | | | | | | | | | | | | | Add documentation for configuring ADC. BUG=b:208435885 TEST=Browse doc in gerrit BRANCH=main Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: Ib83af48f84582e7e5bf63808cfbc2fac77faacab Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3352468 Tested-by: Dawid Niedźwiecki <dn@semihalf.com> Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
* zephyr test: Add TODO for non-hermetic testAbe Levkoy2022-01-181-0/+4
| | | | | | | | | | | | | | Add TODO for order-dependent behavior in usb_integration that should be fixed. BUG=b:213909940 TEST=zmake configure --test zephyr/test/drivers BRANCH=none Change-Id: I7564a33946990a6733c34c0ff0ecfdf4fa99ad9e Signed-off-by: Abe Levkoy <alevkoy@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3379469 Reviewed-by: Wai-Hong Tam <waihong@google.com>
* zephyr: Initialise non-disabled GPIOsAndrew McRae2022-01-182-20/+29
| | | | | | | | | | | | | | Allow GPIOs to be configured as 'inactive', and do not initialise them at the start. BUG=b:214333364 TEST=zmake configure -b nivviks; flash & run BRANCH=none Signed-off-by: Andrew McRae <amcrae@google.com> Change-Id: I98979f9c025bf4050b384d7e2c84271ff4e30022 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384130 Reviewed-by: Keith Short <keithshort@chromium.org>
* PCT2075: Move headerDiana Z2022-01-182-1/+1
| | | | | | | | | | | | | | Move the PCT2075 header to a common location so it can be used in the zephyr shim build. BRANCH=None BUG=b:208515128 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ic0bbb20e779396d9e69a8a8dbaab871272153ca8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3390524 Reviewed-by: Keith Short <keithshort@chromium.org>
* Zephyr: Include build support for PCT2075Diana Z2022-01-183-0/+13
| | | | | | | | | | | | | | Introduce the Kconfig and build support needed to use the PCT2075 driver. BRANCH=None BUG=b:208515128 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ie60e133ef948de80ca018943687358dfef4728ec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3390523 Reviewed-by: Keith Short <keithshort@chromium.org>
* Skyrim: Add SB TSI temperature sensorDiana Z2022-01-183-1/+27
| | | | | | | | | | | | | | Add the SB TSI temperature sensor, which will be both on guybrush and zephyr boards. BRANCH=None BUG=b:195137794,b:208515128 TEST=load on guybrush, verify reasonable SoC temperature Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: Ia8f15cc5e341479170f3d4c02224e7636a588da3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384488 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Zephyr: Add new I2C port enum for AP thermalDiana Z2022-01-181-0/+1
| | | | | | | | | | | | | Add an enum value for the AP thermal port. BRANCH=None BUG=b:195137794,b:208515128 TEST=zmake testall Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I0bd396e8d23e7d05adfce6d2b746beb6c936ef49 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384487 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
* Zephyr: Add SB TSI devicetree supportDiana Z2022-01-182-0/+39
| | | | | | | | | | | | | | | | Add support for the SB TSI temperature sensor in devicetree. Note that only one SB TSI sensor can exist on a board, and the driver is written to have one and only one sensor. BRANCH=None BUG=b:195137794 TEST=zmake testall, add second SB-TSI to guybrush and ensure an error is thrown Signed-off-by: Diana Z <dzigterman@chromium.org> Change-Id: I6c09e08a12eabd0910c3f5270393a0d8d4a4b219 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3384486 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>