]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/keymile/kmp204x/kmp204x.c
kmp204x: selftest/factory test pin support
[karo-tx-uboot.git] / board / keymile / kmp204x / kmp204x.c
index fba1bdd4381a7900fb8e08019fd5bb2f3c35dec6..1ce8429075ff61c7acef59177ee41628d89fcd79 100644 (file)
@@ -250,3 +250,16 @@ void ft_board_setup(void *blob, bd_t *bd)
        fdt_fixup_fman_mac_addresses(blob);
 #endif
 }
+
+#if defined(CONFIG_POST)
+
+/* DIC26_SELFTEST GPIO used to start factory test sw */
+#define SELFTEST_PORT  GPIO_A
+#define SELFTEST_PIN   31
+
+int post_hotkeys_pressed(void)
+{
+       qrio_gpio_direction_input(SELFTEST_PORT, SELFTEST_PIN);
+       return qrio_get_gpio(SELFTEST_PORT, SELFTEST_PIN);
+}
+#endif