diff options
author | Ruibin Chang <Ruibin.Chang@ite.com.tw> | 2019-11-12 14:31:48 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-11-22 11:22:02 +0000 |
commit | 85b276f5158a544229073f24834147bb2ae5ebb8 (patch) | |
tree | a3a9565fc311841d8872ca26e5daeb15cd62971e /chip/it83xx/irq.c | |
parent | 62c28034b339011cb877feca705dfeb6b695459e (diff) | |
download | chrome-ec-85b276f5158a544229073f24834147bb2ae5ebb8.tar.gz |
chip/it8xxx1, chip/it8xxx2: GPIO, WUC and IRQ for chip it83201/it83202
GPIO, WUC and IRQ changes for chip it83201/it83202.
BRANCH=None
BUG=b:133460224
TEST=test GPIO group O, P, Q, R
1.Input: external input 3.3v, GPDR of corresponding pin is 1.
(GCR31, GCR32 select 1.8v, validate again for O and
P group)
2.Output: GPDR of corresponding pin set 1, measure 3.3v.
3.INT: GPIO_INT input trigger => WU INT (select high, low,
rising, falling, both edge trigger mode) => INT => CPU INT
4.Test power-up and down with this CL on ampton.
Change-Id: Ifae081c87b3dafcf3f7da84f637ceaf64a5ed536
Signed-off-by: Ruibin Chang <Ruibin.Chang@ite.com.tw>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1675704
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'chip/it83xx/irq.c')
-rw-r--r-- | chip/it83xx/irq.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/chip/it83xx/irq.c b/chip/it83xx/irq.c index 7b3e48946b..498b7446f0 100644 --- a/chip/it83xx/irq.c +++ b/chip/it83xx/irq.c @@ -19,7 +19,7 @@ static const struct { uint8_t isr_off; uint8_t ier_off; uint8_t cpu_int[8]; -} irq_groups[23] = { +} irq_groups[] = { IRQ_GROUP(0, {-1, 2, 5, 4, 6, 2, 2, 4}), IRQ_GROUP(1, { 7, 6, 6, 5, 2, 2, 2, 8}), IRQ_GROUP(2, { 6, 2, 8, 8, 8, 2, 12, 12}), @@ -27,7 +27,7 @@ static const struct { IRQ_GROUP(4, {11, 11, 11, 11, 8, 9, 9, 9}), IRQ_GROUP(5, { 2, 2, 2, 2, 2, 2, 2, 2}), IRQ_GROUP(6, { 2, 2, 2, 2, 2, 2, 2, 2}), - IRQ_GROUP(7, {10, 10, 3, -1, 3, 3, 3, 3}), + IRQ_GROUP(7, {10, 10, 3, 12, 3, 3, 3, 3}), IRQ_GROUP(8, { 4, 4, 4, 4, 4, 4, -1, 12}), IRQ_GROUP(9, { 2, 2, 2, 2, 2, 2, 2, 2}), IRQ_GROUP(10, { 3, 6, 12, 12, 5, 2, 2, 2}), @@ -41,13 +41,22 @@ static const struct { IRQ_GROUP(18, { 2, 2, 2, 2, -1, 4, 4, 7}), IRQ_GROUP(19, { 6, 6, 12, 3, 3, 3, 3, 3}), IRQ_GROUP(20, {12, 12, 12, 12, 12, 12, 12, -1}), -#ifdef IT83XX_INTC_GROUP_21_22_SUPPORT +#if defined(IT83XX_INTC_GROUP_21_22_SUPPORT) IRQ_GROUP(21, { 2, 2, 2, 2, 2, 2, 2, 2}), IRQ_GROUP(22, { 2, 2, -1, -1, -1, -1, -1, -1}), +#elif defined(CHIP_FAMILY_IT8XXX1) || defined(CHIP_FAMILY_IT8XXX2) + IRQ_GROUP(21, {-1, -1, 12, 12, 12, 12, 12, 12}), + IRQ_GROUP(22, { 2, 2, 2, 2, 2, 2, 2, 2}), #else IRQ_GROUP(21, {-1, -1, -1, -1, -1, -1, -1, -1}), IRQ_GROUP(22, {-1, -1, -1, -1, -1, -1, -1, -1}), #endif + IRQ_GROUP(23, { 2, 2, -1, -1, -1, -1, -1, 2}), + IRQ_GROUP(24, { 2, 2, 2, 2, 2, 2, -1, 2}), + IRQ_GROUP(25, { 2, 2, 2, 2, -1, -1, -1, -1}), + IRQ_GROUP(26, { 2, 2, 2, 2, 2, 2, 2, -1}), + IRQ_GROUP(27, { 2, 2, 2, 2, 2, 2, -1, -1}), + IRQ_GROUP(28, { 2, 2, 2, 2, 2, 2, -1, -1}), }; int chip_get_intc_group(int irq) |