From 6dd54c8835d5400b3861a30d56fabb1573875dc0 Mon Sep 17 00:00:00 2001 From: Richard Wheatley Date: Thu, 22 Aug 2024 12:44:48 -0500 Subject: [PATCH] dts: arm: ambiq: add ambiq adc to dtsi file Add Ambiq adc to apollo4 DTSI Signed-off-by: Richard Wheatley --- dts/arm/ambiq/ambiq_apollo4p.dtsi | 12 ++++++++++++ modules/hal_ambiq/Kconfig | 5 +++++ 2 files changed, 17 insertions(+) diff --git a/dts/arm/ambiq/ambiq_apollo4p.dtsi b/dts/arm/ambiq/ambiq_apollo4p.dtsi index 6570e20c9ccb..bfd25825fa0d 100644 --- a/dts/arm/ambiq/ambiq_apollo4p.dtsi +++ b/dts/arm/ambiq/ambiq_apollo4p.dtsi @@ -3,6 +3,7 @@ #include #include #include +#include #include #include @@ -288,6 +289,17 @@ ambiq,pwrcfg = <&pwrcfg 0x4 0x100>; }; + adc0: adc@40038000 { + reg = <0x40038000 0x400>; + interrupts = <19 0>; + interrupt-names = "ADC"; + channel-count = <10>; + internal-vref-mv = <1190>; + status = "disabled"; + #io-channel-cells = <1>; + ambiq,pwrcfg = <&pwrcfg 0x4 0x2000>; + }; + mspi0: spi@40060000 { compatible = "ambiq,mspi"; reg = <0x40060000 0x400>; diff --git a/modules/hal_ambiq/Kconfig b/modules/hal_ambiq/Kconfig index 326d6bac2d45..a9a7e47e7843 100644 --- a/modules/hal_ambiq/Kconfig +++ b/modules/hal_ambiq/Kconfig @@ -10,6 +10,11 @@ config AMBIQ_HAL if AMBIQ_HAL +config AMBIQ_HAL_USE_ADC + bool + help + Use the ADC driver from Ambiq HAL + config AMBIQ_HAL_USE_GPIO bool help