summaryrefslogtreecommitdiff
path: root/board/aleena
diff options
context:
space:
mode:
authorDavid Huang <david.huang@quanta.corp-partner.google.com>2019-11-04 20:09:37 +0800
committerCommit Bot <commit-bot@chromium.org>2019-11-05 10:13:00 +0000
commit49d43283668c702a984bdc52d91b1d645e1042f1 (patch)
treef37e9159480653c571e364b6fb6c532836741131 /board/aleena
parent43a07d429fd245b1ae50c0fb46939f8013887943 (diff)
downloadchrome-ec-49d43283668c702a984bdc52d91b1d645e1042f1.tar.gz
Aleena: support factory keyboard test.
connector-to-GPIO map: {-1, -1}, {0, 5}, {1, 1}, {1, 0}, {0, 6}, {0, 7}, {-1, -1}, {-1, -1}, {1, 4}, {1, 3}, {-1, -1}, {1, 6}, {1, 7}, {3, 1}, {2, 0}, {1, 5}, {2, 6}, {2, 7}, {2, 1}, {2, 4}, {2, 5}, {1, 2}, {2, 3},{2, 2}, {3, 0}, {-1, -1}, {0, 4}, {-1, -1}, {8, 2}, {-1, -1}, {-1, -1}, BUG=b:143848117 BRANCH=master TEST="ectool kbfactorytest" Pass. Change-Id: I087c4f11338e58d20ad82ce94c4c64380945c56f Signed-off-by: David Huang <David.Huang@quantatw.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1893909 Reviewed-by: Edward Hill <ecgh@chromium.org> Commit-Queue: David Huang <david.huang@quanta.corp-partner.google.com> Tested-by: David Huang <david.huang@quanta.corp-partner.google.com>
Diffstat (limited to 'board/aleena')
-rw-r--r--board/aleena/board.c20
-rw-r--r--board/aleena/board.h7
2 files changed, 27 insertions, 0 deletions
diff --git a/board/aleena/board.c b/board/aleena/board.c
index d648b32f02..987ef36904 100644
--- a/board/aleena/board.c
+++ b/board/aleena/board.c
@@ -75,3 +75,23 @@ static void board_kblight_init(void)
lm3630a_poweron();
}
DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_kblight_init, HOOK_PRIO_DEFAULT);
+
+#ifdef CONFIG_KEYBOARD_FACTORY_TEST
+/*
+ * Map keyboard connector pins to EC GPIO pins for factory test.
+ * Pins mapped to {-1, -1} are skipped.
+ * The connector has 30 pins total, and there is no pin 0.
+ */
+const int keyboard_factory_scan_pins[][2] = {
+ {-1, -1}, {0, 5}, {1, 1}, {1, 0}, {0, 6},
+ {0, 7}, {-1, -1}, {-1, -1}, {1, 4}, {1, 3},
+ {-1, -1}, {1, 6}, {1, 7}, {3, 1}, {2, 0},
+ {1, 5}, {2, 6}, {2, 7}, {2, 1}, {2, 4},
+ {2, 5}, {1, 2}, {2, 3}, {2, 2}, {3, 0},
+ {-1, -1}, {0, 4}, {-1, -1}, {8, 2}, {-1, -1},
+ {-1, -1},
+};
+
+const int keyboard_factory_scan_pins_used =
+ ARRAY_SIZE(keyboard_factory_scan_pins);
+#endif
diff --git a/board/aleena/board.h b/board/aleena/board.h
index 2308de5af9..76350a76e6 100644
--- a/board/aleena/board.h
+++ b/board/aleena/board.h
@@ -52,6 +52,8 @@
#undef CONFIG_MOTION_SENSE_RESUME_DELAY_US
#define CONFIG_MOTION_SENSE_RESUME_DELAY_US (10 * MSEC)
+#define CONFIG_KEYBOARD_FACTORY_TEST
+
#ifndef __ASSEMBLER__
enum pwm_channel {
@@ -66,6 +68,11 @@ enum battery_type {
BATTERY_TYPE_COUNT,
};
+#ifdef CONFIG_KEYBOARD_FACTORY_TEST
+extern const int keyboard_factory_scan_pins[][2];
+extern const int keyboard_factory_scan_pins_used;
+#endif
+
#endif /* !__ASSEMBLER__ */
#endif /* __CROS_EC_BOARD_H */