summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Clear OWNERS for factory/firmware branchfactory-2305.BBrian Norris2021-09-101-0/+1
| | | | | | | | | | | | BUG=none TEST=none Change-Id: I0f03f432ada1064ffba9595be78ca7ab4d25ecd1 Signed-off-by: Brian Norris <briannorris@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3154575 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Owners-Override: Jora Jacobi <jora@google.com> Tested-by: Jack Rosenthal <jrosenth@chromium.org>
* daisy/snow: seperate EC_INT and CODEC_INT handlingDavid Hendricks2012-05-155-20/+20
| | | | | | | | | | | | | | | | | | This patch splits apart EC_INT and CODEC_INT handling for two reasons: 1. Allow other tasks to interrupt the AP without triggering the keyboard noise suppression. 2. Allow more work to be done after a keystroke is detected but before interrupting the AP. This is intended to prevent latency issues with the noise suppression. Also, Snow does not currently have CODEC_INT hooked up, so it does not need the extra function for suppressing keystroke noise. BUG=chrome-os-partner:9594 TEST=tested on daisy (keys still respond), locally compiled for snow. Change-Id: I73bd42bb7263005b11724337162646092292556f Signed-off-by: David Hendricks <dhendrix@chromium.org>
* Merge "daisy/snow: define KB_OUTPUTS in board.h, remove KB_COLS"Gerrit2012-05-153-8/+12
|\
| * daisy/snow: define KB_OUTPUTS in board.h, remove KB_COLSDavid Hendricks2012-05-153-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | An upcoming CL will use the number of keyboard outputs (currently and incorrectly called KB_COLS) in another file. So this is a good time to clean up the naming to remove some column/row ambiguity and move the #define to board-specific configuration. BUG=none TEST=locally compiled for link and daisy Signed-off-by: David Hendricks <dhendrix@chromium.org> Change-Id: I155e3d6f2069c582517016c1116eaf668ffca86a
* | Merge "Enable vboot for BDS too."Gerrit2012-05-153-12/+5
|\ \
| * | Enable vboot for BDS too.Bill Richardson2012-05-153-12/+5
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | The recovery switch is the DOWN button. BUG=none TEST=manual Install on BDS, open console. Press the reset button, it should boot to firmware A. Hold the DOWN button, press the reset button. It should stay in RO. Change-Id: I82f72a56df463c7cc67bde7e09f3be1545c76129 Signed-off-by: Bill Richardson <wfrichar@chromium.org>
* | Rearrange task prioritiesRandall Spangler2012-05-152-7/+7
|/ | | | | | | | | | | | | | Charging state machine doesn't need to be able to preempt everybody. Keyboard scanning and power button should preempt, because they need to debounce/scan at a stable rate. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=system still boots Change-Id: Id57c680b9fa4652bc10d19270620d63788a7b269
* Add option to pll command to divide down system clockRandall Spangler2012-05-151-5/+33
| | | | | | | | | | | | | | | | | | | | | | Also fix sleep command triggering watchdog timer in spin-idle Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:7454 TEST=manual 1) check PLL operation - system keeps operating pll on pll off pll 4 pll 16 2) check sleep operation - no watchdog sleep 0 (reboot) sleep 1 Change-Id: Ib3079634a883d7c96b221f9e06a148221628cc3c
* Merge "fix FMAP linker section offset"Gerrit2012-05-151-1/+2
|\
| * fix FMAP linker section offsetVincent Palatin2012-05-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When the flash memory base address is not 0 (e.g. stm32), the .google section for FMAP was badly positioned inside the EC binary. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:8865 TEST=make BOARD=daisy && make BOARD=link manually verify the .map file for Daisy and boot patched Daisy EC with CONFIG_VBOOT activated. Change-Id: Ibc994d4d52e49dc7bc642a1a138ac533ededbcd3
* | Merge "Fan power is on +5VALW, not VS."Gerrit2012-05-151-1/+1
|\ \ | |/ |/|
| * Fan power is on +5VALW, not VS.Randall Spangler2012-05-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This has been true since proto1, and will continue to be so on EVT+. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=faninfo (on the one board modified for EC +5VALW control, you can also toggle +5VALW and see that powered reports the correct state). Change-Id: Iaabfa3b84eb7eba46cf9972ec402153770f49fd7
* | Merge "Sort console commands at build time"Gerrit2012-05-153-23/+6
|\ \ | |/ |/|
| * Sort console commands at build timeVincent Palatin2012-05-153-23/+6
| | | | | | | | | | | | | | | | | | | | | | | | Use the linker to sort console commands by name, this saves execution time and memory. BUG=none TEST=generate several images with 5N, 5N+1, 5N-1 commands and check the output of the "help" command. Change-Id: Ib5d8f3bca726621c68ab152f4fa662cee355abb1 Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
* | Add chipinfo string for LM4FS1GH5BB.Louis Yung-Chieh Lo2012-05-151-0/+2
|/ | | | | | | | | | | | | | | | | | | Signed-off-by: Louis Yung-Chieh Lo <yjlou@chromium.org> BUG=chrome-os-partner:9625 TEST=test on link. (EC console) > chipinfo Chip vendor: ti Chip name: lm4fs1gh5bb Chip revision: A3 (VT2) % ectool chipinfo Chip info: vendor: ti name: lm4fs1gh5bb revision: A3 Change-Id: I5f18ee068f4d5d64a51933fa3cc69d45b18ecaf3
* Merge "Arrange help output to sort 'column first'"Gerrit2012-05-141-25/+31
|\
| * Arrange help output to sort 'column first'Vadim Bendebury2012-05-141-25/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort the command name index, and then print them in file columns (as before), but ordering columns first. This makes it much easier to examine the 'help' command output. BUG=none TEST=manual . program the new image . execute the 'help' command . observe output printed sorted 'columns first' Change-Id: I7b15cef09a61fe20eb4ba5ee274ba1d72063f1c0 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
* | Merge "Slightly update the host commands API"Gerrit2012-05-1413-59/+144
|\ \
| * | Slightly update the host commands APIVincent Palatin2012-05-1413-59/+144
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Preparatory work to use common host command code between ARM and x86. Every command sends back explicitly the size of the response payload. The size of the response defaults to 0 ond can be updated. Add a protocol version number returned as command 0x00 to help with backward compatibility. move a couple of function from lpc specific header to host commands to be able to implement them for the I2C link. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> BUG=chrome-os-partner:9614 TEST=make BOARD=link Change-Id: I6a28edf02996ddf6b7f32a3831d07d5f0271848f
* | | Merge "Change polarity of PROCHOT signal to match EVT"Gerrit2012-05-145-4/+27
|\ \ \
| * | | Change polarity of PROCHOT signal to match EVTRandall Spangler2012-05-145-4/+27
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This would throttle proto1 systems, if it weren't for a HW bug which means we don't have prochot control over proto1 systems at all. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:8982 TEST=system still boots Change-Id: Ie42c034141f24795ec2bfee592e194001d3cd174
* | | Fix charging task running too frequentlyRandall Spangler2012-05-141-7/+12
|/ / | | | | | | | | | | | | | | | | Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=taskinfo; note that number of IRQ8 (I2C0) exceptions goes up more slowly Change-Id: Ib93aaab80fdd19b7a35aec43903393baf506f2e8
* | Merge "Add #define CONFIG_NO_RW_B for stm32f100"Gerrit2012-05-141-0/+1
|\ \ | |/ |/|
| * Add #define CONFIG_NO_RW_B for stm32f100David Hendricks2012-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | We don't actually use image B for boards with the STM32F and there is no longer enough space for it. BUG=none TEST=locally compiled for Snow Change-Id: Ic668c718feaef4cf808869474dc05e45a5f7290c Signed-off-by: David Hendricks <dhendrix@chromium.org>
* | Merge "Allow console commands abbreviation"Gerrit2012-05-145-10/+34
|\ \
| * | Allow console commands abbreviationVadim Bendebury2012-05-145-10/+34
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EC console input handling code is being enhanced to accept abbreviated command names. If the abbreviation is unique, the appropriate command is used, if the abbreviation is ambiguous, the command is handled as nonexistent. The error message is being modified to mention that the command either does not exist or is ambiguous. This change also makes it impossible to have command names matching the beginning of other command names. Two such cases are being fixed (`ch' renamed to `chan' and `thermal' renamed to 'thermalconf'). BUG=none TEST=manual . program the new EC image. Try entering at the console: > h Command 'h' either not found or ambiguous. Command returned error 1 > he Known commands: adc autofan battery ch charger ... > help Known commands: adc autofan battery ch charger ... Change-Id: Iaa3e91e1504e42daefb02d561e00c39003548197 Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
* | Merge "Extract A and B images from signed EC binary for openocd macros"Gerrit2012-05-142-3/+9
|\ \
| * | Extract A and B images from signed EC binary for openocd macrosRandall Spangler2012-05-142-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=build, then flash_link_a from openocd telnet session Change-Id: If922f54adb4684e27a38ed87348111bd9047535d
* | | daisy: Refactor the power taskSimon Glass2012-05-141-87/+236
| |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a set of functions to deal with power on/power off, and checking the power button. Then use these functions in a new top-level power control loop. This implements the following features: - Cold reset powers off the AP When powered off: - Press pwron turns on the AP - Hold pwron turns on the AP, and then 16s later turns it off and leaves it off until pwron is released and pressed again When powered on: - The PMIC PWRON signal is released one second after the power button is released (we expect that U-Boot as asserted XPSHOLD by then) - Holding pwron for 8s powers off the AP - Pressing and releasing pwron within that 8s is ignored - If XPSHOLD is dropped by the AP, then we power the AP off BUG=chrome-os-partner:9424 TEST=very ad-hoc: 1. build and boot on daisy, flash U-Boot with USB using 'cros_bundle_firmware -w usb', inserting daisy USB cable when it says 'Reseting board via servo...' 2. Press cold reset, then power on, see that it powers on 3. Then hold power-on for 8 seconds and see that it power off 4. XPSHOLD function not tested yet (this should work in Daisy 2) Change-Id: Ie471af0b4e690de7d6340e47e148c8ce3cda94f3 Signed-off-by: Simon Glass <sjg@chromium.org>
* | daisy: Deal with no-timeout explicity in wait_in_signal()Simon Glass2012-05-141-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This function accepts a timeout value of -1, so add a comment to that effect. Also make it deal with this explicitly since the current function seems to return prematurely in that case. BUG=chrome-os-partner:9424 TEST=very ad-hoc: 1. build and boot on daisy, flash U-Boot with USB using 'cros_bundle_firmware -w usb', inserting daisy USB cable when it says 'Reseting board via servo...' 2. Press cold reset, then power on, see that it powers on 3. Then hold power-on for 8 seconds and see that it power off 4. XPSHOLD function not tested yet Change-Id: I01bd81997836333ca33e61d48823e8ff41034d5f Signed-off-by: Simon Glass <sjg@chromium.org>
* | timer: Allow callers to pass 'now' to timestamp_expired()Simon Glass2012-05-142-4/+10
|/ | | | | | | | | | | To avoid calling get_time() when the caller already knows the value, add a parameter to timestamp_expired(). BUG=chrome-os-partner:9424 TEST=build and boot on Daisy Change-Id: Ibb97c86f429ec4b814e17b41cbf79b612a75097a Signed-off-by: Simon Glass <sjg@chromium.org>
* stm32: add missing init hookDavid Hendricks2012-05-111-0/+1
| | | | | | | | | | This adds a missing init hook BUG=none TEST=Tested on Snow Change-Id: I4571d5bddf415b06e27e5e9eaadbb6017bde4bbe Signed-off-by: David Hendricks <dhendrix@chromium.org>
* Maintain timer value across sysjumps and clean up init debug outputRandall Spangler2012-05-117-31/+74
| | | | | | | | | | | This helps us keep track of how long vboot is taking on the EC. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:9651 TEST=reboot system and look at debug log. time shouldn't start over after it jumps to image A. Change-Id: Iad86e90d42dabf1c67b2c2be80dda1151cf9a288
* Call timer_init() before other interrupts are initializedRandall Spangler2012-05-111-5/+7
| | | | | | | | | | Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:9647 TEST=hack code to put a uart_puts() immediately following uart_init() It shouldn't crash. Change-Id: Ia1867a631934dbd457a23183010fdf9f5c284873
* Add LICENSE file to projectBill Richardson2012-05-111-0/+27
| | | | | | | | | | | It's the standard Chromium OS BSD-style license. I just copied it from vboot_reference. BUG=chrome-os-partner:9085 TEST=none Change-Id: Ib8b77e9544d199fa809caaae0be9c0903c169fd5 Signed-off-by: Bill Richardson <wfrichar@chromium.org>
* Enable verified boot for EC firmwareBill Richardson2012-05-1018-22/+375
| | | | | | | | | | | | | | | | | | | | BUG=chrome-os-partner:7459 TEST=manual In the chroot: cd src/platform/ec make BOARD=link The firmware image (build/link/ec.bin) is signed with dev-keys. Reflash the EC and try it, and it should verify and reboot into RW A. Additional tests (setting USE_RO_NORMAL, poking random values into VBLOCK_A or FW_MAIN_A to force RW B to run, etc.) are left as an exercise for the reader. I've done them and they work, though. Change-Id: I29a23ea69aef02a11aebd4af3b043f6864723523 Signed-off-by: Bill Richardson <wfrichar@chromium.org>
* Merge "Use open drain reset signals, and clean up signals to 5VALW-powered ↵Gerrit2012-05-105-41/+45
|\ | | | | | | devices"
| * Use open drain reset signals, and clean up signals to 5VALW-powered devicesRandall Spangler2012-05-105-41/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Open drain cleanup minimizes leakage and signal glitching on shared reset/signal lines, and is tidier than explicitly switching the signals between inputs/outputs. Touchscreen and lightbar are powered by +5VALW so their signals need to be dropped when +5VALW is off to avoid leakage, and so they see a clean reset signal when they're powered up. Moved +5VALW power-on to S5-S3 transition, to minimize power draw in S5. This also ensures that 5VALW-powered devices get reset when the device bounces through S5. (No effect on proto1, where 5VALW is not under EC control.) Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:9172 TEST=boot and shutdown system; still works. Change-Id: Ia4bf0703292a189c324ce283d1e79a33776ee40f
* | stm32: Add a generic gpio librarySimon Glass2012-05-103-7/+17
|/ | | | | | | | | | | | | | Much of the code in gpio-stmxxx.c is duplicated. Also the gpio_get_name() function is not present in the new file. Create a common gpio.c file to hold this function, and hopefully other code in the future. BUG=none TEST=build on all platforms, boot on daisy Change-Id: I4ab33e0e5c52843b770fabc777c917493abccffe Signed-off-by: Simon Glass <sjg@chromium.org>
* daisy: Disable keyscan messagesSimon Glass2012-05-101-0/+3
| | | | | | | | | | | | These messages are unnecessary and seem to hang the EC for a while. Punt them for now. BUG=none TEST=build and boot on daisy; see that keyboard still works, and messages do not appear Change-Id: I62963b62eb3e7cee86162784f364d7b1da37f631 Signed-off-by: Simon Glass <sjg@chromium.org>
* Allow boards to set the default console maskSimon Glass2012-05-102-6/+16
| | | | | | | | | | | | | | Some boards don't like to have every keyboard scan printed, but some devs find this info comforting. Add a way for boards to select the require console mask. BUG=none TEST=manual: build and boot on daisy, see that key scan messages are suppressed. build on all platforms Change-Id: I8e6e640eaabc0a08e5427cd97f7089dda1238025 Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge "Fix truncated output from 'ch' command"Gerrit2012-05-101-0/+1
|\
| * Fix truncated output from 'ch' commandRandall Spangler2012-05-101-0/+1
| | | | | | | | | | | | | | | | | | Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST='ch' - prints all the channels now Change-Id: I38ebc3eed2476c44c26fc00d6ea79800ae427722
* | daisy: Remove start-up message from keyboard scanSimon Glass2012-05-101-2/+0
|/ | | | | | | | | | | | | | | | | Remove the start-up debug message which otherwise ends up being the first thing displayed on boot, ahead of the banner. BUG=chrome-os-partner:9424 TEST=very ad-hoc: 1. build and boot on daisy, flash U-Boot with USB using 'cros_bundle_firmware -w usb', inserting daisy USB cable when it says 'Reseting board via servo...' 2. Press cold reset, then power on, see that it powers on 3. Then hold power-on for 8 seconds and see that it power off 4. XPSHOLD function not tested yet Change-Id: I4f057ad32c3a857851d02935286683ea87dc7cd1 Signed-off-by: Simon Glass <sjg@chromium.org>
* Adjust fan speed control thresholdsVic Yang2012-05-101-3/+3
| | | | | | | | | | | | | This CL set higher temperature thresholds for CPU temperature to reduce fan noise. Also set temperature thresholds for case temperature so that we can adjust fan speed according to them. Signed-off-by: Vic Yang <victoryang@chromium.org> BUG=chrome-os-partner:8982 TEST=Manual Change-Id: I16a74e10af4583a59065c09e8d9538232b0fb157
* Drop DPWROK when system is off for more than 10 secrelease-R20-2268.BRandall Spangler2012-05-096-94/+201
| | | | | | | | | | | | | | | | | | | | | | | | | | This saves ~70mw of power. To make this work, I also had to stretch the power button signal to give the system a chance to come back up when the user taps the power button. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:9574 TEST=manual For each of the following tests, wait ~15 sec after the system is powered off to give it a chance to drop DPWROK. 1) tap power button -> system turns on 2) hold power button 1 sec -> system turns on 3) open lid -> system turns on 4) silego reset (power+refresh, or power+esc on proto1) -> system stays off 5) silego recovery (power+esc+refresh) -> system turns on 6) hold down power button and type 'reboot' on EC console -> system turns on 7) type 'powerbtn' on EC console -> system turns on Change-Id: I781cf3e665104192521b7fb9ff75a3c3e7f43464
* Add hooks for chipset power transitionsRandall Spangler2012-05-0910-53/+134
| | | | | | | | | | | | This is cleaner than having x86_power explicitly know about everything else in the system that cares about power transitions. Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=none TEST=boot and shutdown system; still works. Mouse powered to system is off in S5. Change-Id: Ib673ca2d9edd5473334e7604e98b99b02b768419
* Fix polarity of radio-disable GPIOsRandall Spangler2012-05-093-4/+8
| | | | | | | | | | | | Signed-off-by: Randall Spangler <rspangler@chromium.org> BUG=chrome-os-partner:8932 TEST=manual 1) gpioget with system off -> ENABLE_WLAN = 0, RADIO_ENABLE_* = 0 2) gpioget with system on -> ENABLE_WLAN = 1, RADIO_ENABLE_* = 1 Change-Id: I397a195b4539083c622b85d63703c334cae931fb
* stm32: set default i2c mode to noopDavid Hendricks2012-05-091-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | This CL initializes the default transmit mode for I2C to CMDC_NOP. When we introduced the protocol, we changed the default mode to send message protocol version. This didn't take into account that U-Boot's probe command (and probably other userspace commands) do a single-byte read to probe. So when the probe was asking for a single byte, by default we were sending multiple bytes for the version message. This CL also makes the EC reset the mode to noop after each EC-to-AP transmission. This will help ensure that the EC ends up in a known state e.g. if the system is reset. That will require the AP to set the mode before requesting any real data, but that's how we do things now anyway. BUG=chrome-os-partner:9556 TEST=Tested on Daisy. Tested by running "i2c dev 4; i2c probe" at U-Boot prompt, booting system, and typing on keyboard. Everything seems to work okay. Signed-off-by: David Hendricks <dhendrix@chromium.org> Change-Id: I0849c94588a9a60ade657af8f941f7267553e316
* Merge "stm32: add flash programming support"Gerrit2012-05-096-4/+305
|\