Skip to content

Commit a8796ca

Browse files
MarkWangChinesekartben
authored andcommitted
boards: nxp: add uhc support for frdm_k22f, rt1060, lpc55s69 and lpc55s28
add uhc related items to dts. add clock initialization add BM4 if CONFIG_USB_UHC_NXP_KHCI is enabled add pin mux update board related CMakeLists.txt update sdk-ng CMake to include NXP controller drivers update west.yml to contain the hal_nxp pr Signed-off-by: Mark Wang <yichang.wang@nxp.com>
1 parent abfa945 commit a8796ca

File tree

23 files changed

+274
-15
lines changed

23 files changed

+274
-15
lines changed

boards/nxp/frdm_k22f/frdm_k22f.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,10 @@ zephyr_udc0: &usbotg {
178178
num-bidir-endpoints = <8>;
179179
};
180180

181+
zephyr_uhc0: &usbh {
182+
status = "okay";
183+
};
184+
181185
&gpioa {
182186
status = "okay";
183187
};

boards/nxp/lpcxpresso55s28/lpcxpresso55s28-pinctrl.dtsi

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,22 @@
4646
};
4747
};
4848

49+
pinmux_usbhfs: pinmux_usbhfs {
50+
group0 {
51+
pinmux = <USB0_VBUS_PIO0_22>,
52+
<USB0_OVERCURRENTN_PIO0_28>,
53+
<USB0_PORTPWRN_PIO1_12>;
54+
bias-pull-up;
55+
slew-rate = "standard";
56+
};
57+
};
58+
59+
pinmux_usbhhs: pinmux_usbhhs {
60+
group0 {
61+
pinmux = <USB1_OVERCURRENTN_PIO1_30>,
62+
<USB1_PORTPWRN_PIO1_29>;
63+
bias-pull-up;
64+
slew-rate = "standard";
65+
};
66+
};
4967
};

boards/nxp/lpcxpresso55s28/lpcxpresso55s28.dts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,3 +127,23 @@
127127
zephyr_udc0: &usbhs {
128128
status = "okay";
129129
};
130+
131+
zephyr_uhc0: &usbhfs {
132+
pinctrl-0 = <&pinmux_usbhfs>;
133+
pinctrl-names = "default";
134+
status = "okay";
135+
};
136+
137+
zephyr_uhc1: &usbhhs {
138+
pinctrl-0 = <&pinmux_usbhhs>;
139+
pinctrl-names = "default";
140+
status = "okay";
141+
phy_handle = <&usbphy1>;
142+
};
143+
144+
&usbphy1 {
145+
status = "okay";
146+
tx-d-cal = <5>;
147+
tx-cal-45-dp-ohms = <10>;
148+
tx-cal-45-dm-ohms = <10>;
149+
};

boards/nxp/lpcxpresso55s69/lpcxpresso55s69-pinctrl.dtsi

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* NOTE: File generated by gen_board_pinctrl.py
33
* from LPCXpresso55S69.mex
44
*
5-
* Copyright 2022 NXP
5+
* Copyright 2022,2024 NXP
66
* SPDX-License-Identifier: Apache-2.0
77
*/
88

@@ -108,4 +108,23 @@
108108
slew-rate = "standard";
109109
};
110110
};
111+
112+
pinmux_usbhfs: pinmux_usbhfs {
113+
group0 {
114+
pinmux = <USB0_VBUS_PIO0_22>,
115+
<USB0_OVERCURRENTN_PIO0_28>,
116+
<USB0_PORTPWRN_PIO1_12>;
117+
bias-pull-up;
118+
slew-rate = "standard";
119+
};
120+
};
121+
122+
pinmux_usbhhs: pinmux_usbhhs {
123+
group0 {
124+
pinmux = <USB1_OVERCURRENTN_PIO1_30>,
125+
<USB1_PORTPWRN_PIO1_29>;
126+
bias-pull-up;
127+
slew-rate = "standard";
128+
};
129+
};
111130
};

boards/nxp/lpcxpresso55s69/lpcxpresso55s69_lpc55s69_cpu0.dts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,19 @@ zephyr_udc0: &usbhs {
155155
phy-handle = <&usbphy1>;
156156
};
157157

