tests: adc: Test RW612 ADC
Enable RW612 RD board to test ADC Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
This commit is contained in:
parent
00a205ffba
commit
14ef7d2d21
4 changed files with 78 additions and 0 deletions
|
@ -25,3 +25,4 @@ supported:
|
||||||
- watchdog
|
- watchdog
|
||||||
- counter
|
- counter
|
||||||
- hwinfo
|
- hwinfo
|
||||||
|
- adc
|
||||||
|
|
38
samples/drivers/adc/adc_dt/boards/rd_rw612_bga.overlay
Normal file
38
samples/drivers/adc/adc_dt/boards/rd_rw612_bga.overlay
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2022 NXP
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <zephyr/dt-bindings/adc/nxp,gau-adc.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
zephyr,user {
|
||||||
|
/* adjust channel number according to pinmux in board.dts */
|
||||||
|
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_VDD_1";
|
||||||
|
zephyr,vref-mv = <1800>;
|
||||||
|
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||||
|
zephyr,resolution = <16>;
|
||||||
|
zephyr,input-positive = <GAU_ADC_CH0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
channel@1 {
|
||||||
|
reg = <1>;
|
||||||
|
zephyr,gain = "ADC_GAIN_1";
|
||||||
|
zephyr,reference = "ADC_REF_VDD_1";
|
||||||
|
zephyr,vref-mv = <1800>;
|
||||||
|
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||||
|
zephyr,resolution = <16>;
|
||||||
|
zephyr,input-positive = <GAU_ADC_CH1>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -29,6 +29,7 @@ tests:
|
||||||
- mr_canhubk3
|
- mr_canhubk3
|
||||||
- longan_nano
|
- longan_nano
|
||||||
- longan_nano/gd32vf103/lite
|
- longan_nano/gd32vf103/lite
|
||||||
|
- rd_rw612_bga
|
||||||
integration_platforms:
|
integration_platforms:
|
||||||
- nucleo_l073rz
|
- nucleo_l073rz
|
||||||
- nrf52840dk/nrf52840
|
- nrf52840dk/nrf52840
|
||||||
|
|
38
tests/drivers/adc/adc_api/boards/rd_rw612_bga.overlay
Normal file
38
tests/drivers/adc/adc_api/boards/rd_rw612_bga.overlay
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
/*
|
||||||
|
* Copyright 2023 NXP
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <zephyr/dt-bindings/adc/nxp,gau-adc.h>
|
||||||
|
|
||||||
|
/ {
|
||||||
|
zephyr,user {
|
||||||
|
/* adjust channel number according to pinmux in board.dts */
|
||||||
|
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_VDD_1";
|
||||||
|
zephyr,vref-mv = <1800>;
|
||||||
|
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||||
|
zephyr,resolution = <16>;
|
||||||
|
zephyr,input-positive = <GAU_ADC_CH0>;
|
||||||
|
};
|
||||||
|
|
||||||
|
channel@1 {
|
||||||
|
reg = <1>;
|
||||||
|
zephyr,gain = "ADC_GAIN_1";
|
||||||
|
zephyr,reference = "ADC_REF_VDD_1";
|
||||||
|
zephyr,vref-mv = <1800>;
|
||||||
|
zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
|
||||||
|
zephyr,resolution = <16>;
|
||||||
|
zephyr,input-positive = <GAU_ADC_CH1>;
|
||||||
|
};
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue