diff --git a/drivers/comparator/comparator_nrf_comp.c b/drivers/comparator/comparator_nrf_comp.c index 33bea15778f..bc0dbcff193 100644 --- a/drivers/comparator/comparator_nrf_comp.c +++ b/drivers/comparator/comparator_nrf_comp.c @@ -87,6 +87,15 @@ static const uint32_t shim_nrf_comp_ain_map[] = { NRF_PIN_PORT_TO_PIN_NUMBER(12U, 1), NRF_PIN_PORT_TO_PIN_NUMBER(13U, 1), NRF_PIN_PORT_TO_PIN_NUMBER(14U, 1), +#else + NRF_PIN_PORT_TO_PIN_NUMBER(0U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(31U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(30U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(29U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(6U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(5U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(4U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(3U, 1), #endif }; #endif diff --git a/drivers/comparator/comparator_nrf_lpcomp.c b/drivers/comparator/comparator_nrf_lpcomp.c index 5b3ff0d4a46..2ad8ed867f0 100644 --- a/drivers/comparator/comparator_nrf_lpcomp.c +++ b/drivers/comparator/comparator_nrf_lpcomp.c @@ -58,6 +58,15 @@ static const uint32_t shim_nrf_lpcomp_ain_map[] = { NRF_PIN_PORT_TO_PIN_NUMBER(12U, 1), NRF_PIN_PORT_TO_PIN_NUMBER(13U, 1), NRF_PIN_PORT_TO_PIN_NUMBER(14U, 1), +#else + NRF_PIN_PORT_TO_PIN_NUMBER(0U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(31U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(30U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(29U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(6U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(5U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(4U, 1), + NRF_PIN_PORT_TO_PIN_NUMBER(3U, 1), #endif }; #endif diff --git a/tests/boards/nrf/comp/src/test.c b/tests/boards/nrf/comp/src/test.c index 01493d06811..9e6fd8c1af8 100644 --- a/tests/boards/nrf/comp/src/test.c +++ b/tests/boards/nrf/comp/src/test.c @@ -15,20 +15,30 @@ static const struct gpio_dt_spec test_pin_2 = GPIO_DT_SPEC_GET(DT_PATH(zephyr_us struct comp_nrf_comp_se_config comp_se_config = { +#if defined(CONFIG_BOARD_NRF54LM20APDK) + .psel = COMP_NRF_COMP_PSEL_AIN1, + .extrefsel = COMP_NRF_COMP_EXTREFSEL_AIN5, +#else .psel = COMP_NRF_COMP_PSEL_AIN5, + .extrefsel = COMP_NRF_COMP_EXTREFSEL_AIN1, +#endif .sp_mode = COMP_NRF_COMP_SP_MODE_HIGH, .isource = COMP_NRF_COMP_ISOURCE_DISABLED, .refsel = COMP_NRF_COMP_REFSEL_AREF, - .extrefsel = COMP_NRF_COMP_EXTREFSEL_AIN1, .th_up = 32, .th_down = 32, }; struct comp_nrf_comp_diff_config comp_diff_config = { +#if defined(CONFIG_BOARD_NRF54LM20APDK) + .psel = COMP_NRF_COMP_PSEL_AIN3, + .extrefsel = COMP_NRF_COMP_EXTREFSEL_AIN1, +#else .psel = COMP_NRF_COMP_PSEL_AIN4, + .extrefsel = COMP_NRF_COMP_EXTREFSEL_AIN5, +#endif .sp_mode = COMP_NRF_COMP_SP_MODE_LOW, .isource = COMP_NRF_COMP_ISOURCE_DISABLED, - .extrefsel = COMP_NRF_COMP_EXTREFSEL_AIN5, .enable_hyst = true, };