PWM controlled by ChromeOS EC

Schema identifier ($id): "http://devicetree.org/schemas/pwm/google,cros-ec-pwm.yaml#"

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

Maintainers (maintainers): "Thierry Reding <thierry.reding@gmail.com>", "\"Uwe Kleine-König\" <u.kleine-koenig@pengutronix.de>"

Google's ChromeOS EC PWM is a simple PWM attached to the Embedded Controller (EC) and controlled via a host-command interface. An EC PWM node should be only found as a sub-node of the EC node (see Documentation/devicetree/bindings/embedded-controller/google,cros-ec.yaml).

All of these rules must match (allOf) #

Rule 1 #

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

Properties and child nodes (properties) #

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

PWM controlled using EC_PWM_TYPE_GENERIC channels.

Array item rules (items)

Item 1

Exact value (const): "google,cros-ec-pwm"

Rule 2

PWM controlled using CROS_EC_PWM_DT_<...> types.

Array item rules (items)

Item 1

Exact value (const): "google,cros-ec-pwm-type"

#pwm-cells — not listed as required here #

The cell specifies the PWM index.

Exact value (const): 1

Required in this object (required): "compatible"

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

false

Not allowed by this rule.

Examples (examples) #

spi {
    #address-cells = <1>;
    #size-cells = <0>;

    cros-ec@0 {
        compatible = "google,cros-ec-spi";
        reg = <0>;
        interrupts = <101 0>;

        cros_ec_pwm: pwm {
            compatible = "google,cros-ec-pwm";
            #pwm-cells = <1>;
        };
    };
};

Source notes #

Annotations retained from the schema source

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

Edit this page