Skip to content

Commit 4a07579

Browse files
boards: renesas: Add support USB on ek_ra8p1 and mck_ra8t2
Add support USB on Renesas ek_ra8p1 and mck_ra8t2 boards Signed-off-by: Khoa Nguyen <[email protected]>
1 parent 784683d commit 4a07579

File tree

6 files changed

+73
-0
lines changed

6 files changed

+73
-0
lines changed

boards/renesas/ek_ra8p1/ek_ra8p1-pinctrl.dtsi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,22 @@
7171
};
7272
};
7373

74+
usbhs_default: usbhs_default {
75+
group1 {
76+
psels = <RA_PSEL(RA_PSEL_USBHS, 4, 8)>; /* VBUS */
77+
drive-strength = "high";
78+
};
79+
};
80+
81+
usbfs_default: usbfs_default {
82+
group1 {
83+
psels = <RA_PSEL(RA_PSEL_USBFS, 8, 15)>, /* USB_DM */
84+
<RA_PSEL(RA_PSEL_USBFS, 8, 14)>, /* USB_DP */
85+
<RA_PSEL(RA_PSEL_USBFS, 4, 7)>; /* VBUS */
86+
drive-strength = "high";
87+
};
88+
};
89+
7490
sdram_default: sdram_default {
7591
group1 {
7692
psels = <RA_PSEL(RA_PSEL_BUS, 10, 3)>, /* SDRAM_A2 */

boards/renesas/ek_ra8p1/ek_ra8p1.dtsi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,22 @@
190190
status = "okay";
191191
};
192192

193+
&usbfs {
194+
pinctrl-0 = <&usbfs_default>;
195+
pinctrl-names = "default";
196+
maximum-speed = "full-speed";
197+
};
198+
199+
&usbhs {
200+
pinctrl-0 = <&usbhs_default>;
201+
pinctrl-names = "default";
202+
maximum-speed = "high-speed";
203+
};
204+
205+
&usbhs_phy {
206+
phys-clock-src = "xtal";
207+
};
208+
193209
&sdram {
194210
pinctrl-0 = <&sdram_default>;
195211
pinctrl-names = "default";

boards/renesas/ek_ra8p1/ek_ra8p1_r7ka8p1kflcac_cm85.dts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,3 +108,14 @@
108108
zephyr_lcdif: &lcdif {};
109109

110110
pmod_sd_shield: &sdhc0 {};
111+
112+
&usbhs {
113+
pinctrl-0 = <&usbhs_default>;
114+
interrupts = <20 12>;
115+
interrupt-names = "usbhs-ir";
116+
status = "okay";
117+
118+
zephyr_udc0: udc {
119+
status = "okay";
120+
};
121+
};

boards/renesas/mck_ra8t2/mck_ra8t2-pinctrl.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,15 @@
4040
};
4141
};
4242

43+
usbfs_default: usbfs_default {
44+
group1 {
45+
psels = <RA_PSEL(RA_PSEL_USBFS, 8, 15)>, /* USB_DM */
46+
<RA_PSEL(RA_PSEL_USBFS, 8, 14)>, /* USB_DP */
47+
<RA_PSEL(RA_PSEL_USBFS, 4, 7)>; /* VBUS */
48+
drive-strength = "high";
49+
};
50+
};
51+
4352
sdhc0_default: sdhc0_default {
4453
group1 {
4554
psels = <RA_PSEL(RA_PSEL_SDHI, 13, 7)>, /* SDCD */

boards/renesas/mck_ra8t2/mck_ra8t2.dtsi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,10 @@
8888
};
8989
};
9090

91+
&uclk {
92+
status = "okay";
93+
};
94+
9195
&flash {
9296
flash0: flash@2000000 {
9397
compatible = "soc-nv-flash";
@@ -118,3 +122,9 @@
118122
&ioportb {
119123
status = "okay";
120124
};
125+
126+
&usbfs {
127+
pinctrl-0 = <&usbfs_default>;
128+
pinctrl-names = "default";
129+
maximum-speed = "full-speed";
130+
};

boards/renesas/mck_ra8t2/mck_ra8t2_r7ka8t2lfecac_cm85.dts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,3 +91,14 @@
9191
status = "okay";
9292
};
9393
};
94+
95+
&usbfs {
96+
pinctrl-0 = <&usbfs_default>;
97+
interrupts = <16 12>, <17 12>;
98+
interrupt-names = "usbfs-i", "usbfs-r";
99+
status = "okay";
100+
101+
zephyr_udc0: udc {
102+
status = "okay";
103+
};
104+
};

0 commit comments

Comments
 (0)