samples: pwm for stm32l073 and stm32f091 nucleo boards

The overlay are defined to run the samples application with PWM
feature on the nucleo_l073rz,nucleo_f091rc, nucleo_g474re

Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit is contained in:
Francois Ramu 2022-03-04 12:30:20 +01:00 committed by Anas Nashif
parent 08e3ce0ebc
commit 2620c53771
4 changed files with 132 additions and 0 deletions

View file

@ -0,0 +1,33 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2022 STMicroelectronics
*/
#include <dt-bindings/pwm/pwm.h>
/ {
pwmleds {
compatible = "pwm-leds";
green_pwm_led: green_pwm_led {
pwms = <&pwm2 1 4 PWM_POLARITY_NORMAL>;
};
};
aliases {
pwm-led0 = &green_pwm_led;
};
};
&timers2 {
st,prescaler = <10000>;
status = "okay";
pwm2: pwm {
status = "okay";
pinctrl-0 = <&tim2_ch1_pa5>; /* might conflict with SPI1 */
pinctrl-names = "default";
};
};

View file

@ -0,0 +1,33 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2022 STMicroelectronics
*/
#include <dt-bindings/pwm/pwm.h>
/ {
pwmleds {
compatible = "pwm-leds";
green_pwm_led: green_pwm_led {
pwms = <&pwm2 1 4 PWM_POLARITY_NORMAL>;
};
};
aliases {
pwm-led0 = &green_pwm_led;
};
};
&timers2 {
st,prescaler = <10000>;
status = "okay";
pwm2: pwm {
status = "okay";
pinctrl-0 = <&tim2_ch1_pa5>; /* might conflict with SPI1 */
pinctrl-names = "default";
};
};

View file

@ -0,0 +1,33 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2022 STMicroelectronics
*/
#include <dt-bindings/pwm/pwm.h>
/ {
pwmleds {
compatible = "pwm-leds";
green_pwm_led: green_pwm_led {
pwms = <&pwm2 1 4 PWM_POLARITY_NORMAL>;
};
};
aliases {
pwm-led0 = &green_pwm_led;
};
};
&timers2 {
st,prescaler = <10000>;
status = "okay";
pwm2: pwm {
status = "okay";
pinctrl-0 = <&tim2_ch1_pa5>; /* might conflict with SPI1 */
pinctrl-names = "default";
};
};

View file

@ -0,0 +1,33 @@
/*
* SPDX-License-Identifier: Apache-2.0
*
* Copyright (c) 2022 STMicroelectronics
*/
#include <dt-bindings/pwm/pwm.h>
/ {
pwmleds {
compatible = "pwm-leds";
green_pwm_led: green_pwm_led {
pwms = <&pwm2 1 4 PWM_POLARITY_NORMAL>;
};
};
aliases {
pwm-led0 = &green_pwm_led;
};
};
&timers2 {
st,prescaler = <10000>;
status = "okay";
pwm2: pwm {
status = "okay";
pinctrl-0 = <&tim2_ch1_pa5>; /* might conflict with SPI1 */
pinctrl-names = "default";
};
};