Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mcxa156 usb support #82906

Merged
merged 3 commits into from
Dec 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
10 changes: 10 additions & 0 deletions dts/arm/nxp/nxp_mcxa156.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,16 @@
resolution = <32>;
status = "disabled";
};

usb: usbd@400a4000 {
compatible = "nxp,kinetis-usbd";
reg = <0x400a4000 0x1000>;
interrupts = <36 1>;
interrupt-names = "usb";
num-bidir-endpoints = <16>;
status = "disabled";
no-voltage-regulator;
};
};
};

Expand Down
1 change: 1 addition & 0 deletions samples/subsys/usb/dfu/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ common:
- frdm_kl25z
- frdm_mcxc242
- frdm_mcxc444
- frdm_mcxa156
- lpcxpresso55s69/lpc55s69/cpu0
- stm32l562e_dk/stm32l562xx/ns
depends_on: usb_device
Expand Down
Loading