Amlogic PWM

Schema identifier ($id): "http://devicetree.org/schemas/pwm/pwm-amlogic.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Heiner Kallweit <hkallweit1@gmail.com>"

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Allowed values (enum): "amlogic,meson8b-pwm", "amlogic,meson-gxbb-pwm", "amlogic,meson-gxbb-ao-pwm", "amlogic,meson-axg-ee-pwm", "amlogic,meson-axg-ao-pwm", "amlogic,meson-g12a-ee-pwm", "amlogic,meson-g12a-ao-pwm-ab", "amlogic,meson-g12a-ao-pwm-cd"

Deprecated (deprecated): true

Rule 2

Array item rules (items)

Item 1

Exact value (const): "amlogic,meson-gx-pwm"

Item 2

Exact value (const): "amlogic,meson-gxbb-pwm"

Deprecated (deprecated): true

Rule 3

Array item rules (items)

Item 1

Exact value (const): "amlogic,meson-gx-ao-pwm"

Item 2

Exact value (const): "amlogic,meson-gxbb-ao-pwm"

Deprecated (deprecated): true

Rule 4

Array item rules (items)

Item 1

Exact value (const): "amlogic,meson8-pwm"

Item 2

Exact value (const): "amlogic,meson8b-pwm"

Deprecated (deprecated): true

Rule 5

Allowed values (enum): "amlogic,meson8-pwm-v2", "amlogic,meson-s4-pwm"

Rule 6

Array item rules (items)

Item 1

Allowed values (enum): "amlogic,c3-pwm", "amlogic,meson-a1-pwm"

Item 2

Exact value (const): "amlogic,meson-s4-pwm"

Rule 7

Array item rules (items)

Item 1

Allowed values (enum): "amlogic,meson8b-pwm-v2", "amlogic,meson-gxbb-pwm-v2", "amlogic,meson-axg-pwm-v2", "amlogic,meson-g12-pwm-v2"

Item 2

Exact value (const): "amlogic,meson8-pwm-v2"

reg — required here #

Maximum number of items (maxItems): 1

clocks — not listed as required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 4

clock-names — not listed as required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

power-domains — not listed as required here #

Maximum number of items (maxItems): 1

#pwm-cells — not listed as required here #

Exact value (const): 3

Required in this object (required): "compatible", "reg"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): pwm.yaml#

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "amlogic,meson8-pwm", "amlogic,meson8b-pwm", "amlogic,meson-gxbb-pwm", "amlogic,meson-gxbb-ao-pwm", "amlogic,meson-axg-ee-pwm", "amlogic,meson-axg-ao-pwm", "amlogic,meson-g12a-ee-pwm", "amlogic,meson-g12a-ao-pwm-ab", "amlogic,meson-g12a-ao-pwm-cd"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — not listed as required here

Maximum number of items (maxItems): 2

clock-names — not listed as required here

Exactly one of these rules must match (oneOf)

Rule 1

Array item rules (items)

Item 1

Allowed values (enum): "clkin0", "clkin1"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "clkin0"

Item 2

Exact value (const): "clkin1"

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "amlogic,meson8-pwm-v2"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — required here

Minimum number of items (minItems): 1

Array item rules (items)

Item 1

input clock 0 of the pwm block

Item 2

input clock 1 of the pwm block

Item 3

input clock 2 of the pwm block

Item 4

input clock 3 of the pwm block

clock-names — not listed as required here

false — Not permitted by this property rule.

Required in this object (required): "clocks"

Rule 4 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "amlogic,meson-s4-pwm"

When the condition matches (then) #

Properties and child nodes (properties)

clocks — required here

Array item rules (items)

Item 1

input clock of PWM channel A

Item 2

input clock of PWM channel B

clock-names — not listed as required here

false — Not permitted by this property rule.

Required in this object (required): "clocks"

Rule 5 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "amlogic,meson-a1-pwm"

When the condition matches (then) #

Required in this object (required): "power-domains"

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

pwm@8550 {
  compatible = "amlogic,meson-gxbb-pwm";
  reg = <0x08550 0x10>;
  clocks = <&xtal>, <&xtal>;
  clock-names = "clkin0", "clkin1";
  #pwm-cells = <3>;
};
pwm@2000 {
  compatible = "amlogic,meson8-pwm-v2";
  reg = <0x1000 0x10>;
  clocks = <&xtal>, <0>, <&fdiv4>, <&fdiv5>;
  #pwm-cells = <3>;
};
pwm@1000 {
  compatible = "amlogic,meson-s4-pwm";
  reg = <0x1000 0x10>;
  clocks = <&pwm_src_a>, <&pwm_src_b>;
  #pwm-cells = <3>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Line 92: Obsolete historic bindings tied to the driver implementation

Line 93: The clocks provided here are meant to be matched with the input

Line 94: known (hard-coded) in the driver and used to select pwm clock

Line 95: source. Currently, the linux driver ignores this.

Line 96: This is kept to maintain ABI backward compatibility.

Line 108: Newer binding where clock describe the actual clock inputs of the pwm

Line 109: block. These are necessary but some inputs may be grounded.

Line 129: Newer IP block take a single input per channel, instead of 4 inputs

Line 130: for both channels

Edit this page