Commit ea8eea4d authored by Zhaoxiang Jin's avatar Zhaoxiang Jin Committed by David Leach
Browse files

boards: nxp/frdm_mcxn947: Support LPCMP for NXP frdm_mcxn947 board



Support LPCMP for NXP frdm_mcxn947 board

Signed-off-by: default avatarZhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
parent c4cba91d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -268,6 +268,12 @@ static int frdm_mcxn947_init(void)
	USB_EhciPhyInit(kUSB_ControllerEhci0, BOARD_XTAL0_CLK_HZ, &usbPhyConfig);
#endif

#if DT_NODE_HAS_STATUS(DT_NODELABEL(lpcmp0), okay)
	CLOCK_SetClkDiv(kCLOCK_DivCmp0FClk, 1U);
	CLOCK_AttachClk(kFRO12M_to_CMP0F);
	SPC_EnableActiveModeAnalogModules(SPC0, (kSPC_controlCmp0 | kSPC_controlCmp0Dac));
#endif

	/* Set SystemCoreClock variable. */
	SystemCoreClock = CLOCK_INIT_CORE_CLOCK;

+2 −0
Original line number Diff line number Diff line
@@ -90,6 +90,8 @@ The FRDM-MCXN947 board configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| USBHS     | on-chip    | USB device                          |
+-----------+------------+-------------------------------------+
| LPCMP     | on-chip    | sensor(comparator)                  |
+-----------+------------+-------------------------------------+

Targets available
==================
+9 −0
Original line number Diff line number Diff line
@@ -157,4 +157,13 @@
			drive-strength = "low";
		};
	};

	pinmux_lpcmp0: pinmux_lpcmp0 {
		group0 {
			pinmux = <CMP0_IN0_PIO1_0>;
			drive-strength = "low";
			slew-rate = "fast";
			bias-pull-up;
		};
	};
};
+5 −0
Original line number Diff line number Diff line
@@ -191,3 +191,8 @@
	pinctrl-0 = <&pinmux_lpadc0>;
	pinctrl-names = "default";
};

&lpcmp0 {
	pinctrl-0 = <&pinmux_lpcmp0>;
	pinctrl-names = "default";
};
+4 −0
Original line number Diff line number Diff line
@@ -165,3 +165,7 @@
zephyr_udc0: &usb1 {
	status = "okay";
};

&lpcmp0 {
	status = "okay";
};