From patchwork Fri Oct 8 20:59:36 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: 1538545 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=OElyHJIs; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HR0ts1NZMz9sPf for ; Sat, 9 Oct 2021 07:59:49 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243155AbhJHVBm (ORCPT ); Fri, 8 Oct 2021 17:01:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231587AbhJHVBm (ORCPT ); Fri, 8 Oct 2021 17:01:42 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8A1C8C061570; Fri, 8 Oct 2021 13:59:46 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id r19so42045688lfe.10; Fri, 08 Oct 2021 13:59:46 -0700 (PDT) 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=YG9Ar+cG6qU5gjsx0O70Gv7O+SgzCIkgLxuZkibpVvY=; b=OElyHJIsIrtKb6Iz3Sx7oswZi2H0JvslLpNLrL1Wa0s5lrt/GDREY5V2c4Opvv7Dde 1eBMS67FyAzMW0P/0JD8A6o08qoJSPx1/PChIt3SCnqODF6mubEEChPV8G9uOeSGbJyi LaZF5Ayp7GKQJaMDOBfcGl3yBGCBcf1ReIb1A9/nbUjvJqlMMo1JRjnMI/Aj8/Eiwzig jc31kp++8q0Y6IqbnPnRojCClnbjikba2uXE3AUfsPrqZHv29fXKwdP77s/gBCo2l5iG KFam9QhQt8Pmk11/Kzaev0athOVsHI4yDT9frKzByC5tVbkbDYAefB+92vjhOWf7Rp1s OwVA== 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=YG9Ar+cG6qU5gjsx0O70Gv7O+SgzCIkgLxuZkibpVvY=; b=DMoyZJ0ZCrnVwigO1Wnnz99TnuhtE/ssU8D8oREsq2/Kw4cs/NXkMwyvfdxGFz47cH zY863ntrUCRkTO7RlX3rIOBjM/VMoiQEATrCp10gBTr6Tcdn1ffjL9NbqSu6PN4QzthT 38ZUU3lx8qTWH0a/8S1YGSUsaWlW/2DYskGHSGLdav89GxR/aK0Y9H+fJB7iVk/1/fx8 qpRanCryUJNJyBcIXKheGXjjSPTAZNd76RZJ7mZQXL8oUE6dPRLG/wm27sDIDAhfOl5/ P6MVw/4nenQfgrVEGPBe10stfMW+7jXH6gBf4XPqL7Qa+iGy7Puroa9XGn+2OMQGzF3W TJ1A== X-Gm-Message-State: AOAM532c2YFTtipbO698QwV4IdMu2xL5KWi6BVyIjoNTfwMY3D0innJB Y67sen+j0ArXs8zNY6a8iIQ= X-Google-Smtp-Source: ABdhPJybJouLVsN1ONXMug915a3mBrlzSSdqG2IaISSwBDZkAOo0y+5P9L+b0IOBWL7lBxMGSlU4+Q== X-Received: by 2002:a2e:a367:: with SMTP id i7mr6160510ljn.435.1633726784866; Fri, 08 Oct 2021 13:59:44 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id a21sm31862lfg.194.2021.10.08.13.59.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 13:59:44 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Linus Walleij , Rob Herring Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH V3 linux-pinctrl 1/3] Revert "dt-bindings: pinctrl: bcm4708-pinmux: rework binding to use syscon" Date: Fri, 8 Oct 2021 22:59:36 +0200 Message-Id: <20211008205938.29925-1-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Rafał Miłecki This reverts commit 2ae80900f239484069569380e1fc4340fd6e0089. My rework was unneeded & wrong. It replaced a clear & correct "reg" property usage with a custom "offset" one. Back then I didn't understand how to properly handle CRU block binding. I heard / read about syscon and tried to use it in a totally invalid way. That change also missed Rob's review (obviously). Northstar's pin controller is a simple consistent hardware block that can be cleanly mapped using a 0x24 long reg space. Since the rework commit there wasn't any follow up modifying in-kernel DTS files to use the new binding. Broadcom also isn't known to use that bugged binding. There is close to zero chance this revert may actually cause problems / regressions. This commit is a simple revert. Example binding may (should) be updated / cleaned up but that can be handled separately. Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring --- V2: Update brcm,cru.yaml to avoid new yamllint warnings/errors --- .../devicetree/bindings/mfd/brcm,cru.yaml | 11 +++++---- .../bindings/pinctrl/brcm,ns-pinmux.yaml | 23 +++++++++++-------- 2 files changed, 19 insertions(+), 15 deletions(-) diff --git a/Documentation/devicetree/bindings/mfd/brcm,cru.yaml b/Documentation/devicetree/bindings/mfd/brcm,cru.yaml index fc1317ab3226..28ac60acf4ac 100644 --- a/Documentation/devicetree/bindings/mfd/brcm,cru.yaml +++ b/Documentation/devicetree/bindings/mfd/brcm,cru.yaml @@ -32,13 +32,13 @@ properties: "#size-cells": const: 1 - pinctrl: - $ref: ../pinctrl/brcm,ns-pinmux.yaml - patternProperties: '^clock-controller@[a-f0-9]+$': $ref: ../clock/brcm,iproc-clocks.yaml + '^pin-controller@[a-f0-9]+$': + $ref: ../pinctrl/brcm,ns-pinmux.yaml + '^thermal@[a-f0-9]+$': $ref: ../thermal/brcm,ns-thermal.yaml @@ -73,9 +73,10 @@ examples: "iprocfast", "sata1", "sata2"; }; - pinctrl { + pin-controller@1c0 { compatible = "brcm,bcm4708-pinmux"; - offset = <0x1c0>; + reg = <0x1c0 0x24>; + reg-names = "cru_gpio_control"; }; thermal@2c0 { diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml b/Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml index 470aff599c27..78600a8fe403 100644 --- a/Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml +++ b/Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml @@ -17,9 +17,6 @@ description: 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" - node. - properties: compatible: enum: @@ -27,10 +24,11 @@ properties: - brcm,bcm4709-pinmux - brcm,bcm53012-pinmux - offset: - description: offset of pin registers in the CRU block + reg: maxItems: 1 - $ref: /schemas/types.yaml#/definitions/uint32-array + + reg-names: + const: cru_gpio_control patternProperties: '-pins$': @@ -72,19 +70,24 @@ allOf: uart1_grp ] required: - - offset + - reg + - reg-names additionalProperties: false examples: - | cru@1800c100 { - compatible = "syscon", "simple-mfd"; + compatible = "simple-bus"; reg = <0x1800c100 0x1a4>; + ranges; + #address-cells = <1>; + #size-cells = <1>; - pinctrl { + pin-controller@1c0 { compatible = "brcm,bcm4708-pinmux"; - offset = <0xc0>; + reg = <0x1c0 0x24>; + reg-names = "cru_gpio_control"; spi-pins { function = "spi"; From patchwork Fri Oct 8 20:59:37 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: 1538548 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=i3nHaoe9; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HR0tv3ymSz9sf8 for ; Sat, 9 Oct 2021 07:59:51 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243252AbhJHVBq (ORCPT ); Fri, 8 Oct 2021 17:01:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231587AbhJHVBp (ORCPT ); Fri, 8 Oct 2021 17:01:45 -0400 Received: from mail-lf1-x12f.google.com (mail-lf1-x12f.google.com [IPv6:2a00:1450:4864:20::12f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A9C05C061570; Fri, 8 Oct 2021 13:59:49 -0700 (PDT) Received: by mail-lf1-x12f.google.com with SMTP id x27so44031196lfa.9; Fri, 08 Oct 2021 13:59:49 -0700 (PDT) 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=6pTcByQPk5Jf2+mJih/NpHnbUxpeLWoOcWY2ExgN9Aw=; b=i3nHaoe93M3T/HU0xnUMzZ+BMy6zPba+L7Om/Im25bwyH3YhYSXA/ShlLNzc2BMW4K 10qI0Iu/CXtbDopIGbfPRniuTTPKILnrcDfhYThlb+bY8QPWbOpEDUpEt7JgvtG52BEa NJGTuPwVyVr0okWHe1UEcNqhk0cIdPcAEZNnpLvKasYN9yQ1H2r1QlnrYyyinsnygCt9 PosQgyuuBRElNNpGjc5tkNx7eEe6TJHEDocOfKmpINW1NFzao2lg9V6YE+qOx3K3DrFb u8gsqqA6V11YBKrSc7zzHhPPMNqezjD4VSz8h7lJSkDJllP0AB7u/9fArfPj44pwtOVm xiVA== 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=6pTcByQPk5Jf2+mJih/NpHnbUxpeLWoOcWY2ExgN9Aw=; b=C4+EoSxuCdOocdDIY2Y5FtNlb9h4+Qks6YwBCpXcMr4XgQvqLQO5JxAsEFWxh24upn CtreGDs3CDH2l2SsZgX+WHYsJCVl/VZQ3W2LSaBf37SbBo238YCVmVDS+ny+WwG4dPG7 JUwfyowGcoGiS2xhPqY2/wwO1USL6+oZVy9nuQfIrF9bzHxtvlB6EMmL+yGXdJzVm+GW wlwlFKqrO8m/ed7vM/XDAP59Oy8sCiXQsHeZ/y2HoyY8+p7bpXBNcs1fLGp/AzP+Jf0a z2xV4857o556HQOUo1tSBr+awRhA+X+iKQJ45iJlZYSyEj7hpJlQeDV4jSv9tLQWT+Ai fadA== X-Gm-Message-State: AOAM530SRMYl7aXxqXq9qG9iA0yjObtGrzxWGeuLoK9eVfO05xWXo+IT V21IJCF/HBT90Vvh4OT4G3M= X-Google-Smtp-Source: ABdhPJyrTs63HimQZUhqm4OXO/Oh+DXx7zCmgQZ2/AAGX5aHiHCm7vEGO+JHPJ1JY/x8RK51VRp/LQ== X-Received: by 2002:ac2:58c4:: with SMTP id u4mr12458913lfo.534.1633726788089; Fri, 08 Oct 2021 13:59:48 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id a21sm31862lfg.194.2021.10.08.13.59.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 13:59:47 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Linus Walleij , Rob Herring Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH V3 linux-pinctrl 2/3] dt-bindings: pinctrl: brcm,ns-pinmux: drop unneeded CRU from example Date: Fri, 8 Oct 2021 22:59:37 +0200 Message-Id: <20211008205938.29925-2-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20211008205938.29925-1-zajec5@gmail.com> References: <20211008205938.29925-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Rafał Miłecki There is no need to include CRU in example of this binding. It wasn't complete / correct anyway. The proper binding can be find in the mfd/brcm,cru.yaml . Signed-off-by: Rafał Miłecki Reviewed-by: Rob Herring --- V3: Add this patch to fix dtschema/dtc warning/error --- .../bindings/pinctrl/brcm,ns-pinmux.yaml | 24 +++++++------------ 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml b/Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml index 78600a8fe403..fc39e3e9f71c 100644 --- a/Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml +++ b/Documentation/devicetree/bindings/pinctrl/brcm,ns-pinmux.yaml @@ -77,21 +77,13 @@ additionalProperties: false examples: - | - cru@1800c100 { - compatible = "simple-bus"; - reg = <0x1800c100 0x1a4>; - ranges; - #address-cells = <1>; - #size-cells = <1>; - - pin-controller@1c0 { - compatible = "brcm,bcm4708-pinmux"; - reg = <0x1c0 0x24>; - reg-names = "cru_gpio_control"; - - spi-pins { - function = "spi"; - groups = "spi_grp"; - }; + pin-controller@1800c1c0 { + compatible = "brcm,bcm4708-pinmux"; + reg = <0x1800c1c0 0x24>; + reg-names = "cru_gpio_control"; + + spi-pins { + function = "spi"; + groups = "spi_grp"; }; }; From patchwork Fri Oct 8 20:59:38 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: 1538549 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=juF+oWck; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=23.128.96.18; helo=vger.kernel.org; envelope-from=linux-gpio-owner@vger.kernel.org; receiver=) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4HR0ty1K77z9sPf for ; Sat, 9 Oct 2021 07:59:54 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243309AbhJHVBs (ORCPT ); Fri, 8 Oct 2021 17:01:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53078 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243288AbhJHVBr (ORCPT ); Fri, 8 Oct 2021 17:01:47 -0400 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3247C061570; Fri, 8 Oct 2021 13:59:51 -0700 (PDT) Received: by mail-lf1-x12d.google.com with SMTP id y26so44597609lfa.11; Fri, 08 Oct 2021 13:59:51 -0700 (PDT) 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=gDyEXWIeYRFxChu9VxQR3xwCXz9T0mgyC95BWcs1m1I=; b=juF+oWck8fEkqCK0joVz9cMzf+7iyO+kCiz0bmS/mbiro4fmR/bDT4sCCavGuZPwu1 yvKfm9xVjqR1UKzmTPk8AXfOaS0xxneE/wjr8r8DujzgBrmXsWIov006+/N9xva0U6a6 ctmQT0M4dQqmjdp3apSfBUk/zxxmPYpDLRn2DdauH6EjPuu9QvrbKcavTpY/UUbCXiX0 YIcA2F5oHCGU4goOAXOteRC9rkQD9nnuOJDYxsPKfKzmccuEH6rkk0jiMEnncelpqT3F b84DMAUzB57vj3HqL8J+DSrYUcUVA1zoeqr1E2ESHEMZ6RwsNhxBEu3svpopeNM/0YLg 8LSQ== 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=gDyEXWIeYRFxChu9VxQR3xwCXz9T0mgyC95BWcs1m1I=; b=5Omkw2gLHdmRpy3+/7+iiw8EqMsoUaByUfBtcThR6UcXlt2I4HcrAFE8HUNH64zuWM rqBMwRTlfUbiQZygxdu5FYRWbvX9EWgfuRYOeAidx+VJMdHRMDIrzxP9LYdgGgpwPDrR OuXomEXRuJHEpQXzNvM+wu5H4mz0xO/QDTNuPcfIJiy+ObdqqBCrGXQoPQWem3igP96n mtKDJgNows+TWGMny4xfSlBXzD4EiFHSlILZA/HxHfbyysVbBb7LqMZ54v4Fi0J8z3Fv ZjlQuBSf5XjzB4ds2B4jmkVE2GABmcEAztT8ihJCt2km+xdJtpoU28p31UwvFP/+POFN sCKg== X-Gm-Message-State: AOAM530TBeiK8DwfxlNsnujnBgOiyWN+Sgc2EeO+IJsqUNsOd5A/JH0r n/Kodg9C45hbVzYBo1+cg14= X-Google-Smtp-Source: ABdhPJytWd8DyJ2/z1R4B6YJSLFg9kbeWCWmjlh8uP1VeodhS0GIAKa/13s5OlvKbtfTu8I20eJEFQ== X-Received: by 2002:a2e:a803:: with SMTP id l3mr5822644ljq.74.1633726790195; Fri, 08 Oct 2021 13:59:50 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id a21sm31862lfg.194.2021.10.08.13.59.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Oct 2021 13:59:49 -0700 (PDT) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Linus Walleij , Rob Herring Cc: Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, linux-gpio@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= Subject: [PATCH V3 linux-pinctrl 3/3] Revert "pinctrl: bcm: ns: support updated DT binding as syscon subnode" Date: Fri, 8 Oct 2021 22:59:38 +0200 Message-Id: <20211008205938.29925-3-zajec5@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20211008205938.29925-1-zajec5@gmail.com> References: <20211008205938.29925-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org From: Rafał Miłecki This reverts commit a49d784d5a8272d0f63c448fe8dc69e589db006e. The updated binding was wrong / invalid and has been reverted. There isn't any upstream kernel DTS using it and Broadcom isn't known to use it neither. There is close to zero chance this will cause regression for anyone. Actually in-kernel bcm5301x.dtsi still uses the old good binding and so it's broken since the driver update. This revert fixes it. Signed-off-by: Rafał Miłecki --- drivers/pinctrl/bcm/pinctrl-ns.c | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/drivers/pinctrl/bcm/pinctrl-ns.c b/drivers/pinctrl/bcm/pinctrl-ns.c index e79690bd8b85..d7f8175d2c1c 100644 --- a/drivers/pinctrl/bcm/pinctrl-ns.c +++ b/drivers/pinctrl/bcm/pinctrl-ns.c @@ -5,7 +5,6 @@ #include #include -#include #include #include #include @@ -13,7 +12,6 @@ #include #include #include -#include #include #define FLAG_BCM4708 BIT(1) @@ -24,8 +22,7 @@ struct ns_pinctrl { struct device *dev; unsigned int chipset_flag; struct pinctrl_dev *pctldev; - struct regmap *regmap; - u32 offset; + void __iomem *base; struct pinctrl_desc pctldesc; struct ns_pinctrl_group *groups; @@ -232,9 +229,9 @@ static int ns_pinctrl_set_mux(struct pinctrl_dev *pctrl_dev, unset |= BIT(pin_number); } - regmap_read(ns_pinctrl->regmap, ns_pinctrl->offset, &tmp); + tmp = readl(ns_pinctrl->base); tmp &= ~unset; - regmap_write(ns_pinctrl->regmap, ns_pinctrl->offset, tmp); + writel(tmp, ns_pinctrl->base); return 0; } @@ -266,13 +263,13 @@ static const struct of_device_id ns_pinctrl_of_match_table[] = { static int ns_pinctrl_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; - struct device_node *np = dev->of_node; const struct of_device_id *of_id; struct ns_pinctrl *ns_pinctrl; struct pinctrl_desc *pctldesc; struct pinctrl_pin_desc *pin; struct ns_pinctrl_group *group; struct ns_pinctrl_function *function; + struct resource *res; int i; ns_pinctrl = devm_kzalloc(dev, sizeof(*ns_pinctrl), GFP_KERNEL); @@ -290,18 +287,12 @@ static int ns_pinctrl_probe(struct platform_device *pdev) return -EINVAL; ns_pinctrl->chipset_flag = (uintptr_t)of_id->data; - ns_pinctrl->regmap = syscon_node_to_regmap(of_get_parent(np)); - if (IS_ERR(ns_pinctrl->regmap)) { - int err = PTR_ERR(ns_pinctrl->regmap); - - dev_err(dev, "Failed to map pinctrl regs: %d\n", err); - - return err; - } - - if (of_property_read_u32(np, "offset", &ns_pinctrl->offset)) { - dev_err(dev, "Failed to get register offset\n"); - return -ENOENT; + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, + "cru_gpio_control"); + ns_pinctrl->base = devm_ioremap_resource(dev, res); + if (IS_ERR(ns_pinctrl->base)) { + dev_err(dev, "Failed to map pinctrl regs\n"); + return PTR_ERR(ns_pinctrl->base); } memcpy(pctldesc, &ns_pinctrl_desc, sizeof(*pctldesc));