From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.6 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BCE51C43461 for ; Fri, 21 May 2021 08:32:07 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9FB5061057 for ; Fri, 21 May 2021 08:32:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232089AbhEUId3 (ORCPT ); Fri, 21 May 2021 04:33:29 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:43322 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232011AbhEUId2 (ORCPT ); Fri, 21 May 2021 04:33:28 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 14L8W3ud053831; Fri, 21 May 2021 03:32:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1621585923; bh=MOUPIRXUwXmLPYczhUeKPgIWYaZIsJK7spC0Tb6vuTI=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=s6WFFiDHKxoceCE8FOc2HHpVjRjiPsgmcnlIremPUYWO5kjNorAhP/UjtBde1cKM6 9Sq41S+PlRSFbY9msc16UBOXKKMfCHm7f13GqT1tHKHTUGrJofOkcXPs7e3rJjoxPA gmsJacbNZ1ybSJwS/uFlyANrLLVguFDaaeER+3sE= Received: from DFLE102.ent.ti.com (dfle102.ent.ti.com [10.64.6.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 14L8W363115480 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 21 May 2021 03:32:03 -0500 Received: from DFLE104.ent.ti.com (10.64.6.25) by DFLE102.ent.ti.com (10.64.6.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2; Fri, 21 May 2021 03:32:03 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE104.ent.ti.com (10.64.6.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2176.2 via Frontend Transport; Fri, 21 May 2021 03:32:03 -0500 Received: from [10.250.100.73] (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id 14L8W0gb032440; Fri, 21 May 2021 03:32:00 -0500 Subject: Re: [PATCH] dt-bindings: gpio: gpio-davinci: Convert to json-schema To: Rob Herring , Aswath Govindraju CC: Vignesh Raghavendra , Lokesh Vutla , Kishon Vijay Abraham I , Linus Walleij , Bartosz Golaszewski , Keerthy , , , References: <20210511090122.6995-1-a-govindraju@ti.com> <20210517221513.GA3263368@robh.at.kernel.org> From: Grygorii Strashko Message-ID: <861cefe2-7bb6-c435-ab0d-483155852876@ti.com> Date: Fri, 21 May 2021 11:31:56 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210517221513.GA3263368@robh.at.kernel.org> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? >> + >> +required: >> + - compatible >> + - reg >> + - gpio-controller >> + - "#gpio-cells" >> + - interrupts >> + - ti,ngpio >> + - ti,davinci-gpio-unbanked >> + - clocks >> + - clock-names >> + >> +additionalProperties: false >> + [...] -- Best regards, grygorii