From patchwork Thu Nov 18 13:21:47 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: 12693041 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A80A4C433EF for ; Thu, 18 Nov 2021 13:24:07 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6B78461401 for ; Thu, 18 Nov 2021 13:24:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6B78461401 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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: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:In-Reply-To:References: List-Owner; bh=2zCAFNGLK2JK8ou6z3IbizXI2P4kuLqNQr/AczKNFE8=; b=XRxz2Zo9orfUBb YAEgg8529mgzRm1gkN7kI7U8hS10wxqey7MeSuqjip2oyA2/o2Sn519R5TqdDlhJ7JyhzXYGlHXuG 4a8I96MQlaQky9Xx6ZgqfqShbLvDp5Z7ytxtEn6wnX2CyNvtq1U0SHnYrsuDVKJ0HGPnEjAvQTL42 CR0T44tUB95kElLKol1JOGNaD4zUy6knuZYXarNJMrM22TLd5CrZj/rRF2vkCWzbmpViu08DKPXfk h+4BwOEqn7iffXqMPdHxcvuBAzrAx5NK6eaSMs+3hnpSradgPwFX3gv76i+6haV5aqB30IQx6pm+Y lXneiMBOlFAeeclyLeuw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnhMl-007sNo-3o; Thu, 18 Nov 2021 13:22:15 +0000 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mnhMg-007sMP-UF for linux-arm-kernel@lists.infradead.org; Thu, 18 Nov 2021 13:22:12 +0000 Received: by mail-lf1-x12c.google.com with SMTP id f18so26013533lfv.6 for ; Thu, 18 Nov 2021 05:22:09 -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:mime-version :content-transfer-encoding; bh=jjMWmw57eJoizn/MdkVd1BrZJOz35EE2CVOU92rSq/4=; b=hZf5UnOcyzLEh9qBLP6XQaEXhRD3KuDDIXkH9pn8Okmdy9F/5MmOeolZUU9ZgtXzAt GYbMB+PvtoU0y8/mPeLeHxFAAG8SKdTbVyq9PWVisqf0WyndumYj75nOe1b2A8p/GG1u Q0VWyqVbHShWi5Q7JLRfep0JfLz4qy+QinNkFpkYrtfoXg2AbjjBvWqfl8mrlIxp+9f4 Eo2GBNIMrYKqTWVqQr3tDbXDI84ix3kLZFj4Y/ez8U7DHmFDQ61/GgNhP6ohMt/Atm4Z W0nKkuZCJdYkkHEMRcagjvXtEixhAEO3I+Hibf+6qViKJj/G1+IXjdd+t1cpOb2UFfQE b5zw== 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:mime-version :content-transfer-encoding; bh=jjMWmw57eJoizn/MdkVd1BrZJOz35EE2CVOU92rSq/4=; b=xOT2xxtJT83pk6sZC/YIEMtpWmcZC4wweHV8q5v7g/IKIEgImn3SGZoVtn/WEzjJuz sJzo8W9uClCkeeR+KYO9vuqaWYikiXFeICH8Ahr597NRIt29mJwSXSMrGjRvphgL5p+P dJAN3hiGz02lAL4QHnjlYvetROE/0AWDskjN0IxqZg0QHlREB0zHNboOG8rDB/Rrjrcj LtFZLPQODgM3VWI2wE3h0GN0cwcfwubPr+UlxOgVvnfuab0zlBXOLdY7+g1YClG4ivHI zF1vNyax17vK4DeCVjyHpUbqG5YRtju2I0L8FOaVx5Y/Jwa1J/Wv6wBARYZTcTtoMxGZ dhUQ== X-Gm-Message-State: AOAM533tRYdu8HuYoAxlK+Qfdl3hNWbTObyZz18MNfNa0s4nJThg2F8Z vODRACk9L4rpxLooB+AwN9A= X-Google-Smtp-Source: ABdhPJy8R7ZJQyi3lcjMDV9QAMDL0q5pOG30pY+enhtBxo7zcBuKN9hCqOq+sZ7FpzXH2I3ciZRjEQ== X-Received: by 2002:a05:6512:1310:: with SMTP id x16mr4000688lfu.436.1637241728204; Thu, 18 Nov 2021 05:22:08 -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 bp36sm356550lfb.0.2021.11.18.05.22.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Nov 2021 05:22:07 -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 0/5] pinctrl: allow storing pins, groups & functions in DT Date: Thu, 18 Nov 2021 14:21:47 +0100 Message-Id: <20211118132152.15722-1-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211118_052211_012674_5C6E0651 X-CRM114-Status: GOOD ( 11.36 ) 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 A week ago I sent [PATCH RFC] dt-bindings: pinctrl: support specifying pins https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20211110231436.8866-1-zajec5@gmail.com/ From short discussion in that thread it seems that using DT to store pinctrl pins, groups & functions may be an option. I'd like to ask for reviewing my patchset implementing that. Please note it's about describing hardware elements and not actual programming way. It may be used with pinctrl-single.c one day but it's designed as a generic solution for data. Patches 1-4 are for linux-pinctrl.git. Patch 5 I found worth including as DT big example. It can go through Linus with Florian's Ack or I can send it to Florian later. Rafał Miłecki (5): dt-bindings: pinctrl: support specifying pins, groups & functions dt-bindings: pinctrl: brcm,ns-pinmux: extend example pinctrl: add helpers reading pins, groups & functions from DT pinctrl: bcm: pinctrl-ns: supoprt DT specified pins, groups & functions ARM: dts: BCM5301X: add pinctrl pins, groups & functions .../bindings/pinctrl/brcm,ns-pinmux.yaml | 29 ++++- .../devicetree/bindings/pinctrl/pinctrl.yaml | 50 +++++++ arch/arm/boot/dts/bcm4709.dtsi | 74 +++++++++++ arch/arm/boot/dts/bcm47094.dtsi | 11 +- arch/arm/boot/dts/bcm5301x.dtsi | 123 ++++++++++++++++++ drivers/pinctrl/bcm/pinctrl-ns.c | 90 ++++++++----- drivers/pinctrl/core.c | 89 +++++++++++++ drivers/pinctrl/core.h | 5 + drivers/pinctrl/pinmux.c | 43 ++++++ drivers/pinctrl/pinmux.h | 2 + 10 files changed, 475 insertions(+), 41 deletions(-)