commit ed73469472a500fd7ca4ac6fbf351ca932e6ab79 from: patrick date: Tue Jul 02 19:43:52 2024 UTC 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@ commit - 60036ea56503a2c67a8c44cc554c59bdb713d7ca commit + ed73469472a500fd7ca4ac6fbf351ca932e6ab79 blob - ac1f673d4e49e56a5eb8656346ddf6c947194b21 blob + e4a5443e9068ccd38224981017acd4eb677ce299 --- sys/dev/fdt/qcgpio_fdt.c +++ 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, v { 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 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);