158+
zephyr_uhc0: &usbhfs {
159+
pinctrl-0 = <&pinmux_usbhfs>;
160+
pinctrl-names = "default";
161+
status = "okay";
162+
};
163+
164+
zephyr_uhc1: &usbhhs {
165+
pinctrl-0 = <&pinmux_usbhhs>;
166+
pinctrl-names = "default";
167+
status = "okay";
168+
phy_handle = <&usbphy1>;
169+
};
170+
158171
&usbphy1 {
159172
status = "okay";
160173
tx-d-cal = <5>;

boards/nxp/mimxrt1060_evk/mimxrt1060_evk.dtsi

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,13 +188,30 @@ zephyr_udc0: &usb1 {
188188
phy-handle = <&usbphy1>;
189189
};
190190

191+
zephyr_uhc0: &usbh1 {
192+
status = "okay";
193+
phy_handle = <&usbphy1>;
194+
};
195+
196+
zephyr_uhc1: &usbh2 {
197+
status = "okay";
198+
phy_handle = <&usbphy2>;
199+
};
200+
191201
&usbphy1 {
192202
status = "okay";
193203
tx-d-cal = <12>;
194204
tx-cal-45-dp-ohms = <6>;
195205
tx-cal-45-dm-ohms = <6>;
196206
};
197207

208+
&usbphy2 {
209+
status = "okay";
210+
tx-d-cal = <12>;
211+
tx-cal-45-dp-ohms = <6>;
212+
tx-cal-45-dm-ohms = <6>;
213+
};
214+
198215
&csi {
199216
pinctrl-0 = <&pinmux_csi>;
200217
pinctrl-names = "default";

dts/arm/nxp/nxp_k2x.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
/*
22
* Copyright (c) 2018 Prevas A/S
3+
* Copyright 2024 NXP
34
*
45
* SPDX-License-Identifier: Apache-2.0
56
*/
@@ -375,6 +376,14 @@
375376
status = "disabled";
376377
};
377378

379+
usbh: usbh@40072000 {
380+
compatible = "nxp,uhc-khci";
381+
reg = <0x40072000 0x1000>;
382+
interrupts = <53 1>;
383+
interrupt-names = "usb_otg";
384+
status = "disabled";
385+
};
386+
378387
rnga: random@40029000 {
379388
compatible = "nxp,kinetis-rnga";
380389
reg = <0x40029000 0x1000>;

dts/arm/nxp/nxp_lpc55S2x_common.dtsi

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,27 @@
320320
num-bidir-endpoints = <6>;
321321
status = "disabled";
322322
};
323+
324+
usbhfs: usbhfs@A2000 {
325+
compatible = "nxp,uhc-ohci";
326+
reg = <0xa2000 0x1000>;
327+
interrupts = <28 1>;
328+
maximum-speed = "full-speed";
329+
status = "disabled";
330+
};
331+
332+
usbhhs: usbhhs@A3000 {
333+
compatible = "nxp,uhc-ip3516hs";
334+
reg = <0xa3000 0x1000>;
335+
interrupts = <47 1>;
336+
status = "disabled";
337+
};
338+
339+
usbphy1: usbphy@38000 {
340+
compatible = "nxp,usbphy";
341+
reg = <0x38000 0x1000>;
342+
status = "disabled";
343+
};
323344
};
324345

325346
&nvic {

dts/arm/nxp/nxp_lpc55S6x_common.dtsi

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,21 @@
390390
status = "disabled";
391391
};
392392

393+
usbhfs: usbhfs@A2000 {
394+
compatible = "nxp,uhc-ohci";
395+
reg = <0xa2000 0x1000>;
396+
interrupts = <28 1>;
397+
maximum-speed = "full-speed";
398+
status = "disabled";
399+
};
400+
401+
usbhhs: usbhhs@A3000 {
402+
compatible = "nxp,uhc-ip3516hs";
403+
reg = <0xa3000 0x1000>;
404+
interrupts = <47 1>;
405+
status = "disabled";
406+
};
407+
393408
usbphy1: usbphy@38000 {
394409
compatible = "nxp,usbphy";
395410
reg = <0x38000 0x1000>;

dts/arm/nxp/nxp_rt10xx.dtsi

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017,2023 NXP
2+
* Copyright 2017,2023,2024 NXP
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -846,6 +846,24 @@
846846
status = "disabled";
847847
};
848848

849+
usbh1: usbh@402e0000 {
850+
compatible = "nxp,uhc-ehci";
851+
reg = <0x402E0000 0x200>;
852+
interrupts = <113 1>;
853+
interrupt-names = "usb_otg";
854+
clocks = <&usbclk>;
855+
status = "disabled";
856+
};
857+
858+
usbh2: usbh@402e0200 {
859+
compatible = "nxp,uhc-ehci";
860+
reg = <0x402E0200 0x200>;
861+
interrupts = <112 1>;
862+
interrupt-names = "usb_otg";
863+
clocks = <&usbclk>;
864+
status = "disabled";
865+
};
866+
849867
usbphy1: usbphy@400d9000 {
850868
compatible = "nxp,usbphy";
851869
reg = <0x400D9000 0x1000>;

0 commit comments

Comments
 (0)