diff options
author | Patrick Wildt <patrick@cvs.openbsd.org> | 2024-07-02 19:43:53 +0000 |
---|---|---|
committer | Patrick Wildt <patrick@cvs.openbsd.org> | 2024-07-02 19:43:53 +0000 |
commit | 76e1d3839f2ffa3f8e7f49594cfd4533f57f107c (patch) | |
tree | b978e8abcff0ec4752028e137911abe2269a692c /sys/dev/fdt | |
parent | 91d53d948be53c6d02200e4b5eb0268f9c68bd54 (diff) |
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@
Diffstat (limited to 'sys/dev/fdt')
-rw-r--r-- | sys/dev/fdt/qcgpio_fdt.c | 10 |
1 files changed, 7 insertions, 3 deletions
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 <kettenis@openbsd.org> * @@ -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); |