Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

dt-bindings: riscv: convert pwm bindings to json-schema

Convert device tree bindings for SiFive's PWM controller to YAML
format.

Signed-off-by: Sagar Kadam <sagar.kadam@sifive.com>
Link: https://lore.kernel.org/r/1601393531-2402-4-git-send-email-sagar.kadam@sifive.com
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Sagar Kadam and committed by
Rob Herring
6b49329a c825a081

+69 -33
-33
Documentation/devicetree/bindings/pwm/pwm-sifive.txt
··· 1 - SiFive PWM controller 2 - 3 - Unlike most other PWM controllers, the SiFive PWM controller currently only 4 - supports one period for all channels in the PWM. All PWMs need to run at 5 - the same period. The period also has significant restrictions on the values 6 - it can achieve, which the driver rounds to the nearest achievable period. 7 - PWM RTL that corresponds to the IP block version numbers can be found 8 - here: 9 - 10 - https://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/pwm 11 - 12 - Required properties: 13 - - compatible: Should be "sifive,<chip>-pwm" and "sifive,pwm<version>". 14 - Supported compatible strings are: "sifive,fu540-c000-pwm" for the SiFive 15 - PWM v0 as integrated onto the SiFive FU540 chip, and "sifive,pwm0" for the 16 - SiFive PWM v0 IP block with no chip integration tweaks. 17 - Please refer to sifive-blocks-ip-versioning.txt for details. 18 - - reg: physical base address and length of the controller's registers 19 - - clocks: Should contain a clock identifier for the PWM's parent clock. 20 - - #pwm-cells: Should be 3. See pwm.yaml in this directory 21 - for a description of the cell format. 22 - - interrupts: one interrupt per PWM channel 23 - 24 - Examples: 25 - 26 - pwm: pwm@10020000 { 27 - compatible = "sifive,fu540-c000-pwm", "sifive,pwm0"; 28 - reg = <0x0 0x10020000 0x0 0x1000>; 29 - clocks = <&tlclk>; 30 - interrupt-parent = <&plic>; 31 - interrupts = <42 43 44 45>; 32 - #pwm-cells = <3>; 33 - };
+69
Documentation/devicetree/bindings/pwm/pwm-sifive.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + # Copyright (C) 2020 SiFive, Inc. 3 + %YAML 1.2 4 + --- 5 + $id: http://devicetree.org/schemas/pwm/pwm-sifive.yaml# 6 + $schema: http://devicetree.org/meta-schemas/core.yaml# 7 + 8 + title: SiFive PWM controller 9 + 10 + maintainers: 11 + - Yash Shah <yash.shah@sifive.com> 12 + - Sagar Kadam <sagar.kadam@sifive.com> 13 + - Paul Walmsley <paul.walmsley@sifive.com> 14 + 15 + description: 16 + Unlike most other PWM controllers, the SiFive PWM controller currently 17 + only supports one period for all channels in the PWM. All PWMs need to 18 + run at the same period. The period also has significant restrictions on 19 + the values it can achieve, which the driver rounds to the nearest 20 + achievable period. PWM RTL that corresponds to the IP block version 21 + numbers can be found here - 22 + 23 + https://github.com/sifive/sifive-blocks/tree/master/src/main/scala/devices/pwm 24 + 25 + properties: 26 + compatible: 27 + items: 28 + - const: sifive,fu540-c000-pwm 29 + - const: sifive,pwm0 30 + description: 31 + Should be "sifive,<chip>-pwm" and "sifive,pwm<version>". Supported 32 + compatible strings are "sifive,fu540-c000-pwm" for the SiFive PWM v0 33 + as integrated onto the SiFive FU540 chip, and "sifive,pwm0" for the 34 + SiFive PWM v0 IP block with no chip integration tweaks. 35 + Please refer to sifive-blocks-ip-versioning.txt for details. 36 + 37 + reg: 38 + maxItems: 1 39 + 40 + clocks: 41 + maxItems: 1 42 + 43 + "#pwm-cells": 44 + const: 3 45 + 46 + interrupts: 47 + maxItems: 4 48 + description: 49 + Each PWM instance in FU540-C000 has 4 comparators. One interrupt per comparator. 50 + 51 + required: 52 + - compatible 53 + - reg 54 + - clocks 55 + - "#pwm-cells" 56 + - interrupts 57 + 58 + additionalProperties: false 59 + 60 + examples: 61 + - | 62 + pwm: pwm@10020000 { 63 + compatible = "sifive,fu540-c000-pwm", "sifive,pwm0"; 64 + reg = <0x10020000 0x1000>; 65 + clocks = <&tlclk>; 66 + interrupt-parent = <&plic>; 67 + interrupts = <42>, <43>, <44>, <45>; 68 + #pwm-cells = <3>; 69 + };