samples: drivers: adc: Add support for RZ/G3S-SMARC

Add support for RZ/G3S-SMARC to ADC driver sample

Signed-off-by: Phuc Pham <phuc.pham.xr@bp.renesas.com>
Signed-off-by: Binh Nguyen <binh.nguyen.xw@renesas.com>
This commit is contained in:
Phuc Pham 2024-12-16 14:20:04 +07:00 committed by Benjamin Cabé
parent a1ab2fc91a
commit ec5bcdc2c8
3 changed files with 73 additions and 0 deletions

View File

@ -0,0 +1,36 @@
/*
* Copyright (c) 2024 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
zephyr,user {
io-channels = <&adc 0>, <&adc 2>;
};
};
&adc {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,resolution = <12>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,vref-mv = <1800>;
};
channel@2 {
reg = <2>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,resolution = <12>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,vref-mv = <1800>;
};
};

View File

@ -0,0 +1 @@
CONFIG_SEQUENCE_RESOLUTION=12

View File

@ -0,0 +1,36 @@
/*
* Copyright (c) 2024 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
aliases {
adc0 = &adc;
};
};
&adc {
status = "okay";
#address-cells = <1>;
#size-cells = <0>;
channel@0 {
reg = <0>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,resolution = <12>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,vref-mv = <1800>;
};
channel@2 {
reg = <2>;
zephyr,gain = "ADC_GAIN_1";
zephyr,reference = "ADC_REF_INTERNAL";
zephyr,resolution = <12>;
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
zephyr,vref-mv = <1800>;
};
};