Commit 1a406a38 authored by Sergiu Moga's avatar Sergiu Moga Committed by Thierry Reding
Browse files

dt-bindings: pwm: Convert atmel pwm to json-schema



Convert PWM binding for Atmel/Microchip SoCs to Device Tree Schema
format.

Signed-off-by: default avatarSergiu Moga <sergiu.moga@microchip.com>
Reviewed-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
Signed-off-by: default avatarThierry Reding <thierry.reding@gmail.com>
parent bc1ce713
Loading
Loading
Loading
Loading
+42 −0
Original line number Diff line number Diff line
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
# Copyright (C) 2022 Microchip Technology, Inc. and its subsidiaries
%YAML 1.2
---
$id: http://devicetree.org/schemas/pwm/atmel,at91sam-pwm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Atmel/Microchip PWM controller

maintainers:
  - Claudiu Beznea <claudiu.beznea@microchip.com>

allOf:
  - $ref: "pwm.yaml#"

properties:
  compatible:
    enum:
      - atmel,at91sam9rl-pwm
      - atmel,sama5d3-pwm
      - atmel,sama5d2-pwm
      - microchip,sam9x60-pwm

  reg:
    maxItems: 1

  "#pwm-cells":
    const: 3

required:
  - compatible
  - reg

unevaluatedProperties: false

examples:
  - |
    pwm0: pwm@f8034000 {
        compatible = "atmel,at91sam9rl-pwm";
        reg = <0xf8034000 0x400>;
        #pwm-cells = <3>;
    };
+0 −35
Original line number Diff line number Diff line
Atmel PWM controller

Required properties:
  - compatible: should be one of:
    - "atmel,at91sam9rl-pwm"
    - "atmel,sama5d3-pwm"
    - "atmel,sama5d2-pwm"
    - "microchip,sam9x60-pwm"
  - reg: physical base address and length of the controller's registers
  - #pwm-cells: Should be 3. See pwm.yaml in this directory for a
    description of the cells format.

Example:

	pwm0: pwm@f8034000 {
		compatible = "atmel,at91sam9rl-pwm";
		reg = <0xf8034000 0x400>;
		#pwm-cells = <3>;
	};

	pwmleds {
		compatible = "pwm-leds";

		d1 {
			label = "d1";
			pwms = <&pwm0 3 5000 0>
			max-brightness = <255>;
		};

		d2 {
			label = "d2";
			pwms = <&pwm0 1 5000 1>
			max-brightness = <255>;
		};
	};
+1 −1
Original line number Diff line number Diff line
@@ -12959,7 +12959,7 @@ M: Claudiu Beznea <claudiu.beznea@microchip.com>
L:	linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
L:	linux-pwm@vger.kernel.org
S:	Supported
F:	Documentation/devicetree/bindings/pwm/atmel-pwm.txt
F:	Documentation/devicetree/bindings/pwm/atmel,at91sam-pwm.yaml
F:	drivers/pwm/pwm-atmel.c
MICROCHIP SAMA5D2-COMPATIBLE ADC DRIVER