Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1073148pxj; Fri, 21 May 2021 05:59:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwBNDQXlREf2Euf5itzwQfmYPlgF0s74kBRDz4h0pyOYXHcnhFrjL/QgA6+0fR6mjRbhJ7c X-Received: by 2002:a17:906:8591:: with SMTP id v17mr10249304ejx.378.1621601981327; Fri, 21 May 2021 05:59:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621601981; cv=none; d=google.com; s=arc-20160816; b=omZMtXK5u5EJOVLfJGda2KZ90cx6GHw3+yQgPbaofxx02qcRMDaSGobQa+7My4xDd2 UvoJW8cID1VAQTNuulglvgfYwHXRL1tbrH+1sRZLfzRh8lrNPxXO5jhoNzxkdnCNU8A0 2na9ZLjF3nyzcDGiUSqpHRFgFauXKC65c/P8fenv6FzMVSj1pUdEa0vRgpBVqzgEd9A9 poOHSKGfUjmyi0LKWANcW3bF9GpK8IWJynfi6JluuwMOTE5QfKuHdy1kJxRcGYe40Itz Vg8PEf0eX7jN4G/QCmuDaK2n12ea2KQRIaZ6T/2aHKrIlM8lguZBEn4XZIOWVSRqLnmk do1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=U2y0kmvlmB9TXA/99jUImfSL+6G3PiWuJL5sh/b5LWI=; b=EwypAw1DHqSDS0gCvsVCL3nbtV93xeXYA9DIc78DJg1JS1XWsaHwNp1w3Bnzf17VSo YuFU2Z8W/udxOxsZVzCfb3Xxxh9BAb+UwU5rVoMxAoISsDzEvNLDMHer6zbFKvchpF2X xC11qR/vKNafvTbBQu2O/MpbmP0IqYixC3yXZpPwvIhMPNWe317HrSX1VGl0Hp7IqThk rYv4ykDz827CmPnWghoJd74e186deBnAQ+3FKtBIUDNI7zIUR26FfUpT3SFabPXun9HO qMnqnCFujmOd35WeTtKGWdptyw6Ts1eRYqs4E74iIYpZjN4LCPzWkamzhHI4xw9s0w8o hmlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GWyNqRI7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f6si5207970ejt.379.2021.05.21.05.59.15; Fri, 21 May 2021 05:59:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GWyNqRI7; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229512AbhEUM6W (ORCPT + 99 others); Fri, 21 May 2021 08:58:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:37218 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232290AbhEUM6A (ORCPT ); Fri, 21 May 2021 08:58:00 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CB1FF613D8; Fri, 21 May 2021 12:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1621601797; bh=nLiWIiuQ0kxuVgZbeKOWUyyPgYrR77UCzFAel1jg22c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=GWyNqRI73z76a3BP9cwhI1q4Y2hipTP6tw1R5/sCn21TJVTrA/u3S3/8OmIuokl/p 7lhzcQXLFM7jnJb1M6CwO/lMY58asJZn02RBlqMc2p+S6Ff2SyzdLqDJ/n6qlF0YnC zrdXsEan6JTyXOxKqqHt5Pzd20nDEyZS5JK1+CUTbSpjdMCocMiKeSLgS/A7Dae1vP IfwiX9FcCA1jZyxxjuDaNIhsAPXDPVoK17dQrkVfTC+FDbqtHE/Oj3z46pBzeXt9oy X0OA0gCIoUkjxPIGYB3+VDpUU9KVO/t8gmExjUrW6+FlwNWXdavIPXYiTM9r96iawz EKd8+0iy5bwQw== Received: by mail-ej1-f44.google.com with SMTP id et19so23273786ejc.4; Fri, 21 May 2021 05:56:37 -0700 (PDT) X-Gm-Message-State: AOAM530LqUzEJjDG2TSEQpSMs71whYBkcHLzYSJxgcKEjDXYLv/mNp5N o1cjdpNviEUrorV7U5GtfX6aKyrGr2qJnr2h4g== X-Received: by 2002:a17:907:76e8:: with SMTP id kg8mr9610299ejc.130.1621601796326; Fri, 21 May 2021 05:56:36 -0700 (PDT) MIME-Version: 1.0 References: <20210511090122.6995-1-a-govindraju@ti.com> <20210517221513.GA3263368@robh.at.kernel.org> <861cefe2-7bb6-c435-ab0d-483155852876@ti.com> In-Reply-To: <861cefe2-7bb6-c435-ab0d-483155852876@ti.com> From: Rob Herring Date: Fri, 21 May 2021 07:56:24 -0500 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] dt-bindings: gpio: gpio-davinci: Convert to json-schema To: Grygorii Strashko Cc: Aswath Govindraju , Vignesh Raghavendra , Lokesh Vutla , Kishon Vijay Abraham I , Linus Walleij , Bartosz Golaszewski , Keerthy , "open list:GPIO SUBSYSTEM" , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, May 21, 2021 at 3:32 AM Grygorii Strashko wrote: > > Hi Rob, All > > On 18/05/2021 01:15, Rob Herring wrote: > > On Tue, May 11, 2021 at 02:31:20PM +0530, Aswath Govindraju wrote: > >> Convert gpio-davinci dt-binding documentation from txt to yaml format. > >> > >> Signed-off-by: Aswath Govindraju > >> --- > >> .../devicetree/bindings/gpio/gpio-davinci.txt | 167 --------------- > >> .../bindings/gpio/gpio-davinci.yaml | 193 ++++++++++++++++++ > >> MAINTAINERS | 2 +- > >> 3 files changed, 194 insertions(+), 168 deletions(-) > >> delete mode 100644 Documentation/devicetree/bindings/gpio/gpio-davinci.txt > >> create mode 100644 Documentation/devicetree/bindings/gpio/gpio-davinci.yaml > >> > >> diff --git a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt b/Documentation/devicetree/bindings/gpio/gpio-davinci.txt > >> deleted file mode 100644 > >> index 696ea46227d1..000000000000 > >> --- a/Documentation/devicetree/bindings/gpio/gpio-davinci.txt > >> +++ /dev/null > >> @@ -1,167 +0,0 @@ > >> -Davinci/Keystone GPIO controller bindings > >> - > >> -Required Properties: > >> -- compatible: should be "ti,dm6441-gpio": for Davinci da850 SoCs > >> - "ti,keystone-gpio": for Keystone 2 66AK2H/K, 66AK2L, > >> - 66AK2E SoCs > >> - "ti,k2g-gpio", "ti,keystone-gpio": for 66AK2G > >> - "ti,am654-gpio", "ti,keystone-gpio": for TI K3 AM654 > >> - "ti,j721e-gpio", "ti,keystone-gpio": for J721E SoCs > >> - "ti,am64-gpio", "ti,keystone-gpio": for AM64 SoCs > >> - > > [...] > > >> -}; > >> diff --git a/Documentation/devicetree/bindings/gpio/gpio-davinci.yaml b/Documentation/devicetree/bindings/gpio/gpio-davinci.yaml > >> new file mode 100644 > >> index 000000000000..1e16172669c7 > >> --- /dev/null > >> +++ b/Documentation/devicetree/bindings/gpio/gpio-davinci.yaml > >> @@ -0,0 +1,193 @@ > >> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > >> +%YAML 1.2 > >> +--- > >> +$id: http://devicetree.org/schemas/gpio/gpio-davinci.yaml# > >> +$schema: http://devicetree.org/meta-schemas/core.yaml# > >> + > >> +title: GPIO controller for Davinci and keystone devices > >> + > >> +maintainers: > >> + - Keerthy > >> + > >> +properties: > >> + compatible: > >> + oneOf: > >> + - items: > >> + - enum: > >> + - ti,k2g-gpio > >> + - ti,am654-gpio > >> + - ti,j721e-gpio > >> + - ti,am64-gpio > >> + - const: ti,keystone-gpio > >> + > >> + - items: > >> + - const: ti,dm6441-gpio > >> + - items: > >> + - const: ti,keystone-gpio > > > > These 2 can be expressed as an 'enum'. > > > >> + > >> + reg: > >> + maxItems: 1 > >> + description: > >> + Physical base address of the controller and the size of memory mapped registers. > > > > Drop. That's every 'reg' property. > > > >> + > >> + gpio-controller: true > >> + > >> + gpio-ranges: true > >> + > >> + gpio-line-names: > >> + description: strings describing the names of each gpio line. > > > > Any constraints like min/max number of lines? > > > >> + > >> + "#gpio-cells": > >> + const: 2 > >> + description: > >> + first cell is the pin number and second cell is used to specify optional parameters (unused). > >> + > >> + interrupts: > >> + description: > >> + Array of GPIO interrupt number. Only banked or unbanked IRQs are supported at a time. > > > > Needs constraints. How many items and what are they? > > > >> + > >> + ti,ngpio: > >> + $ref: /schemas/types.yaml#/definitions/uint32 > >> + description: The number of GPIO pins supported consecutively. > >> + minimum: 1 > >> + > >> + ti,davinci-gpio-unbanked: > >> + $ref: /schemas/types.yaml#/definitions/uint32 > >> + description: The number of GPIOs that have an individual interrupt line to processor. > >> + minimum: 0 > >> + > >> + clocks: > >> + maxItems: 1 > >> + description: > >> + clock-specifier to represent input to the GPIO controller. > > > > Drop description. > > > >> + > >> + clock-names: > >> + const: gpio > >> + > >> + interrupt-controller: true > >> + > >> + power-domains: > >> + maxItems: 1 > >> + description: > >> + Phandle to the power domain provider node. > > > > Drop. > > > >> + > >> + "#interrupt-cells": > >> + const: 2 > >> + > >> +patternProperties: > >> + "-hog$": > >> + type: object > >> + properties: > >> + gpios: true > >> + gpio-hog: true > >> + input: true > >> + output-high: true > >> + output-low: true > >> + line-name: true > >> + > >> + required: > >> + - gpio-hog > >> + - gpios > > I see that gpio-hog.yaml dtschema has been added. > Can it be reused here and how? It's applied to any node containing 'gpio-hog' property, so all you need is: required: - gpio-hog