| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just code cleanup; no functional changes
BUG=chrome-os-partner:15579
BRANCH=none
TEST=build code; boot link; gpioget still works
Change-Id: If0770c1a5ce0d5c51ba528fbe2944a73fafa949b
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36556
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code cleanup only; no functional changes
BUG=chrome-os-partner:15579
BRANCH=none
TEST=ectool hello -> success
Change-Id: I40391b66efaeab873e99500d4f58a5a779eb2c71
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36557
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
No functional changes; just reformatting.
BUG=chrome-os-partner:15579
BRANCH=none
TEST=compile code
Change-Id: I6b775c835a935be845bc8aea3dd742af91ab2af7
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36455
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, the battery charging algorithm would give the battery
current even when it was requesting 0 mA.
BUG=chrome-os-partner:15573
BRANCH=link
TEST=charge battery and leave AC plugged in
Battery will eventually drop to 99% charged. At that point, it should
request 0mA, not 84mA or 85mA. (When it drops farther, it will really
start requesting charge.)
Change-Id: I464a7c8e857c928dbb9f9595f9c947d565b5f5c6
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36526
Reviewed-by: Rong Chang <rongchang@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Code cleanup and reformatting. No functional changes.
BUG=chrome-os-partner:15579
BRANCH=none
TEST=compile code; type a debug command like 'help list'.
Change-Id: I641215ba3333628f658eec86d9d99718c43b111f
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36387
|
|
|
|
|
|
|
|
|
|
| |
BUG=chrome-os-partner:15579
BRANCH=none
TEST=discharge and charge battery; should still work
Change-Id: I97033e5f5ff4289831f9a4400d18730ece3bd99a
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36365
|
|
|
|
|
|
|
|
|
|
|
|
| |
Just code cleanup; no functional changes.
BUG=chrome-os-partner:15579
BRANCH=none
TEST=code compiles
Change-Id: I9610b7df4b6c621d0a1d5ca0513629ee21626ec4
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36364
|
|
|
|
|
|
|
|
|
|
|
|
| |
Tidy code. No functional changes.
BUG=chrome-os-partner:15579
BRANCH=none
TEST=discharge battery, then plug AC in and make sure it charges
Change-Id: I4cff018940ecb665be96655d6722f74dd6674f6d
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36359
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit db2c527d5cab61af399694cc853d1dfce1bbd3cd
Change-Id: I033916921993bffc6a3c0d6bbb70a867b73b25a9
Reviewed-on: https://gerrit.chromium.org/gerrit/36414
Commit-Ready: Jon Salz <jsalz@chromium.org>
Reviewed-by: Jon Salz <jsalz@chromium.org>
Tested-by: Jon Salz <jsalz@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes build breaks in 'make tests'.
BUG=none
BRANCH=none
TEST=make tests (note that this still fails due to other problems;
will fix those in a followup CL)
Change-Id: I5b5ce52ed6e44ade6051e0a091a6699c0454d61a
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36353
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We only have one scan mask and no capability to change scan masks, so
don't reserve space for masks we're not using.
BUG=chrome-os-partner:15579
BRANCH=none
TEST=type on keyboard; should still work
Change-Id: I8ad0c5c894f93c2a79ca646e7666b3279c90a63c
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36347
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Remove unused code paths. Simplify interfaces. Clarify comments.
Split the protocol constants into their own header file (since they're
used only by keyboard.c, not i8042.c, which is really keyboard
buffering... and will be renamed so in a followup CL.)
This cleanup reduces binary size by about 200 bytes.
BUG=chrome-os-partner:15579
BRANCH=none
TEST=type on the keyboard; it should still work.
Change-Id: I6acbab5fe5604b4b0c516ba3622e6f41820985d1
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36271
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, all hook functions returned EC_SUCCESS, which was
meaningless because nothing ever looked at the return value. Changing
the return value to void saves ~100 bytes of code size and an equal
amount of source code size.
BUG=none
BRANCH=none
TEST=code still builds; link still boots
Change-Id: I2a636339894e5a804831244967a9c9d134df7d13
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36372
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Updated S0 calibration settings based on DVT3 systems.
De-activate the PCH sensor in the thermal loop as its accuracy is poor.
BUG=chrome-os-partner:9599
TEST=run "for i in {0..3}; do echo $i: && ectool tmp006cal $i; done" and make sure
the S0 values are the same as those programmed by temp_metrics.conf.
BRANCH=none
Change-Id: I2b4395d3c74ce4610f57ee90f6cd3f0d7467d31b
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36000
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
| |
BUG=chrome-os-partner:15519
TEST=none
BRANCH=link
Change-Id: I00c27eab4320a95b17c4f18572835fea1fb8cdf7
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36307
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We map the raw DID value to chip name in EC. If the raw value is not in
the mapping table, EC just returns empty string and we lose this
information from host side. Let's return raw DID value like
"Unknown-10ea".
BUG=chrome-os-partner:15519
TEST=remove 0x10ea from the mapping and check 'mosys -k ec info' shows
'Unknown-10ea'.
BRANCH=link
Change-Id: I9399f44ab40db02202ee03ba3f988f3ece010d9f
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36305
Reviewed-by: David Hendricks <dhendrix@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not all of the options for reboot_ec were listed. This fixes the
text; there are no code changes.
BUG=none
BRANCH=none
TEST=run ectool with no options to print help
Change-Id: I65275a007febbd3583f157cc7f8df5634d6eeeda
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/36257
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously they reported on the system channel, not the hostcmd channel.
BUG=none
BRANCH=none (affects all platforms, but only affects use of 'chan' ec console command)
TEST=manual
- chan 0x40
- x86reset
- should see HC debug output.
Change-Id: Ie9873db015c94a0198a94ebafad87d51b0f73620
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35953
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=none
BRANCH=none
TEST=code still builds; this is code cleanup with nothing to test
Change-Id: Ibce47a67c8af51c214bb1ef5e31e9afdd8d2dfd3
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35964
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This accidentally got disabled when printing keyboard scan state was
turned off by default.
BUG=chrome-os-partner:15466
BRANCH=link
TEST=alt+volup+R should reboot system
Then from console, ksstate on
Then press keys; KB state should print on console
Change-Id: I7d410b56210fda0c73c65d9d76ccc7b4e873516c
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35971
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This matches Silego's recommendation as of 10/18.
BUG=chrome-os-partner:14687
BRANCH=link
TEST='reboot cold' repeatedly from EC console (or 'ectool reboot_ec
cold' repeatedly from root shell), then check that Power+Esc still
reboots the system.
Change-Id: Ief2962bf66a947e83dfe934e45e18dc37d6ba326
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35968
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes a problem where flash writes would fail because the source
buffer was not 32-bit aligned.
BUG=chrome-os-partner:15435
BRANCH=link
TEST=from a root shell,
localhost ~ # echo 1234567812345678123456781234567 > /tmp/data
localhost ~ # ls -l /tmp/data
-rw-r--r-- 1 root root 32 Oct 17 17:28 /tmp/data
localhost ~ # ectool flasherase 0x3a000 0x4000
Erasing 16384 bytes at offset 237568...
done.
localhost ~ # ectool flashwrite 0x3a000 /tmp/data
Reading 32 bytes from /tmp/data...
Writing to offset 237568...
done.
If that doesn't crash, the fix works (prior to this fix, that would
reboot the system).
Change-Id: I8d197e7ef7a1c74825916bd788f7d450088a55cc
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35916
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The keyboard scan module generates a lot of debug output when the user
is typing on the keyboard - enough so that switching to the console,
logging in as root, and typing 'ectool console' flushes the EC's
console output buffer of any useful data. Default printing this to
off. Add a new 'ksstate' command which will print the current
keyboard scan state or toggle printing off/on.
This is important for debugging LPC communication failures.
BUG=chrome-os-partner:13819
BRANCH=link
TEST=manual
- Boot system
- Type on keyboard. At EC console, should not see KB state: output
- Hold down space bar.
- At EC console, type 'ksstate'. Should print:
ksstate
[20.943886 KB debounced : -- -- -- -- -- -- -- -- -- -- -- 20 --]
[20.945215 KB prev : -- -- -- -- -- -- -- -- -- -- -- 20 --]
[20.945568 KB debouncing: -- -- -- -- -- -- -- -- -- -- -- -- --]
Keyboard scan state printing off
- Release space bar
- At EC console, type 'ksstate on'
- Type on keyboard. Should see KB state: output
- At EC console, type 'ksstate off'
- Type on keyboard. At EC console, should not see KB state: output
Change-Id: I4343b7b777fd13057b3222eeba77ed099c5e5a93
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35843
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works around a potential LM4 chip problem where edges on the FRMH
status bit don't always trigger interrupts. The workaround is to look
at FRMH for each channel in the interrupt handler rather than the
interrupt status, and to trigger the interrupt every 250ms to sweep up
any missed writes. We already do this for port 80 writes; this just
extends the workaround to all channels.
BUG=chrome-os-partner:13965
BRANCH=link
TEST=manual
- boot system
- EC console should show a number of HC lines for host command
- EC console should show a number of ACPI queries
- switch to root shell; keyboard should work
- ectool version should work
Change-Id: If02d685519c69ee88c055c8374a6c655a277e637
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35871
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
During the debounce refactor we unintentionally adjusted the behavior
of special keys so that they are no longer swallowed (as per commit
9332d76). The LM4's keyboard behaves differently so this code cannot
be brought over as is.
Bring back the required behavior for STM32.
BUG=chrome-os-partner:14496
TEST=hit alt-volume_up-r keys together. See that the AP does not see
this keypress in U-Boot by checking the EC console has no 0x60 messages.
BRANCH=snow
Change-Id: I043fbba4d9be5941e550257b99bdb2137792c133
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35767
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This makes the timing for the S3 low-power indicator adjustable without
reflashing.
BUG=chrome-os-partner:8039
BRANCH=Link
TEST=manual
Boot, log in, run this to put the lightbar into demo mode:
ectool lightbar demo 1
ectool lightbar seq s3s0
The lightbar should act as though the system is asleep.
Then press the left arrow a couple of times and the down-arrow four or five
times. You should see the red light pulse every 5 seconds or so.
Now run
ectool lightbar params > /tmp/w
Edit /tmp/w to change the timing lines to this:
100 # .s3_ramp_up
100 # .s3_ramp_down
Then run
ectool lightbar params /tmp/w
After a cycle or two, you should see the lightbar flash instead of pulse.
Change-Id: If815ff2fb9a158c0e1f4dbb6a269ad07e122d84c
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35839
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The charging voltage and current are not necessary zero. Remove the
conditions.
BUG=chrome-os-partner:14094
TEST=Remove the battery with AC connected. LED turns red after 30
seconds.
Plug in AC with battery disconnected. LED turns red after 30 seconds.
BRANCH=link
Change-Id: I754383b05af6de0ceeb706612f1cb534254e47e3
Signed-off-by: Vic Yang <victoryang@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35807
Reviewed-by: Rong Chang <rongchang@chromium.org>
Tested-by: Rong Chang <rongchang@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is hopefully the finally final tweak to the lightbar behavior. It does
this:
* When booting or awakening from sleep, Google colors pulse briefly.
* When the chromebook is fully on, lightbar is dim blue. Every 3-5 seconds,
a pulse of brighter blue sweeps across.
* On battery, the lightbar is not quite as bright, and the sweep goes in the
other direction and is slightly slower. If the battery charge drops below
10%, the lightbar changes from blue to red (but only on battery, not AC).
* When going to sleep (close lid while logged in), lightbar fades to black,
then pulses Google colors, then off.
* While asleep, lightbar does nothing, UNLESS on battery and battery charge
is under 10%. Then it pulses red every 5-8 seconds.
* When shutting off, it just goes black with no special effects.
Other than the slight dimming on battery power, there is no ambient light or
dynamic brightness control.
BUG=chrome-os-partner:8039
BRANCH=Link
TEST=manual
Turn it on, watch the blinky lights. Log in, close the lid, open the lid.
Connect/disconnect AC. The lights should change as described above. Ta Da.
Change-Id: Id174a452639decc4b5eefb9e21b28cf3643529f5
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35742
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This works around a problem where the Silego chip doesn't cleanly
reset for short hibernate durations.
BUG=chrome-os-partner:14687
BRANCH=link
TEST=ectool reboot_ec cold (~100 times), then check if power+refresh still
reboots the system
Change-Id: I14098940da9331856dd061a56a60a47c9a1cf1f8
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/34832
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add EC commands for managing a list of keyscan events which the EC
should replay instead of its normal key scanning operation.
There are two commands: one adds to the list of events. The other
allows the list to be cleared, the sequence to be started, and the
resulting information to be collected.
BUG=chrome-os-partner:12179
BRANCH=none
TEST=manual for now:
On snow:
./ectool keyscan 10000 key_sequence.txt
See that the test passes.
Signed-off-by: Simon Glass <sjg@chromium.org>
Change-Id: Ie4c3e4d0f5c1dbf642185fec99b9201d47532ae1
Reviewed-on: https://gerrit.chromium.org/gerrit/35117
Commit-Ready: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I introduced a glitch in the parameterization CL. This fixes it, and makes
the choice between the gentle throbbing and occasional pulse something that
can be selected as a parameter. Default is the new pulsey style.
BUG=chrome-os-partner:8039
BRANCH=Link
TEST=manual
Using the ectool that's part of this change, run these commands to flip
between suspend and active displays:
ectool lightbar seq s3s0
ectool lightbar seq s0s3
Change the "new_s0" value (0/1) and reload the params with
ectool lightbar params | tee /tmp/w
vi /tmp/w
ectool lightbar params /tmp/w
In each case you'll see some pretty patterns. Pass/Fail is an artistic
decision. No QA required.
Change-Id: I8de0b1b3cc77f65879befe95e110bbbce18846d9
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35620
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
ACPI thermal zone 0 is used for critical thermal events while thermal zone 1
is used for asserting (internal) prochot and duty cycling. Since the
equivalent of thermal zone 1 functionality exists in temp_metrics,
disable ACPI's thermal zone 1 in order to prevent conflicts between ACPI
and temp_metrics.
BUG=chrome-os-partner:9193
TEST='cat /sys/class/thermal/thermal_zone1/mode' and check that it is
disabled.
BRANCH=none
Change-Id: I689e8e5c1747c5f259f4a72a9f86396f4aa5c0b2
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35593
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the recent changes that have gone into the EC, the TMP006
calibration data is no longer present in the EC by default. Push it down
to the EC via the newly added ectool tmp006cal command.
Also added couple of changes to the fan loop:
- hand back fan control loop to the EC if none of the TMP006 sensors
report valid temperatures.
- handle S0->S3->S0 transition where the EC sets the fan to 0 RPM.
BUG=chrome-os-partner:9193
TEST=run "ectool tmp006cal" command for sensors 0, 1, 2 and 3 and ensure
that they return non-zero calibration values.
BRANCH=none
Change-Id: Iaf91216a4d3353f15489b39aba9acb34055551cf
Signed-off-by: Sameer Nanda <snanda@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35469
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Todd Broch <tbroch@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, any command which set the fan duty manually would leave
the PWM RPM controller disabled. Setting the fan back to auto mode
via 'ectool autofanctrl' or 'autofan' or 'ectool pwmsetfanrpm'
wouldn't turn the controller back on. Now it does.
BUG=chrome-os-partner:14307
BRANCH=link
TEST=manual
- Reboot in recovery mode and wait for INSERT screen
- From EC console
fanduty 100 -> fan turns on all the way
faninfo -> mode is duty
fanset 6000 -> fan turns down to a lower level
faninfo -> mode is rpm
fanduty 0 -> fan turns off all the way
faninfo -> mode is duty
(wait a min or so for the system to heat up)
autofan -> fan turns on
faninfo -> mode is rpm
- Reboot normally
- From root shell
ectool fanduty 100 -> fan turns on all the way
ectool pwmsetfanrpm 6000 -> fan turns down to a lower level
Change-Id: I3b07e8b49500f5f8a42f20909d2869cf63987d6d
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35335
Reviewed-by: Sameer Nanda <snanda@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For board bring-up.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=chrome-os-partner:10912 chrome-os-partner:14324
TEST=on Spring, boot the AP, issue "pmu" command on the EC console
and FET1 and FET6 (registers 0xf and 0x14) contains 0x13.
Change-Id: Ic8fd681c2e2f3e2168de2cb7f83920d4feefd485
Reviewed-on: https://gerrit.chromium.org/gerrit/33703
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The remote temperature sensors for case temps are now not used until
they're calibrated by the host. But the EC still tries to control the
fan based on case temps. At best this has no effect because the
sensors haven't been enabled by host calibration. At worst, the host
calibrates them, but doesn't set up the temerature thresholds to
match, so the EC spins up the fan briefly during boot before the host
takes over (annoying), or potentially asserts prochot, shuts the
system down, or triggers a bunch of SMIs (really annoying). It's
safer just to leave these thresholds disabled by default; if the host
wants the EC to use them, it can easily set them at the same time it
sets the remote sensor calibration data.
Also, adjust overheated thresholds up based on snanda's recommendations.
BUG=chrome-os-partner:9193
BRANCH=link
TEST=thermalconf 2 --> should print 0 K for all levels
Change-Id: I5bd1ea65eaefc4d39238b22363176d32663434a0
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35449
Reviewed-by: Sameer Nanda <snanda@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chrome-os-partner:8039
BRANCH=Link
TEST=none
More cosmetic changes.
Change-Id: If33e39d3cea1e3930d630ad84a156e9afb4c57fd
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35485
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chrome-os-partner:8039
BRANCH=Link
TEST=none
More cosmetic changes.
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Change-Id: I1fd9318131ce55541d845ac8be5faa9334c3953f
Reviewed-on: https://gerrit.chromium.org/gerrit/35484
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The lid is flexible enough that it's possible to press keys by
squeezing the laptop. To keep this from waking the device from
suspend or powering it on, don't scan the keyboard or power button
when the lid is closed.
BUG=chrome-os-partner:15252
BRANCH=link
TEST=manual
- boot system
- use a magnet near the search key to trigger the lid-closed switch
- press space, then power. neither one should trigger resume
- remove magnet. system resumes
- space and power should work as expected again
- log out
- use magnet to trigger lid-closed switch (looking at EC console output is
handy here). system should shut down
- pressing power should not boot the system
- remove magnet; system will boot
- pressing power should work as expected again
Change-Id: I92080237b0a2f21774301df3d8e866878697b793
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35425
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Each I2C controller needs to use a fixed pair of DMA channels.
The former code was hardcoded for I2C2. We now use the board
configuration to decide between I2C1 and I2C2 DMA channels.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BRANCH=none
BUG=chrome-os-partner:15185
TEST=make BOARD=snow && make BOARD=spring && make BOARD=daisy
run on Spring and Snow and see we can communicate both with the PMU
(using "pmu" EC console command) and the AP (answering U-Boot host command)
Change-Id: Ifd6806205b443c623e3db09fb1a2d5804bb94214
Reviewed-on: https://gerrit.chromium.org/gerrit/35355
Reviewed-by: Charlie Mooney <charliemooney@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the power LED code is doing useless operations and messing up with
the former LED pin.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:14313
TEST=make BOARD=spring
Change-Id: Idf44bdb7b7a779706bd6579fb66ba3e6932de89f
Reviewed-on: https://gerrit.chromium.org/gerrit/35273
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The spring board doesn't have one and we doesn't want to mess up with
that pin.
When the POWERLED task is not present, let's de-activate cleanly that
code.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:14324
TEST=make BOARD=spring (no power_led.o compiled)
make BOARD=snow (power_led.o compiled)
make BOARD=link && make BOARD=bds
run on Snow and see the power LED working
Change-Id: Ib44f5df54ec4fdee1863814e6c7052fd6620fee8
Reviewed-on: https://gerrit.chromium.org/gerrit/35272
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Needed for easy power on until we have the full USB charge state
machine.
note: the GPIO name ILIM_1500 is somewhat misleading,
it is connected to the enable pin of the TPS43060
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:14319
TEST=manual :
plug the board and press servo power button,
see the AP rails coming up.
Change-Id: I93421d1581065bcc1e7be07086e74d11d1e1ec56
Reviewed-on: https://gerrit.chromium.org/gerrit/35271
Commit-Ready: Vincent Palatin <vpalatin@chromium.org>
Tested-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change replaces most of the hard-coded lightbar constants with values
that can be updated at run-time, so that if we change our minds about colors
and timing we can tweak some of the values without requiring an EC/BIOS
update.
It also adds the "ectool lightbar params" command to get and set those
values from the host. You can see the values from the EC console ("lightbar
params"), but there's no way to set them.
BUG=chrome-os-partner:8039
BRANCH=Link
TEST=manual
From the EC console, run
lightbar params
It should display the current values that can be changed.
Log in to the host and run this to see the same values:
ectool lightbar params
Or edit and change them with this:
ectool lightbar params > /tmp/vals.txt
vi /tmp/vals.txt
ectool lightbar params /tmp/vals.txt
The updated parameters are persistent across EC jumps (RO->RW), but are lost
when/if the EC reboots (as it will after the AP is off for 24 hours, for
example).
Change-Id: Ic2a3fd6f8062673432b48904933e0c7239b8658b
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35289
Reviewed-by: Randall Spangler <rspangler@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, if the AP took fan control, the EC would never take it
back. This meant the EC would leave the fan off even if the system
was sitting at the INSERT screen or booted an alternate OS.
BUG=chrome-os-partner:15189
BRANCH=link
TEST=manual
- boot system
- from EC console, fanset 0
- faninfo shows fan at 0rpm
- from root shell, crossystem recovery_request=123 && reboot
- wait a few mins
- faninfo should show fan spinning again
Change-Id: I534c9978194085467f1df6eae971c55d4e8083be
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35309
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This prevents the fan from coming on loudly during resume.
BUG=chrome-os-partner:15187
BRANCH=link
TEST=manual
- power on system
- wait for it to heat up; type faninfo periodically from ec console
- when faninfo reports non-zero, type 'powerd_suspend' at root shell
- faninfo should now report Target: 0 rpm Enable: no
Change-Id: Ia5ee93c0f5c6626afd54a22d2996ab65cf8e3b18
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35303
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
S0 values are incorrect and may even need to be calibrated on a
per-system basis. Set them to 0 by default so that the EC doesn't
return inaccurate remote temperature readings before calibration data
is sent.
BUG=chrome-os-partner:15174
BRANCH=link
TEST=manual
- temps -> remote temps are all not calibrated
- t6cal 1 s0 9301
- temps -> PCH D-Object temp now returns a temperature
Change-Id: I43facc60cf947ebd9441a8a629a76f7ffc8f3959
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35302
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
BUG=chrome-os-partner:15174
BRANCH=link
TEST=manual, from root shell
- ectool temps all -> prints all temps
- ectool tmp006cal 1 0 0 0 0
- ectool temps all -> sensor 3 not calibrated
Change-Id: I16ee818c948fe90ac7c18b230c5d9f9a0ec83ded
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35288
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes the need for a separate method to check sensor power, and
gets rid of temp_sensor.c knowledge of what powers each sensor.
BUG=chrome-os-partner:15174
BRANCH=link
TEST=manual
- reboot
- within a second, type 'temps'; I2C sensors should return error 1
- type 'temps' again; all sensors should return data
- power off system
- type 'temps' again; I2C sensors and PECI should return error 8
- 'gpioset enable_vs 1'
- type 'temps' again; I2C sensors should return valid data; PECI should still
return error 8.
Change-Id: I17c353b3c483bc320769307c7715008ec729089b
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35287
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This will be used in a follow-up CL to return specific error codes
(not powered, not calibrated, etc.)
BUG=chrome-os-partner:15174
BRANCH=link
TEST=manual
Power on system.
'temps' should return all good temps.
Power off system (into S5)
Only ECInternal temp should work; others should return Error 1
'gpioset enable_vs 1' and wait a second
Now all the I2C temps should display good data, but PECI will still be error 1.
Change-Id: I925434e71653ad53ad76bad992a7a8fdeadb088c
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/35286
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
|