diff options
author | CHLin <CHLIN56@nuvoton.com> | 2017-08-08 13:09:00 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-08-17 01:56:54 -0700 |
commit | 7a41d77b15830990c198b22f027bc925f7bc6382 (patch) | |
tree | 5b2c06e983a97fe9a149e254b7b15d80ff677eac /power/rk3399.c | |
parent | 86d7ea33af1d6565afb169aefafff6cd08e30fe6 (diff) | |
download | chrome-ec-7a41d77b15830990c198b22f027bc925f7bc6382.tar.gz |
npcx: shi: add the support for SHI module version 2
In npcx7, we introduce an enhanced version of Serial Host Interface
(SHI) module. This CL adds the support for it.
It includes:
1. Increase the size of IBF/OBF from 64 bytes to 128 bytes.
2. Add IBULVL/IBFLVL2 in SHICFG4/SHICFG5 which can configure at which
level the IBF pointer reaches to trigger an interrupt to core.
The current setting of these two register fields are:
IBFLVL - 64 (half full)
IBFLVL2 - 8 (the size of host command protocol V3 header)
3. Dedicated CS high/low interrupts.
In old SHI module, the way to generate CS high interrupt event is via
EOR bit. However, it has a defect that EOR won't be set to 1 when CS
is de-asserted if there is no SHI CLK generated. It makes the
handling of glitch condition more complicated.
In the new SHI module, we introduce the CS high/low interrupts
(by enabling the CSnFEN/CSnREEN) to make it easier to handle the
glitch.
The new SHI module is enabled during SHI initialization when the chip
family is npcx7.
BRANCH=none
BUG=none
TEST=No build errors for "make buildall". Test host command
communication is ok between npcx7 EVB and a host emulator.
Make sure the glitch condition can be detected and handled.
Also test the driver on gru, make sure it won't break the operation of
old SHI module.
Change-Id: If297fd32a0ec2c9e340c60c8f1942868fa978fbc
Signed-off-by: CHLin <CHLIN56@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/607812
Commit-Ready: CH Lin <chlin56@nuvoton.com>
Tested-by: CH Lin <chlin56@nuvoton.com>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'power/rk3399.c')
0 files changed, 0 insertions, 0 deletions