Skip to content

Commit a614d15

Browse files
NeilChen93kartben
authored andcommitted
boards: nxp: frdm_mcxa156: Support usb for NXP frdm_mcxa156 board
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]>
1 parent 725c28e commit a614d15

File tree

4 files changed

+14
-0
lines changed

4 files changed

+14
-0
lines changed

boards/nxp/frdm_mcxa156/board.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,11 @@ static int frdm_mcxa156_init(void)
154154
CLOCK_AttachClk(kFRO12M_to_LPTMR0);
155155
#endif /* DT_PROP(DT_NODELABEL(lptmr0), clk_source) */
156156

157+
#endif
158+
159+
#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(usb))
160+
RESET_PeripheralReset(kUSB0_RST_SHIFT_RSTn);
161+
CLOCK_EnableUsbfsClock();
157162
#endif
158163

159164
/* Set SystemCoreClock variable. */

boards/nxp/frdm_mcxa156/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ The FRDM-MCXA156 board configuration supports the following hardware features:
6464
+-----------+------------+-------------------------------------+
6565
| PWM | on-chip | pwm |
6666
+-----------+------------+-------------------------------------+
67+
| USB | on-chip | USB device |
68+
+-----------+------------+-------------------------------------+
6769

6870
Targets available
6971
==================

boards/nxp/frdm_mcxa156/frdm_mcxa156.dts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,8 @@
117117
&lptmr0 {
118118
status = "okay";
119119
};
120+
121+
zephyr_udc0: &usb {
122+
status = "okay";
123+
num-bidir-endpoints = <8>;
124+
};

boards/nxp/frdm_mcxa156/frdm_mcxa156.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ supported:
2121
- counter
2222
- dac
2323
- pwm
24+
- usb_device
25+
- usbd
2426
vendor: nxp

0 commit comments

Comments
 (0)