From 76e1d3839f2ffa3f8e7f49594cfd4533f57f107c Mon Sep 17 00:00:00 2001 From: Patrick Wildt Date: Tue, 2 Jul 2024 19:43:53 +0000 Subject: 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@ --- sys/dev/fdt/qcgpio_fdt.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'sys/dev/fdt') 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); -- cgit v1.2.3