Documentation / devicetree / bindings / pwm / sophgo,sg2042-pwm.yaml


Based on kernel version 6.15. Page generated on 2025-05-29 09:09 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/pwm/sophgo,sg2042-pwm.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Sophgo SG2042 PWM controller

maintainers:
  - Chen Wang <unicorn_wang@outlook.com>

description:
  This controller contains 4 channels which can generate PWM waveforms.

allOf:
  - $ref: pwm.yaml#

properties:
  compatible:
    const: sophgo,sg2042-pwm

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  clock-names:
    items:
      - const: apb

  resets:
    maxItems: 1
 
  "#pwm-cells":
    const: 3

required:
  - compatible
  - reg
  - clocks
  - clock-names
  - resets

unevaluatedProperties: false

examples:
  - |
    #include <dt-bindings/reset/sophgo,sg2042-reset.h>
 
    pwm@7f006000 {
        compatible = "sophgo,sg2042-pwm";
        reg = <0x7f006000 0x1000>;
        #pwm-cells = <3>;
        clocks = <&clock 67>;
        clock-names = "apb";
        resets = <&rstgen RST_PWM>;
    };