Skip to content

Commit 2702192

Browse files
jsbatchkartben
authored andcommitted
Samples: basic: blinky_pwm: Add support for cyw920829m2evk_02 board
Origin: Zephyr OS License: Apache-2.0 URL: https://github.com/zephyrproject-rtos/zephyr/blame/main/samples/basic/fade_led/boards/cyw920829m2evk_02.overlay commit: abca729 Purpose: Add overlay to enable and configure PWM device on IFX CYW920829M2EVK-02 board. Signed-off-by: John Batch <[email protected]>
1 parent 4aa1ac9 commit 2702192

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* SPDX-License-Identifier: Apache-2.0
3+
*
4+
* Copyright (c) 2024 Cypress Semiconductor Corporation (an Infineon company) or
5+
* an affiliate of Cypress Semiconductor Corporation
6+
*/
7+
8+
#include <zephyr/dt-bindings/pwm/pwm.h>
9+
#include <zephyr/dt-bindings/pwm/pwm_ifx_cat1.h>
10+
11+
/ {
12+
aliases {
13+
pwm-led0 = &pwm_led0;
14+
};
15+
16+
pwmleds {
17+
compatible = "pwm-leds";
18+
pwm_led0: pwm_led_0 {
19+
pwms = <&pwm0_0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
20+
label = "PWM MB1";
21+
};
22+
};
23+
};
24+
25+
&pwm0_0 {
26+
status = "okay";
27+
pinctrl-0 = <&p1_1_pwm0_0>;
28+
pinctrl-names = "default";
29+
divider-type = <CY_SYSCLK_DIV_16_BIT>;
30+
divider-sel = <1>;
31+
divider-val = <9599>;
32+
};
33+
34+
35+
&pinctrl {
36+
p1_1_pwm0_0: p1_1_pwm0_0 {
37+
drive-push-pull;
38+
};
39+
};

0 commit comments

Comments
 (0)