From: Brian Norris Date: Fri, 15 Jul 2016 23:28:43 +0000 (-0700) Subject: UPSTREAM: dt-bindings: pwm: Add binding for ChromeOS EC PWM X-Git-Tag: firefly_0821_release~415 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3aa4b5061c6e147a802f5e51242bafc4f430d94d;p=firefly-linux-kernel-4.4.55.git UPSTREAM: dt-bindings: pwm: Add binding for ChromeOS EC PWM The ChromeOS Embedded Controller can support controlling its attached PWMs via its host-command interface. The number of supported PWMs varies on a per-board basis, but we can autodetect this by checking the error codes, so we don't need an extra property for this. And because the EC only allows specifying the duty cycle and not the period, we don't specify the period via pwm-cells, and instead have only support for one cell -- to specify the index. Signed-off-by: Brian Norris Acked-by: Rob Herring Signed-off-by: Thierry Reding (cherry picked from commit 9e60f50b4a79ae2df791d89d08cf2b78ad7629bd) Change-Id: Ibb2ac5cff1e8cc2ab43c9f1f89e68e48da23d897 Signed-off-by: David Wu --- diff --git a/Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.txt b/Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.txt new file mode 100644 index 000000000000..472bd46ab5a4 --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/google,cros-ec-pwm.txt @@ -0,0 +1,23 @@ +* PWM controlled by ChromeOS EC + +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/mfd/cros-ec.txt). + +Required properties: +- compatible: Must contain "google,cros-ec-pwm" +- #pwm-cells: Should be 1. The cell specifies the PWM index. + +Example: + cros-ec@0 { + compatible = "google,cros-ec-spi"; + + ... + + cros_ec_pwm: ec-pwm { + compatible = "google,cros-ec-pwm"; + #pwm-cells = <1>; + }; + };