| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
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/+/3154577
Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Owners-Override: Jora Jacobi <jora@google.com>
Tested-by: Jack Rosenthal <jrosenth@chromium.org>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
...so I can use usleep() for eeprom delays in the CL coming next...
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:10200
TEST=if it boots, it worked
Change-Id: I564578f24452a4ac39abe79ff28cfff4b665ad2f
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Each TMP006 temperature sensor has different sensitivity factor. Let's
add a field to set different sensitivity factor for each sensor. Also
update the factors to get more reasonable temperature readings, but
still need more precise calibration.
BUG=chrome-os-partner:9599
TEST=Build and read tempearture succeeded.
Change-Id: Ib4feea3b78b71f6d37c9a02668ffa7bd9e63d390
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
When discharging, EC checks if battery temperature is in working
range. The battery pack module should provide the working range
in deci-Kelvin, not Celcius.
Signed-off-by: Rong Chang <rongchang@chromium.org>
BUG=chrome-os-partner:9485
TEST=manual
Unplug AC adapter, and check
/sys/class/power_supply/BAT0/charge_now
Change-Id: Ib6a312941cb1f3622c6f18d2c58bc50a06feafaf
|
|
|
|
|
|
|
|
|
|
|
| |
When keyboard backlight is disabled, make 'ectool pwmgetkblight' reports
'disabled'.
BUG=chrome-os-partner:9966
TEST='ectool pwmgetkblight' shows 'Keyboard backlight disabled' when
lid closed.
Change-Id: Ica690159e30431ccb530275fcc2311fb8f54a9aa
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This returns true when both HW and SW write protect are enabled.
Once WP is enabled, sysjump will be locked out.
system_is_locked() can be used to gate other dangerous-ish commands too.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:7468
TEST=manual
sysinfo -> unlocked, copy A
sysjump B -> works
flashwp lock
reboot
(make sure flashinfo shows WP asserted and flash locked; note there is a
HW bug on proto1 which makes this flaky)
sysinfo -> locked, copy A
sysjump B -> fails
(remove WP screw)
reboot hard
flashwp unlock
Change-Id: I849b573675c2c1cb4c44b9a05d6973e38247ca23
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Additional help messages and usage are gated by
CONFIG_CONSOLE_CMDHELP, so we can turn it on if there's space (adds
about 3KB to image size) and turn it off when there isn't.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=manual
1) help
2) help list
3) help gpioset
4) gpioset -> wrong number of params
5) gpioset fred 0 -> param1 bad
6) gpioset cpu_prochot fred -> param2 bad
Change-Id: Ibe99f37212020f763ebe65a068e6aa83a809a370
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
BUG=none
TEST=none
Change-Id: Id6ced0b87b354136e0b80026a537958586bb1325
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the FIFO is empty, returns the last read entry not the next one.
also rewrite the FIFO index increment to generate slightly better code.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:8869
TEST=On Snow, in U-Boot using "stdin=mkbp-keyb" type on internal
keyboard and see the correct text.
Change-Id: I189d230053de40dd563ce672db82dd6217e545e3
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| | |
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=none
TEST=if it builds, it works
Change-Id: I2064f3eed4790051312a5a53ef742dcf79c4ee9d
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of storing task contexts in .data and wasting several kB of
flash with mostly 0s, move them to .bss and fill the initial context at EC
startup. The runtime overhead is small enough.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:9839
TEST=run on Link and check verified boot and chromeOS startup are OK.
Change-Id: Iaef23d46a4e3e80e49886dfbf7ab1f537c587362
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This works around a problem where columns are not tri-stated when
calling select_column(COLUMN_ASSERT_ALL) with enable_scanning=0.
Also removes polling for power button released; we can use the same
task wait for that as we do for a keypress.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:7486
TEST=manual
1) press g then press power button repeatedly. EC is not rebooted.
2) press power button the g repeatedly. EC is not rebooted.
3) press power+refresh (or ESC on proto1). EC is rebooted.
Change-Id: I43a0beae1a6c0ef8fa9379a8fff47b6006e63c8c
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Allow to use EC tool on ARM based platforms.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=On Daisy, ectool version
Change-Id: If7f52de827d0bcffb39af0553245cce4e02b9b48
|
|\ \ \
| |/ / |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Preparatory work to re-use the tools on ARM boards using I2C
communications.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=make BOARD=link && make BOARD=bds && make BOard=DAISY
Change-Id: I31d41f30c3231a4a9349b939bf6bba871ed4c383
|
|/
|
|
|
|
|
|
|
|
|
| |
This resets the EC when power falls below the brown-out threshold
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:9952
TEST=hopefully srikanth can; requires hardware mods to test.
Change-Id: I161e49003409cb68eb43303c3c8de0eb4cc27104
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Also fix 'i2cscan' output, and detect/ignore busy ports
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:9928
TEST=manual
1) check i2cscan
i2cscan -> thermal port should report busy
gpioset enable_vs 1
i2cscan -> thermal port should show 4 devices
2) probe EC_SMB_CK[012] signals to verify clock frequency
Change-Id: I52e165de77eb9ed2619d648d84f251152772fe1c
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
In order to pass in different config from ebuild and enable easier
debugging/testing, let's add a way to pass in define flags to make.
BUG=chrome-os-partner:9936
TEST='V=1 EXTRA_CFLAGS=-DFACTORY_MODE make' and see '-DFACTORY_MODE'.
Change-Id: I18dc5a3dc61bda1e63e96081def3f077ba431938
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
...so lidopen/lidclose debug command also update the backlight
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:9188
TEST=manual:
powerbtn -> boot system, display backlight on
kblight 100 -> keyboard backlight on
lidclose -> backlights off
lidopen -> backlights on
Change-Id: I0d092d3061ba8a00c8790b3d1b8380eecd2d1628
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Tristage all columns as soon as possible right after the power button is
pressed. This can avoid the silego chip to reset the EC.
Resume the interrupt mode after power button is released so that the
deasserted columns doesn't trigger EC reset.
Also change some function names for export.
BUG=chrome-os-partner:7486
TEST=
press g first, then power button. repeat many times. system is not rebooted.
press power button first, then g. repeat many times. system is not rebooted.
ESC+power is still reseting system.
The long press power button still shutdowns system.
Change-Id: Ie5dec20ec3d3c4ffbd4acf5a4dd7f63eec38af56
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Since the events are requests for new patterns, we only want to do the
latest one. This does that.
BUG=chrome-os-partner:9349
TEST=none
No test: multiple events are rare. I had to fake them to see the problem.
Change-Id: I7e7de94655576e16c442a97097a7303e422a551a
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
|
|\ \ |
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Timeout properly when the AP doesn't want our bytes.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:8865
TEST=On Snow, boot with an old kernel.
Change-Id: Iac4fa5c3606f2e8731927326fad291dae26a615c
|
|\ \
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The main CPU might need to know the particular hardware version the
system is running on. This information is available to the EC, this
change adds a mechanism for the main CPU to request this information.
The board version is defined as a flat 16 bit number.
BUG=chrome-os-partner:8722
TEST=manual
. this change was tested in concert with the appropriate coreboot
modification, the proto1 board returns board version of 0. The
code was modified manually to return a one off version - and the
coreboot indeed observed board version of 1
Change-Id: If434d33f43783b18cb202ea15819bd5804694b8e
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Sometimes when requesting a sysjump from the AP, the I2C bus gets
wedged. Ensure we restore it in a proper state during the driver
initialization.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:8865
TEST=On Snow, use flashrom to program the EC.
Change-Id: I6279afba2bdeed4473ace42220a0342c4addaf1d
|
|\ \ \
| |/ /
| | /
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The size of the RW partition is size of RW-A + size of RW-B.
When B is de-activated, we need to nullify its size to get the correct
total size.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:8865
TEST=On Snow, flashrom -p internal:bus=lpc -i EC_RW -w ec.bin
Change-Id: Id015af512f072efce5fcafc5a630845c5d9600bb
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This adds "ectool vboot", which works like so:
# ./ectool vboot
0x06 image=A fake_dev=1
# ./ectool vboot 0
# ./ectool vboot
0x02 image=A fake_dev=0
# ./ectool vboot ff
# ./ectool vboot
0x06 image=A fake_dev=1
You can set or unset the fake dev-switch, and see which firmware image the
EC is running from.
BUG=chrome-os-partner:8313
TEST=manual
Boot the host, use crossystem to see the devsw_boot state. Change it with
the ectool command, reboot, see that it's changed.
Change-Id: Iaac40267338c6a07bc47b80e925e829bf1e1ae0c
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The Snow board has currently the second RW partition de-activated due to
flash space constraints, we don't want to send false information to the
tools.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:8865
TEST=on Snow, flashrom -p internal:bus=lpc -i EC_RW -w ec.bin
Change-Id: I6da60028aa69aeb476d5c2d98df5a03ece961891
|
|\ \ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
BUG=none
TEST=none
Change-Id: I07e3751c8fece18cf34d9b7c628fb3c6ab63d6b3
Signed-off-by: Bill Richardson <wfrichar@chromium.org>
|
|\ \ \
| |_|/
|/| | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This makes timestamps much easier to read.
Signed-off-by: Randall Spangler <rspangler@chromium.org>
BUG=chrome-os-partner:9866
TEST=timerinfo, taskinfo, battery commands have fixed-point numbers,
and timestamps printed in the log look right.
Change-Id: If91c83f725984c8e04bfb7cdcff316d9c3bfe24c
|
| |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The warm boot condition was badly detected since we are tweaking the
GPIO enables in board.c. The timer enable (TIM2) is a more reliable
condition.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:8865
TEST=on Snow, boot Linux then type "sysjump A" in the EC console and see
that AP & Linux are still alive.
Change-Id: If375aa320c140360d313241b5d9219ffa8bcecd7
|
|/
|
|
|
|
|
|
|
|
|
|
| |
- add the simple erase command
- fix the flash size
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=./build/snow/util/stm32mon -d /dev/pts/10 -w ec.bin
Change-Id: I9bdb0cf06759a04bd2bbef24d559eb67e4c0aa00
|
|
|
|
|
|
|
|
|
|
|
| |
This simplifies the re-flashing for stm32 based platforms.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=chrome-os-partner:8865
TEST=On Daisy, flashrom -p internal:bus=lpc -w ec.bin
Change-Id: I66860383c34110b1edf852929c244a2b682bc105
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On platform where the flash base address is non null (e.g. stm32), we need to
take it into account.
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
BUG=None
TEST=On Daisy, type "sysjump A" and "version" into the EC console
and observe that the commands succeed.
Change-Id: I95596d45f6970259d19d7063f6794fae0c400ab7
|