drivers: timer: stm32_lptim: Support all LPTIM instances

The LPTIM timer driver previously had hardcoded assumptions about
using LPTIM1 or LPTIM3, which prevented it from working with other
LPTIM instances like LPTIM2, LPTIM4, LPTIM5, and LPTIM6.

This change makes the driver work with any LPTIM instance by:

1. Adding lptim_enable_autonomous_mode() function that dynamically
   detects which LPTIM instance is in use and enables autonomous
   mode for instances that support it (LPTIM1, LPTIM3, LPTIM4).
   LPTIM2, LPTIM5, LPTIM6 do not support autonomous mode.

2. Adding lptim_freeze_during_debug() function that handles debug
   freeze configuration for all LPTIM instances across different
   APB buses:
   - LPTIM1: APB1_GRP1, APB3_GRP1, or APB7_GRP1
   - LPTIM2: APB1_GRP1, APB1_GRP2, APB3_GRP1, or APB4_GRP1
   - LPTIM3: APB1_GRP2, APB3_GRP1, or APB4_GRP1
   - LPTIM4: APB3_GRP1 or APB4_GRP1
   - LPTIM5: APB3_GRP1
   - LPTIM6: APB3_GRP1

Both functions use DT_REG_ADDR() to compare the base address of the
configured LPTIM instance at compile time, ensuring zero runtime
overhead.

Tested on STM32U5A5 with all four LPTIM instances (LPTIM1-4).

Signed-off-by: Kamil Krzyżanowski <kamnxt@kamnxt.com>
1 file changed