linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Wesley W. Terpstra" <wesley@sifive.com>
To: "Thierry Reding" <thierry.reding@gmail.com>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Mark Rutland" <mark.rutland@arm.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Noralf Trønnes" <noralf@tronnes.org>,
	"David Lechner" <david@lechnology.com>,
	"Alexandre Belloni" <alexandre.belloni@free-electrons.com>,
	"SZ Lin" <sz.lin@moxa.com>,
	linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: "Wesley W. Terpstra" <wesley@sifive.com>
Subject: [PATCH 1/3] dt-bindings: added new pwm-sifive driver documentation
Date: Fri, 27 Apr 2018 15:59:56 -0700	[thread overview]
Message-ID: <1524869998-2805-2-git-send-email-wesley@sifive.com> (raw)
In-Reply-To: <1524869998-2805-1-git-send-email-wesley@sifive.com>

Document new PWM device tree bindings for SiFive SoCs.

Signed-off-by: Wesley W. Terpstra <wesley@sifive.com>
---
 .../devicetree/bindings/pwm/pwm-sifive.txt         | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pwm/pwm-sifive.txt

diff --git a/Documentation/devicetree/bindings/pwm/pwm-sifive.txt b/Documentation/devicetree/bindings/pwm/pwm-sifive.txt
new file mode 100644
index 0000000..7cea20d
--- /dev/null
+++ b/Documentation/devicetree/bindings/pwm/pwm-sifive.txt
@@ -0,0 +1,28 @@
+SiFive PWM controller
+
+Unlike most other PWM controllers, the SiFive PWM controller currently only
+supports one period for all channels in the PWM. This is set globally in DTS.
+The period also has significant restrictions on the values it can achieve,
+which the driver rounds to the nearest achievable frequency.
+
+Required properties:
+- compatible: should be "sifive,pwm0"
+- reg: physical base address and length of the controller's registers
+- clocks: The frequency the controller runs at
+- #pwm-cells: Should be 2.
+  The first cell is the PWM channel number
+  The second cell is the PWM polarity
+- sifive,approx-period: the driver will get as close to this period as it can
+- interrupts: one interrupt per PWM channel (currently unused in the driver)
+
+Examples:
+
+pwm:  pwm@10020000 {
+	compatible = "sifive,pwm0";
+	reg = <0x0 0x10020000 0x0 0x1000>;
+	clocks = <&tlclk>;
+	interrupt-parent = <&plic>;
+	interrupts = <42 43 44 45>;
+	#pwm-cells = <2>;
+	sifive,approx-period = <1000000>;
+};
-- 
2.7.4

  reply	other threads:[~2018-04-27 23:00 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-27 22:59 [PATCH 0/3] SiFive SoC PWM driver Wesley W. Terpstra
2018-04-27 22:59 ` Wesley W. Terpstra [this message]
2018-04-29  5:54   ` [PATCH 1/3] dt-bindings: added new pwm-sifive driver documentation Thierry Reding
2018-04-29 20:51     ` Wesley Terpstra
2018-04-29 21:01       ` Andreas Färber
2018-04-29 21:08         ` Wesley Terpstra
2018-04-30  8:19           ` Thierry Reding
2018-04-30 10:45             ` Andreas Färber
2018-05-01 16:11               ` Rob Herring
2018-04-30  8:27       ` Thierry Reding
2018-04-30 19:09         ` Wesley Terpstra
2018-04-30  9:42   ` Thierry Reding
2018-04-27 22:59 ` [PATCH 2/3] dt-bindings: Add "sifive" vendor prefix Wesley W. Terpstra
2018-04-28 11:21   ` Andreas Färber
     [not found]     ` <CAMgXwThXvdzi27GjTD-q4Fw7kM5WOCtMewh7U3M4wcLwEx+VQw@mail.gmail.com>
2018-05-01 16:14       ` Rob Herring
2018-05-01 16:32         ` Palmer Dabbelt
2018-04-27 22:59 ` [PATCH 3/3] pwm-sifive: add a driver for SiFive SoC PWM Wesley W. Terpstra
2018-04-30  9:39   ` Thierry Reding
2018-04-30 19:09     ` Wesley Terpstra
2018-05-04  8:43   ` kbuild test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1524869998-2805-2-git-send-email-wesley@sifive.com \
    --to=wesley@sifive.com \
    --cc=afaerber@suse.de \
    --cc=alexandre.belloni@free-electrons.com \
    --cc=david@lechnology.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=noralf@tronnes.org \
    --cc=robh+dt@kernel.org \
    --cc=sz.lin@moxa.com \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).