From patchwork Tue May 14 00:50:33 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring \(Arm\)" X-Patchwork-Id: 164092 Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp1999780ili; Mon, 13 May 2019 17:50:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwCyDRkA+YwD4Ja2BckLXgKbT3fgSk9H8Dw8k0q9OtafRB4jZBEuesb1TvFWNEvhF33oD+p X-Received: by 2002:a63:fd0c:: with SMTP id d12mr35402683pgh.391.1557795037062; Mon, 13 May 2019 17:50:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557795037; cv=none; d=google.com; s=arc-20160816; b=KcQTdfGGnDxLPkSvxFWt8YgihsC3+LaoJayd7DszefRHiu1RYkBWO3qA9+/FkLtBgy h0JUOp0oMjnj7LUPe34U+h3C/KTU2BVvqhhvL+XNPGm21FzHLEGsGRLhYvrc5sFYV7an Li09dCnr9+Ti7FgNFR1mqYTC8Y1+uxJaNzbz/ZHZcmIveiwpN0Hq1LvIz51ZrUsqJzHX CJOW7zsGNUhKKcc03pN8KyQQHYSjmyNhspTF/4mCVlHft/Nh1ehKc+4wu2pj4Kk+W41P 08R03Z/WxmZHa0tqRS1pdiQM3vNNuywsXtLy2ZY/QAXQqSADPmx9idhpI1sWR2Oa6fZT xMTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=rv0mn5KUbHgge7O7vIawkh8Ujbd2zyxMdRjz07XVw40=; b=1CHmByQtJG47NnnMl4TRQGyX94YrWKWvy27rEMvnsLTK3yO0bYRM9n2aTVhymM0Snh FDpukbT2mqlWdZckztKq9EUXOGsLIpUTv4abDdnP1Dt0NVpkB57s4n66PtfYTpLeEDTa u1zSZ+4nZLVsQ8jrL7+77MnCXG2qPgeDqcE3KyaWf7PWdb003zTVxRU1XtEPUn1Gk/KR to9md39NlyXebQCTfed5eDhagQZioi5KbD/DEHsRCqmUss2lBnVr6NIEtUObbn8tL24A IcgggrY3X/CmDhhDz1dK7Ict9/IHhb8xL7zasi1bmtMi/zHCYkvFgRVA3eXczXq+kiK2 e9lw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 l62si5160917pga.434.2019.05.13.17.50.36; Mon, 13 May 2019 17:50:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-gpio-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-gpio-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-gpio-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 S1726638AbfENAug (ORCPT + 5 others); Mon, 13 May 2019 20:50:36 -0400 Received: from mail-oi1-f194.google.com ([209.85.167.194]:42726 "EHLO mail-oi1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726233AbfENAug (ORCPT ); Mon, 13 May 2019 20:50:36 -0400 Received: by mail-oi1-f194.google.com with SMTP id k9so10819544oig.9; Mon, 13 May 2019 17:50:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=rv0mn5KUbHgge7O7vIawkh8Ujbd2zyxMdRjz07XVw40=; b=kTtzAuxgmhxh87CJ67XqCJP8v9zY8Q+KVygMCILTgQSm7ovqHV/f6aIIK1tkA4p5pN 07vWnqadPyrEOekU/IUuwle3BFL2ZTk03VN+Uo1x5h9vn6sJSWY+gjrAPg9tDP1jv4lx Ev2p1fc9BTq/Ed4xMFQmF1TB5OZzttsYJ3j4+OO+K0eB7xdu9FV9eBiPe1fVwJxflni/ 60fpmGHKIDGCC+UINkOKTFlQJmGbX9Y4E+6Pj6YIigMfrTB0/gXvbT8Z43Khtm6VEPsO Q+i0z593oSf6/8FSZtXBUFAHqEAYEDEe3YrZ0oe0JY/xRvIZKyy0e0LTmlKKtlnEolyF acmA== X-Gm-Message-State: APjAAAWO5Tax4JuQHfz41UuHfavI9uuHwgvsxBQUcm1f8NzOGq9Apftv md1GwKwQnsUr0mPxoSLjkA== X-Received: by 2002:aca:3cc5:: with SMTP id j188mr1363334oia.88.1557795034674; Mon, 13 May 2019 17:50:34 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id w192sm5990259oiw.57.2019.05.13.17.50.33 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 13 May 2019 17:50:33 -0700 (PDT) From: Rob Herring To: linus.walleij@linaro.org Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Bartosz Golaszewski , linux-gpio@vger.kernel.org Subject: [PATCH] dt-bindings: gpio: Convert Arm PL061 to json-schema Date: Mon, 13 May 2019 19:50:33 -0500 Message-Id: <20190514005033.15593-1-robh@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org Convert the Arm PL061 GPIO controller binding to json-schema format. As I'm the author for all but the gpio-ranges line, make the schema dual GPL/BSD license. Cc: Linus Walleij Cc: Bartosz Golaszewski Cc: linux-gpio@vger.kernel.org Signed-off-by: Rob Herring --- This warns on a few platforms missing clocks, interrupt-controller and/or #interrupt-cells. We could not make those required, but really they should be IMO. OTOH, it's platforms like Spear and Calxeda which aren't too active, so I don't know that we want to fix them. .../devicetree/bindings/gpio/pl061-gpio.txt | 10 --- .../devicetree/bindings/gpio/pl061-gpio.yaml | 69 +++++++++++++++++++ 2 files changed, 69 insertions(+), 10 deletions(-) delete mode 100644 Documentation/devicetree/bindings/gpio/pl061-gpio.txt create mode 100644 Documentation/devicetree/bindings/gpio/pl061-gpio.yaml -- 2.20.1 diff --git a/Documentation/devicetree/bindings/gpio/pl061-gpio.txt b/Documentation/devicetree/bindings/gpio/pl061-gpio.txt deleted file mode 100644 index 89058d375b7c..000000000000 --- a/Documentation/devicetree/bindings/gpio/pl061-gpio.txt +++ /dev/null @@ -1,10 +0,0 @@ -ARM PL061 GPIO controller - -Required properties: -- compatible : "arm,pl061", "arm,primecell" -- #gpio-cells : Should be two. The first cell is the pin number and the - second cell is used to specify optional parameters: - - bit 0 specifies polarity (0 for normal, 1 for inverted) -- gpio-controller : Marks the device node as a GPIO controller. -- interrupts : Interrupt mapping for GPIO IRQ. -- gpio-ranges : Interaction with the PINCTRL subsystem. diff --git a/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml b/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml new file mode 100644 index 000000000000..313b17229247 --- /dev/null +++ b/Documentation/devicetree/bindings/gpio/pl061-gpio.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/gpio/pl061-gpio.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: ARM PL061 GPIO controller + +maintainers: + - Linus Walleij + - Rob Herring + +# We need a select here so we don't match all nodes with 'arm,primecell' +select: + properties: + compatible: + contains: + const: arm,pl061 + required: + - compatible + +properties: + $nodename: + pattern: "^gpio@[0-9a-f]+$" + + compatible: + items: + - const: arm,pl061 + - const: arm,primecell + + reg: + maxItems: 1 + + interrupts: + oneOf: + - maxItems: 1 + - maxItems: 8 + + interrupt-controller: true + + "#interrupt-cells": + const: 2 + + clocks: + maxItems: 1 + + clock-names: true + + "#gpio-cells": + const: 2 + + gpio-controller: true + + gpio-ranges: + maxItems: 8 + +required: + - compatible + - reg + - interrupts + - interrupt-controller + - "#interrupt-cells" + - clocks + - "#gpio-cells" + - gpio-controller + +additionalProperties: false + +...