From 9a4091b02a3ade2bc5e9f3a7f3738dcc291e3978 Mon Sep 17 00:00:00 2001 From: Richard Wheatley Date: Thu, 22 Aug 2024 12:44:57 -0500 Subject: [PATCH] boards: ambiq: add adc to apollo4p boards Add adc to apollo4 plus boards Signed-off-by: Richard Wheatley --- boards/ambiq/apollo4p_evb/apollo4p_evb-pinctrl.dtsi | 7 ++++++- boards/ambiq/apollo4p_evb/apollo4p_evb.dts | 7 +++++++ boards/ambiq/apollo4p_evb/apollo4p_evb.yaml | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/boards/ambiq/apollo4p_evb/apollo4p_evb-pinctrl.dtsi b/boards/ambiq/apollo4p_evb/apollo4p_evb-pinctrl.dtsi index 98636cf262a..125e1a7d238 100644 --- a/boards/ambiq/apollo4p_evb/apollo4p_evb-pinctrl.dtsi +++ b/boards/ambiq/apollo4p_evb/apollo4p_evb-pinctrl.dtsi @@ -17,6 +17,12 @@ input-enable; }; }; + adc0_default: adc0_default{ + group1 { + pinmux = , ; + drive-strength = "0.1"; + }; + }; i2c0_default: i2c0_default { group1 { pinmux = , ; @@ -81,7 +87,6 @@ bias-pull-up; }; }; - spi0_default: spi0_default { group1 { pinmux = , , ; diff --git a/boards/ambiq/apollo4p_evb/apollo4p_evb.dts b/boards/ambiq/apollo4p_evb/apollo4p_evb.dts index 5a9d5d49368..c678604f358 100644 --- a/boards/ambiq/apollo4p_evb/apollo4p_evb.dts +++ b/boards/ambiq/apollo4p_evb/apollo4p_evb.dts @@ -63,6 +63,13 @@ status = "okay"; }; +&adc0 { +compatible = "ambiq,adc"; + pinctrl-0 = <&adc0_default>; + pinctrl-names = "default"; + status = "okay"; +}; + &counter0 { status = "okay"; }; diff --git a/boards/ambiq/apollo4p_evb/apollo4p_evb.yaml b/boards/ambiq/apollo4p_evb/apollo4p_evb.yaml index 09ca43fb8b3..1b7b54a71e6 100644 --- a/boards/ambiq/apollo4p_evb/apollo4p_evb.yaml +++ b/boards/ambiq/apollo4p_evb/apollo4p_evb.yaml @@ -15,6 +15,7 @@ supported: - spi - i2c - rtc + - adc - hwinfo testing: ignore_tags: