boards: nucleo_g0b1 add timers, move spi2, nucleo_g474, add timers

nucleo_g0b1re:
removes spi2 from arduino header pins to ST morpho pins in order to
free pins for other peripherals.
Adds tim15 with pwm on pb14, changes tim3 pwm to pb4.
As a result timers are available on arduino pins D5 and D6.

nucleo g474re:
Adds timer 3 with pwm  pin on pb4 and changes tim2 pwm pin
from pa5 to pb10.
As a result timers are available on arduino pins D5 and D6.

Use default prescaler (==1) for 32-bit timer and
10.001 for 16-bit timers as these are commonly used.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
This commit is contained in:
Thomas Stranger 2021-03-30 17:53:13 +02:00 committed by Christopher Friedt
commit 405c6977bf
2 changed files with 22 additions and 4 deletions

View file

@ -90,7 +90,16 @@
pwm3: pwm {
status = "okay";
st,prescaler = <10000>;
pinctrl-0 = <&tim3_ch1_pa6>;
pinctrl-0 = <&tim3_ch1_pb4>;
};
};
&timers15 {
status = "okay";
pwm15: pwm {
status = "okay";
st,prescaler = <10000>;
pinctrl-0 = <&tim15_ch1_pb14>;
};
};
@ -113,8 +122,8 @@
};
&spi2 {
pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13
&spi2_miso_pb14 &spi2_mosi_pb15>;
pinctrl-0 = <&spi2_nss_pd0 &spi2_sck_pd1
&spi2_miso_pd3 &spi2_mosi_pd4>;
status = "okay";
};

View file

@ -116,7 +116,16 @@
pwm2: pwm {
status = "okay";
pinctrl-0 = <&tim2_ch1_pa5>;
pinctrl-0 = <&tim2_ch3_pb10>;
};
};
&timers3 {
status = "okay";
pwm3: pwm {
status = "okay";
st,prescaler = <10000>;
pinctrl-0 = <&tim3_ch1_pb4>;
};
};