Commit 5f51b0ac authored by Declan Snyder's avatar Declan Snyder Committed by David Leach
Browse files

boards: frdm_mcxw71: Enable ADC and tests/sample

Enable LPADC on the FRDM_MCXW71 and add overlays for tests and sample

Signed-off-by: default avatarDeclan Snyder <declan.snyder@nxp.com>
parent c1affb98
Loading
Loading
Loading
Loading
+2 −0
Changes for boards/nxp/frdm_mcxw71/doc/index.rst: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -66,6 +66,8 @@ The ``frdm_mcxw71`` board target in Zephyr currently supports the following feat
+-----------+------------+-------------------------------------+
| VREF      | on-chip    | regulator                           |
+-----------+------------+-------------------------------------+
| LPADC     | on-chip    | adc                                 |
+-----------+------------+-------------------------------------+

Fetch Binary Blobs
******************
+10 −0
Changes for boards/nxp/frdm_mcxw71/frdm_mcxw71-pinctrl.dtsi: 10 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -58,4 +58,14 @@
			drive-strength = "low";
		};
	};

	pinmux_lpadc0: pinmux_lpadc0 {
		group0 {
			pinmux = <ADC0_A6_PTD2>,
				<ADC0_B6_PTD3>,
				<ADC0_B5_PTD1>;
			drive-strength = "low";
			slew-rate = "fast";
		};
	};
};
+6 −0
Changes for boards/nxp/frdm_mcxw71/frdm_mcxw71.dts: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -131,3 +131,9 @@
		max-bitrate = <5000000>;
	};
};

&adc0 {
	pinctrl-0 = <&pinmux_lpadc0>;
	pinctrl-names = "default";
	status = "okay";
};
+1 −0
Changes for boards/nxp/frdm_mcxw71/frdm_mcxw71.yaml: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -20,3 +20,4 @@ supported:
  - i2c
  - can
  - regulator
  - adc
+29 −0
Changes for samples/drivers/adc/adc_dt/boards/frdm_mcxw71.overlay: 29 added lines, 0 removed lines.
Original line number Diff line number Diff line
/*
 * Copyright 2024 NXP
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr/dt-bindings/adc/adc.h>
#include <zephyr/dt-bindings/adc/mcux-lpadc.h>

/ {
	zephyr,user {
		io-channels = <&adc0 0>;
	};
};

&adc0 {
	#address-cells = <1>;
	#size-cells = <0>;

	channel@0 {
		reg = <0>;
		zephyr,gain = "ADC_GAIN_1";
		zephyr,reference = "ADC_REF_EXTERNAL1";
		zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
		zephyr,resolution = <12>;
		zephyr,vref-mv = <1800>;
		/* channel 2 signal 6A */
		zephyr,input-positive = <MCUX_LPADC_CH2A>;
	};
};
Loading