Skip to content

Commit 61246e2

Browse files
billwatersiiinashif
authored andcommitted
driver: adc: infineon: Adding ADC driver support to cy8cproto_063_ble
- The boards\arm\cy8cproto_063_ble board now has ADC enabled - This includes overlay files for the test app and sample app Signed-off-by: Bill Waters <[email protected]>
1 parent 66c568e commit 61246e2

File tree

4 files changed

+96
-0
lines changed

4 files changed

+96
-0
lines changed

boards/arm/cy8cproto_063_ble/cy8cproto_063_ble.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ toolchain:
1313
- zephyr
1414
- gnuarmemb
1515
supported:
16+
- adc
1617
- gpio
1718
- uart
1819
- i2c

dts/arm/infineon/psoc6/psoc6_01/psoc6_01.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@
211211
reg = <0x411f0000 0x10000>;
212212
interrupts = <138 6>;
213213
status = "disabled";
214+
#io-channel-cells = <1>;
214215
};
215216

216217
scb0: scb@40610000 {
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or
5+
* an affiliate of Cypress Semiconductor Corporation
6+
*/
7+
8+
#include <zephyr/dt-bindings/adc/adc.h>
9+
10+
/ {
11+
zephyr,user {
12+
io-channels = <&adc0 0>, <&adc0 1>, <&adc0 2>, <&adc0 3>;
13+
};
14+
};
15+
16+
&adc0 {
17+
status = "okay";
18+
#address-cells = <1>;
19+
#size-cells = <0>;
20+
21+
channel@0 {
22+
reg = <0>;
23+
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>;
24+
zephyr,gain = "ADC_GAIN_1";
25+
zephyr,reference = "ADC_REF_INTERNAL";
26+
zephyr,resolution = <12>;
27+
zephyr,input-positive = <0>; /* P10.0 */
28+
};
29+
30+
channel@1 {
31+
reg = <1>;
32+
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>;
33+
zephyr,gain = "ADC_GAIN_1";
34+
zephyr,reference = "ADC_REF_INTERNAL";
35+
zephyr,resolution = <12>;
36+
zephyr,input-positive = <1>; /* P10.1 */
37+
};
38+
39+
channel@2 {
40+
reg = <2>;
41+
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>;
42+
zephyr,gain = "ADC_GAIN_1";
43+
zephyr,reference = "ADC_REF_INTERNAL";
44+
zephyr,resolution = <12>;
45+
zephyr,input-positive = <2>; /* P10.2 */
46+
};
47+
48+
channel@3 {
49+
reg = <3>;
50+
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>;
51+
zephyr,gain = "ADC_GAIN_1";
52+
zephyr,reference = "ADC_REF_INTERNAL";
53+
zephyr,resolution = <12>;
54+
zephyr,input-positive = <3>; /* P10.3 */
55+
};
56+
};
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2023 Cypress Semiconductor Corporation (an Infineon company) or
5+
* an affiliate of Cypress Semiconductor Corporation
6+
*/
7+
8+
#include <zephyr/dt-bindings/adc/adc.h>
9+
10+
/ {
11+
zephyr,user {
12+
io-channels = <&adc0 0>, <&adc0 1>;
13+
};
14+
};
15+
16+
&adc0 {
17+
status = "okay";
18+
#address-cells = <1>;
19+
#size-cells = <0>;
20+
21+
channel@0 {
22+
reg = <0>;
23+
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>;
24+
zephyr,gain = "ADC_GAIN_1";
25+
zephyr,reference = "ADC_REF_INTERNAL";
26+
zephyr,resolution = <12>;
27+
zephyr,input-positive = <0>; /* P10.0 */
28+
};
29+
30+
channel@1 {
31+
reg = <1>;
32+
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_MICROSECONDS, 1)>;
33+
zephyr,gain = "ADC_GAIN_1";
34+
zephyr,reference = "ADC_REF_INTERNAL";
35+
zephyr,resolution = <12>;
36+
zephyr,input-positive = <1>; /* P10.1 */
37+
};
38+
};

0 commit comments

Comments
 (0)