From patchwork Tue Dec 18 15:57:44 2018 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: 10735931 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 56890746 for ; Tue, 18 Dec 2018 15:58:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 451E82A936 for ; Tue, 18 Dec 2018 15:58:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 38BE52A93C; Tue, 18 Dec 2018 15:58:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B52DD2A936 for ; Tue, 18 Dec 2018 15:58:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject: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=KjSfO/XJs23VOazFt13FxxTeFfy2qJRomBe/pAk3wUw=; b=qfQghI4xv2gaNQ tFP6kD8SF35Izgun3biL5nTt1xXop9c5EvwqpeAtHToSNrp987mbykZrG+Z66olKyu4pMBLSN2u1w K498goyEbyXmBhRexn5NxQ9KSQsUcAtx4dgK/AVuXN/4Ss7NHh3b7CKVGrZ3dc5RZzq/zakQd8ADT lkFu0/DIcYb0q8bWHNKMjol9IVENjEzpilcZnYZkIorT/JIUfx1q6/JfeTxasVXXDh4Z4RYQbRft5 RHq8Qj1BLdIdBBJOwnqXGKM22HePzV0D21VGDzg+x0uIoT8W4/k8sbP40l4M5ddkzplt5DJneIbFw qJB1A/ea3rQ+1IFk5aLQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZHlE-0003ks-LB; Tue, 18 Dec 2018 15:58:20 +0000 Received: from mail-lf1-x142.google.com ([2a00:1450:4864:20::142]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gZHlA-0003jr-8m for linux-arm-kernel@lists.infradead.org; Tue, 18 Dec 2018 15:58:18 +0000 Received: by mail-lf1-x142.google.com with SMTP id n18so12654334lfh.6 for ; Tue, 18 Dec 2018 07:58:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jf8b8vtTUhJJ5Ks//e7xldWM93d3ka8ldx+UbNKLFZs=; b=c3qM7PBdboDMxG33PXBfsFZNQcwjQgOHMJR+HFCRZ6U5UALSvkdn4V+IlGyNb6Mtey 6l0Z6UvgCUEKnp4Pz0szT2f4WV9qAYhOUWA51HNpC1KMR/uPn0kKSW6nk1vZxro8ky8s OWsiG2WJr5aC3G/DjCB1RdhTmWPx+3twMfw1L1Q7wEEmanA5aE78Uafl0anjWoZQD7sy 3TKBixJOMVyiQ8jekLy4hoqOpalxoFxDtGc1TdRJzzLEFcowZAFJWFUdCiLKBrW+W7Xx b6o1ojD28Ig5yYDazrTRHmNje6CjFtBKbrSH7qfPKrhPxBhDCGhA+dsVCkLAhepusV6G iKYQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=jf8b8vtTUhJJ5Ks//e7xldWM93d3ka8ldx+UbNKLFZs=; b=J1G1/CMpG14TiTiBrmwP3PxSrBc3a2aYmObKYznXCYkPBuu2CVcTp66nnNsNZj30tf TzCtf3p/IARgVknt8Szv52Y3rzsTNNHOkizk/W96Yh7tR1SHb5QcHPAxRz+67FrHstj8 Pnlw0Ffdgf1Bjt+NoDC3RdNVNQ4jIeoEelpYGEATMOeuUuO2/4eUTtWOnKcE+b28mEzc ZQ6r+I/PkCrFIs5QcMPjrAICgfy8GwvuiFY1p5ZNjz4xt8+Hg0fRIvEICOt3Urkfkzo5 Q8t8yZMC/P0hFr+jQHbTIjqewZlahYAb6RzlRNRXAIQhCtuPfwM41r0rQg1b7ptOaDLK Xyvg== X-Gm-Message-State: AA+aEWY2JXHGIL5b1nRgUu3HpW543YVNZoMeFnhnCO+aJepyfVQ30ONu JSJozhOBW8SjZR5LNiZR47c= X-Google-Smtp-Source: AFSGD/VVeB7z9vq414UvtXJV4JLPFy7J6RYjn7tma8OebLcZ37jJgWJM5XQc3saJtXScwztxRri6zg== X-Received: by 2002:a19:ae03:: with SMTP id f3mr10876716lfc.86.1545148683647; Tue, 18 Dec 2018 07:58:03 -0800 (PST) Received: from linux-veee.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id r7-v6sm3085277ljc.10.2018.12.18.07.58.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 18 Dec 2018 07:58:03 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Linus Walleij , linux-gpio@vger.kernel.org, Rob Herring , devicetree@vger.kernel.org Subject: [PATCH fixes 4.20] dt-bindings: pinctrl: bcm4708-pinmux: rework binding to use syscon Date: Tue, 18 Dec 2018 16:57:44 +0100 Message-Id: <20181218155744.19409-1-zajec5@gmail.com> X-Mailer: git-send-email 2.13.7 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181218_075816_335435_E3EF9EE1 X-CRM114-Status: GOOD ( 16.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Florian Fainelli , Scott Branden , Ray Jui , bcm-kernel-feedback-list@broadcom.com, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Rafał Miłecki As pointed by Rob, CRU is a kind of block that can't be guaranteed to have everything exposed as subnodes. It's a set of various registers that aren't tied to any single device. It could be described much more accurately as MFD (Multi-Function Device). Some hardware blocks may indeed want to access a register or two of the CRU which requires describing it as the "syscon". While at it replace exmple node name with the standard "pinctrl" (also pointed out by Rob). Signed-off-by: Rafał Miłecki --- Hi Linus, After being pinged about the pinctrl driver I realized I never addressed Rob's comments from the e-mail thread: [PATCH] dt-bindings: pinctrl: bcm4708-pinmux: improve example binding https://www.spinics.net/lists/arm-kernel/msg682838.html https://patchwork.ozlabs.org/patch/984024/ Rob has pointed correctly (as always) that describing CRU using "simple-bus" has its implications and may hunt us back if we ever realize we will want to reference it as "syscon". That is pretty likely actually. To fix that while still possible (before having that Documentation in any stable release) I'd like you to consider taking this patch for the 4.20 release if you find it possible. I'm well aware it's damn late. I'm aware I've screwed up. I'm sorry. I'm afraid I cannot fix it anyhow. Just take a look at that patch and feel free to say I'm crazy coming with it so late. --- .../devicetree/bindings/pinctrl/brcm,bcm4708-pinmux.txt | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,bcm4708-pinmux.txt b/Documentation/devicetree/bindings/pinctrl/brcm,bcm4708-pinmux.txt index 4fa9539070cb..8ab2d468dbdb 100644 --- a/Documentation/devicetree/bindings/pinctrl/brcm,bcm4708-pinmux.txt +++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm4708-pinmux.txt @@ -7,13 +7,15 @@ configure controller correctly. A list of pins varies across chipsets so few bindings are available. +Node of the pinmux must be nested in the CRU (Central Resource Unit) "syscon" +noce. + Required properties: - compatible: must be one of: "brcm,bcm4708-pinmux" "brcm,bcm4709-pinmux" "brcm,bcm53012-pinmux" -- reg: iomem address range of CRU (Central Resource Unit) pin registers -- reg-names: "cru_gpio_control" - the only needed & supported reg right now +- offset: offset of pin registers in the CRU block Functions and their groups available for all chipsets: - "spi": "spi_grp" @@ -37,16 +39,12 @@ Example: #size-cells = <1>; cru@100 { - compatible = "simple-bus"; + compatible = "syscon", "simple-mfd"; reg = <0x100 0x1a4>; - ranges; - #address-cells = <1>; - #size-cells = <1>; - pin-controller@1c0 { + pinctrl { compatible = "brcm,bcm4708-pinmux"; - reg = <0x1c0 0x24>; - reg-names = "cru_gpio_control"; + offset = <0xc0>; spi-pins { function = "spi";