drivers: usb: udc: change numaker m46x usbd clock source to hirc48m

Change NuMaker M463/M467 series USBD clock source to HIRC48M.
This makes core-clock and its clock source PLL not required
to be multiple of 48MHz.

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
This commit is contained in:
Chun-Chieh Li 2024-07-30 14:56:13 +08:00 committed by Anas Nashif
commit 9cf4e1aae5
2 changed files with 4 additions and 5 deletions

View file

@ -65,8 +65,6 @@
}; };
&scc { &scc {
/* For USB 1.1 Host/Device/OTG, configure to 192MHz, which can generate necessary 48MHz. */
/* For USB 2.0 Host/Device/OTG or no USB application, comment out to use default. */
core-clock = <192000000>; core-clock = <192000000>;
}; };
@ -122,7 +120,7 @@
status = "okay"; status = "okay";
}; };
/* On enabled, 'core-clock', as above, is required to be 192MHz. */ /* On enabled, usbd is required to be clocked in 48MHz. */
zephyr_udc0: &usbd { zephyr_udc0: &usbd {
pinctrl-0 = <&usbd_default>; pinctrl-0 = <&usbd_default>;
pinctrl-names = "default"; pinctrl-names = "default";

View file

@ -51,6 +51,7 @@
#clock-cells = <0>; #clock-cells = <0>;
/* hxt = "enable"; */ /* hxt = "enable"; */
lxt = "enable"; lxt = "enable";
hirc48m = "enable";
clk-pclkdiv = <(NUMAKER_CLK_PCLKDIV_APB0DIV_DIV2 | clk-pclkdiv = <(NUMAKER_CLK_PCLKDIV_APB0DIV_DIV2 |
NUMAKER_CLK_PCLKDIV_APB1DIV_DIV2)>; NUMAKER_CLK_PCLKDIV_APB1DIV_DIV2)>;
core-clock = <200000000>; core-clock = <200000000>;
@ -606,8 +607,8 @@
reg = <0x400c0000 0x1000>; reg = <0x400c0000 0x1000>;
interrupts = <53 0>; interrupts = <53 0>;
resets = <&rst NUMAKER_USBD_RST>; resets = <&rst NUMAKER_USBD_RST>;
clocks = <&pcc NUMAKER_USBD_MODULE NUMAKER_CLK_CLKSEL0_USBSEL_PLL_DIV2 clocks = <&pcc NUMAKER_USBD_MODULE NUMAKER_CLK_CLKSEL0_USBSEL_HIRC48M
NUMAKER_CLK_CLKDIV0_USB(2)>; NUMAKER_CLK_CLKDIV0_USB(1)>;
dma-buffer-size = <1536>; dma-buffer-size = <1536>;
status = "disabled"; status = "disabled";
num-bidir-endpoints = <25>; num-bidir-endpoints = <25>;