From patchwork Fri Dec 10 11:42:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12695595 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 21237C433EF for ; Fri, 10 Dec 2021 11:44:24 +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=A6zzAiR7VNlDW4uT0TJkMHFoYF3KAXjJfZnINB2ZJmc=; b=Czq1FfFKpxprV3 goALZt0IjhDLPGxD3iDVdk3T2dn7INbNriy7iWl1cTdKAawZks/z4+IlF+8d+SmYUxwhtWlx+BRD7 NrA9GnvTfC4kwbdjYs+UefP2DfbJ42lXDVJSLvaiXghAcSUrUxTZ9rhg0NpfQAiDF5IamiVwE3WWz 6zV5GKVavLZSFu2LSuZUFgargPa3MJrYPH6ilJv3nYnlDv1V+2pg+GVug+Ufk3V8q0+AO2o1uDyaT O6nXdafBvC2isLcF0IefLz0NPiqVVtblT8tJn6UuMoMomDdX5K4Lrsmvj0lK9GSnqplOUe1A86n4P O4UI/qzvavqB/mb7qCMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mveIa-001ibj-EA; Fri, 10 Dec 2021 11:42:48 +0000 Received: from mail-lf1-x131.google.com ([2a00:1450:4864:20::131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mveIL-001iYV-QH for linux-arm-kernel@lists.infradead.org; Fri, 10 Dec 2021 11:42:35 +0000 Received: by mail-lf1-x131.google.com with SMTP id m27so17475834lfj.12 for ; Fri, 10 Dec 2021 03:42:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=CmlEqelTeZa5/+/7EvCKddeNcASbx3AAXYq8cfWXM3w=; b=d/tDZCmkYz4kBcQ5AVD/PRKTRfH/VN/RKit55yf1mCPSo4yyE4Vg1t5EfIO7u5+Dkl b89+6h3tBbApts5N/MpZk9ea+bQDSBu9gy9u6nlVnICKENnn1Sn4ZYJih07z+woWVQnx +4ZLpzzyrV/B0YRFaRzHSupOhTFY1J6SD5ol/7XMqpBKnyU+DfXBoXoyqyMn+ZkvFN+6 OtLlzRehekeJp3w/js6JvShObA5E1qGkKemhMp1474Hm75HimGXY3fglmq2P9qoxJXMP 8jiocn9FH71zk2mKfSwC4Rq1LW6AIrXPe7812pgxWEOsFl363gLAxbL6FFpuiDEjhKoD zyFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=CmlEqelTeZa5/+/7EvCKddeNcASbx3AAXYq8cfWXM3w=; b=nnXoCnhZgiUbyIYs/eXN60nr7siv7tZpcaQBFtJVixxv4qtMNKUPoxPuPC7mRHjEg2 z9X+Bq38OpxIxhGcpKTZLL2jTAqkm2PHagiiP14Gt/AIghpm5RRET200b11pKTuhBmZj qyHeEB8zqdsU9buAh5/VQy9RFfqrC1eCvoXy4k8sMKkoKEMWR6jSDSxS75w9+KgvRudQ ucPLmkEgszdTFjD021F0tANWZe094lv37lyi9RuKL5P01pewZtQ/jIl8WtYbM185IMWZ W/5rY11B1fqsbUKIbG0+sEwwE7yMOsBa9KRc1VZ+/+dSu4OncyWd6AZpqkwjZYrQZy4Z 97lA== X-Gm-Message-State: AOAM53063VNQ7KJYAEFwUe4nTfpCmrDp09DtSLAN31kg7U271VMqKiNO atFPTdhZxyZhxeHZyUeMY2I= X-Google-Smtp-Source: ABdhPJyCyDDUfrqZQhdCo3chcesn2+D/GAUca/n2gxuX+hb9vVLIGTbmTOFuccVzmAO+c62mBRYMaw== X-Received: by 2002:ac2:5c48:: with SMTP id s8mr11730573lfp.292.1639136551798; Fri, 10 Dec 2021 03:42:31 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id j15sm289375lfe.157.2021.12.10.03.42.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Dec 2021 03:42:31 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Linus Walleij , Rob Herring Cc: Tony Lindgren , Andy Shevchenko , linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH V3 1/2] dt-bindings: pinctrl: support specifying pins, groups & functions Date: Fri, 10 Dec 2021 12:42:21 +0100 Message-Id: <20211210114222.26581-2-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211210114222.26581-1-zajec5@gmail.com> References: <20211210114222.26581-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211210_034233_877656_BEB431F6 X-CRM114-Status: GOOD ( 12.31 ) 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 From: Rafał Miłecki This binding change is meant to introduce a generic way of describing pinctrl blocks details. Every pinmux block is expected to have: 1. Named pins 2. Named groups containing one or more pins 3. Named functions referencing one or more groups It doesn't describe how hw should be programmed. That remains binding and driver specific. This commit describes a common syntax for "pins", "groups" & "functions" nodes. Every node allows specifying its entries. That design is meant to be extendable and minimalistic enough to be generic (matching any hardware). Relations between pins, groups and functions are expected to be the same for every hardware. Using subnode objects allows extending this binding to cover hardware specific needs (e.g. custom values). Example to consider: pins { foo: foo { vendor,magic = <0xc0fe>; }; } groups { bar { pins = <&foo>; vendor,secret = <0xbeaf>; }; }; Signed-off-by: Rafał Miłecki --- .../devicetree/bindings/pinctrl/pinctrl.yaml | 34 +++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl.yaml b/Documentation/devicetree/bindings/pinctrl/pinctrl.yaml index d471563119a9..e36662cb1f3b 100644 --- a/Documentation/devicetree/bindings/pinctrl/pinctrl.yaml +++ b/Documentation/devicetree/bindings/pinctrl/pinctrl.yaml @@ -42,4 +42,38 @@ properties: This property can be set either globally for the pin controller or in child nodes for individual pin group control. + pins: + type: object + + patternProperties: + "^.*$": + type: object + description: Pin named by node name + + groups: + type: object + + patternProperties: + "^.*$": + type: object + description: Group named by node name + + properties: + pins: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: Array of pins belonging to this group + + functions: + type: object + + patternProperties: + "^.*$": + type: object + description: Function named by node name + + properties: + groups: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: Array of groups used by this function + additionalProperties: true