dts: nordic: refactor bindings helper symbols for SAADC

Split header files containing symbols denoting SAADC inputs
so that only supported inputs can be used for given device.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
This commit is contained in:
Nikodem Kastelik 2024-09-30 16:05:34 +02:00 committed by Henrik Brix Andersen
parent 41f749ce8b
commit d494769948
22 changed files with 79 additions and 14 deletions

View File

@ -7,7 +7,8 @@
#define ADC_CONTEXT_USES_KERNEL_TIMER
#include "adc_context.h"
#include <haly/nrfy_saadc.h>
#include <zephyr/dt-bindings/adc/nrf-adc.h>
#include <zephyr/dt-bindings/adc/nrf-saadc-v3.h>
#include <zephyr/dt-bindings/adc/nrf-saadc-nrf54l.h>
#include <zephyr/linker/devicetree_regions.h>
#define LOG_LEVEL CONFIG_ADC_LOG_LEVEL

View File

@ -2,6 +2,7 @@
#include <arm/armv6-m.dtsi>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-adc.h>
/ {
chosen {

View File

@ -6,6 +6,7 @@
#include <arm/armv7-m.dtsi>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc-v2.h>
#include <zephyr/dt-bindings/regulator/nrf5x.h>
/ {

View File

@ -2,6 +2,7 @@
#include <arm/armv7-m.dtsi>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc-v2.h>
#include <zephyr/dt-bindings/regulator/nrf5x.h>
/ {

View File

@ -6,6 +6,7 @@
#include <arm/armv7-m.dtsi>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc-v2.h>
#include <zephyr/dt-bindings/regulator/nrf5x.h>
/ {

View File

@ -2,6 +2,7 @@
#include <arm/armv7-m.dtsi>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc-v2.h>
#include <zephyr/dt-bindings/regulator/nrf5x.h>
/ {

View File

@ -6,6 +6,7 @@
#include <arm/armv7-m.dtsi>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc-v3.h>
#include <zephyr/dt-bindings/regulator/nrf5x.h>
/ {

View File

@ -2,6 +2,7 @@
#include <arm/armv7-m.dtsi>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc-v3.h>
#include <zephyr/dt-bindings/regulator/nrf5x.h>
/ {

View File

@ -6,6 +6,7 @@
#include <arm/armv8-m.dtsi>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc-v3.h>
/ {
cpus {

View File

@ -8,6 +8,7 @@
#include <arm/armv8-m.dtsi>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc-v3.h>
/ {
cpus {

View File

@ -6,6 +6,7 @@
#include <arm/armv8-m.dtsi>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc-v2.h>
/ {
cpus {

View File

@ -6,6 +6,7 @@
#include <arm/armv8-m.dtsi>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc-v2.h>
/ {
cpus {

View File

@ -7,6 +7,7 @@
#include <mem.h>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc.h>
#include <zephyr/dt-bindings/misc/nordic-nrf-ficr-nrf54h20.h>
#include <zephyr/dt-bindings/misc/nordic-domain-id-nrf54h20.h>
#include <zephyr/dt-bindings/misc/nordic-owner-id-nrf54h20.h>

View File

@ -6,6 +6,7 @@
#include <mem.h>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc-nrf54l.h>
#include <zephyr/dt-bindings/regulator/nrf5x.h>
/delete-node/ &sw_pwm;

View File

@ -6,6 +6,7 @@
#include <mem.h>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc-nrf54l.h>
#include <zephyr/dt-bindings/regulator/nrf5x.h>
/delete-node/ &sw_pwm;

View File

@ -6,7 +6,7 @@
#include <mem.h>
#include <nordic/nrf_common.dtsi>
#include <zephyr/dt-bindings/adc/nrf-saadc.h>
#include <zephyr/dt-bindings/misc/nordic-nrf-ficr-nrf9230-engb.h>
#include <zephyr/dt-bindings/misc/nordic-domain-id-nrf9230.h>
#include <zephyr/dt-bindings/misc/nordic-owner-id-nrf9230.h>

View File

@ -5,7 +5,6 @@
*/
#include <zephyr/dt-bindings/adc/adc.h>
#include <zephyr/dt-bindings/adc/nrf-adc.h>
#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/i2c/i2c.h>
#include <zephyr/dt-bindings/input/input-event-codes.h>

View File

@ -18,15 +18,4 @@
#define NRF_ADC_AIN6 BIT(6)
#define NRF_ADC_AIN7 BIT(7)
#define NRF_SAADC_AIN0 1
#define NRF_SAADC_AIN1 2
#define NRF_SAADC_AIN2 3
#define NRF_SAADC_AIN3 4
#define NRF_SAADC_AIN4 5
#define NRF_SAADC_AIN5 6
#define NRF_SAADC_AIN6 7
#define NRF_SAADC_AIN7 8
#define NRF_SAADC_VDD 9
#define NRF_SAADC_VDDHDIV5 13
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_ADC_H_ */

View File

@ -0,0 +1,15 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2024 Nordic Semiconductor ASA
*/
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_SAADC_NRF54L_H_
#define ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_SAADC_NRF54L_H_
#include <zephyr/dt-bindings/adc/nrf-saadc-v2.h>
#define NRF_SAADC_AVDD 10
#define NRF_SAADC_DVDD 11
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_SAADC_NRF54L_H_ */

View File

@ -0,0 +1,14 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2024 Nordic Semiconductor ASA
*/
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_SAADC_V2_H_
#define ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_SAADC_V2_H_
#include <zephyr/dt-bindings/adc/nrf-saadc.h>
#define NRF_SAADC_VDD 9
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_SAADC_V2_H_ */

View File

@ -0,0 +1,14 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2024 Nordic Semiconductor ASA
*/
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_SAADC_V3_H_
#define ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_SAADC_V3_H_
#include <zephyr/dt-bindings/adc/nrf-saadc-v2.h>
#define NRF_SAADC_VDDHDIV5 13
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_SAADC_V3_H_ */

View File

@ -0,0 +1,19 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2024 Nordic Semiconductor ASA
*/
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_SAADC_H_
#define ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_SAADC_H_
#define NRF_SAADC_AIN0 1
#define NRF_SAADC_AIN1 2
#define NRF_SAADC_AIN2 3
#define NRF_SAADC_AIN3 4
#define NRF_SAADC_AIN4 5
#define NRF_SAADC_AIN5 6
#define NRF_SAADC_AIN6 7
#define NRF_SAADC_AIN7 8
#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_ADC_NRF_SAADC_H_ */