-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generic PWM framework driver for the PWM controller found on Phytium SoCs. Signed-off-by: xu yan <[email protected]> Signed-off-by: Chen Zhenhua <[email protected]> Signed-off-by: Wang Yinfeng <[email protected]> Signed-off-by: lanhengyu1395 <[email protected]>
- Loading branch information
xu yan
committed
May 15, 2024
1 parent
ecf00ab
commit 84cbdb1
Showing
5 changed files
with
662 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/pwm/phytium,pwm.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Phytium PWM controller | ||
|
||
maintainers: | ||
- Chen Baozi <[email protected]> | ||
|
||
allOf: | ||
- $ref: pwm.yaml# | ||
|
||
properties: | ||
compatible: | ||
const: phytium,pwm | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
clocks: | ||
description: Clock specifiers for both ipg and per clocks. | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
phytium,db: | ||
description: | | ||
One or two <cntmod dutymod div updbcly dbpolarity> to describe dead-band configurations. | ||
"cntmod" indicates the counter mode (0 for modulo, 1 for up-and-down). | ||
"dutymod" indicdates which duty to compare with (0 for PMW_CCR, 1 for FIFO). | ||
"div" selects the clock divider value, from 0 to 1023. | ||
"updbcly" selects the rising edge delay cycles. | ||
"dbpolarity" selects the polarity for dead-band. | ||
$ref: /schemas/types.yaml#/definitions/uint32-array | ||
uniqueItems: true | ||
items: | ||
minimum: 1 | ||
maximum: 2 | ||
|
||
|
||
required: | ||
- compatible | ||
- reg | ||
- clocks | ||
- interrupts | ||
- phytium,db | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
pwm0: pwm@2804a000 { | ||
compatible = "phytium,pwm"; | ||
reg= <0x0 0x2804a000 0x0 0x1000>; | ||
interrupts = <GIC_SPI 173 IRQ_TYPE_LEVEL_HIGH>; | ||
clocks = <&sysclk_48mhz>; | ||
phytium,db = <0 0 0 1000 0>; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.