Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1949579ybl; Thu, 5 Dec 2019 09:28:26 -0800 (PST) X-Google-Smtp-Source: APXvYqxaCYkIRzpjSOddMu1U+Fd3ZDjUqueOpP/sc0WVNdZQjeC82fi0HZG73CFjqH8a1YzvMSXQ X-Received: by 2002:a9d:6f11:: with SMTP id n17mr7331850otq.126.1575566906569; Thu, 05 Dec 2019 09:28:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575566906; cv=none; d=google.com; s=arc-20160816; b=kzShO9iJM2sJnIjLLgNLotYe/M1dHOXPWQvnIZ5kH+HsOyj0qJzsATQazeUxKNO7mx xteQqI2uUPLC30Kh78oq2MaLwPdyIrfa8gzebDC15A50BDBeK5Lbg4oRfP9dwbCyoqBw xaRuNggctMDw9FUMj82fQV9BM+lXKUxFWAFLPN2LMa7wvVDz/dDfxFbyyvf1Ky/+GMRc kKyH6rfHh+RN1BT+g1hEDPjCvFNAZ6cziXzKKmcETX9texHeQ23wuBmj2xtcMDphrdsa c7DJXA9/eygZFYAZx2lQ9BodGivDE14LAkkku3EPRrbpAxOtGMDnZLPYceZpSWuMkd+H SVbg== 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=Beu9Ho0H5ERuGsbF7ZjrVG0ZON0A+E7tAAYEYAdqCyk=; b=fKqONkF3qWtn+4XRg6hUl0q4+RCLbAnK1DX8tywEWXkce8xaK/H1C/VCK1vX+dDy7L 18fEzuf/zK7kFYa80YCGpnVcYbsV6CUWeOJhsQFM6x1Sv7032yZk+Bs+1tghcpQ9nJdg +kpP1VVEuEYTl0MhrrHFgBYocuxQZO9Kj3iiEBxfkqA22Y4/g/BnmXHJ4iKA+EHggq2a jPdpAHgoHMtS7zk1Gbw4pN9JMi8XxJUxOpjiJ/PdjhzrlKKbPhq0Ml5VcbQRpU4v/1FF qMn/S9nq0IPCclF/K/2VzRs64t5CWj3i2nO0E3kE5tHnxcjSn8kg5PELxZ6hcdhi6KI8 SDPQ== 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 y3si5389016ote.235.2019.12.05.09.28.12; Thu, 05 Dec 2019 09:28:26 -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 S1730033AbfLER1h (ORCPT + 99 others); Thu, 5 Dec 2019 12:27:37 -0500 Received: from mail-ot1-f68.google.com ([209.85.210.68]:36765 "EHLO mail-ot1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729450AbfLER1h (ORCPT ); Thu, 5 Dec 2019 12:27:37 -0500 Received: by mail-ot1-f68.google.com with SMTP id i4so3314508otr.3; Thu, 05 Dec 2019 09:27:36 -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=Beu9Ho0H5ERuGsbF7ZjrVG0ZON0A+E7tAAYEYAdqCyk=; b=kgQMyMAQ+/Xhw0YG+MKF3GlD/ZPlJETN3HkW8ILdKDDrstaFW0p+oKcMYBInR/wVwo 6t6jhkMGsLEBUF/vk4pHApZ9nf4H6OA1ZyFBsXc3Fy20BMGS0ffXxzRN8S6PfTpeCtJE Jg89mU+Hf3r7OC+erP56WYN8bQyXFFve+0zZOEKA91SruiAgdS0QWkzaqPMM2RqDJ5uT ChuVpGt29hsgPEq8jyoStoqZZZoNwiK9J4fUetu9Eb6X2K+HLj5eAQTdUuExObIhJVAD zQHRe1DVsPyG6TycwWriYnECugVu5JGbLOKImOLNkXvUM5hu8Hov19k2GHF2MGjS8/RK +t4Q== X-Gm-Message-State: APjAAAVNt7bFmUQ50T8rrn89b1cpif3WscLb6zXjLpd5V4OP3hnKr205 06ol544HWn0b9hfYgZjnWg== X-Received: by 2002:a05:6830:1e61:: with SMTP id m1mr7623640otr.68.1575566856033; Thu, 05 Dec 2019 09:27:36 -0800 (PST) Received: from localhost (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.gmail.com with ESMTPSA id n25sm3724656oic.6.2019.12.05.09.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Dec 2019 09:27:35 -0800 (PST) Date: Thu, 5 Dec 2019 11:27:34 -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 v3 4/6] gpio: sifive: Add DT documentation for SiFive GPIO Message-ID: <20191205172734.GA18142@bogus> References: <1574661437-28486-1-git-send-email-yash.shah@sifive.com> <1574661437-28486-5-git-send-email-yash.shah@sifive.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1574661437-28486-5-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 Mon, Nov 25, 2019 at 05:58:03AM +0000, Yash Shah wrote: > DT json-schema 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.yaml | 69 ++++++++++++++++++++++ > 1 file changed, 69 insertions(+) > create mode 100644 Documentation/devicetree/bindings/gpio/gpio-sifive.yaml > > diff --git a/Documentation/devicetree/bindings/gpio/gpio-sifive.yaml b/Documentation/devicetree/bindings/gpio/gpio-sifive.yaml > new file mode 100644 > index 0000000..49214bb > --- /dev/null > +++ b/Documentation/devicetree/bindings/gpio/gpio-sifive.yaml sifive,gpio.yaml would be the more standard naming. > @@ -0,0 +1,69 @@ > +# SPDX-License-Identifier: GPL-2.0 Dual license new bindings: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/gpio/gpio-sifive.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: SiFive GPIO controller > + > +maintainers: > + - Yash Shah > + - Paul Walmsley > + > +properties: > + compatible: > + items: > + - const: sifive,fu540-c000-gpio > + - const: sifive,gpio0 > + > + reg: > + maxItems: 1 > + > + interrupts: > + description: > + interrupt mapping one per GPIO. Maximum 16 GPIOs. What's the minimum? If not 16, you need 'minItems'. > + maxItems: 1 > + > + interrupt-controller: true > + > + "#interrupt-cells": > + const: 2 > + > + clocks: > + maxItems: 1 > + > + clock-names: true Need to define the strings. Or drop because you don't need it when there's only 1. > + > + "#gpio-cells": > + const: 2 > + > + gpio-controller: true > + > +required: > + - compatible > + - reg > + - interrupts > + - interrupt-controller > + - "#interrupt-cells" > + - clocks > + - "#gpio-cells" > + - gpio-controller > + > +additionalProperties: false > + > +examples: > + - | > + #include > + gpio@10060000 { > + compatible = "sifive,fu540-c000-gpio", "sifive,gpio0"; > + 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 PRCI_CLK_TLCLK>; > + gpio-controller; > + #gpio-cells = <2>; > + interrupt-controller; > + #interrupt-cells = <2>; > + }; > + > +... > -- > 2.7.4 >