File tree Expand file tree Collapse file tree 9 files changed +411
-3
lines changed
tests/drivers/build_all/adc Expand file tree Collapse file tree 9 files changed +411
-3
lines changed Original file line number Diff line number Diff line change 4
4
* SPDX-License-Identifier: Apache-2.0
5
5
*/
6
6
7
+ #include <zephyr/dt-bindings/adc/adc.h>
7
8
#include "tdk_robokit1-pinctrl.dtsi"
8
9
9
10
/ {
90
91
pinctrl-names = "default";
91
92
dmas = <&xdmac 0 DMA_PERID_SPI0_TX>, <&xdmac 1 DMA_PERID_SPI0_RX>;
92
93
dma-names = "tx", "rx";
93
- cs-gpios =<&pioa 31 GPIO_ACTIVE_LOW>;
94
+ cs-gpios =<&pioa 31 GPIO_ACTIVE_LOW>,
95
+ <&pioc 31 GPIO_ACTIVE_LOW>;
94
96
status = "okay";
95
97
96
98
icm42688: icm42688p@0 {
103
105
gyro-hz = <32000>;
104
106
gyro-fs = <2000>;
105
107
};
108
+ spi_adc: adc@1 {
109
+ compatible = "ti,ads7052";
110
+ reg = <1>;
111
+ #io-channel-cells = <1>;
112
+ #address-cells = <1>;
113
+ #size-cells = <0>;
114
+ spi-max-frequency = <12000000>;
115
+ channel@0 {
116
+ reg = <0>;
117
+ zephyr,gain = "ADC_GAIN_1";
118
+ zephyr,reference = "ADC_REF_VDD_1";
119
+ zephyr,vref-mv = <3300>;
120
+ zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
121
+ zephyr,resolution = <14>;
122
+ };
123
+ };
106
124
};
107
125
108
126
&spi1 {
Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ zephyr_library_sources_ifdef(CONFIG_ADC_TEST adc_test.c)
28
28
zephyr_library_sources_ifdef (CONFIG_ADC_ADS1X1X adc_ads1x1x.c )
29
29
zephyr_library_sources_ifdef (CONFIG_ADC_GD32 adc_gd32.c )
30
30
zephyr_library_sources_ifdef (CONFIG_ADC_ADS1119 adc_ads1119.c )
31
+ zephyr_library_sources_ifdef (CONFIG_ADC_ADS7052 adc_ads7052.c )
31
32
zephyr_library_sources_ifdef (CONFIG_ADC_RPI_PICO adc_rpi_pico.c )
32
33
zephyr_library_sources_ifdef (CONFIG_ADC_XMC4XXX adc_xmc4xxx.c )
33
34
zephyr_library_sources_ifdef (CONFIG_ADC_ESP32 adc_esp32.c )
Original file line number Diff line number Diff line change @@ -84,6 +84,8 @@ source "drivers/adc/Kconfig.gd32"
84
84
85
85
source "drivers/adc/Kconfig.ads1119"
86
86
87
+ source "drivers/adc/Kconfig.ads7052"
88
+
87
89
source "drivers/adc/Kconfig.rpi_pico"
88
90
89
91
source "drivers/adc/Kconfig.xmc4xxx"
Original file line number Diff line number Diff line change
1
+ # Copyright (c) 2023 Google LLC
2
+ #
3
+ # SPDX-License-Identifier: Apache-2.0
4
+
5
+ config ADC_ADS7052
6
+ bool "Texas instruments ADS7052 SPI"
7
+ default y
8
+ depends on DT_HAS_TI_ADS7052_ENABLED
9
+ select SPI
10
+ select ADC_CONFIGURABLE_INPUTS
11
+ help
12
+ Enable the driver implementation for the ADS7052
13
+
14
+ if ADC_ADS7052
15
+
16
+ config ADC_ADS7052_INIT_PRIORITY
17
+ int "ADS7052 init priority"
18
+ default 80
19
+ help
20
+ ADS7052 device initialization priority must come
21
+ after SPI initialization
22
+
23
+ config ADC_ADS7052_ACQUISITION_THREAD_STACK_SIZE
24
+ int "Stack size for the ADC data acquisition thread"
25
+ default 512
26
+ help
27
+ Size of the stack used for the internal data acquisition
28
+ thread.
29
+
30
+ config ADC_ADS7052_ACQUISITION_THREAD_PRIO
31
+ int "Priority for the ADC data acquisition thread"
32
+ default 0
33
+ help
34
+ Priority level for the internal ADC data acquisition thread.
35
+
36
+ endif # ADC_ADS7052
You can’t perform that action at this time.
0 commit comments