Received: by 2002:a05:7412:3784:b0:e2:908c:2ebd with SMTP id jk4csp1819154rdb; Tue, 3 Oct 2023 01:43:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGMFjselDMIkL37AK9kBRdt0MNuXupkBbA95lCxR9xnT2OQvPRPTzzocoWbTuO/biRmP4TX X-Received: by 2002:a05:6a21:33a9:b0:15d:8366:65b8 with SMTP id yy41-20020a056a2133a900b0015d836665b8mr2626570pzb.13.1696322627564; Tue, 03 Oct 2023 01:43:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696322627; cv=none; d=google.com; s=arc-20160816; b=UZ97sh1Dx4PagGEt+/5B5VQk8ifFZKhmm/YxLKYlFM0MVVe5uT/eRuGwhtTjTgC/Ef gqoa5blH/Db/3GFNcsbgE92vrWeWRAK/Ozmbv12h5F27LWvVajxuqhsTcQsn+s8M9EuP JCaX5Rayici6VhBwtnyRj/SurZknNkGqXVaorH5DmdfXjAjKiB5AxCHjnMWbiwsXFLLt Ktkjd/ypsgOvB3AVQqFxzn770vDhqc25FwoHWdtcBXn2gI11JvzznGmGlyUrtFS4oaSH +iWgZW6JrRrBJ+pYlQoSuxMwh8Z5Uubpm0NFMCNSa9akvHKRKIOpxpRc+Di8+QkcZ/4q 392w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:autocrypt :from:references:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=SL97zAxIUC9k1IlgpaOnwdtJoVdfWSEq6aWQGA8726w=; fh=C36mCmhQfM6k4AkfFyK84uQgjh+yNjSoWOSZKnGOr+0=; b=iyyqIwdBpk4tg3HBt9rhTEazHW7TgTDWNoOdUcpC42tCZiZlmbaojbWfL6lptkIKmu GM9Uh3W9u0az5E3zUPdORR4Z/gyeJrfAlF/qNOBBAYjshEFgOYUppOC1TG2UlJQZLd+c LNveCs4ADrcAVjVURqrbojAKKQs27lkp9gJinFiuu1n8vaePHblKa/Hpn4cagJzV852g SUYZ/hBjV4TqXMdBxQex8EP7WH2Hh+TQerA/9qQLVcZkp+XEoF1VLA+jdGD39DShxU2R xP4BtqVmhnR2LIU8cNur2/vqrcjlml5YwEVSbhzGmDAOUV+k0zNJrCqjNtRvh0hJbpiU f4fA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UavXr8+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id h2-20020a654682000000b005774635c69dsi1004905pgr.66.2023.10.03.01.43.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 01:43:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=UavXr8+d; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 933D98083A95; Tue, 3 Oct 2023 01:43:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230441AbjJCInn (ORCPT + 99 others); Tue, 3 Oct 2023 04:43:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53800 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230314AbjJCInm (ORCPT ); Tue, 3 Oct 2023 04:43:42 -0400 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C4BF9A9 for ; Tue, 3 Oct 2023 01:43:35 -0700 (PDT) Received: by mail-ej1-x631.google.com with SMTP id a640c23a62f3a-98377c5d53eso105841566b.0 for ; Tue, 03 Oct 2023 01:43:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696322614; x=1696927414; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=SL97zAxIUC9k1IlgpaOnwdtJoVdfWSEq6aWQGA8726w=; b=UavXr8+dG7sEVWzswx8sHPDVXI/4uXgY6ufNiyYp//dvWWZ6AGDIAO5sioNyaGct/Q BwHnpo8QsPtJvLbWMbdRA/2tMes3lm/sS7BSYt/MWrL68oneuwyduOgof/SGoDNBdlid P5XsdJGhAKSJf7aaY9LlAJ6vm0J5Myx8THdq8VMo1QqcpNHjdUDSp9xwEGwytoXP3K93 c/wjQozCWLrkIvT6Ljw3Nlpyi1/05T1pGuSCojuqQ7FgZiBqiahftfD/dzM/Z/yJeteV Ssx7eM7ygZ+UjTRYBXtTByy/I3nm8w3GBqUBTpk8MhX8wOy923DCUQ5g086aXLft8ePg zUGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696322614; x=1696927414; h=content-transfer-encoding:in-reply-to:autocrypt:from:references:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=SL97zAxIUC9k1IlgpaOnwdtJoVdfWSEq6aWQGA8726w=; b=Zjw4UyJ1nX/coFMc/egF9yl50H9TQavv/rA/q6Q6vPjrq+Sy1yTbkZXSqNaVNOGGHH 6xZ6wsSj0rJ6t+dpCZ1qrRfk9fJOtjh6Qb6FU3L0Y7V0FtnuZKp0o4Z6GuW5wX0rjOmL HAlRdFyws9Mdmub03n3GFbDp1ZxI/Ri51bhSYaTgaKVesw70kmP1feaXpzkfa2D6UlH3 LjFTIxAlzOZ43tJnwgsSwqSa4q/gfli50ZjQ20CVCEniQXfH6VxSjYMwCBRJFE83nvz1 rUUvnIOIR9tnhN0BGhav0HiD1ScgjZdnd7zBw99N6Th/wmORuHczHvstjlbkrl5rMSRB VuIQ== X-Gm-Message-State: AOJu0Yxg2ipQWv3a738rO0RP2ehfee7uJsDjqPCONm3chQAL08O9ZlW7 8J3OWvWofrZNhOugQcepOhGgyg== X-Received: by 2002:a17:906:24d:b0:9ae:5db5:149 with SMTP id 13-20020a170906024d00b009ae5db50149mr14054363ejl.35.1696322614150; Tue, 03 Oct 2023 01:43:34 -0700 (PDT) Received: from [192.168.1.197] (5-157-101-10.dyn.eolo.it. [5.157.101.10]) by smtp.gmail.com with ESMTPSA id v8-20020a1709063bc800b009ad8338aafasm693458ejf.13.2023.10.03.01.43.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 03 Oct 2023 01:43:33 -0700 (PDT) Message-ID: Date: Tue, 3 Oct 2023 10:43:31 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC 4/4] dt-bindings: gpio: Add bindings for SCMI pinctrl based gpio Content-Language: en-US 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> From: Krzysztof K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KXqBQEscVODaFicsUkjheOD4BfWEcVUqa+XdUEciwG/SgNyxBZepj41oVq FPSVE+Ni2tNrW/e16b8mgXNngHSnbsr6pAIXZH3qFW+4TKPMGZ2rZ6zITrMip+12jgw4mGjy 5y06JZvA02rZT2k9aa7i9dUUFggaanI09jNGbRA/ABEBAAHCwXwEGAEKACYCGwwWIQSb0H4O DFH41ZZ3t1Qbk0N9O0FimwUCYDzvagUJFF+UtgAKCRAbk0N9O0Fim9JzD/0auoGtUu4mgnna oEEpQEOjgT7l9TVuO3Qa/SeH+E0m55y5Fjpp6ZToc481za3xAcxK/BtIX5Wn1mQ6+szfrJQ6 59y2io437BeuWIRjQniSxHz1kgtFECiV30yHRgOoQlzUea7FgsnuWdstgfWi6LxstswEzxLZ Sj1EqpXYZE4uLjh6dW292sO+j4LEqPYr53hyV4I2LPmptPE9Rb9yCTAbSUlzgjiyyjuXhcwM qf3lzsm02y7Ooq+ERVKiJzlvLd9tSe4jRx6Z6LMXhB21fa5DGs/tHAcUF35hSJrvMJzPT/+u /oVmYDFZkbLlqs2XpWaVCo2jv8+iHxZZ9FL7F6AHFzqEFdqGnJQqmEApiRqH6b4jRBOgJ+cY qc+rJggwMQcJL9F+oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 01:43:46 -0700 (PDT) On 03/10/2023 02:41, AKASHI Takahiro wrote: > 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. Linux specific GPIO library is as well outside of DT scope. Please focus here on hardware, not Linux specifics. > >>> >>> 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? Underscores are no allowed and are pointed by dtc (W=2). scmi is redundant here, because names should be generic. Anyway, we do not add node name requirements to device schema. > >>> + >>> + 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. Just look at any other bindings. Best regards, Krzysztof