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: 1015450 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="c3qM7PBd"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 43K2jr0DY8z9sCh for ; Wed, 19 Dec 2018 02:58:08 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726840AbeLRP6G (ORCPT ); Tue, 18 Dec 2018 10:58:06 -0500 Received: from mail-lf1-f65.google.com ([209.85.167.65]:37340 "EHLO mail-lf1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726862AbeLRP6G (ORCPT ); Tue, 18 Dec 2018 10:58:06 -0500 Received: by mail-lf1-f65.google.com with SMTP id y11so12669025lfj.4; Tue, 18 Dec 2018 07:58:04 -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=k9d+8HuNUMW66+0Cab6FyMvzvpzHmAvo2G2XjiUJELzoI4vg2vYDWgxCEVSu3zCDRR HB7VR3BDNdKe5N4uNtScjsvEHNGwxKzHmnof1f3xgyx2uKm7sAXAwX+bCqLTYdghGrj/ moUF4Z4qhXutUmusWyVJMlg8VyDfydEGy8L7FMAzbJdbc9rMTu4bXIPgydtSG8hWT5Z/ Txeqt2REc3ReO0c+ZJeMhR8kTws0wyO07QUN88WEyCRYp05HWf7fd6hLaB7gEpQvF7ju BMhVDX6NBCXa4rRsL5Dt3/3KPzWjBh/05JsBA5h9gPGj9vO/M8RNwVxpIxJRBQBk02tI hi0w== X-Gm-Message-State: AA+aEWaec52JJ+uvxe9ajKXL290Ugts/1M463JS9u0GEfC8nu/txAOpO MTSnWpcd7E/r8fWGVYiFZ+w= 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 Cc: Mark Rutland , Ray Jui , Scott Branden , Florian Fainelli , bcm-kernel-feedback-list@broadcom.com, linux-arm-kernel@lists.infradead.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= 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 Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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";