Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1041994pxb; Tue, 9 Feb 2021 21:08:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSbi1+pYqWnMyiuuZfhzmctENhUuusqhk7Av0WPywrGzY5e2/0oXJbSqHyPRefl/Lj8UNB X-Received: by 2002:a17:906:755:: with SMTP id z21mr1207834ejb.514.1612933712342; Tue, 09 Feb 2021 21:08:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612933712; cv=none; d=google.com; s=arc-20160816; b=z/43UOQI/rWN5VqxrWbaw+Al4vC+gUZha+Zzj//tBcKCK1mS7TbBFdCRtEw8iQoOXZ ZfJFOKqMG22fi8U7F9VnK6G5YM1QMDfBrIh/GzTpQvJPkPjks3COvS1A1DAm+zw3u8Tq 39LIkK+/qDiLVXd1gJXnpODsJ1uG+ETrqiDjLJeI+NDe0Wv5hGHZN4C/1PqMlXAnr9xs OM/vORWvOfAML0Jh4NlI3zpk25N/WM5IHLVVdSq/8/T++YzXgKMfup3FkI65mXit3S6p JhPFTvAzziNlzX+kr/fRVNqmxIukIWICPTrmWQkgN2zBwHPbvoAIgB8FXg0GZTp9psk4 ksRw== 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=6ooCc+sKKlN32ff88V1qipdg9E0fgrhZ3Z5bNuZJHHo=; b=CbtFl/TQ6F7+XBeW6EnpYaLzmcRAv9YYQTMlLw1KujlEOArlTs4WedNdVc0xlnGZiH LACUI/Fzvw7w08G3weMVP6VOMIsSyeMIOjY8GS7hVLLbWju/8noVi1hK9gb1tjU/ydQW JoDcwmMWKw5h1JKRba6Omx+mDKRu+bMUnhSqloKgYNJrsOeKXikI+1utimrsE5TRFhkn oXV1bJc8f780NM8340lQFDjoSidHqB8K0/WQe3XlFE0Hhe/ZQwyqNlFClez2dnLqPY4C NPU/6KclQkr/lLV2jyQDL+89goFgEJ0akb4cvEyISjmX5hdfju/uqHe/30/lxp+gz+Qc 8XHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CoXx6r9G; 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 t24si725476edi.132.2021.02.09.21.08.09; Tue, 09 Feb 2021 21:08:32 -0800 (PST) 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=CoXx6r9G; 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 S232086AbhBIN6z (ORCPT + 99 others); Tue, 9 Feb 2021 08:58:55 -0500 Received: from mail.kernel.org ([198.145.29.99]:49668 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231825AbhBIN5t (ORCPT ); Tue, 9 Feb 2021 08:57:49 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 553E264EEE; Tue, 9 Feb 2021 13:57:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1612879027; bh=NYBRJpVERhcrNPXZUFCqG9eeCVvRA7N1yQGIY6Hsm10=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=CoXx6r9G7v1kTpRmFlkNMSqNy+qXE4rqUTUJXwzKNgMKfKLQBk1c3FSaxpWFUWJYU LFN/NC/hFLZ9pz3bD1N+/B2nx/OBd9bT/HCZgs9kM+TJFSvXh3Cp8YOWDSZ2zGIazr EtIpfsV2vYLTOadp6htqPxzTh4onfXz/D8QO/XaDcMJHGJ6JfeMD/LECfIlpbzx8wl 1+Mez/sJWPs+tfzxdq7xHajxiJS2LNVgip/pLWCYVHaiQpqC6iYbf7DKp+QuTd5g43 IqWtLCXqfRIMh4IhvS5j87Z0dHhTJK0BhRR/xWT7/w5f24vjwaqja4MAo0JWFw6iSS FRvAFjVSn8eBQ== Received: by mail-qk1-f174.google.com with SMTP id s77so17951112qke.4; Tue, 09 Feb 2021 05:57:07 -0800 (PST) X-Gm-Message-State: AOAM531ucW8CNYIWFN/UcopqicS0txCVbwPJLHS668DvPS7QIL7q5Y4L 1xFZtZcztK9FliY7+7PP8OtINgYTXqd0s/3kvA== X-Received: by 2002:ae9:f20b:: with SMTP id m11mr22290060qkg.464.1612879026441; Tue, 09 Feb 2021 05:57:06 -0800 (PST) MIME-Version: 1.0 References: <1611034054-63867-1-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com> <1611034054-63867-3-git-send-email-lakshmi.sai.krishna.potthuri@xilinx.com> <20210209022041.GA2527041@robh.at.kernel.org> In-Reply-To: From: Rob Herring Date: Tue, 9 Feb 2021 07:56:55 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 2/3] dt-bindings: pinctrl: Added binding for ZynqMP pinctrl driver To: Sai Krishna Potthuri Cc: Linus Walleij , Michal Simek , Greg Kroah-Hartman , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-gpio@vger.kernel.org" , git , "saikrishna12468@gmail.com" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Feb 9, 2021 at 2:17 AM Sai Krishna Potthuri wrote: > > Hi Rob, > > Thanks for the review. > > > -----Original Message----- > > From: Rob Herring > > Sent: Tuesday, February 9, 2021 7:51 AM > > To: Sai Krishna Potthuri > > Cc: Linus Walleij ; Michal Simek > > ; Greg Kroah-Hartman ; > > linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; > > devicetree@vger.kernel.org; linux-gpio@vger.kernel.org; git > > ; saikrishna12468@gmail.com > > Subject: Re: [PATCH v2 2/3] dt-bindings: pinctrl: Added binding for ZynqMP > > pinctrl driver > > > > On Tue, Jan 19, 2021 at 10:57:33AM +0530, Sai Krishna Potthuri wrote: > > > Added documentation and dt-bindings file which contains MIO pin > > > configuration defines for Xilinx ZynqMP pinctrl driver. > > > > > > Signed-off-by: Sai Krishna Potthuri > > > > > > --- > > > .../bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml | 337 > > > ++++++++++++++++++ include/dt-bindings/pinctrl/pinctrl-zynqmp.h | > > > 23 ++ > > > 2 files changed, 360 insertions(+) > > > create mode 100644 > > > Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml > > > create mode 100644 include/dt-bindings/pinctrl/pinctrl-zynqmp.h > > > > > > diff --git > > > a/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml > > > b/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml > > > new file mode 100644 > > > index 000000000000..9f2efbafcaa4 > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/pinctrl/xlnx,zynqmp-pinctrl.ya > > > +++ ml > > > @@ -0,0 +1,337 @@ > > > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause %YAML 1.2 > > > +--- > > > +$id: http://devicetree.org/schemas/pinctrl/xlnx,zynqmp-pinctrl.yaml# > > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > > + > > > +title: Xilinx ZynqMP Pinctrl > > > + > > > +maintainers: > > > + - Sai Krishna Potthuri > > > + - Rajan Vaja > > > + > > > +description: | > > > + Please refer to pinctrl-bindings.txt in this directory for details > > > +of the > > > + common pinctrl bindings used by client devices, including the > > > +meaning of the > > > + phrase "pin configuration node". > > > + > > > + ZynqMP's pin configuration nodes act as a container for an > > > + arbitrary number of subnodes. Each of these subnodes represents > > > + some desired configuration for a pin, a group, or a list of pins or > > > + groups. This configuration can include the mux function to select > > > + on those pin(s)/group(s), and various pin configuration parameters, such > > as pull-up, slew rate, etc. > > > + > > > + Each configuration node can consist of multiple nodes describing > > > + the pinmux and pinconf options. Those nodes can be pinmux nodes or > > pinconf nodes. > > > + > > > + The name of each subnode is not important; all subnodes should be > > > + enumerated and processed purely based on their content. > > > + > > > +properties: > > > + compatible: > > > + const: xlnx,zynqmp-pinctrl > > > + > > > +patternProperties: > > > + '^(.*-)?(default|gpio)$': > > > + type: object > > > + patternProperties: > > > + '^mux(.*)$': > > > > '^mux' is equivalent. > I will fix in v3. > > > > > > + type: object > > > + description: > > > + Pinctrl node's client devices use subnodes for pin muxes, > > > + which in turn use below standard properties. > > > + $ref: pinmux-node.yaml# > > > + > > > + properties: > > > + groups: > > > + description: > > > + List of groups to select (either this or "pins" must be > > > + specified), available groups for this subnode. > > > + items: > > > + oneOf: > > > + - enum: [ethernet0_0_grp, ethernet1_0_grp, > > > + ethernet2_0_grp, > > > > Don't need 'oneOf' for a single item. > Here we have a possibility to have more than one group item as below, > hence used 'oneOf'. > groups = "uart0_4_grp", "uart0_5_grp"; > Please suggest me if there is a better/another way to represent this. 'items' has 2 forms: a list with a schema per entry or a schema that applies to all entries. 1 item: items: - enum: [...] all items: items: enum: [...] You should use the latter form. You may need 'maxItems' here. Pick a 'should be enough' value if you don't have an actual max. Rob