-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'pwm/for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/ker…
…nel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This rather small set of changes includes some minor fixes and improvements. The AB8500 driver gained support for reading the initial hardware state and the Synopsys DesignWare driver received some work to prepare for device tree and platform support" * tag 'pwm/for-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: pwm: dwc: Use devm_pwmchip_add() pwm: dwc: Move memory allocation to own function pwm: dwc: Change &pci->dev to dev in probe dt-bindings: pwm: Document Synopsys DesignWare snps,pwm-dw-apb-timers-pwm2 pwm: iqs620a: Replace one remaining instance of regmap_update_bits() pwm: ab8500: Implement .get_state() pwm: ab8500: Fix calculation of duty and period pwm: lp3943: Drop unused i2c include dt-bindings: pwm: mediatek: Convert pwm-mediatek to DT schema pwm: stm32-lp: fix the check on arr and cmp registers update pwm: Move pwm_capture() dummy to restore order pwm: sifive: Always let the first pwm_apply_state succeed
- Loading branch information
Showing
10 changed files
with
302 additions
and
90 deletions.
There are no files selected for viewing
93 changes: 93 additions & 0 deletions
93
Documentation/devicetree/bindings/pwm/mediatek,mt2712-pwm.yaml
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,93 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/pwm/mediatek,mt2712-pwm.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: MediaTek PWM Controller | ||
|
||
maintainers: | ||
- John Crispin <john@phrozen.org> | ||
|
||
allOf: | ||
- $ref: pwm.yaml# | ||
|
||
properties: | ||
compatible: | ||
oneOf: | ||
- enum: | ||
- mediatek,mt2712-pwm | ||
- mediatek,mt6795-pwm | ||
- mediatek,mt7622-pwm | ||
- mediatek,mt7623-pwm | ||
- mediatek,mt7628-pwm | ||
- mediatek,mt7629-pwm | ||
- mediatek,mt8183-pwm | ||
- mediatek,mt8365-pwm | ||
- mediatek,mt8516-pwm | ||
- items: | ||
- enum: | ||
- mediatek,mt8195-pwm | ||
- const: mediatek,mt8183-pwm | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
"#pwm-cells": | ||
const: 2 | ||
|
||
interrupts: | ||
maxItems: 1 | ||
|
||
clocks: | ||
minItems: 2 | ||
maxItems: 10 | ||
|
||
clock-names: | ||
description: | ||
This controller needs two input clocks for its core and one | ||
clock for each PWM output. | ||
minItems: 2 | ||
items: | ||
- const: top | ||
- const: main | ||
- const: pwm1 | ||
- const: pwm2 | ||
- const: pwm3 | ||
- const: pwm4 | ||
- const: pwm5 | ||
- const: pwm6 | ||
- const: pwm7 | ||
- const: pwm8 | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- "#pwm-cells" | ||
- clocks | ||
- clock-names | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
#include <dt-bindings/interrupt-controller/arm-gic.h> | ||
#include <dt-bindings/clock/mt2712-clk.h> | ||
#include <dt-bindings/interrupt-controller/irq.h> | ||
pwm0: pwm@11006000 { | ||
compatible = "mediatek,mt2712-pwm"; | ||
reg = <0x11006000 0x1000>; | ||
#pwm-cells = <2>; | ||
interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>; | ||
clocks = <&topckgen CLK_TOP_PWM_SEL>, <&pericfg CLK_PERI_PWM>, | ||
<&pericfg CLK_PERI_PWM0>, <&pericfg CLK_PERI_PWM1>, | ||
<&pericfg CLK_PERI_PWM2>, <&pericfg CLK_PERI_PWM3>, | ||
<&pericfg CLK_PERI_PWM4>, <&pericfg CLK_PERI_PWM5>, | ||
<&pericfg CLK_PERI_PWM6>, <&pericfg CLK_PERI_PWM7>; | ||
clock-names = "top", "main", | ||
"pwm1", "pwm2", | ||
"pwm3", "pwm4", | ||
"pwm5", "pwm6", | ||
"pwm7", "pwm8"; | ||
}; |
This file was deleted.
Oops, something went wrong.
68 changes: 68 additions & 0 deletions
68
Documentation/devicetree/bindings/pwm/snps,dw-apb-timers-pwm2.yaml
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,68 @@ | ||
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
# Copyright (C) 2022 SiFive, Inc. | ||
%YAML 1.2 | ||
--- | ||
$id: http://devicetree.org/schemas/pwm/snps,dw-apb-timers-pwm2.yaml# | ||
$schema: http://devicetree.org/meta-schemas/core.yaml# | ||
|
||
title: Synopsys DW-APB timers PWM controller | ||
|
||
maintainers: | ||
- Ben Dooks <ben.dooks@sifive.com> | ||
|
||
description: | ||
This describes the DesignWare APB timers module when used in the PWM | ||
mode. The IP core can be generated with various options which can | ||
control the functionality, the number of PWMs available and other | ||
internal controls the designer requires. | ||
|
||
The IP block has a version register so this can be used for detection | ||
instead of having to encode the IP version number in the device tree | ||
comaptible. | ||
|
||
allOf: | ||
- $ref: pwm.yaml# | ||
|
||
properties: | ||
compatible: | ||
const: snps,dw-apb-timers-pwm2 | ||
|
||
reg: | ||
maxItems: 1 | ||
|
||
"#pwm-cells": | ||
const: 3 | ||
|
||
clocks: | ||
items: | ||
- description: Interface bus clock | ||
- description: PWM reference clock | ||
|
||
clock-names: | ||
items: | ||
- const: bus | ||
- const: timer | ||
|
||
snps,pwm-number: | ||
$ref: /schemas/types.yaml#/definitions/uint32 | ||
description: The number of PWM channels configured for this instance | ||
enum: [1, 2, 3, 4, 5, 6, 7, 8] | ||
|
||
required: | ||
- compatible | ||
- reg | ||
- "#pwm-cells" | ||
- clocks | ||
- clock-names | ||
|
||
additionalProperties: false | ||
|
||
examples: | ||
- | | ||
pwm: pwm@180000 { | ||
compatible = "snps,dw-apb-timers-pwm2"; | ||
reg = <0x180000 0x200>; | ||
#pwm-cells = <3>; | ||
clocks = <&bus>, <&timer>; | ||
clock-names = "bus", "timer"; | ||
}; |
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.