-/* $OpenBSD: pchgpio.c,v 1.2 2021/05/16 08:50:59 jsg Exp $ */
+/* $OpenBSD: pchgpio.c,v 1.3 2021/08/10 12:19:06 jcs Exp $ */
/*
* Copyright (c) 2020 Mark Kettenis
* Copyright (c) 2020 James Hastings
const char *pchgpio_hids[] = {
"INT34BB",
+ "INT34C5",
NULL
};
.npins = 320,
};
+struct pchgpio_group tgl_lp_groups[] =
+{
+ /* Community 0 */
+ { 0, 0, 0, 25, 0, 0 }, /* GPP_B */
+ { 0, 1, 26, 41, 26, 32 }, /* GPP_T */
+ { 0, 2, 42, 66, 42, 64 }, /* GPP_A */
+
+ /* Community 1 */
+ { 1, 0, 67, 74, 0, 96 }, /* GPP_S */
+ { 1, 1, 75, 98, 24, 128 }, /* GPP_H */
+ { 1, 2, 99, 119, 45, 160 }, /* GPP_D */
+ { 1, 3, 120, 143, 69, 192 }, /* GPP_U */
+
+ /* Community 4 */
+ { 2, 0, 171, 194, 0, 256 }, /* GPP_C */
+ { 2, 1, 195, 219, 25, 288 }, /* GPP_F */
+ { 2, 3, 226, 250, 51, 320 }, /* GPP_E */
+
+ /* Community 5 */
+ { 3, 0, 260, 267, 0, 352 }, /* GPP_R */
+};
+
+struct pchgpio_device tgl_lp_device =
+{
+ .pad_size = 16,
+ .gpi_is = 0x100,
+ .gpi_ie = 0x120,
+ .groups = tgl_lp_groups,
+ .ngroups = nitems(tgl_lp_groups),
+ .npins = 360,
+};
+
struct pchgpio_match pchgpio_devices[] = {
{ "INT34BB", &cnl_lp_device },
+ { "INT34C5", &tgl_lp_device },
};
int pchgpio_read_pin(void *, int);
uint32_t reg;
uint16_t offset;
uint8_t bank, bar;
-
- KASSERT(pin >= 0 && pin < sc->sc_npins);
+
+ KASSERT(pin >= 0);
if ((group = pchgpio_find_group(sc, pin)) == NULL)
return;