Samsung SoC PWM timers

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

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

Maintainers (maintainers): "Thierry Reding <thierry.reding@gmail.com>", "Krzysztof Kozlowski <krzk@kernel.org>"

Samsung SoCs contain PWM timer blocks which can be used for system clock source and clock event timers, as well as to drive SoC outputs with PWM signal. Each PWM timer block provides 5 PWM channels (not all of them can drive physical outputs - see SoC and board manual).

Be aware that the clocksource driver supports only uniprocessor systems.

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Allowed values (enum): "samsung,s3c2410-pwm", "samsung,s3c6400-pwm", "samsung,s5p6440-pwm", "samsung,s5pc100-pwm", "samsung,exynos4210-pwm"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "samsung,exynos5433-pwm", "samsung,exynos7-pwm", "samsung,exynos8890-pwm", "samsung,exynosautov9-pwm", "samsung,exynosautov920-pwm", "tesla,fsd-pwm"

Item 2

Exact value (const): "samsung,exynos4210-pwm"

reg — required here #

Maximum number of items (maxItems): 1

clocks — required here #

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 3

clock-names — required here #

Should contain all following required clock names: - "timers" - PWM base clock used to generate PWM signals, and any subset of following optional clock names: - "pwm-tclk0" - first external PWM clock source, - "pwm-tclk1" - second external PWM clock source. Note that not all IP variants allow using all external clock sources. Refer to SoC documentation to learn which clock source configurations are available.

Exactly one of these rules must match (oneOf) #

Rule 1

Array item rules (items)

Item 1

Exact value (const): "timers"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "timers"

Item 2

Exact value (const): "pwm-tclk0"

Rule 3

Array item rules (items)

Item 1

Exact value (const): "timers"

Item 2

Exact value (const): "pwm-tclk1"

Rule 4

Array item rules (items)

Item 1

Exact value (const): "timers"

Item 2

Exact value (const): "pwm-tclk0"

Item 3

Exact value (const): "pwm-tclk1"

interrupts — not listed as required here #

One interrupt per timer, starting at timer 0. Necessary only for SoCs which use PWM clocksource.

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 5

#pwm-cells — not listed as required here #

The only third cell flag supported by this binding is PWM_POLARITY_INVERTED.

Exact value (const): 3

samsung,pwm-outputs — not listed as required here #

A list of PWM channels used as PWM outputs on particular platform. It is an array of up to 5 elements being indices of PWM channels (from 0 to 4), the order does not matter.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32-array

Items must be unique (uniqueItems): true

Array item rules (items) #

Minimum value (minimum): 0

Maximum value (maximum): 4

Required in this object (required): "clocks", "clock-names", "compatible", "reg"

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

false

Not allowed by this rule.

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): "samsung,s3c2410-pwm", "samsung,s3c6400-pwm", "samsung,s5p6440-pwm", "samsung,s5pc100-pwm"

When the condition matches (then) #

Required in this object (required): "interrupts"

Examples (examples) #

pwm@7f006000 {
    compatible = "samsung,s3c6400-pwm";
    reg = <0x7f006000 0x1000>;
    interrupt-parent = <&vic0>;
    interrupts = <23>, <24>, <25>, <27>, <28>;
    clocks = <&clock 67>;
    clock-names = "timers";
    samsung,pwm-outputs = <0>, <1>;
    #pwm-cells = <3>;
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0

Line 25: 16-bit, S3C24xx

Line 26: 32-bit, S3C64xx

Line 27: 32-bit, S5P64x0

Line 28: 32-bit, S5PC100, S5PV210, Exynos4210 rev0 SoCs

Line 29: 32-bit, Exynos

Edit this page