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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CFC63E776D4 for ; Tue, 3 Oct 2023 00:42:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=LwFMX7bVqtuDXIQJPsyrqPH6nDWNx9rqvUVNAOYYZ1I=; b=bL6WPreGF9UWeu siZOXDgLqAw149vxDB7pHI0g9bvBwjrjFRUCKWY5ERDu65STbbdCcgQqSKcr18nUTPnA68AHDMPd7 BsySndGbFq+GfYww04EeFRjo7x/4kmliEeJLFPvqxYRq0LPGvr2p82+Ui4Eb8FjaEofHI5vyZ1By+ aSBTll3jWtSOh1i1DDIO3heL1Fn+sOt7Vrix1Th6bfPSjMZaZxhMXznxafjATM6MeJVgYTbTNd0ai UarjziH3zfVc2LTlbJbRASa/MYEPLeMcjOnAwAT/Y0L9DBkzOGpdLDiqHdtqJWkbiFWxRjiyVeJM3 MR9of6WLS3N4csF1K7eA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qnTUJ-00Das4-1L; Tue, 03 Oct 2023 00:42:11 +0000 Received: from mail-oi1-x22e.google.com ([2607:f8b0:4864:20::22e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qnTUG-00DarA-0c for linux-arm-kernel@lists.infradead.org; Tue, 03 Oct 2023 00:42:10 +0000 Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3ae0df6494bso55317b6e.1 for ; Mon, 02 Oct 2023 17:42:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696293726; x=1696898526; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:from:to:cc :subject:date:message-id:reply-to; bh=6NUDE2+H89he6BS9I3HNkP9B+FIe1jpB9GTuSekloXo=; b=ETu5p3xNhkpYWan8xHzpic6ehjfRMweXamkuKAwinxWy2EFPTRel7RXc2J/AGXXiDt iK9Z7SRl0MYYinRpt1DmS8u3aYj9IFdEdnC1fvThRaPzm2WmkGcD2MTA3t+t5x33R5LM Ydp3Q9hKNgrxwcGZ2XTZgwEGQ7ZeX9hu9rIOvqdaUlGTWcuC7uXDx5z84KESX9RE8PWU zjPMxVF3MIzXmEsUEzC8mX2NGHsRmLI0h65LEZyguN4zXMKM1O4Cl12nVDrqihaOdUKs 4fmdyjBZFYntTTsYxpwohCaTmw1WrIUmcLIDu2joLLlCYY+kB1KVFclxVWMjjImvC45X p5gw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696293726; x=1696898526; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6NUDE2+H89he6BS9I3HNkP9B+FIe1jpB9GTuSekloXo=; b=UfwJ3hwg8VewGtFYzQVR+5PLlCSzWH1pREdnPPIkA0TDDJd+fM9Erl9RpfmMcDpifh elCluL1no9kEnVeCsy7ZAviyewXtAZlOAM370OePdsMU3qTzf1olM1sBPlxiNWqJbCtb aZNsszEEvNH0KMaK2uv8ZGTN97O8pGBfg+kcuXJCbFO/RIMwRo9WOO2a0Lbm2o3Uava9 79O0kdGXdXuAhkXHSiOSTaSe56vU5KNaH0SuuBjfycil0Qce+KKtzFonrnaQK5cRBrol mdMNhqbsNME8rQzq1d+K/IDuvehLMODC8PvuiagbsbXUL+PYgMRBcTFEzB9CHU1zLto6 JCxw== X-Gm-Message-State: AOJu0Yw7jAwRYNAZXY+PW/gqR5Byl4+rHaMp4TIns9q3MHP+8IzCUwcZ 0iXpySJNCU11IM2E38sqYpqdHg== X-Google-Smtp-Source: AGHT+IGlw1kZKdt+UyAH31lC9JsO/OzHGFTE0E91BQ34s5sGYXbhHt7x/H/hFaTuM1t44AIWZKwO6w== X-Received: by 2002:a05:6808:3614:b0:3ad:f5d8:2da9 with SMTP id ct20-20020a056808361400b003adf5d82da9mr10798904oib.4.1696293722812; Mon, 02 Oct 2023 17:42:02 -0700 (PDT) Received: from octopus ([2400:4050:c3e1:100:783d:e8bb:e013:a869]) by smtp.gmail.com with ESMTPSA id a20-20020a637f14000000b0057d86bb613esm75006pgd.45.2023.10.02.17.41.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Oct 2023 17:42:02 -0700 (PDT) Date: Tue, 3 Oct 2023 09:41:58 +0900 From: AKASHI Takahiro To: Rob Herring Cc: sudeep.holla@arm.com, cristian.marussi@arm.com, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linus.walleij@linaro.org, Oleksii_Moisieiev@epam.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org Subject: Re: [RFC 4/4] dt-bindings: gpio: Add bindings for SCMI pinctrl based gpio Message-ID: Mail-Followup-To: AKASHI Takahiro , Rob Herring , sudeep.holla@arm.com, cristian.marussi@arm.com, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linus.walleij@linaro.org, Oleksii_Moisieiev@epam.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org References: <20231002021602.260100-1-takahiro.akashi@linaro.org> <20231002021602.260100-5-takahiro.akashi@linaro.org> <20231002144155.GA1675188-robh@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20231002144155.GA1675188-robh@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231002_174208_252511_4FE616F3 X-CRM114-Status: GOOD ( 24.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi Rob, On Mon, Oct 02, 2023 at 09:41:55AM -0500, Rob Herring wrote: > On Mon, Oct 02, 2023 at 11:16:02AM +0900, AKASHI Takahiro wrote: > > A dt binding for SCMI pinctrl based gpio driver is defined in this > > commit. It basically conforms to generic pinctrl-gpio mapping framework. > > What is "generic pinctrl-gpio mapping framework"? DT doesn't have > frameworks. I meant to refer to section 2.1-2.3 in "Documentation/devicetree/bindings/gpio/gpio.txt". The semantics is implemented in drivers/gpio/gpiolib(-of).c. > > > > Signed-off-by: AKASHI Takahiro > > --- > > .../bindings/gpio/arm,scmi-gpio.yaml | 71 +++++++++++++++++++ > > 1 file changed, 71 insertions(+) > > create mode 100644 Documentation/devicetree/bindings/gpio/arm,scmi-gpio.yaml > > > > diff --git a/Documentation/devicetree/bindings/gpio/arm,scmi-gpio.yaml b/Documentation/devicetree/bindings/gpio/arm,scmi-gpio.yaml > > new file mode 100644 > > index 000000000000..2601c5594567 > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/gpio/arm,scmi-gpio.yaml > > @@ -0,0 +1,71 @@ > > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause > > +%YAML 1.2 > > +--- > > +$id: http://devicetree.org/schemas/gpio/arm,scmi-gpio.yaml# > > +$schema: http://devicetree.org/meta-schemas/core.yaml# > > + > > +title: SCMI pinctrl based generic GPIO controller > > + > > +maintainers: > > + - AKASHI Takahiro > > + > > +properties: > > + $nodename: > > + pattern: "^scmi_gpio(@[0-9a-f]+)$" > > Not the correct name. How not? > > + > > + compatible: > > + const: arm,scmi-gpio-generic > > What makes it generic? No such thing. Just drop '-generic'. I will discuss this issue in following Cristian's comment. > > > + > > + gpio-controller: true > > + > > + "#gpio-cells": > > + const: 2 > > + > > + gpio-ranges: true > > + > > + gpio-ranges-group-names: true > > + > > +patternProperties: > > + "^.+-hog(-[0-9]+)?$": > > + type: object > > + properties: > > + gpio-hog: true > > + gpios: true > > + input: true > > + output-high: true > > + output-low: true > > + line-name: true > > + > > + required: > > + - gpio-hog > > + - gpios > > You don't need all this just 'required: [ gpio-hog ]'. Then the hog > schema will check the rest. Okay. > > + > > + additionalProperties: false > > + > > +required: > > + - compatible > > + - gpio-controller > > + - "#gpio-cells" > > + - gpio-ranges > > + > > +additionalProperties: false > > + > > +examples: > > + - | > > + #include > > + > > + scmi_gpio_0: scmi_gpio@0 { > > gpio { > > But doesn't SCMI have protocol numbers? > > > + compatible = "arm,scmi-gpio"; > > + gpio-controller; > > + #gpio-cells = <2>; > > + gpio-ranges = <&scmi_pinctrl 0 10 5>, > > + <&scmi_pinctrl 5 0 0>; > > + gpio-ranges-group-names = "", > > + "pinmux_gpio"; > > + }; > > + > > + // Consumer: > > Outside the scope of this binding. Drop this node. Even though it's in an example? "#gpio-cells" has a meaning in consumer side. -Takahiro Akashi > > + sdhci0_pwrseq { > > + compatible = "mmc-pwrseq-emmc"; > > + reset-gpios = <&scmi_gpio_0 0 GPIO_ACTIVE_LOW>; > > + }; > > -- > > 2.34.1 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel