Skip to content

Commit

Permalink
boards: nxp: frdm_mcxa156: Support usb for NXP frdm_mcxa156 board
Browse files Browse the repository at this point in the history
Support usb for NXP frdm_mcxa156 board.
Test it using samples/subsys/usb/console and tests/drivers/udc

Signed-off-by: Neil Chen <[email protected]>
  • Loading branch information
NeilChen93 committed Dec 12, 2024
1 parent 7bc7638 commit 73a086b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions boards/nxp/frdm_mcxa156/board.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,11 @@ static int frdm_mcxa156_init(void)
CLOCK_AttachClk(kFRO12M_to_LPTMR0);
#endif /* DT_PROP(DT_NODELABEL(lptmr0), clk_source) */

#endif

#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb))
RESET_PeripheralReset(kUSB0_RST_SHIFT_RSTn);
CLOCK_EnableUsbfsClock();
#endif

/* Set SystemCoreClock variable. */
Expand Down
2 changes: 2 additions & 0 deletions boards/nxp/frdm_mcxa156/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ The FRDM-MCXA156 board configuration supports the following hardware features:
+-----------+------------+-------------------------------------+
| PWM | on-chip | pwm |
+-----------+------------+-------------------------------------+
| USB | on-chip | USB device |
+-----------+------------+-------------------------------------+

Targets available
==================
Expand Down
5 changes: 5 additions & 0 deletions boards/nxp/frdm_mcxa156/frdm_mcxa156.dts
Original file line number Diff line number Diff line change
Expand Up @@ -117,3 +117,8 @@
&lptmr0 {
status = "okay";
};

zephyr_udc0: &usb {
status = "okay";
num-bidir-endpoints = <8>;
};
2 changes: 2 additions & 0 deletions boards/nxp/frdm_mcxa156/frdm_mcxa156.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,6 @@ supported:
- counter
- dac
- pwm
- usb_device
- usbd
vendor: nxp

0 comments on commit 73a086b

Please sign in to comment.