Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: pwm: Add Intel PCH blinky PWM driver #59769

Merged
merged 3 commits into from
Jul 12, 2023

Conversation

akanisetti
Copy link
Collaborator

Submitting this PR for review for new PWM driver for the IP found in multiple intel PCH hardwares.
This PR includes commits for
a) The driver code
b) dts node for pwm
c) enable pwm_api test for rpl_crb

we can verify using "west build -b rpl_crb tests/drivers/pwm/pwm_api/"

drivers/pwm/pwm_intel_blinky.c Outdated Show resolved Hide resolved
drivers/pwm/Kconfig.intel_blinky Outdated Show resolved Hide resolved
Comment on lines 14 to 15
hex "PWM intel control register offset"
default 0x304
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be specified in devicetree instead?

Copy link
Collaborator Author

@akanisetti akanisetti Jul 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will move this to soc.h

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @henrikbrixandersen, I have added "reg-offset" property to send it through device tree.

#
# SPDX-License-Identifier: Apache-2.0

description: INTEL BLINKY PWM
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All upper-case intended?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I will change this to lower case.

Comment on lines +15 to +23
clock-frequency:
type: int
required: true
description: PWM Peripheral Clock frequency in Hz
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need for an input clock (e.g. having a clocks property)?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clocks is of type "phandle-array" but here I just need to mention IP frequency, so this clock frequency is needed.

@akanisetti akanisetti force-pushed the intel_blinky_pwm branch 3 times, most recently from e22e788 to 2a16587 Compare July 6, 2023 06:05
This patch adds support for PWM blink which is found in intel's
PCH hardwares.

Signed-off-by: Anisetti Avinash Krishna <[email protected]>
Adds pwm node for intel raptorlake pch pwm blink IP

Signed-off-by: Anisetti Avinash Krishna <[email protected]>
jhedberg
jhedberg previously approved these changes Jul 12, 2023
Enable pwm api test for intel blinky on rpl_crb board.

Signed-off-by: Anisetti Avinash Krishna <[email protected]>
finikorg
finikorg previously approved these changes Jul 12, 2023
@jhedberg jhedberg merged commit c9cd273 into zephyrproject-rtos:main Jul 12, 2023
18 checks passed
@akanisetti akanisetti deleted the intel_blinky_pwm branch September 5, 2023 04:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree Binding PR modifies or adds a Device Tree binding area: PWM Pulse Width Modulation platform: X86 x86 and x86-64
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants