It was probably the most complicated pcb I've designed so far and I'm glad I'm not doing it on a prototyping board. Comments what could be done better are very much appreciated. I will send it to fab this week.
This version allows to configure what drives upper transistors (pwm from MCU or output from comparators) and what sets reference voltage for comparators. This way I can switch this board between sensing edges by mcu and counting switching frequency when in comparator mode. Commanded position could be set on ANALOG_IN or via serial.