From patchwork Mon Oct 2 02:16:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 13405504 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 EDF5CE784A7 for ; Mon, 2 Oct 2023 02:18:00 +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:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=hhm8IqK33aD9XenqMIP1Hys2iREGjGNFiryYK9e9ho0=; b=b8T11BMpGx7wqO ySXez4gwTXepXeA7mXfmu6v21i2qzoex7RERokFivgyDvdJtw/NjQGtrIO4xRzixVz/f86wlj6Edz 7jr9G2mqAymqy+dqCa7UIEjaB9/THzaYg8KJU0SuciwEM2DYCJRPP26m7IOA3H+XL0U5HF++OL3Ug WFjH7cfBjnHYaPtBKXOYgLCW0ZKUUlYSIMpkJjUdJsaPSrD6CZNO9edyU2+jfaFTbQh5dFz5pEx/C TquNOhBWKkoHP4TDEQMH0JRZ9HnQliyTWcBnSjpr6syZxU2fI/Fdbz6vxOnffSyhexD86YsFlc1XA nMYeZOyUUaqdRTrvC+Fg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qn8V4-00BqPE-0v; Mon, 02 Oct 2023 02:17:34 +0000 Received: from mail-oa1-x31.google.com ([2001:4860:4864:20::31]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qn8V1-00BqMo-2W for linux-arm-kernel@lists.infradead.org; Mon, 02 Oct 2023 02:17:33 +0000 Received: by mail-oa1-x31.google.com with SMTP id 586e51a60fabf-1dd4115b369so1159518fac.1 for ; Sun, 01 Oct 2023 19:17:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696213050; x=1696817850; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=RPOWcZHTqmoq/zqsh7e1DQOIHdOfQaJNQbue+Ak7Pz4=; b=DIDYV+VjEgRFz1xxOEe/3I9m8DrePNwK2SPxbNDq+Pw68wa/pbEd7SCFR733yUEcYm 01EbzzyehSyHOY9rgFWyyC695J5NjsZvlF6Fh7CHFz0w7i+Q8aDD4K9eSocfaXsn6v5R Z1LEGJbRngJfWC0WnrijUTo7Jz4E4NE/I77YzlCc+yPh4+yvpISl/Kxw5SLLDvdckD4o m9fkXgm6BCSZmDHYy+3iEtB0WeKbAdp983YfsWRHvR4Mc5PWsJefR9kCW7z2xXku86xi AaspA4t0miW9fa7qa8BJFCayD21Ic0xgYXO5NnidlTkzk0H1Uf2BhPpyn3NbbLwLwrWV 5+BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696213050; x=1696817850; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RPOWcZHTqmoq/zqsh7e1DQOIHdOfQaJNQbue+Ak7Pz4=; b=g2acLIaz4dUJ0XQr0pp/IfRZOsi9Z6+ZqMpgi6Fb3zHusDTkP8tNKufDlxLIfep3Et MgVfpNOMLs8uEJ/w9WBXgUyFgLwe6mREMYSGatBnaaOXd/iIHl1DPJUz02RUxrF1Vwrk l8ApdiPlsA497vgTUSQ77eLfYoHQ5HsyFKkHQbGVO9x4jQP4fymtxWo+rYWyDjmocsfP y2iBdAVJ1Z2S0e90V1wVIrP3WtcEjtHzZfcJ1ToQFsQ0VJ3+Rwf/iPh0kjnpNmXKvKzl sWM+KaaLDjo7TxIcrxIdc+m83SLqzOXi68v/ZWt8JEoyHmL1kA0SzkohCkZ/zTfPf+jF ZAQg== X-Gm-Message-State: AOJu0YzMmQn+joJ+9NonA8I8jfOmtnvxv4rlHTeIBCdZQZ41Wh9NrlsO 7sdNcIkql4jVSV4Viw0awfeIzw== X-Google-Smtp-Source: AGHT+IGpOuQGzvtGHKgSr/mxvP55UKAmUGYnrFTePhofwASv4SkD/NQd9nZ9IBhVQqqOhXeqb9otNw== X-Received: by 2002:a05:6808:2123:b0:3a9:f25d:d917 with SMTP id r35-20020a056808212300b003a9f25dd917mr13656079oiw.4.1696213049725; Sun, 01 Oct 2023 19:17:29 -0700 (PDT) Received: from octopus.. ([2400:4050:c3e1:100:7ab1:199:d138:f054]) by smtp.gmail.com with ESMTPSA id mg11-20020a17090b370b00b002609cadc56esm5278319pjb.11.2023.10.01.19.17.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Oct 2023 19:17:29 -0700 (PDT) From: AKASHI Takahiro To: sudeep.holla@arm.com, cristian.marussi@arm.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, linus.walleij@linaro.org Cc: Oleksii_Moisieiev@epam.com, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, AKASHI Takahiro Subject: [RFC 4/4] dt-bindings: gpio: Add bindings for SCMI pinctrl based gpio Date: Mon, 2 Oct 2023 11:16:02 +0900 Message-Id: <20231002021602.260100-5-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231002021602.260100-1-takahiro.akashi@linaro.org> References: <20231002021602.260100-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231001_191731_817420_B1955FB7 X-CRM114-Status: GOOD ( 12.88 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org A dt binding for SCMI pinctrl based gpio driver is defined in this commit. It basically conforms to generic pinctrl-gpio mapping framework. 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]+)$" + + compatible: + const: arm,scmi-gpio-generic + + 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 + + additionalProperties: false + +required: + - compatible + - gpio-controller + - "#gpio-cells" + - gpio-ranges + +additionalProperties: false + +examples: + - | + #include + + scmi_gpio_0: scmi_gpio@0 { + 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: + sdhci0_pwrseq { + compatible = "mmc-pwrseq-emmc"; + reset-gpios = <&scmi_gpio_0 0 GPIO_ACTIVE_LOW>; + };