| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Note that this moves the charger to a different I2C port. If you're
working on battery charging, you'll need to hack board.h in your local
repo to move it back.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:8458
TEST=manual
Change-Id: Id94ee2ce1ef6c973c1786037e07d0c64a89a9940
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that this is a big security hole and should be removed after we
complete the EC autoupdate mechanism and vboot code.
To full update EC firmware on proto 1.0, we need a manual way to switch
EC running on RO/RW. This CL implements the LPC command.
BUG=chrome-os-partner:8415
TEST=on proto 0.5.
ectool reboot_ec RW_A # EC boots to RW A
ectool reboot_ec RO # EC boots to RO
Change-Id: Ibf050328bc4e3d2c6d72bfc478d6334f11f0eb46
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
And faninfo now checks if the fan is powered.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=manual
1) faninfo --> fan is initially disabled and powered off
3) gpioset enable_vs 1 --> fan is now powered on, but still disabled
2) fanset 8000 --> fan is now enabled, and you should hear it
Change-Id: I97f35a20022cabd4520522f2d18ecb7603faabd1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:8325
TEST=manual
Boot system with lid open. 'ectool switches' should show lid open.
Use 'dut-control goog_rec_mode:on'. 'ectool switches should show
dedicated recovery signal on.'
Use 'dut-control goog_rec_mode:off'. 'ectool switches should show
dedicated recovery signal off.'
Disable write protect via screw. 'ectool switches' should show WP
signal disabled.
Boot system in recovery mode (power+esc+reload). Should show 0x09.
Change-Id: I0434427c4b5f8c07c02a8714618f7eb101b86fed
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
util/ectool.c source contains mixed indentation. This change
adds battery command and retabifies the whole file.
Signed-off-by: Rong Chang <rongchang@chromium.org>
BUG=chrome-os-partner:8181
TEST=manual:
Type command 'ectool battery' and check battery info.
Change-Id: Id60a53b88b414524cc8735c9456bdf4e15a4400f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This CL adds LPC commands to provide the following information:
- Design Capacity (dword)
- Last Full Charge Capacity (dword)
- Design Voltage (dword)
- Design Capacity of Warning (dword)
- Design Capacity of Low (dword)
- Battery Type (ascii)
- Model Number (ascii)
- Serial Number (ascii)
- OEM (usually Vendor) (ascii)
- Battery charge cycle count (dword)
Signed-off-by: Rong Chang <rongchang@chromium.org>
BUG=chrome-os-partner:8181
TEST=none
CQ-DEPEND:Iad4d63c996272568b5a661a6716790ef151b29c5
Change-Id: Iabaf7d9862e15c5b21cf5170cf43450e472b7836
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
These bits are as per definition in "Chrome EC LPC Communication"
document.
BUG=chrome-os-partner:8351
TEST=manual
. tested in concert with coreboot modifications introducing the EC
command implementation
Change-Id: I46d5795e06854e34584132c7fdb37e29150ce179
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The STM32L15xx monitor does not implement the mass erase,
so we need to use the page erase feature and loop.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=on Discovery, fill the flash with a pattern, then erase, write a
firmware image, read back the content of the flash, run the firmware.
Change-Id: Icf0e9812a5d491fea78472a0203ddbbc3e813b2f
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:8350
TEST=manual
Hack a task function to return. Then see that it prints an error to
the debug console and the EC continues running, instead of seeing a
hard-fault.
Change-Id: Iacd2b83c4d4845bb8e6c61e07c3150df8edc7e49
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also prints the current timer value when inits are done, and when the
watchdog task first gets to run (after all higher priority tasks sleep
at least once).
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=none
Change-Id: I342f86ad087fd18ab064a10a5bcdd0b69ee373d0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Rong Chang <rongchang@chromium.org>
BUG=chrome-os-partner:8321
TEST=manual:
type 'battery' in EC serial console, check following fields:
Manufacturer
Device name
Device chemistry
CQ-DEPEND:I0ad3ad45b796d9ec03d8fbc1d643aa6a92d6343f
Change-Id: Iad4d63c996272568b5a661a6716790ef151b29c5
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Implement a generalized I2C transmit-receive function that
write-then-read blocks of raw data. Original 8-bit and 16-bit
read/write functions are refactored.
SMBus read-block protocol for ASCII string is also implemented
based on this API.
Signed-off-by: Rong Chang <rongchang@chromium.org>
BUG=chrome-os-partner:8026,8316
TEST=manual:
Type 'lightsaber' to check 8-bit read/write.
Type 'charger' to check 16-bit read.
Type 'charger input 4032' to check 16-bit write.
Change-Id: I0ad3ad45b796d9ec03d8fbc1d643aa6a92d6343f
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Note that this only handles lid and power button; see
crosbug.com/p/8325 for write protect.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:8185
TEST=manual
1. Check state with lid open
localhost ~ # ectool switches
Current switches: 0x01
Lid switch: OPEN
Power button: UP
Write protect: ENABLED
2. Press power button
localhost ~ # ectool switches
Current switches: 0x03
Lid switch: OPEN
Power button: DOWN
Write protect: ENABLED
3. Release power button and close lid
localhost ~ # ectool switches
Current switches: 0x00
Lid switch: CLOSED
Power button: UP
Write protect: ENABLED
Change-Id: I25f2fa3dfeac004dde9b10a4243ee235875f1b6e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Useful when debugging to determine if a user has an official build or
not, particularly early in the devel process where we're handing
builds to everyone. Particularly useful for proto1, since not all
those systems will be case-open servo-attached.
Also move get-version LPC command into system.c, where it's closer to
the system functions it calls (matches what we do for other host
commands).
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=none
Change-Id: Idb0f6edf31ca00e32f083be0b0d3f23ab79c5fba
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:8324
TEST=manual
1. When system is off, open lid. Debug console should show PB PCH pwrbtn activity.
2. Wait for system to boot.
3. Quickly close and open lid. Debug console should not show pwrbtn activity.
Change-Id: Ia018ff06a31ac2a68f20021d17e47ddb06096eb8
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
...since x86_power_in_S0() is a terrible function to have implemented
for gaia chipsets, and I need to add more detectable states for lid
switch handling anyway.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=none
Change-Id: I0c90c6875b27d1bf23f093e88e34eabf2a8c86e4
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(Also define other host events)
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:8308
TEST=manual:
Use magnet to trigger lid-closed and lid-open.
'hostevent' should show raw events = 0x3.
Press power button.
'hostevent' should now show raw events = 0x7.
Change-Id: I9c8367d5152d526299a7a3149250de84cc2e0557
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chrome-os-partner:8277
TEST=manual
On EC console:
hostevent set 0x1e
From root shell:
ectool eventget --> should return 0x1e
ectool eventclear 0x02
ectool eventget --> should return 0x1c
ectool queryec --> should return event 3
ectool queryec --> should return event 4
ectool queryec --> should return event 5
ectool queryec --> should return no event pending
ectool eventsetsmimask 0x1200
ectool eventsetscimask 0x0034
ectool eventgetsmimask --> should return 0x1200
ectool eventgetscimask --> should return 0x0034
On EC console:
hostevent --> should show raw=0 SMI mask = 0x1200 SCI mask = 0x34
Change-Id: I33042fa80c0b148cd63209a94a184af493e25ed3
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
implement actual_key_masks[]. A ghost key exists if two columns share
more than one row (after ANDed actual_key_masks[]).
BUG=chrome-os-partner:7485
TEST=on bds. test cases:
single press of all keys.
~ 1 4 5: later 2 keys should be ignored (ghost).
h j k: all keys should work.
u R-shift 0 P: p should be ignored (ghost).
i R-shift ' p: P should show up.
Change-Id: I1ac105874a5327e839a5240ccbdd6304637ad404
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Update the mapped memory inside charge state machine.
BUG=chrome-os-partner:8184
TEST=none
Change-Id: I84f6079fff9683b6a7a96e3bb066e0e043c0db28
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This CL adds a charge state machine for SMB compliant battery pack.
Vendor specific charge constraints can be applied through function
call, defined in battery_pack.h .
BUG=chrome-os-partner:7526
TEST=Attach EC serial console
Unplug AC adapter: state ==> "discharge"
Plug AC adapter: state ==> "charge"
Battery full: state ==> "idle"
Unplug battery: state ==> "error"
Change-Id: Iabff0988a6067d37c17c11b060bbb7e66505c118
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
Useful when debug dump binary flags.
BUG=chrome-os-partner:8287
TEST=none
Change-Id: I646d80befafca07074847f2f09eeb23126533f67
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix the quoting for git local change detection.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=run ./util/getversion.sh on a repository with and without local
changes and observe we no longer have a spurious output on stderr.
Change-Id: I40ea4505d175c9135027ba7cf2b787c08eff6f70
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The list of if()'s was getting long and obnoxious.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=run a few ectool commands and see that they still work
Change-Id: Ie292b50a27e98ca2c48f13e1141faf273efdd94b
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
'ectool temps 0' always have non-zero return code.
Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:8294
TEST="ectool temps 0 && echo 'test'" gives 'test' on screen.
Change-Id: I3a4eff513638c25ec68e24968ce9d1022b4c1281
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add build information (date/time/builder) which can be displayed at the
EC console.
Generate a version from the board name and the branch tag.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chromium-os:27013
TEST=on BDS, run version command on the console.
inspect the built binary.
Change-Id: Idb1f68898ba6b811d02919f17ab4536ed9f8934a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We used to have flaky PECI temperature read so we ignored failure. Now
the PECI temperature read seems to work fine so we should have it report
error on failure.
Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:7493
TEST=When powered off, 'temps' shows error on PECI temperature reading.
Change-Id: I161a8f84f66ba06959c21838ee364b2f8d8b4945
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is necessary to support SCI/SMI events.
Note that this breaks compatibility with previous ectool builds - and
probably also breaks flashrom support.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:8253
TEST='ectool hello' and 'ectool flashinfo' still work
and 'ectool usbchargemode 3 1' fails with error 2
Change-Id: If39e5b6e7cdcec1b5ec765594e8492925b430b10
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently if ENABLE_VS is off, each time we poll TMP006 sensors, it
takes 1 second for each sensor to return ERROR. Checking for power
before polling help to reduce the time spent on temperature polling.
Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:8275
TEST=Manual test
Change-Id: I2da83f09cccc331074f9bb5483b2ba92c0865742
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Add console command 'autofan' to turn on automatic fan speed control.
Also modify 'fanset' to disable automatic control before setting fan
speed.
Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:8250
TEST=Manual test
Change-Id: I2db85ce2e754bba21567b2c92e4476049d517627
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
On the STM32L UART without a FIFO, the Transmit Register might need
some time before pushing its content to the shift register.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=on ADV board, verify we are no longer missing most of the carriage
return on console.
Change-Id: Ic638dc452d6e30a5f127710fc964143d477fa1d6
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Implement LPC commands and ectool commands to
1. Set/get threshold temperature values.
2. Toggle on/off automatic fan speed control.
Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:8251
TEST=Manual test
Change-Id: Ia4282a6fa47a838aed26540f33c1eb7acc92ef0e
|
|\ \ \
| |_|/
|/| | |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The debug message is larger than UART transmit buffer so we have to
flush the output manually.
Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:8265
TEST='tmp006' shows debug message of all TMP006 sensors.
Change-Id: I81793504e1a345b172567d3e877ee8740b85640c
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The previous TX might end in the middle of the buffer filling and stop
TX. So we need to check if we want to restart the transmission.
With 1-byte deep FIFO, it's easy to trigger that race condition.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=run console commands with lots of traces on BDS, Link and ADV and check
we are not stuck.
Change-Id: Ia57e974a3a51af694e736d4cf36d9d01eafd2251
|
|/
|
|
|
|
|
|
|
|
|
|
| |
If the last command is saved at the beginning of the buffer, loading
this command will lead to a character missing.
Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:8261
TEST=Manual
Change-Id: I0afd4a264f342137955075fe2950444691f79d35
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The thermal engine monitors the temperature readings from all sensors.
For each sensor, five threshold temperatures can be set:
1. Low fan speed.
2. High fan speed.
3. SMI warning.
4. Shutdown CPU.
5. Shutdown everything we can.
Each of these thresholds can be set to either a fixed value or disabled.
Currently the real implementation of SMI warning and shutting down is
left as TODO, as indicated in the comment.
Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:8250
TEST=Manually change threshold value to test all actions can be triggered.
Change-Id: If168dcff78ef2d7a3203cb227e1739a08eca961e
|
|
|
|
|
|
|
|
|
| |
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:8253
TEST=manual
Change-Id: Ie14465283c09029c3d2fa9a32296f32ce7304760
|
|
|
|
|
|
|
| |
BUG=none
TEST=run assorted ectool commands
Change-Id: I830d3cbf2d1557b3ab455ec8736d3de5e5d3e697
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:8247
TEST=manual
from root shell on host:
ectool pstoreinfo --> should print PstoreSize 1024 AccessSize 4
echo testing 1 2 3 4 > /tmp/infile
ectool pstorewrite 8 /tmp/infile
ectool pstoreread 8 /tmp/outfile
diff /tmp/infile /tmp/outfile
Change-Id: I565e580307584f7def36c5e53d360c1a897d67d2
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
'tempremote' is a debug command used to assess temperature calculation of
TMP006 sensor. Remove it since we have finished TMP006 module.
Also add back the fixed-point algorithm that is lost in rebasing earlier.
Signed-off-by: Vic Yang <victoryang@chromium.org>
BUG=chrome-os-partner:7801
TEST=none
Change-Id: Ic3555c1a04d2c0483075262e3ab53842f7bd43d8
|