boards: stm32f1: Check usbpre/otgfspre based on sysclk freq.

If sysclk is set to 72MHz, USB prescaler should be not be set in
order to achieve 48MHz USB clock.

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
This commit is contained in:
Erwan Gouriou 2022-12-21 13:17:07 +01:00 committed by Carles Cufí
commit c385144070
5 changed files with 5 additions and 0 deletions

View file

@ -58,6 +58,7 @@
ahb-prescaler = <1>; ahb-prescaler = <1>;
apb1-prescaler = <2>; apb1-prescaler = <2>;
apb2-prescaler = <1>; apb2-prescaler = <1>;
/* usbpre not set: USB clock = 72 / 1.5: 48MHz */
}; };
&usart1 { &usart1 {

View file

@ -73,6 +73,7 @@
ahb-prescaler = <1>; ahb-prescaler = <1>;
apb1-prescaler = <2>; apb1-prescaler = <2>;
apb2-prescaler = <1>; apb2-prescaler = <1>;
/* usbpre not set: USB clock = 72 / 1.5: 48MHz */
}; };
uext_i2c: &i2c2 {}; uext_i2c: &i2c2 {};

View file

@ -50,6 +50,7 @@
ahb-prescaler = <1>; ahb-prescaler = <1>;
apb1-prescaler = <2>; apb1-prescaler = <2>;
apb2-prescaler = <1>; apb2-prescaler = <1>;
/* usbpre not set: USB clock = 72 / 1.5: 48MHz */
}; };
&usart1 { &usart1 {

View file

@ -54,6 +54,7 @@
ahb-prescaler = <1>; ahb-prescaler = <1>;
apb1-prescaler = <2>; apb1-prescaler = <2>;
apb2-prescaler = <1>; apb2-prescaler = <1>;
/* usbpre not set: USB clock = 72 / 1.5: 48MHz */
}; };
&usart1 { &usart1 {

View file

@ -95,6 +95,7 @@
ahb-prescaler = <1>; ahb-prescaler = <1>;
apb1-prescaler = <2>; apb1-prescaler = <2>;
apb2-prescaler = <1>; apb2-prescaler = <1>;
/* usbpre not set: USB clock = 72 / 1.5: 48MHz */
}; };
&usart1 { &usart1 {