Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions boards/microchip/sam/sam_e54_xpro/sam_e54_xpro-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,10 @@
<PB24D_SERCOM2_PAD1>;
};
};

tcc0_pwm_default: tcc0_pwm_default {
group1 {
pinmux = <PC18F_TCC0_WO2>;
};
};
};
24 changes: 24 additions & 0 deletions boards/microchip/sam/sam_e54_xpro/sam_e54_xpro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,19 @@
zephyr,sram = &sram0;
zephyr,flash = &flash0;
};

aliases {
pwm-led0 = &pwm_led0;
};

pwmleds {
compatible = "pwm-leds";

pwm_led0: pwm_led_0 {
status = "okay";
pwms = <&tcc0 2 PWM_MSEC(20) 0>;
};
};
};

&flash0 {
Expand Down Expand Up @@ -60,3 +73,14 @@
pinctrl-0 = <&sercom2_uart_default>;
pinctrl-names = "default";
};

&tcc0 {
compatible = "microchip,tcc-g1-pwm";
status = "okay";
#pwm-cells = <3>;
pinctrl-0 = <&tcc0_pwm_default>;
pinctrl-names = "default";
max-bit-width = <24>;
prescaler = <8>;
channels = <6>;
};
1 change: 1 addition & 0 deletions boards/microchip/sam/sam_e54_xpro/sam_e54_xpro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ flash: 1024
ram: 256
supported:
- pinctrl
- pwm
- shell
- uart
vendor: microchip
1 change: 1 addition & 0 deletions drivers/pwm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ zephyr_library_sources_ifdef(CONFIG_PWM_BBLED_XEC pwm_mchp_xec_bbled.c)
zephyr_library_sources_ifdef(CONFIG_PWM_INTEL_BLINKY pwm_intel_blinky.c)
zephyr_library_sources_ifdef(CONFIG_PWM_XMC4XXX_CCU4 pwm_xmc4xxx_ccu4.c)
zephyr_library_sources_ifdef(CONFIG_PWM_XMC4XXX_CCU8 pwm_xmc4xxx_ccu8.c)
zephyr_library_sources_ifdef(CONFIG_PWM_MCHP_G1_TCC pwm_mchp_tcc_g1.c)
zephyr_library_sources_ifdef(CONFIG_PWM_MCUX_CTIMER pwm_mcux_ctimer.c)
zephyr_library_sources_ifdef(CONFIG_PWM_MSPM0 pwm_mspm0.c)
zephyr_library_sources_ifdef(CONFIG_PWM_NUMAKER pwm_numaker.c)
Expand Down
2 changes: 2 additions & 0 deletions drivers/pwm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ source "drivers/pwm/Kconfig.xmc4xxx_ccu4"

source "drivers/pwm/Kconfig.xmc4xxx_ccu8"

source "drivers/pwm/Kconfig.mchp"

source "drivers/pwm/Kconfig.mcux_ctimer"

source "drivers/pwm/Kconfig.mspm0"
Expand Down
14 changes: 14 additions & 0 deletions drivers/pwm/Kconfig.mchp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) 2025 Microchip Technology Inc.
# SPDX-License-Identifier: Apache-2.0

menu "Microchip PWM Drivers"

config PWM_MCHP_G1_TCC
bool "Microchip TCC G1 PWM driver"
default y
depends on DT_HAS_MICROCHIP_TCC_G1_PWM_ENABLED
select PINCTRL
help
Enable the Microchip Pulse Width Modulation(PWM) driver.

endmenu
Loading
Loading