I need to access STM32's general purpose timer's quadrature decoding functionality. I'm trying to understand what exactly is needed to expose this, either write a custom driver accessing arch-dependant interface directly or if there's at least some support exposed via counter API for example.
So far support for quadrature decoding functionality of a general purpose timer/counter module has been implemented as a dedicated sensor driver. You can check
They use a different binding than a regular counter driver. It's the compatible property of the timer/counter DT node that decides which driver will 'own' it.
There is also a basic sample app to demo the driver: samples/sensor/qdec.