From patchwork Wed Oct 7 15:37:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TcOlbnMgUnVsbGfDpXJk?= X-Patchwork-Id: 527326 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 838DE1402B0 for ; Thu, 8 Oct 2015 02:37:26 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753954AbbJGPhZ (ORCPT ); Wed, 7 Oct 2015 11:37:25 -0400 Received: from unicorn.mansr.com ([81.2.72.234]:32972 "EHLO unicorn.mansr.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753875AbbJGPhY (ORCPT ); Wed, 7 Oct 2015 11:37:24 -0400 Received: by unicorn.mansr.com (Postfix, from userid 51770) id C25551538A; Wed, 7 Oct 2015 16:37:20 +0100 (BST) From: Mans Rullgard To: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] devicetree: add binding for generic mmio clocksource Date: Wed, 7 Oct 2015 16:37:13 +0100 Message-Id: <1444232234-2133-1-git-send-email-mans@mansr.com> X-Mailer: git-send-email 2.5.3 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org This adds a DT binding for a generic mmio clocksource as implemented by clocksource_mmio_init(). Signed-off-by: Mans Rullgard --- Changed in v2: - added sched_clock support --- .../devicetree/bindings/timer/clocksource-mmio.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 Documentation/devicetree/bindings/timer/clocksource-mmio.txt diff --git a/Documentation/devicetree/bindings/timer/clocksource-mmio.txt b/Documentation/devicetree/bindings/timer/clocksource-mmio.txt new file mode 100644 index 0000000..cfb3601 --- /dev/null +++ b/Documentation/devicetree/bindings/timer/clocksource-mmio.txt @@ -0,0 +1,28 @@ +Generic MMIO clocksource + +Required properties: + +- compatible: should be "clocksource-mmio" +- reg: the physical address of the counter register +- reg-io-width: size of counter register in bytes, should be 2 or 4 +- clocks: phandle to the source clock +- clocksource-bits: number of valid bits +- clocksource-rating: rating of the clocksource + +Optional properties: + +- clocksource-counts-down: indicates that counter counts down +- label: name of the clocksource +- linux,sched-clock: boolean, register clocksource as sched_clock + +Example: + +clocksource { + compatible = "clocksource-mmio"; + reg = <0x10000 4>; + reg-io-width = <4>; + clocksource-bits = <32>; + clocksource-rating = <300>; + clocks = <&clk>; + linux,sched_clock; +}