Add qcpas(4), a driver for the Peripheral Authentication Service found on
authorpatrick <patrick@openbsd.org>
Sat, 10 Jun 2023 18:31:38 +0000 (18:31 +0000)
committerpatrick <patrick@openbsd.org>
Sat, 10 Jun 2023 18:31:38 +0000 (18:31 +0000)
commit013f1076211bba6ff985fa8d35cf679e93d5e46f
treec457e508c8fed8fc14452f53f8d3e700ff6c096c
parent72ed2a140753e578a51b42adbbe967a01c74fa90
Add qcpas(4), a driver for the Peripheral Authentication Service found on
Qualcomm SoCs.

The immediate task for this driver is to provide firmware to the auxiliary
cores and to bring them up.  This is accomplished by parsing the ELF files
and providing the data in certain memory regions, and telling qcscm(4) to
check and execute the firmware on the auxiliary cores.

With the cores up we can now talk to the firmware.  The glink-edge subnode
indicates that we can talk to it using the GLINK protocol over shared memory
provided by qcsmem(4).  This interface is essentially a channel multiplexer,
with each channel identified through an ASCII string.

One of those channels connects to a PMIC router, which allows us to talk to
the battery manager service that contains information about the charging and
battery states.

ok drahn@ kettenis@
sys/arch/arm64/conf/GENERIC
sys/arch/arm64/conf/RAMDISK
sys/dev/fdt/files.fdt
sys/dev/fdt/qcpas.c [new file with mode: 0644]