Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp5242390imm; Tue, 9 Oct 2018 11:52:17 -0700 (PDT) X-Google-Smtp-Source: ACcGV62yWHUAvi5hA4JRplZR0D/s6VlJQyHJfckdo3d28JfWQVRGlmWBVG6SUvgfhb0wKiWkQhgX X-Received: by 2002:a65:6458:: with SMTP id s24-v6mr17405521pgv.29.1539111137166; Tue, 09 Oct 2018 11:52:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539111137; cv=none; d=google.com; s=arc-20160816; b=nIoGdXc4gm7ShjSsv9EUVlOIAJ1GEZZpnPLt9N52/U8YdM59W4H5iyTWUXqpMNnYyM DOo/w7cFeww6UTtmTq4FTO4n5SU6pHDpU9xqdWvNGWdWlxObz99yR+jDAhVQVwYxvj5j nlJt1yQZMBMRxAQ4miq578mRUBKHP9KXxJg6C2LlO1nrAdilV2gKR5SRsL0kXUCfw2LS 6RFAmLxtqBss0PbrPQz2q+kEqxG60FERX14CM7waSIdnftegaPOYVGcvs4TnswUjyXW8 XOOJaV013T67/dhxem0+CuovH4x8ImRbaAvfK4U0fuVaand6OazjbBXehNojeD9GCJZs FOVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=n4f8Wxqu+QufIZyE5kc4lbBs5IF3Wl22r1YOjuJ69LI=; b=bWC0Rx220uG1k1D6WI6fmpzWvKPr7s+Ks3U+l4NaTCibY9LGAkIidelPMHLS/SerT5 gPyWCCSaClVNu7afzuXpeN0UT7ndhVJKQ6xGPkoxZQJH4npE3fr1g8IQ5bMlgzZQzq8n b4a0Audg5LW3jXWcPZi2dpzNBHmzci3RRgU0JDHiTVbdCA79EU5H/qU58mE61IQvMEqO dapoQXcYnQA4QhUvbt2zblp0bcjbJp8D4POhzObTdHpxdVLfPHNUyrPxC1jP35b7RU57 kyWPGK1XdtY8TTmU8J/MEjO8Yol7PrstjahUVtmrS5m+MXb/Gu9oqya7LL5hsSy2HYJu G8vA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=UEIzF27P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y73-v6si23392596pfi.61.2018.10.09.11.52.02; Tue, 09 Oct 2018 11:52:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@wdc.com header.s=dkim.wdc.com header.b=UEIzF27P; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=wdc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727317AbeJJCJu (ORCPT + 99 others); Tue, 9 Oct 2018 22:09:50 -0400 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:53214 "EHLO esa6.hgst.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726460AbeJJCJs (ORCPT ); Tue, 9 Oct 2018 22:09:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1539111087; x=1570647087; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=3buQbls5/gIS7422ozrHmZ63B7g/jc69OByotZi7u7I=; b=UEIzF27PKT4lMQ7oWm3gm+dRjYC12BVFvEZsGj7oALm3jKmfT7K9HrfC X2mMn4hKlKtjxhOLzQ+lYi5elUzfFSG/ItzYdbJ39Huo0t66pNV19pTsJ KZKVhcX6arWf/oy1Ie2T4T7NyCLvLmefs4jzQ/AyPgPfLd47phXwwrzge Tqoe1FIaVZzI2g6gP5s17eqCv/HStxVqV87xgnRYNHqoppsXFn2JryfHw fPqATc8nfgBjBkMu2tt7ki5Y+SSICgYWKYPzrRBaUsx5YoVo/huI2GtSi 6bjI+CjoeM9OvTeLlZyGJ3yAN1Nh8V6tvYyWoGIIad8A4JwcVT+3MhRId w==; X-IronPort-AV: E=Sophos;i="5.54,361,1534780800"; d="scan'208";a="93263449" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 10 Oct 2018 02:51:26 +0800 Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP; 09 Oct 2018 11:36:35 -0700 Received: from jedi-01.sdcorp.global.sandisk.com (HELO jedi-01.int.fusionio.com) ([10.11.143.218]) by uls-op-cesaip02.wdc.com with ESMTP; 09 Oct 2018 11:51:26 -0700 From: Atish Patra To: palmer@sifive.com, linux-riscv@lists.infradead.org, linux-pwm@vger.kernel.org, linux-gpio@vger.kernel.org Cc: linus.walleij@linaro.org, robh+dt@kernel.org, thierry.reding@gmail.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mark.rutland@arm.com, hch@infradead.org, atish.patra@wdc.com Subject: [RFC 1/4] pwm: sifive: Add DT documentation for SiFive PWM Controller. Date: Tue, 9 Oct 2018 11:51:22 -0700 Message-Id: <1539111085-25502-2-git-send-email-atish.patra@wdc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1539111085-25502-1-git-send-email-atish.patra@wdc.com> References: <1539111085-25502-1-git-send-email-atish.patra@wdc.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Wesley W. Terpstra" DT documentation for PWM controller added with updated compatible string. Signed-off-by: Wesley W. Terpstra [Atish: Compatible string update] Signed-off-by: Atish Patra --- .../devicetree/bindings/pwm/pwm-sifive.txt | 32 ++++++++++++++++++++++ 1 file changed, 32 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 00000000..532b10fc --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/pwm-sifive.txt @@ -0,0 +1,32 @@ +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 one of + "sifive,fu540-c000-pwm0","sifive,pwm0". + PWM controller is HiFive Unleashed specific chip which warrants a + specific compatible string. The second string is kept for backward + compatibility until a firmware update with latest compatible string. +- 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,fu540-c000-pwm0","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