From eb6b726d9c4e76bc351a75196d6b490486dcb97d Mon Sep 17 00:00:00 2001 From: Neil Chen Date: Tue, 10 Dec 2024 10:13:58 +0800 Subject: [PATCH] boards: frdm_mcxc444: Add adc support Support adc for NXP frdm_mcxc444 board Signed-off-by: Neil Chen --- boards/nxp/frdm_mcxc444/doc/index.rst | 2 ++ boards/nxp/frdm_mcxc444/frdm_mcxc444-pinctrl.dtsi | 8 ++++++++ boards/nxp/frdm_mcxc444/frdm_mcxc444.dts | 6 ++++++ boards/nxp/frdm_mcxc444/frdm_mcxc444.yaml | 1 + 4 files changed, 17 insertions(+) diff --git a/boards/nxp/frdm_mcxc444/doc/index.rst b/boards/nxp/frdm_mcxc444/doc/index.rst index 601bc9877a7..891fdce5c86 100644 --- a/boards/nxp/frdm_mcxc444/doc/index.rst +++ b/boards/nxp/frdm_mcxc444/doc/index.rst @@ -55,6 +55,8 @@ The ``frdm_mcxc444`` board target supports the following hardware features: +-----------+------------+-------------------------------------+ | FLASH | on-chip | soc flash | +-----------+------------+-------------------------------------+ +| ADC | on-chip | adc | ++-----------+------------+-------------------------------------+ | I2C | on-chip | i2c | +-----------+------------+-------------------------------------+ | LPTMR | on-chip | counter | diff --git a/boards/nxp/frdm_mcxc444/frdm_mcxc444-pinctrl.dtsi b/boards/nxp/frdm_mcxc444/frdm_mcxc444-pinctrl.dtsi index 36b40c40abc..328ce758ba4 100644 --- a/boards/nxp/frdm_mcxc444/frdm_mcxc444-pinctrl.dtsi +++ b/boards/nxp/frdm_mcxc444/frdm_mcxc444-pinctrl.dtsi @@ -8,6 +8,14 @@ #include &pinctrl { + pinmux_adc0: pinmux_adc0 { + group0 { + pinmux = , + ; + drive-strength = "low"; + slew-rate = "slow"; + }; + }; pinmux_i2c0: pinmux_i2c0 { group0 { pinmux = , diff --git a/boards/nxp/frdm_mcxc444/frdm_mcxc444.dts b/boards/nxp/frdm_mcxc444/frdm_mcxc444.dts index df6c55e5721..3fc85d96075 100644 --- a/boards/nxp/frdm_mcxc444/frdm_mcxc444.dts +++ b/boards/nxp/frdm_mcxc444/frdm_mcxc444.dts @@ -119,6 +119,12 @@ status = "okay"; }; +&adc0 { + status = "okay"; + pinctrl-0 = <&pinmux_adc0>; + pinctrl-names = "default"; +}; + i2c0: &i2c0 { status = "okay"; pinctrl-0 = <&pinmux_i2c0>; diff --git a/boards/nxp/frdm_mcxc444/frdm_mcxc444.yaml b/boards/nxp/frdm_mcxc444/frdm_mcxc444.yaml index a7aabf28a35..ed9be199401 100644 --- a/boards/nxp/frdm_mcxc444/frdm_mcxc444.yaml +++ b/boards/nxp/frdm_mcxc444/frdm_mcxc444.yaml @@ -15,6 +15,7 @@ toolchain: - gnuarmemb - xtools supported: + - adc - counter - flash - gpio