hammer: Use different KB scanning matrix for masterball
ODM/OEM decided to change pinout.
BRANCH=none
TEST=make BOARD=masterball
TEST=Check that there is not interrupt conflict in gpio.inc
@@ -21,6 +21,31 @@ GPIO_INT(TABLET_MODE_L, PIN(B, 11), GPIO_PULL_UP | GPIO_INT_BOTH, gmr_tablet_swi
#define GPIO_KB_INPUT (GPIO_INPUT | GPIO_PULL_UP | GPIO_INT_BOTH)
#define GPIO_KB_OUTPUT GPIO_ODR_HIGH
+#ifdef BOARD_MASTERBALL
+GPIO_INT(KB_IN00, PIN(B, 2), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt)
+GPIO_INT(KB_IN01, PIN(B, 13), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt)
+GPIO_INT(KB_IN02, PIN(B, 1), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt)
+GPIO_INT(KB_IN03, PIN(A, 6), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt)
+GPIO_INT(KB_IN04, PIN(B, 10), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt)
+GPIO_INT(KB_IN05, PIN(B, 12), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt)
+GPIO_INT(KB_IN06, PIN(A, 7), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt)
+GPIO_INT(KB_IN07, PIN(B, 0), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt)
+
+/* Do not forget to update KB_OUT_PORT_LIST to match this. */
+GPIO(KB_OUT00, PIN(C, 15), GPIO_KB_OUTPUT)
+GPIO(KB_OUT01, PIN(C, 14), GPIO_KB_OUTPUT)
+GPIO(KB_OUT02, PIN(A, 2), GPIO_KB_OUTPUT)
+GPIO(KB_OUT03, PIN(A, 1), GPIO_KB_OUTPUT)
+GPIO(KB_OUT04, PIN(F, 1), GPIO_KB_OUTPUT)
+GPIO(KB_OUT05, PIN(A, 3), GPIO_KB_OUTPUT)
+GPIO(KB_OUT06, PIN(A, 0), GPIO_KB_OUTPUT)
+GPIO(KB_OUT07, PIN(F, 0), GPIO_KB_OUTPUT)
+GPIO(KB_OUT08, PIN(A, 5), GPIO_KB_OUTPUT)
+GPIO(KB_OUT09, PIN(A, 4), GPIO_KB_OUTPUT)
+GPIO(KB_OUT10, PIN(B, 14), GPIO_KB_OUTPUT)
+GPIO(KB_OUT11, PIN(B, 15), GPIO_KB_OUTPUT)
+GPIO(KB_OUT12, PIN(A, 8), GPIO_KB_OUTPUT)
+#else /* !BOARD_MASTERBALL */
GPIO_INT(KB_IN00, PIN(A, 4), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt)
#ifdef BOARD_WHISKERS
GPIO_INT(KB_IN01, PIN(B, 10), GPIO_KB_INPUT, keyboard_raw_gpio_interrupt)
@@ -53,6 +78,7 @@ GPIO(KB_OUT09, PIN(C, 15), GPIO_KB_OUTPUT)
GPIO(KB_OUT10, PIN(F, 1), GPIO_KB_OUTPUT)
GPIO(KB_OUT11, PIN(F, 0), GPIO_KB_OUTPUT)
GPIO(KB_OUT12, PIN(C, 13), GPIO_KB_OUTPUT)
+#endif /* !BOARD_MASTERBALL */
/* I2C pins should be configured as inputs until I2C module is */
/* initialized. This will avoid driving the lines unintentionally.*/
