Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3061832ybc; Mon, 18 Nov 2019 08:57:27 -0800 (PST) X-Google-Smtp-Source: APXvYqyyrGCk1oaIIWtG6IJhcJf/osJXbSV9d9L0cV36Hb0ncSDw0jDfvB76iSac6PCmKi+rpbWt X-Received: by 2002:adf:ef8a:: with SMTP id d10mr22592265wro.314.1574096247244; Mon, 18 Nov 2019 08:57:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574096247; cv=none; d=google.com; s=arc-20160816; b=hv2kiskIbL1kddT86dgCwd0PmaTG754Kx4AKURX4M39hIsSWLTTQP+Q56DeM+YlEra kx+EWQk8mxq3+9PfnYDvhWQ3lOJ2/rEsueejJY7iOuZ+JCXMffIw6V6qfqX8Jv96xN8u 5mWnRs8qAP690OWRXZbGstfxePat4aUUu0fpeq2VTtqlrFG8p3IYor7VjB1W1fPAATu1 YkPVr5R78GoQq+zzrdNSZBeHmB9v2RW6igO7B28Fg71L7jtM8M5Y/t+w5KQdptjUTiLD 3x0zkSYGtgCDGP1HAP7SdRPreQ/nUkvyjTOx8IU2fsywcjKe5cFxizFiFXPGcg7+6MpN zAQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=hqTOasQxtcpYkZR/qyY0Ns887QHHgqrNr6obLQsmNsI=; b=1Lj770HCMXcA+MIj211N+DR/p6pqzy2RE8bS+N4C7myKKoz3ZJl/c42bt4kmEAR0TA TZhA5fJ/0V31eZm2syjZzIkccdqgOZJge4K01ePYkP6ZfaXqGnfJsPN1/oc/XuU4VgXy 99ka0d4eHyZo3r+zQ9PHyTVzhf2u4UEfXYQibfgxpoojhS8ikVPK85llH28zKgP9M0cL evw1SOdjPxUMvaEkEqjOAnEwyDwtCwdG50TCzGzCGCq6HWISyoUgYmT9scHi+brAzLfr UIWkxReNo95YJnP186aWP21cQTQFYPVb4wxLQJifmxN5i9D7UO4/acXiHI0qVPSPezyW bsqQ== ARC-Authentication-Results: i=1; mx.google.com; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q18si14277434eda.291.2019.11.18.08.57.02; Mon, 18 Nov 2019 08:57:27 -0800 (PST) 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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726795AbfKRQxr (ORCPT + 99 others); Mon, 18 Nov 2019 11:53:47 -0500 Received: from mail-oi1-f196.google.com ([209.85.167.196]:42683 "EHLO mail-oi1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726068AbfKRQxr (ORCPT ); Mon, 18 Nov 2019 11:53:47 -0500 Received: by mail-oi1-f196.google.com with SMTP id o12so5815511oic.9; Mon, 18 Nov 2019 08:53:47 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=hqTOasQxtcpYkZR/qyY0Ns887QHHgqrNr6obLQsmNsI=; b=OWcHeOLBFcvsJGM4bLKrsbHY1ywlzAMVlzijeOfEGBK/N0Jh1Sol1ekSSLR02gfBIY FlkgaQ8h39q6D0Fgso6CK23rttxDepbChSmpC+P34nzqkblv0ZgZLLiG1kiLocci25Wu gKiqoU4s9ynUYwdAc9vaBYnCYoAjdAokWu9Fwgr+QW9Hg+Vd89X4ad3PDOhlvm504Ip8 iSpdo6mGx6NBP4SobWaSYYnP8ketB8xNkBfvDWUR7nDcuX4d4a2BeKooQ9JmEYGgt4L1 Wxkksa8GDAYnPLUhl2UKzOWYYyBARx10vypQ8WkUsonuXflGMrKKAArVOjxC+Hr56jjI VY1Q== X-Gm-Message-State: APjAAAVrB1r4NDT2YvrDZc8Z7mfjGQpqMFH1q/Smw4TWoB+dgnrI1ouk PGmlIjgFobWY77uGmg4oRA== X-Received: by 2002:aca:451:: with SMTP id 78mr21727660oie.170.1574096026456; Mon, 18 Nov 2019 08:53:46 -0800 (PST) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id o18sm6447650otj.38.2019.11.18.08.53.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2019 08:53:45 -0800 (PST) Date: Mon, 18 Nov 2019 10:53:45 -0600 From: Rob Herring To: Yash Shah Cc: "linus.walleij@linaro.org" , "bgolaszewski@baylibre.com" , "mark.rutland@arm.com" , "palmer@dabbelt.com" , "Paul Walmsley ( Sifive)" , "aou@eecs.berkeley.edu" , "tglx@linutronix.de" , "jason@lakedaemon.net" , "maz@kernel.org" , "bmeng.cn@gmail.com" , "atish.patra@wdc.com" , Sagar Kadam , "linux-gpio@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" , Sachin Ghadi Subject: Re: [PATCH 2/4] gpio: sifive: Add DT documentation for SiFive GPIO Message-ID: <20191118165345.GA3935@bogus> References: <1573560684-48104-1-git-send-email-yash.shah@sifive.com> <1573560684-48104-3-git-send-email-yash.shah@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1573560684-48104-3-git-send-email-yash.shah@sifive.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 12, 2019 at 12:12:06PM +0000, Yash Shah wrote: > DT documentation for GPIO controller added. > > Signed-off-by: Wesley W. Terpstra > [Atish: Compatible string update] > Signed-off-by: Atish Patra > Signed-off-by: Yash Shah > --- > .../devicetree/bindings/gpio/gpio-sifive.txt | 33 ++++++++++++++++++++++ > 1 file changed, 33 insertions(+) > create mode 100644 Documentation/devicetree/bindings/gpio/gpio-sifive.txt Please make this a schema. See Documentation/devicetree/writing-schema.rst. > > diff --git a/Documentation/devicetree/bindings/gpio/gpio-sifive.txt b/Documentation/devicetree/bindings/gpio/gpio-sifive.txt > new file mode 100644 > index 0000000..d3416d5 > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpio/gpio-sifive.txt > @@ -0,0 +1,33 @@ > +SiFive GPIO controller bindings > + > +Required properties: > +- compatible: Should be "sifive,-gpio" and "sifive,gpio". > + Supported compatible strings are: "sifive,fu540-c000-gpio" for the SiFive > + GPIO v0 as integrated onto the SiFive FU540 chip, and "sifive,gpio0" for the > + SiFive GPIO v0 IP block with no chip integration tweaks. > + Please refer to sifive-blocks-ip-versioning.txt for details. > +- reg: Physical base address and length of the controller's registers. > +- clocks: Should contain a clock identifier for the GPIO's parent clock. > +- #gpio-cells : Should be 2 > + - The first cell is the GPIO offset number. > + - The second cell indicates the polarity of the GPIO > +- gpio-controller : Marks the device node as a GPIO controller. > +- interrupt-controller: Marks the device node as an interrupt controller. > +- #interrupt-cells : Should be 2. > + - The first cell is the GPIO offset number within the GPIO controller. > + - The second cell is the edge/level to use for interrupt generation. > +- interrupts: Specify the interrupts, one per GPIO How many GPIOs? > + > +Example: > + > +gpio: gpio@10060000 { > + compatible = "sifive,fu540-c000-gpio","sifive,gpio0"; space ^ > + interrupt-parent = <&plic>; > + interrupts = <7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22>; > + reg = <0x0 0x10060000 0x0 0x1000>; > + clocks = <&tlclk>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > +}; > -- > 2.7.4 >