soc: nxp: s32ze: add option to select RTU index

Add a hidden Kconfig option to select the index of the target RTU
(Real-Time Unit) subsystem. This index can be used by peripheral
drivers, for example, to know the peripheral instance index since the
HAL is index-based.

Signed-off-by: Manuel Arguelles <manuel.arguelles@nxp.com>
This commit is contained in:
Manuel Arguelles 2022-10-06 17:45:22 +07:00 committed by Carles Cufí
parent 38ad230aec
commit 10c9e40566
2 changed files with 10 additions and 0 deletions

View file

@ -10,6 +10,10 @@ config BOARD
default "s32z270dc2_rtu0_r52" if BOARD_S32Z270DC2_RTU0_R52
default "s32z270dc2_rtu1_r52" if BOARD_S32Z270DC2_RTU1_R52
config NXP_S32_RTU_INDEX
default 0 if BOARD_S32Z270DC2_RTU0_R52
default 1 if BOARD_S32Z270DC2_RTU1_R52
if SERIAL
config UART_INTERRUPT_DRIVEN

View file

@ -34,4 +34,10 @@ config INIT_CLOCK_AT_BOOT_TIME
driver's configurator, instead of using the default SoC clock configuration
at reset.
config NXP_S32_RTU_INDEX
int
range 0 1
help
This option indicates the index of the target RTU (Real-Time Unit) subsystem.
endif # SOC_SERIES_S32ZE_R52