From f333c700df979ad5d9571db667fcce63a4c6834b Mon Sep 17 00:00:00 2001 From: Anke Xiao Date: Thu, 27 Jun 2024 11:01:17 +0800 Subject: [PATCH] tests: drivers: adc_api: add support for ke17z and ke17z512 Add ADC configuration for the NXP FRDM-KE17Z and FRDM-KE17Z512 boards. Signed-off-by: Anke Xiao --- .../adc/adc_api/boards/frdm_ke17z.overlay | 32 +++++++++++++++++++ .../adc/adc_api/boards/frdm_ke17z512.overlay | 32 +++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 tests/drivers/adc/adc_api/boards/frdm_ke17z.overlay create mode 100644 tests/drivers/adc/adc_api/boards/frdm_ke17z512.overlay diff --git a/tests/drivers/adc/adc_api/boards/frdm_ke17z.overlay b/tests/drivers/adc/adc_api/boards/frdm_ke17z.overlay new file mode 100644 index 00000000000..e43c626df5c --- /dev/null +++ b/tests/drivers/adc/adc_api/boards/frdm_ke17z.overlay @@ -0,0 +1,32 @@ +/* + * Copyright 2024 NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + zephyr,user { + io-channels = <&adc0 0>, <&adc0 1>; + }; +}; + +&adc0 { + #address-cells = <1>; + #size-cells = <0>; + + channel@0 { + reg = <0>; + zephyr,gain = "ADC_GAIN_1"; + zephyr,reference = "ADC_REF_INTERNAL"; + zephyr,acquisition-time = ; + zephyr,resolution = <12>; + }; + + channel@1 { + reg = <1>; + zephyr,gain = "ADC_GAIN_1"; + zephyr,reference = "ADC_REF_INTERNAL"; + zephyr,acquisition-time = ; + zephyr,resolution = <12>; + }; +}; diff --git a/tests/drivers/adc/adc_api/boards/frdm_ke17z512.overlay b/tests/drivers/adc/adc_api/boards/frdm_ke17z512.overlay new file mode 100644 index 00000000000..e43c626df5c --- /dev/null +++ b/tests/drivers/adc/adc_api/boards/frdm_ke17z512.overlay @@ -0,0 +1,32 @@ +/* + * Copyright 2024 NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/ { + zephyr,user { + io-channels = <&adc0 0>, <&adc0 1>; + }; +}; + +&adc0 { + #address-cells = <1>; + #size-cells = <0>; + + channel@0 { + reg = <0>; + zephyr,gain = "ADC_GAIN_1"; + zephyr,reference = "ADC_REF_INTERNAL"; + zephyr,acquisition-time = ; + zephyr,resolution = <12>; + }; + + channel@1 { + reg = <1>; + zephyr,gain = "ADC_GAIN_1"; + zephyr,reference = "ADC_REF_INTERNAL"; + zephyr,acquisition-time = ; + zephyr,resolution = <12>; + }; +};