From: patrick Date: Tue, 2 Jul 2024 19:43:52 +0000 (+0000) Subject: From what we currently use, the Qualcomm Snapdragon X Elite (X1E80100) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=ed73469472a500fd7ca4ac6fbf351ca932e6ab79;p=openbsd From what we currently use, the Qualcomm Snapdragon X Elite (X1E80100) GPIO controller is to be treated equally as the SC8280XP, apart from the new one having a few more pins. ok kettenis@ --- diff --git a/sys/dev/fdt/qcgpio_fdt.c b/sys/dev/fdt/qcgpio_fdt.c index ac1f673d4e4..e4a5443e906 100644 --- a/sys/dev/fdt/qcgpio_fdt.c +++ b/sys/dev/fdt/qcgpio_fdt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: qcgpio_fdt.c,v 1.3 2024/05/13 01:15:50 jsg Exp $ */ +/* $OpenBSD: qcgpio_fdt.c,v 1.4 2024/07/02 19:43:52 patrick Exp $ */ /* * Copyright (c) 2022 Mark Kettenis * @@ -100,7 +100,8 @@ qcgpio_fdt_match(struct device *parent, void *match, void *aux) { struct fdt_attach_args *faa = aux; - return OF_is_compatible(faa->fa_node, "qcom,sc8280xp-tlmm"); + return (OF_is_compatible(faa->fa_node, "qcom,sc8280xp-tlmm") || + OF_is_compatible(faa->fa_node, "qcom,x1e80100-tlmm")); } void @@ -116,7 +117,10 @@ qcgpio_fdt_attach(struct device *parent, struct device *self, void *aux) return; } - sc->sc_npins = 230; + if (OF_is_compatible(faa->fa_node, "qcom,sc8280xp-tlmm")) + sc->sc_npins = 230; + else + sc->sc_npins = 239; sc->sc_pin_ih = mallocarray(sc->sc_npins, sizeof(*sc->sc_pin_ih), M_DEVBUF, M_WAITOK | M_ZERO);