From patchwork Sun May 15 20:20:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12850076 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 69BCEC433F5 for ; Sun, 15 May 2022 20:22:48 +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=fUZa94iyENBduNfs/XlA8h6m67zGvJc9/9irEYwMBkU=; b=EUrLpkQVZGojyM m3M9PGTK4Y5rq1QvU8wZY4Fw9zLHnIfmlUtj7WjJZQCMv3UeoZF1xAkv3q7k9PiOoScaDhCrQ4F1F taVmSLabWNn7PCh5QiHMw0y2vlc22AzX2/ojmVh+QW8CttETD2f2f3yM48QVPbaUm3UqttmOCK7nE pbgTLtWpUWTfhT+2Hnqx4OFB/oEYZw2lrnHbVj2KT4u97Zfi2VVlOfWotYTWNj1X3NRvBS7lI6jYA 5irZs4bzVPL+XY4ak0SFQiQBUbxSbXzqTIa9TAok375MbYOSfLr1BIU6HhWgG4699HpV0qLDgTcg9 pXnX51dHj/oW70gCjbZw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKkH-004uFE-A3; Sun, 15 May 2022 20:21:41 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKk3-004u8D-DH; Sun, 15 May 2022 20:21:29 +0000 Received: from localhost.localdomain ([37.4.249.94]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mn2Jj-1nRQ6b1e8V-00kBkK; Sun, 15 May 2022 22:21:18 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Nicolas Saenz Julienne , Rob Herring , Stefan Wahren Subject: [PATCH 01/11] dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema Date: Sun, 15 May 2022 22:20:22 +0200 Message-Id: <20220515202032.3046-2-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515202032.3046-1-stefan.wahren@i2se.com> References: <20220515202032.3046-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:c7pGFENzAqMSCqN7MGXhkFOqceYQpzp1FDFxXFmlbRkX0WJuLVR qcx6ZWICXAURR6xq0e3VFto5fdnepYtfRBywg5pnESppn30Q9UvHo7x8yhkWTKFA5lT8ffq ZTG3rSiwthIl9lhh+V5AwVLftqrdvy1jJyAWh7WThaRKekP6TU+iN+qD/XA5JkTcPSZ2B/i pSxmNhnoM2Fi1bivPQUEg== X-UI-Out-Filterresults: notjunk:1;V03:K0:wSCxaowmMu0=:n2eFcECYIstpec0LUxz/aO wY8YORyMKu+IeVSWbaSJb+3p+BAUZkwe7wLRgG/9/rZEfC2opv6a8dHa8yF0ZAT4OWaLwNhf8 QiGV5be/3yiLwNhjAdLiXrZtBSO7usjXJoGkdfOltAXUFrW5oBBIsIfWwPZ7u++8c0LGURNY4 zPHufTolluKi1oxpgM0Hsl/73usVK0JpUp1LEnLN19O2F+WIzRpcwtD8jwg/4C7y4LGtZ2nd1 FaMgP3Bsi4OmLGZFE8B4GezfMP7MPSTy9p3yA5wk3aUJshhDwwMATeiBOehoZr3WjzaJKneDk aiC+WF+Zj3/oIANYzfeMQEMH5rI4L9ioY0iDRNScaJ1a9gK0O3IFiXCNUBxYcr+KlAu8SweB1 Ex9r4XHw5zhUJEl/XAj5ZkxL1ZS42SFyQEt/4FBr4d7tzg3ZvYViaKpklENaTpR/X5ceie8S6 0ObbyDcmqj9sgRB68T2I33qFOcJoiEdNM4is0mk3OPOBR4wS0ib0XUXgn3SSv7RQBxDaWFmfL MeI3jvfBHCX9KhFE11NLVnqKJFqGQEihUlzogHrz8QD9LZW5y61QB/oc0ymj2j+jaJsbdlgek o967DAbyVMOScuWxKp5oAnF4vliGQV8hQs5h2hbt+fUIaSw618p004zD5Ms+Gd0mxj4NADVLC REHYkxMfzHtsMyDanBBpLwcYMMK2VMPmBKoIUsgmR8PjQl0nhm0EMGyxLqr7Dr+igvxbwzXQU sri93uiw021KfwDR X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_132127_796407_6961229D X-CRM114-Status: GOOD ( 14.18 ) 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: Nicolas Saenz Julienne This converts the brcm,bcm2835-pm bindings from text to proper schema. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Signed-off-by: Stefan Wahren --- .../bindings/soc/bcm/brcm,bcm2835-pm.txt | 46 ----------- .../bindings/soc/bcm/brcm,bcm2835-pm.yaml | 77 +++++++++++++++++++ 2 files changed, 77 insertions(+), 46 deletions(-) delete mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt create mode 100644 Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt deleted file mode 100644 index 72ff033565e5..000000000000 --- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.txt +++ /dev/null @@ -1,46 +0,0 @@ -BCM2835 PM (Power domains, watchdog) - -The PM block controls power domains and some reset lines, and includes -a watchdog timer. This binding supersedes the brcm,bcm2835-pm-wdt -binding which covered some of PM's register range and functionality. - -Required properties: - -- compatible: Should be "brcm,bcm2835-pm" -- reg: Specifies base physical address and size of the two - register ranges ("PM" and "ASYNC_BRIDGE" in that - order) -- clocks: a) v3d: The V3D clock from CPRMAN - b) peri_image: The PERI_IMAGE clock from CPRMAN - c) h264: The H264 clock from CPRMAN - d) isp: The ISP clock from CPRMAN -- #reset-cells: Should be 1. This property follows the reset controller - bindings[1]. -- #power-domain-cells: Should be 1. This property follows the power domain - bindings[2]. - -Optional properties: - -- timeout-sec: Contains the watchdog timeout in seconds -- system-power-controller: Whether the watchdog is controlling the - system power. This node follows the power controller bindings[3]. - -[1] Documentation/devicetree/bindings/reset/reset.txt -[2] Documentation/devicetree/bindings/power/power-domain.yaml -[3] Documentation/devicetree/bindings/power/power-controller.txt - -Example: - -pm { - compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt"; - #power-domain-cells = <1>; - #reset-cells = <1>; - reg = <0x7e100000 0x114>, - <0x7e00a000 0x24>; - clocks = <&clocks BCM2835_CLOCK_V3D>, - <&clocks BCM2835_CLOCK_PERI_IMAGE>, - <&clocks BCM2835_CLOCK_H264>, - <&clocks BCM2835_CLOCK_ISP>; - clock-names = "v3d", "peri_image", "h264", "isp"; - system-power-controller; -}; diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml new file mode 100644 index 000000000000..5d1ff0f6c8ce --- /dev/null +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml @@ -0,0 +1,77 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/bcm/brcm,bcm2835-pm.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: BCM2835 PM (Power domains, watchdog) + +description: | + The PM block controls power domains and some reset lines, and includes a + watchdog timer. + +maintainers: + - Nicolas Saenz Julienne + +allOf: + - $ref: ../../watchdog/watchdog.yaml# + +properties: + compatible: + items: + - const: brcm,bcm2835-pm + - const: brcm,bcm2835-pm-wdt + + reg: + items: + - description: PM registers + - description: ASB registers + + "#power-domain-cells": + const: 1 + + "#reset-cells": + const: 1 + + clocks: + minItems: 4 + maxItems: 4 + + clock-names: + items: + - const: v3d + - const: peri_image + - const: h264 + - const: isp + + system-power-controller: + type: boolean + + timeout-sec: true + +required: + - compatible + - reg + - "#power-domain-cells" + - "#reset-cells" + - clocks + +additionalProperties: false + +examples: + - | + #include + + watchdog@7e100000 { + compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt"; + #power-domain-cells = <1>; + #reset-cells = <1>; + reg = <0x7e100000 0x114>, + <0x7e00a000 0x24>; + clocks = <&clocks BCM2835_CLOCK_V3D>, + <&clocks BCM2835_CLOCK_PERI_IMAGE>, + <&clocks BCM2835_CLOCK_H264>, + <&clocks BCM2835_CLOCK_ISP>; + clock-names = "v3d", "peri_image", "h264", "isp"; + system-power-controller; + }; From patchwork Sun May 15 20:20:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12850078 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 01466C433F5 for ; Sun, 15 May 2022 20:23:08 +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=D+MVQYSoBg6XIx+PXr/v7hb7AQkbxipol1Bg4lTlpdk=; b=4ZBGjqD8mshj4Q ilmXPx/aVjIFbZEq9LRRipSBP649aZIzgdNsUY6qypfttjgNhxlCFu4SHr7quSS+fz7oJvkwnc45n SuBPt9jemUfLcjgjrXwT1Dk8WEfT/HeTKI3tCXCzP6dracbKWAq9dbBiNPb4iwgrrgxo+B8s2+3OK lcfow1akuq1tqNCWub10EthDSZa56w4T6zPdKWl1ZvDuJRoFz9eBqIjrzsZ5dj26hL1YdUN6aHdj9 ymBpcUhOgAtshArKEHf1CwxtBHxAMlkbA0JWmx2uwylD0Jpe48lTK4Zk5Ok4JlTLA08YSutm2PT7D 3Ffp3g5aiSuZYM/HGdZg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKkb-004uMj-Fg; Sun, 15 May 2022 20:22:01 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKk4-004u8W-OB; Sun, 15 May 2022 20:21:31 +0000 Received: from localhost.localdomain ([37.4.249.94]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MNKyQ-1oF2cX0Uiw-00Okjh; Sun, 15 May 2022 22:21:19 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Nicolas Saenz Julienne , Rob Herring , Stefan Wahren Subject: [PATCH 02/11] dt-bindings: soc: bcm: bcm2835-pm: Introduce reg-names Date: Sun, 15 May 2022 22:20:23 +0200 Message-Id: <20220515202032.3046-3-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515202032.3046-1-stefan.wahren@i2se.com> References: <20220515202032.3046-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:HvOpsjTGFG8ydQxQPPL/ZfmmV8b3SXQZxN7l9il4O8dHbW3dB0+ wZqL76EdcCCMGPDpTL3bhj8VMXQBYbyXP9QoxEB0gl1pU1WbVREUkwITN5ZQmT+wMOpb6tj bXf3Vr5C5qt448mEu0gJbYXYPM97fjq1ozx/xj7PL+LhEQF5MyWnobf27RpBQ8Ytz5O8+J0 dc8dyf/ZlFk6cmQFjVA3g== X-UI-Out-Filterresults: notjunk:1;V03:K0:0Go4nnZ0k4U=:iGzB04ym5lTWiNhsWWm772 aPrBgtUoYwkP54NKafO7BM88tWIubsHLxHlxEhXalqmqZzRGhWkJVHM31nZ3uZL7edL4atbFZ UtVXXInGCRDOK8SbAbuiW6p673Pfw9kU2EONw3ZGIQXPRguUVTD8shkhMeCLTRt59/tjcOgdy 4waz57upoR+wj6MxnzSU/WLhe/cLfqwOUCdMdA4GvyBB2D1Eer+Tlp13bXnndSeumJbL+4Hfe V3+SWtLzOh9bJQ52KFNr3pNLWwzhlEUezh7OcCku9+ohAlSuD+kiG6zZGtGhDr2+WyEqdj7Bg cB4wgu/qLpaSsqXIyDY+0TVqXtJg2n7oUnLZM8BLrVx3uK5iKETqvx6v78SUryvU02LPG1gUC E3bYXmWort/0ZYHdmQSdEwChWXURDcMXZxklIQX9Uq1kYQxgxfEbTm6JAvfezQQ18FU8C5Se+ 15TY2Z4jl3Z1uVooQIzBrCVhonBlqKAYq9TGElGeug6gUvCm4zNk/hDqMT8rhf6ZTlfzOeFAI WshDC+fLUnEHlLfronzIZy4cbzUTfXVHmH77wjzAqndBZvTcg7op9O3pCGYwu4IVuPvlqO7ph KsAXFGHLJhqOMmWX/qCcQAeSMH6hQ65WIeOCZsSjRMh+EGzSl1svEONVZbTaY6VsSfbPRbfUz Oj3wmKXswyvmhww1yoj9E8l1HrptTvPCUgT1M6IrVCht7Agi51le1VTwg1R0gMKatKeXYKJFP re2GsIiQx6ccxES4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_132129_118545_0D81560E X-CRM114-Status: UNSURE ( 9.04 ) X-CRM114-Notice: Please train this message. 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: Nicolas Saenz Julienne Anticipating the introduction of BCM2711, of which we'll need to support its new RPiVid ASB, introduce reg-names into bcm2835-pm's binding. This will help to have a consistent mapping between resources and their meaning. Signed-off-by: Nicolas Saenz Julienne Reviewed-by: Rob Herring Signed-off-by: Stefan Wahren --- .../devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml index 5d1ff0f6c8ce..883ab7cb96e9 100644 --- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml @@ -23,9 +23,13 @@ properties: - const: brcm,bcm2835-pm-wdt reg: + minItems: 2 + maxItems: 2 + + reg-names: items: - - description: PM registers - - description: ASB registers + - const: pm + - const: asb "#power-domain-cells": const: 1 @@ -68,6 +72,7 @@ examples: #reset-cells = <1>; reg = <0x7e100000 0x114>, <0x7e00a000 0x24>; + reg-names = "pm", "asb"; clocks = <&clocks BCM2835_CLOCK_V3D>, <&clocks BCM2835_CLOCK_PERI_IMAGE>, <&clocks BCM2835_CLOCK_H264>, From patchwork Sun May 15 20:20:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12850081 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 1A90BC433F5 for ; Sun, 15 May 2022 20:23:43 +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=WEMAvyuMGJ1Eud5YzVRW8MkcopgLVPZQ3m2VLmjRYqw=; b=0fM7xt/Dc4dWSO u+Yyld9Dm8ugiwe3NtfbSGM9Kq817T5Rcbg8IGAhjph58x7Et3jF9G064HYNVv2ZD+LTh1REWc7mw OndTYAvdAqi+S15i2g0CtG2J6nEW6rCFayGGMk4zhZBW7g9/UX9vh8pfGMSXL5XlJ1DyFJrWIomck 1X4WCnVystgXXgk60UeCCB+094I4/O72oabbAleC7q8ed/MXc5oT2EhoAAxpOUR0ZuTNARg/Gbq2S 7Ct3k3JvrE/vHnT4XK9VCQBg075ytpRj8IIMhZDGuyRCRJ15IeT4ntNO5C4v3HrVW7oImghgQlJGZ BGfEJun5gX7fGu5qeVZQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKlK-004ugR-3S; Sun, 15 May 2022 20:22:46 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKk4-004u8V-J6; Sun, 15 May 2022 20:21:31 +0000 Received: from localhost.localdomain ([37.4.249.94]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Ml6Vg-1nTLmN3Pci-00lYf1; Sun, 15 May 2022 22:21:19 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH 03/11] dt-bindings: soc: bcm: bcm2835-pm: Add support for bcm2711 Date: Sun, 15 May 2022 22:20:24 +0200 Message-Id: <20220515202032.3046-4-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515202032.3046-1-stefan.wahren@i2se.com> References: <20220515202032.3046-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:gDrmecDgKFIq2+EdHQt+MGyYGBomlnSecRvr5kKkqGpll7UdUAI y4xJXEfAD8GU6wd4IVKvuVIkZ7rDGUTizEBKL9k5wicTpYl7LvKyq2porHXzqnz0DygE2oi JCPCTk2Bm+I8MqYUezbgsg44+HMScwr59KYWvuKo5c5pe9Yam+bX16UkDNN2Z283vXKNyIN W6DF4i36EF4W668sMxIYw== X-UI-Out-Filterresults: notjunk:1;V03:K0:rCConZGf990=:auNaV7MWxMDUnu+z0ebF0k HJBkZbMPo2KltOJZbsuNh1OSIMC62U9m8vaxr5zmJTZaSQyT9hAlYfspJcWgmFsmAo3gFT2f0 uHy9i6lTFm9AfdRowBqVps7UFZVEVbuiM0/raKqY2PGo4GjBs/j+UjbClMnYbvh6dqGOLYK+e SsjLMliWObaKkotoNMz9Eh/mxbWhUACmPHBE/jwPRwGJWJT6g9HmTEgDfTPRMaHgxmmMV2nES fN04EmdX22q/aZyb1fL3Fln9G6wPc3ivkWrafQZmFlgbdvx/wEuDqYF946UsdeYIHk8d7V7lT bNG6B71fE8LyimiE1KkCbiy3VhXVDeiHF3lJgGZD/tQFgnJavwNWjBzVQbUbAoIo2byuIKwyt OysLIIIFLTff8J2aqSn0Akid4wOP+MELFiO6vjGbVOgdyjcOpVV351B2iRGnopPrtxhelra6A nuJab0Ona11rygg1PuZWW9Fuw72KPQU3ie5Kt71iLOOJRtB6H2HSJ36SwVRrmoc/KWl4aQvK3 7nnYOh99FowbmizAdh/SMxn0iZrCB9cAZPNUD+2uxUq0PLvbXoQWJZUd6+/auxx9u7+l3Usx9 S+JpOTLOnMsD9v5crP9QCAUNfMsD2zpL+3WK3tns7jDuH+w0N0Lc5oy/H9EsrVd7aaabMz1Io MMaX6HkpSeq3LCn9qv26u6Rz1HG2/+p67mYcx3r9uUg4fNTdnayWA9+p5AnQ/ILMn7eADnY2X rS8R9C4TPOfG6PXv X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_132128_953631_28229EF6 X-CRM114-Status: UNSURE ( 9.07 ) X-CRM114-Notice: Please train this message. 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 Add a new compatible string for BCM2711 and the option to provide a third reg property for the board's new RPiVid ASB. In BCM2711 the new RPiVid ASB took over V3D, which is our only consumer of this driver so far. The old ASB is still be present with ISP and H264 bits but no V3D. Signed-off-by: Stefan Wahren --- .../bindings/soc/bcm/brcm,bcm2835-pm.yaml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml index 883ab7cb96e9..e13ce98d1753 100644 --- a/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml @@ -19,17 +19,24 @@ allOf: properties: compatible: items: - - const: brcm,bcm2835-pm + - enum: + - brcm,bcm2835-pm + - brcm,bcm2711-pm - const: brcm,bcm2835-pm-wdt reg: - minItems: 2 - maxItems: 2 + minItems: 1 + maxItems: 3 reg-names: - items: - - const: pm - - const: asb + oneOf: + - items: + - const: pm + - const: asb + - items: + - const: pm + - const: asb + - const: rpivid_asb "#power-domain-cells": const: 1 From patchwork Sun May 15 20:20:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12850079 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 C3D4BC433EF for ; Sun, 15 May 2022 20:23:09 +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=qTsVo2F2STteGH0qIIkhSKT97IOVcic2Ke8QzvsWmYY=; b=h7Ue8UyZAXfzL1 17tUnzCQm2gJn3otrZlygRFtsc5f5vQrjDEiWQvRo58BWeKNpeyMZG9l3zKDasDLoPp/9JiHXc4PW PcUbPmW869Jjrjdp4TZAcm5l/7I8qcv7/nxTtDACD2hKmkTbLy7ottj01FpkN8OAph4og8TR6OHe6 BRI1MVpkgIzo/c0gjgug9CYFCQyi3HP0j5/VpBwH8Qz2cq++SHmiU9GM+h1ypdFj5XFzTJEC13Bi0 laRBPI+ULNp8lRWJr3uB1NovJuDuGA90jG0QEdP6yC9XkkuPcxKXpMGVBli3XEQSWza7Ur3/1wFiU P+QxAYgSM6/Vn9MDSvvQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKkl-004uQ6-Vz; Sun, 15 May 2022 20:22:12 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKk4-004u8e-CC; Sun, 15 May 2022 20:21:31 +0000 Received: from localhost.localdomain ([37.4.249.94]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MnaY1-1nQrtV2IYn-00jdmY; Sun, 15 May 2022 22:21:20 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Nicolas Saenz Julienne , Stefan Wahren Subject: [PATCH 04/11] ARM: dts: bcm2835/bcm2711: Introduce reg-names in watchdog node Date: Sun, 15 May 2022 22:20:25 +0200 Message-Id: <20220515202032.3046-5-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515202032.3046-1-stefan.wahren@i2se.com> References: <20220515202032.3046-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:Ub6mldJYY0ItRChrV4lh8lvw7S2zT0Smevj0awMU+bIGvBZ9O+R aMUNpcBZNvPTNUef+gBuZiAiqmtHjC39B7SFK9EUvMSNsAr2Q1yFjqPLcUx69V3FgCb0d46 I+AVbhmpfv3+tgXebJc1fBB6hTNNP8mYgsAdgqTvQoMbkMUPOgl2p58fyHFVQltpZTD0EWt M2HOWnCTTDJJtg8527NcA== X-UI-Out-Filterresults: notjunk:1;V03:K0:zqZuZPcyOUs=:NKLb6uA7IuIFBUv++Tw8a8 hPO8MUqAHBTLdEvPXjkRm34f8zTEJtI3FFBmZnIoSbI4+04t3vvM7DQCNXfzNbzXKmuXBcyiZ S53mjmH2nXIriF9Om055F/AGbAsqLWA5uw24MSxVkXIZhIFPRtIs/TtpI5m54sYxAEQn9kIy1 K0czl+VxfGR4fLwcR5UahzHrjVHqr8bJ6dMFqjKxsMgRfyL5Ii0udsCZhV5ZdanjVo9s6d9oy bdFm9rSMkb/xdtcwutDHJiqrLXtXo80ua5E5D05TSFfNMEQ3IOws5RzAfmimDIMeP4RpDcVG3 yVaZJWFaQXyER+cJYZa/VlKKNyDgESvxMH1SKjVua1/NPk9azbl82cib14iaZ5oWOGJK8Yq9f GN3kR0p1zywmoU2lCRo6DZCC9XjW1+DwA3tF1Swd1NhWh/5qoMnnTKFE7UhhAmy/JirbUeeeZ Mk+crrYYWScSjScwWE4p+yzSbhVd5ZLAMHW+nOmi27jxw0oIumNrwQcyGS0S7Y9uhXxA1eioy 8h5vcQqctjT9wj74lZZX42P0xsRLCRvsF9hUih9Qaj/DgMCHMpvCqB2dmB6eR8wMc6Q595TUw dSqHeJSJP6jS6rtGfHTMIaFgiuEfX+7DymH+V238XZN8G9jmEnhLBVjjdns72t3Jo3El7UF6l s67sDPr4JEMTD0Cxlcef6JvnsaY7Rs9W6IYMmYuAOuhBWezPQVBEl8o6e4qNsSu8aW09sv1b9 3lTGqN6BCOAACt4J X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_132128_766348_5E3C6A72 X-CRM114-Status: UNSURE ( 9.37 ) X-CRM114-Notice: Please train this message. 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: Nicolas Saenz Julienne bcm2835-pm's bindings now support explicitly setting 'reg-names,' so use them. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson --- arch/arm/boot/dts/bcm2711.dtsi | 1 + arch/arm/boot/dts/bcm2835-common.dtsi | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index 89af57482bc8..cbb47e2c9434 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -113,6 +113,7 @@ pm: watchdog@7e100000 { reg = <0x7e100000 0x114>, <0x7e00a000 0x24>, <0x7ec11000 0x20>; + reg-names = "pm", "asb", "rpivid_asb"; clocks = <&clocks BCM2835_CLOCK_V3D>, <&clocks BCM2835_CLOCK_PERI_IMAGE>, <&clocks BCM2835_CLOCK_H264>, diff --git a/arch/arm/boot/dts/bcm2835-common.dtsi b/arch/arm/boot/dts/bcm2835-common.dtsi index c25e797b9060..a037d2bc5b11 100644 --- a/arch/arm/boot/dts/bcm2835-common.dtsi +++ b/arch/arm/boot/dts/bcm2835-common.dtsi @@ -62,6 +62,7 @@ pm: watchdog@7e100000 { #reset-cells = <1>; reg = <0x7e100000 0x114>, <0x7e00a000 0x24>; + reg-names = "pm", "asb"; clocks = <&clocks BCM2835_CLOCK_V3D>, <&clocks BCM2835_CLOCK_PERI_IMAGE>, <&clocks BCM2835_CLOCK_H264>, From patchwork Sun May 15 20:20:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12850080 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 950B3C433F5 for ; Sun, 15 May 2022 20:23:32 +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=9wboBZAZZR12Tpg4tE2Rsz6ePYX3m4t7yq45aeBb+5g=; b=nh4mANvOZ0KPVt bzGMia3hmgkUjR4127EVCNKhb4HwHY0O0DONKOWOE3xjZL+CJlZVFZcl2uNpcK7NzBeS+n7sllsqh XtUiRkPY1mHHeyilYx3+tsB5b+jDtfp0gPWtq0IXghWBJCvlOkDjXm/GjMfSVADBunA6O4fAw81r/ K0aLlqzlynnh8Bvg0iEEbYSI9u9y2HyO2Y6XnOsK34T709IFMGiboRBw9pSVKpLu4JUm6K6RZPdcD dzmGKkifoTruH1oeoiUaaiufySs1ltbREw76NbQ8TY5EWy+s9An/9qW4X8be0Z1yktYy9piQWkN9J HVlczZDdz31H97ikE1KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKl3-004uWV-44; Sun, 15 May 2022 20:22:29 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKk4-004u8b-CC; Sun, 15 May 2022 20:21:31 +0000 Received: from localhost.localdomain ([37.4.249.94]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MzQwa-1ndDft0Jto-00vLjH; Sun, 15 May 2022 22:21:21 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Nicolas Saenz Julienne , Stefan Wahren Subject: [PATCH 05/11] ARM: dts: bcm2711: Use proper compatible in PM/Watchdog node Date: Sun, 15 May 2022 22:20:26 +0200 Message-Id: <20220515202032.3046-6-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515202032.3046-1-stefan.wahren@i2se.com> References: <20220515202032.3046-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:0jzGuZpTigtObmzVR5ZyHvgD+0Dbhv2L1UAKpoafb+ZMxfpFCkE geN+ap+GvnT/Pyxp6i60JZGKNI5GO2ias3FxugPbmLUrdEcFqlrdm+S8e5z4e1H+9oGzdvs jgDCzHeMlUfY9LsTpBX7+mmB1JHnr7uwoHivPre49YF5SySW1wiDvYuAd8tEJCdOp8Vg1ih 1ydZwdqn3b6a9C3fxbTKg== X-UI-Out-Filterresults: notjunk:1;V03:K0:qpiRpCUtuNk=:AGvM1qp2m+dNNWi/E26N7p pKscEXmpKpncjMT1M/Zo+eMbdLGhiKkP4Cn45XRRIJvPFC5/OgkkipIf6j6JtiU4aQuidSszy sDui0gU5m6vNqX3lc1uqs0KCTL3r5N6MRgNhrCdujUUIAmNbxCt/CoUaO5eVgTNjwvUpiB7Uv 8KllkfchiXgKY7S9FRfKcz42Gq7fK/E3zBw7WssVSRBq8Hon48H3eqXdgL2rnD8YyIq7vS5z3 BZnIKuP3TNiw2whIb/MjsuJ5waxCh+YNIoIwz4DIfCumZmnB7UvZ6pZMvusOD6gaw7iWA+rLQ Ux0kOqjWn8CKw5lnpZLHNVm9KmDo6Fv0C/t+JyZO7syUvVG76Wkq6ATbAYg/snb8aToM8jRNn A3mI0t0m53Exx2c3rM2ubuoRAwiNsKpnWY4ubeEaTFXp6sweuOR5x7Xl7n81rO7SNBg+pa/pS dRQGHxDEM6xQkzzM87JSBsCAxDo8DoAdnYbFriwmr0+ekVZNINOfYMg6lg0VayzpqsW5MjyCC prnNRJtemb4LWyHLlqrT7qfXjXLmJP7sFaqwqWP31C7ENpgbXFrSMxmi9AvtqvP48TOsdW8j1 jGY9KwvYPrUfOjU13F5NxfGGPTFfVVx88F1VDAOrtSYYWQp6A93WhZ2wy/0WOfS9ZBvT9prm9 04calzmTGT2/99QeTWbSWtp6XHH5hh+TEBDUH3CHVUvYkVWpaAN7GybSE2hp3L0o2jUxgPHcD MFlltwRjk3Z650i9 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_132128_770230_0BA78CCF X-CRM114-Status: GOOD ( 11.29 ) 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: Nicolas Saenz Julienne A new compatible string was introduced specifically for BCM2711, so make use of it. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson --- arch/arm/boot/dts/bcm2711.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm/boot/dts/bcm2711.dtsi index cbb47e2c9434..5eca5207c212 100644 --- a/arch/arm/boot/dts/bcm2711.dtsi +++ b/arch/arm/boot/dts/bcm2711.dtsi @@ -107,7 +107,7 @@ dma: dma@7e007000 { }; pm: watchdog@7e100000 { - compatible = "brcm,bcm2835-pm", "brcm,bcm2835-pm-wdt"; + compatible = "brcm,bcm2711-pm", "brcm,bcm2835-pm-wdt"; #power-domain-cells = <1>; #reset-cells = <1>; reg = <0x7e100000 0x114>, From patchwork Sun May 15 20:20:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12850077 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 21CB6C433F5 for ; Sun, 15 May 2022 20:22:51 +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=h/R5tJdDdQPCMH14Lv0UGHUK2B/4isQzJRCSTY0GA5c=; b=YW7OaS/nYMNbTO 17EfO2ut2xWVGzm1yCpsVxUSh8Al4ona0JmIKFV2sspOO3ERNsypOxlLr4G5rdT61pFW5YBsdt6Ly sisbQIMxUvYVSSF3butbHEG05Sej3peZ+a2xDKG7J88WXoaKKqv1wAkSoV8yEFqfVSw2GtBsasBUz 2HBVtMU7gVQzuyVBpQUMRbm8y6Ml0Su+qL0NnYY9EBMZVU/MH7O818h1OcfBOG8xCxFWTBKzIRdEc 1E4wcbfvFFzB83KeJnlqphEreg2V+eRqhmYky2+cbzU8uZnbfOXiQfjMh+GtNLbYZMG2IRAj4D756 lzVM19WvZf/JflWhfgdw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKkR-004uJS-O6; Sun, 15 May 2022 20:21:51 +0000 Received: from mout.kundenserver.de ([212.227.126.131]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKk3-004u8a-Lp; Sun, 15 May 2022 20:21:30 +0000 Received: from localhost.localdomain ([37.4.249.94]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MUpCz-1oGM3E2aK9-00Qjsw; Sun, 15 May 2022 22:21:21 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Nicolas Saenz Julienne , Stefan Wahren Subject: [PATCH 06/11] mfd: bcm2835-pm: Use 'reg-names' to get resources Date: Sun, 15 May 2022 22:20:27 +0200 Message-Id: <20220515202032.3046-7-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515202032.3046-1-stefan.wahren@i2se.com> References: <20220515202032.3046-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:CMkjM+dxKS19+f0NnafvR4zTuYK2+uCtLEdF0TAXa3g67s/sGgz /bQlBsGqTr03dg6w9dwkQfD4EkfI/SkRUh+C4nSqn+0QheLryE/4xyTREt9SLNTNpZK1P1u n7lPfBxsNLZBL6L3PoQi2CgKK5aJR7+HWzN3DzSpRrE14DfctYiti8A1AAHHkHJ2NF6Mvuq 4+NtsVRJr/jzgc3efJnRA== X-UI-Out-Filterresults: notjunk:1;V03:K0:IBPrTA7w700=:zqLHdXPLbiprmM8VSnI+xv dpd59o301tzViqVR0w+sei3Le3VYd/S7GwIQ3EQXIWyBcgK8n9AcGWP1YY9x+NxkH1rKpvFsI a38bU8tNDad0N71OZsdQ6o6rMSBqmdzqqpOfrsaCdaGiMVNUIQREcLtZgktB5D3mbdl3+zwDc Udd8up0ViGJN+mJnd2dqym2HHivZFVIy1aRO4sliTt1D5TBrlfvLKI3oGvWwIJTSpTV5VN7go PvZwHJ0tKMThE5meMId09QhLcmHZYfB62efrLkcIqEJypdDVPkW3hngG+xCvriNeltJShNh9j s8kBzd244FpAcunqac1ETdf8D//jY18xFcJVBuniydd4SriN7sfzL592G8dBRH2whfPCPohcm 0eNKrefuWGIp/SD6FlSpKo4QBRCx7cO1ro7qQWV0vo2byPpl5MWXQ1U7PQB3o43hdUz6vAgAQ TM1JDK+jvhS6XWs2iXArz4CWOml+J3G+CTcv/No7lVqA/jqet9BqM2PE9ZONHt2cTm+965tgf Tca6epv8NsfYW0VKq4oQIh+8MNo3R8rQcQUX1hscndKgGuxQS1QNgHSOU9Z+ZeCappDORdgkc IQB3XHphHaKq9DEA/fSeTbhSje6Yb2ZsZOq/Amftgt1syVK3HKVKiHw9e/o6bSyHz5Wp5/xkE GPmkthXCK/TKFhp2nt1P4utTejPy5k7/max/u3tzxkEckJbyzMEFW3bV+rtKM7WEW8InJXMGq GkLZJTm4j/I0lLiu X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_132128_043208_5D3818B4 X-CRM114-Status: GOOD ( 15.04 ) 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: Nicolas Saenz Julienne If available in firmware, find resources by their 'reg-names' position instead of relying on hardcoded offsets. Care is taken to support old firmware nonetheless. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson --- drivers/mfd/bcm2835-pm.c | 59 +++++++++++++++++++++++++++------------- 1 file changed, 40 insertions(+), 19 deletions(-) diff --git a/drivers/mfd/bcm2835-pm.c b/drivers/mfd/bcm2835-pm.c index 42fe67f1538e..1656d786993a 100644 --- a/drivers/mfd/bcm2835-pm.c +++ b/drivers/mfd/bcm2835-pm.c @@ -25,9 +25,41 @@ static const struct mfd_cell bcm2835_power_devs[] = { { .name = "bcm2835-power" }, }; +static int bcm2835_pm_get_pdata(struct platform_device *pdev, + struct bcm2835_pm *pm) +{ + /* If no 'reg-names' property is found we can assume we're using old + * firmware. + */ + if (!of_find_property(pm->dev->of_node, "reg-names", NULL)) { + dev_warn(pm->dev, "Old devicetree detected, please update your firmware.\n"); + + pm->base = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(pm->base)) + return PTR_ERR(pm->base); + + pm->asb = devm_platform_ioremap_resource(pdev, 1); + } else { + struct resource *res; + + pm->base = devm_platform_ioremap_resource_byname(pdev, "pm"); + if (IS_ERR(pm->base)) + return PTR_ERR(pm->base); + + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, + "asb"); + if (res) + pm->asb = devm_ioremap_resource(&pdev->dev, res); + } + + if (IS_ERR(pm->asb)) + pm->asb = NULL; + + return 0; +} + static int bcm2835_pm_probe(struct platform_device *pdev) { - struct resource *res; struct device *dev = &pdev->dev; struct bcm2835_pm *pm; int ret; @@ -39,10 +71,9 @@ static int bcm2835_pm_probe(struct platform_device *pdev) pm->dev = dev; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - pm->base = devm_ioremap_resource(dev, res); - if (IS_ERR(pm->base)) - return PTR_ERR(pm->base); + ret = bcm2835_pm_get_pdata(pdev, pm); + if (ret) + return ret; ret = devm_mfd_add_devices(dev, -1, bcm2835_pm_devs, ARRAY_SIZE(bcm2835_pm_devs), @@ -54,20 +85,10 @@ static int bcm2835_pm_probe(struct platform_device *pdev) * bcm2835-pm binding as the key for whether we can reference * the full PM register range and support power domains. */ - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - if (res) { - pm->asb = devm_ioremap_resource(dev, res); - if (IS_ERR(pm->asb)) - return PTR_ERR(pm->asb); - - ret = devm_mfd_add_devices(dev, -1, - bcm2835_power_devs, - ARRAY_SIZE(bcm2835_power_devs), - NULL, 0, NULL); - if (ret) - return ret; - } - + if (pm->asb) + return devm_mfd_add_devices(dev, -1, bcm2835_power_devs, + ARRAY_SIZE(bcm2835_power_devs), + NULL, 0, NULL); return 0; } From patchwork Sun May 15 20:20:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12850083 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 85006C433EF for ; Sun, 15 May 2022 20:24:20 +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=3Wiixa2MFVd0bAVT5CXxvQ5RIxbnN6ClhpAwZf5Hxlg=; b=WCxKVf+yntC3Hi KDQO8exsZYnlk1j0+vKI40KrJX5L9gPAoqiQxyUlQyhepChYBfRixeNGQodFqWvG4B10kEzxXCny2 az0XIsTvPS4oheE4+whXhadLMtgXP+pSpuM99TWoC8bgZfLlHZxgVdgX6LMHxQYb8JB3Az/UMnfOv Yo3a4rzgaC08qt1J69Yy7UrPaU0MwS8Db944FFQpWWPbQ5PAfWvvdYVjgVgG9uHMMx1hx4ZjR0RRx 2x/kYqqwsjdh7eQ3PkrxWkooXOKZSUNIurSo8ZL+M+i8Ec2fkzeR9Q84n45tGrajyYhluDD5ALNvy UGZC1iCwklJjLdxB5W4g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKlp-004uym-AM; Sun, 15 May 2022 20:23:17 +0000 Received: from mout.kundenserver.de ([212.227.126.133]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKk5-004u8h-41; Sun, 15 May 2022 20:21:33 +0000 Received: from localhost.localdomain ([37.4.249.94]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MZkd5-1oMQb71GTv-00WlUa; Sun, 15 May 2022 22:21:22 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH 07/11] mfd: bcm2835-pm: Add support for BCM2711 Date: Sun, 15 May 2022 22:20:28 +0200 Message-Id: <20220515202032.3046-8-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515202032.3046-1-stefan.wahren@i2se.com> References: <20220515202032.3046-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:4Si2iYUKDyfIR2VHN4xNZ0Z/q2PQv44pgS66WVd8M3m1i6viOYR oRgb2yw1kWXBgrmCAZIMMsk/gtPpggZxhQcI/AKhgvz+VJMfftnk0H1rpHFNrR/jrAEFgZI oUmIxK9pozZR611xU4mlawbjl+n0UQ00Uy4XnduezRvQK5rSP2V1p8Bmod0NiawibRq3+NO i3E8MqKpJSB1ARgeGI/mw== X-UI-Out-Filterresults: notjunk:1;V03:K0:pfukOn779hw=:1m6QlStlv6APXT+MSX+2i2 ezFuRRGV/sc2LQ8wa39xRg4YG4VserQbNqXkJ/BLy1Fx9zxYhAh7VThHDjdbAghQ/0W+D4SJS TADTHngJvIzBWiVJCiQr9okKhsHCuUj/J9vy1x3yhqFI69C7hnzFTegeK8zvYdn8d5LJOy+CH RsRiGVr1DGSsHoHhn2tnxYSX8E2Or430SG8D/mZhCdVIaBjXf4dYkI2ZDk4ya0fWr1Zc2mZpI j38Q/uw5qo1Z7VUWAsD6ZNWaIEPMjbMh1qfC5/7AU7WLOKTKNIvhA1JJmihIB8GAYBBFaXsj4 rkyNL+VZKqSIzRPrzpXiTafBWVRk+0xWHRahc+f0rh9MNaL2hLisARdyvPvBr+FUBHiXbi/PA V34ekwt/shVG2E9BDKq1hynJumCL+O+TwCvaQLZJIy/8dz/emw6QyPhQK6jKemlRm+zwoU1pd +Fj148Cp6mFQE8dOy4Slm3kZ0PGcz7g6srXAfb2GBiMIKXGEPp7+7c5Qlgy9SfHAScyPi8IA8 8ha/ZcJ4Nvsc8u1bAmvGmSrPIZwluJhtaFeZKJe11haFy1dOMIMe7+P+64BR936Wj8y/sKAvh E7VjqrcjHbwJvIMZSYaSpKhBqLL5dATBBGfhV6t1aYvJRaoLQGXzNmmOZ5kbVH0m/Q9Qh2foS +XGVT9SWJIPTeNfj+7gWI2j/KoVXO6K4AgawEFQf2G5qghEJtwaK95aGTHIXGH7CYhnMpXKcn ojVjXSR63E5NV6t+ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_132129_537749_3E85FDE0 X-CRM114-Status: GOOD ( 17.38 ) 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 In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present with the ISP and H264 bits, and V3D is in the same place in the new ASB as the old one. As per the devicetree bindings, BCM2711 will provide both the old and new ASB resources, so get both of them and pass them into 'bcm2835-power,' which will take care of selecting which one to use accordingly. Since the RPiVid ASB's resources were being provided prior to formalizing the bindings[1], also support the old firmwares that didn't use 'reg-names.' Signed-off-by: Stefan Wahren --- drivers/mfd/bcm2835-pm.c | 18 ++++++++++++++++++ include/linux/mfd/bcm2835-pm.h | 1 + 2 files changed, 19 insertions(+) diff --git a/drivers/mfd/bcm2835-pm.c b/drivers/mfd/bcm2835-pm.c index 1656d786993a..da110767c6a4 100644 --- a/drivers/mfd/bcm2835-pm.c +++ b/drivers/mfd/bcm2835-pm.c @@ -28,6 +28,8 @@ static const struct mfd_cell bcm2835_power_devs[] = { static int bcm2835_pm_get_pdata(struct platform_device *pdev, struct bcm2835_pm *pm) { + bool is_bcm2711 = of_device_is_compatible(pm->dev->of_node, "brcm,bcm2711-pm"); + /* If no 'reg-names' property is found we can assume we're using old * firmware. */ @@ -39,6 +41,7 @@ static int bcm2835_pm_get_pdata(struct platform_device *pdev, return PTR_ERR(pm->base); pm->asb = devm_platform_ioremap_resource(pdev, 1); + pm->rpivid_asb = devm_platform_ioremap_resource(pdev, 2); } else { struct resource *res; @@ -50,11 +53,25 @@ static int bcm2835_pm_get_pdata(struct platform_device *pdev, "asb"); if (res) pm->asb = devm_ioremap_resource(&pdev->dev, res); + + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, + "rpivid_asb"); + if (res) + pm->rpivid_asb = devm_ioremap_resource(&pdev->dev, + res); } if (IS_ERR(pm->asb)) pm->asb = NULL; + if (IS_ERR(pm->rpivid_asb)) + pm->rpivid_asb = NULL; + + if (pm->rpivid_asb && !is_bcm2711) { + dev_err(pm->dev, "RPiVid ASB support only present in BCM2711\n"); + return -EINVAL; + } + return 0; } @@ -95,6 +112,7 @@ static int bcm2835_pm_probe(struct platform_device *pdev) static const struct of_device_id bcm2835_pm_of_match[] = { { .compatible = "brcm,bcm2835-pm-wdt", }, { .compatible = "brcm,bcm2835-pm", }, + { .compatible = "brcm,bcm2711-pm", }, {}, }; MODULE_DEVICE_TABLE(of, bcm2835_pm_of_match); diff --git a/include/linux/mfd/bcm2835-pm.h b/include/linux/mfd/bcm2835-pm.h index ed37dc40e82a..f70a810c55f7 100644 --- a/include/linux/mfd/bcm2835-pm.h +++ b/include/linux/mfd/bcm2835-pm.h @@ -9,6 +9,7 @@ struct bcm2835_pm { struct device *dev; void __iomem *base; void __iomem *asb; + void __iomem *rpivid_asb; }; #endif /* BCM2835_MFD_PM_H */ From patchwork Sun May 15 20:20:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12850082 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 2A9A8C433F5 for ; Sun, 15 May 2022 20:24:03 +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=O0hP1Ln1ta677/xDP2Tmqiq9Jr9WYNEoLWkjtOByiFQ=; b=SZqw1r0KXZFYQ1 swFM1uoX77nMnh0RmyBW1RHzayD82Xv3aTPOMBlr0XGBvhTtlhJMJem7hcgiSPZ3qYPTTwHdaTHyU khSi0iLyytxtolCFTkikbejpJnoleiUhQzx4ufsP/uYWHZ9fSDwSh/VDQQWuWhSPXtuRNsF9GCB7V aflSuwWf8898Z2zd3jU9ANYk4dMjPRr12cAUGPsoSB3smJuItW9aQkvw8MUUxk3EOUsT33Vsvux/E yqnmmQ8YtHdeC/T3vT76oHG71NXzE5BQPYllMhaFC64Rtr9jKBQbmGSB6HkByNFjxEsLtdiKiI+eH bpa5w3G4u0cX1fw+4wcw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKlX-004unc-Kj; Sun, 15 May 2022 20:22:59 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKk5-004u9C-2m; Sun, 15 May 2022 20:21:32 +0000 Received: from localhost.localdomain ([37.4.249.94]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MwwuJ-1nfhqj41CF-00yMXI; Sun, 15 May 2022 22:21:23 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH 08/11] soc: bcm: bcm2835-power: Refactor ASB control Date: Sun, 15 May 2022 22:20:29 +0200 Message-Id: <20220515202032.3046-9-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515202032.3046-1-stefan.wahren@i2se.com> References: <20220515202032.3046-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:Zqx34iD9uP2vLVfJxyyrnXUaDcBAS1OAjj+1y5zlPa6QSvmg7dF lNniJXMsL7INUDUZVbU4O2kSzlZB4jjnbiAbXKC6KSplR7p7cmoPyuMaLHCxL9ikzuALSfl VYXJIXicKPowLJh6A66+fnP7HCu9Y2b1PK3x+x2iVCl4fPTj3IK8Sk46oPQXMdMKdw6+4WZ 6UZHATKF7UpguG4FWurGw== X-UI-Out-Filterresults: notjunk:1;V03:K0:wHxqaCRRoUs=:7jadS5BZLbCNTKKcTEADfW +aSAv/86dO5OsBydg79joGUnw/7GDqTV9kVQSarYMEjLR0w0+k+T9IVf44z1GlYwanKn5jWRh B+tKSiCk2lqwN9umJ06V6hOT7h2WVKAASD6mxoP37eDgY40c02hlocx5oQIjENoj1lAfGtIst r9heMmlAgkSwToJAIf8feiJJouW8Nl9b0RWucE1xleFB1S8OwsF3vxM9FA2v7EETpw9U0ncgl FcaW4b/XQglYtHoXSzz7rEAZSlaWUM5ZZ3HDhLTBCfym0iqkowwA9aXeiMCOvqbwHnOWDQbuH NarRhAtCCbxKLKFOCjhIUxYHIUJ/6X67LEjZPA/aSKSsjuNpPaPNISNc+KDK1lPB3OrF20wxa rCAdD2vj6XZf4XI651H1AAXz/LrBb03RXIgLhhB5qOkrMbDBLAUikD8RxNyeElpI0qGtpIiB2 nZLheFMqITZVHOSsug2CWz3JVHWN4CFnW0+wzEwmYZrDvQ7+DKC7/dDirljjMChp3dPNp9tVE hv3mEqM9bHlXEXFZTGftx5FCC4mPBobGIDOYmWbqSm8n69pQJETvNUeFlipEqvteHDL9aXNho ffHp0zyK0u4m41dqzac9uhHrtFNqDdSaLNAhUVt7omIUULuoYmz+iw7+WUJA4hvyqvZINGk4P 3zOFvtFhNaGSuPYD5vjXZMlkzSwFHHY/83urlDBoSJ1vyGVI08lBjU9WiJ2m6OP78ZfUJytLg yZxgTeDR0g9U36hU X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_132129_503151_1F953073 X-CRM114-Status: GOOD ( 12.17 ) 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 The functions to control the async AXI bridges are almost identical. So define a general function to handle it and keep the original ones as wrapper. This should make this driver easier to extend. Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson --- drivers/soc/bcm/bcm2835-power.c | 31 +++++++++++++------------------ 1 file changed, 13 insertions(+), 18 deletions(-) diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c index 1e0041ec8132..77dc9e62b207 100644 --- a/drivers/soc/bcm/bcm2835-power.c +++ b/drivers/soc/bcm/bcm2835-power.c @@ -148,7 +148,7 @@ struct bcm2835_power { struct reset_controller_dev reset; }; -static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg) +static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable) { u64 start; @@ -158,7 +158,12 @@ static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg) start = ktime_get_ns(); /* Enable the module's async AXI bridges. */ - ASB_WRITE(reg, ASB_READ(reg) & ~ASB_REQ_STOP); + if (enable) { + ASB_WRITE(reg, ASB_READ(reg) & ~ASB_REQ_STOP); + } else { + ASB_WRITE(reg, ASB_READ(reg) | ASB_REQ_STOP); + } + while (ASB_READ(reg) & ASB_ACK) { cpu_relax(); if (ktime_get_ns() - start >= 1000) @@ -168,24 +173,14 @@ static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg) return 0; } -static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg) +static int bcm2835_asb_enable(struct bcm2835_power *power, u32 reg) { - u64 start; - - if (!reg) - return 0; - - start = ktime_get_ns(); - - /* Enable the module's async AXI bridges. */ - ASB_WRITE(reg, ASB_READ(reg) | ASB_REQ_STOP); - while (!(ASB_READ(reg) & ASB_ACK)) { - cpu_relax(); - if (ktime_get_ns() - start >= 1000) - return -ETIMEDOUT; - } + return bcm2835_asb_control(power, reg, true); +} - return 0; +static int bcm2835_asb_disable(struct bcm2835_power *power, u32 reg) +{ + return bcm2835_asb_control(power, reg, false); } static int bcm2835_power_power_off(struct bcm2835_power_domain *pd, u32 pm_reg) From patchwork Sun May 15 20:20:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12850086 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 61DF1C433F5 for ; Sun, 15 May 2022 20:25:23 +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=RzLov583xMfm68T4XpK32p4LIWUBSbLNEgdIeMeBA0c=; b=HXm9tf0/vQMSwi y7SxdfGHBd2nWL3RwB5Lw1CeHeiDIBFmEcnowQWP9LvEnX1zzfxSfKe6dlhUNBeTUAL2hWBk8rcmF l3TEKklcR3oyxj1v7uQDcJZZnAR7X4thChHZ6FB7Gr0RC+MadpxVYf4I6b2Bb7mB5gMZauj7es0OH 7CIind6812urR4mG3yo1jdiT/yvU8CmtCPc2lv/wmtyA5d9AFYzds9LVq5RJI+tX0oPyw3mCANcFU W9idg4vVAU3dzHedL1htXaKaRxC/CpZKLzcbs9lPaXHZEIT/iHX04rKCduoh7ODlPqQVp7N5vPd1C bh11/cif+IUN/5U3MNUw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKmq-004vbd-IS; Sun, 15 May 2022 20:24:20 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKk7-004uAu-AC; Sun, 15 May 2022 20:21:33 +0000 Received: from localhost.localdomain ([37.4.249.94]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1Mr8vG-1nW6xZ2jGo-00oITd; Sun, 15 May 2022 22:21:23 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH 09/11] soc: bcm: bcm2835-power: Resolve ASB register macros Date: Sun, 15 May 2022 22:20:30 +0200 Message-Id: <20220515202032.3046-10-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515202032.3046-1-stefan.wahren@i2se.com> References: <20220515202032.3046-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:tRuXr/NcWiagAyMCNC8Bv6us8sxURSZzdQ7aPD5wKLaX5A5J4tu OLs9ExQ9AtejcsXt40LVzIixorLLH8hTqLxhkRSKhYq7DjMDshq6n29tU0Unr073yve6jtK sJmSM8ztCdop11QII7iGllmf4Kvwwf5TxSE6JblAdL/5kxkh3eFrQf0oxdxJ6NyDqElxQNu Cg6H6TZYrOFJEBnztgM4g== X-UI-Out-Filterresults: notjunk:1;V03:K0:IArgAF7lIF0=:JUsiscSwkp1tfDbi/w9Cl8 gdvTqNLqq1nngmEjWFOoFtYxL9BoC+4PT6eTNbo1QdHevjiKZ6kYP+jH+m133sreOpg27p5RK HhTHD9tYMvTE5+rAOzd0sILq1rwtab/fWUhUmqcPmNW6fxXy97cAon84XUlvAzHDoqYYthR8j b1kBxDOMC2ozY7jAMWp5Yyw7eIUBxYUCocNPjYD0hEFYZXxmYuDlt2H0MbmlA0tc030fMdJWv LM3L3IkEwHHchLkwUEqudfBRx8xLHp+b0LN4FSVE8r1QMUGE7Iazd9LZ0GtLBegz3mTNhByHl mp5M4/Xa2x/RyMYeN1AzLNjW3K097COlLaOFq49ZrxL8+4CRGRdhx/d7jdS2dvEImc9pA30jN mO5OPqvxR8mWvJ8OeW63P0sX4+A7nDV+KC9UKtEyasve7wQlzc6Fmqu93BlmwYBVX7mvVIrka iItUekLxA6+PYiKFkaEbo1Z275ItQa7n90qpGUxcT73ZE2q0fKPww2Cw9m1wV4CQbAAinmUCk HTrGo2Z5n5lrxVZVJ1ArM1YlvXBykmwBMDhPLG/LALPvIDe2hisY6hb8Usw/Eur2lhonrww63 EbwH6cCjpeaf9uqtIojebkr8oLqnh3jbT6N2eW8tqV4CT51VbZSDZAYrnjXM/Rwsvb/8RpJyz RapkQcaXiqG/geDD03DFaEg7pqwSiC6O28z5V6OSciQdatOePXsUPzkst/4brVl7TxmQoO7yA FyZvRq1NowvaT/m0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_132131_718035_94185C09 X-CRM114-Status: GOOD ( 12.83 ) 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 The macros in order to access the ASB registers have a hard coded base address. So extending them for other platforms would make them harder to read. As a solution resolve these macros. Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson --- drivers/soc/bcm/bcm2835-power.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c index 77dc9e62b207..fa0a13035794 100644 --- a/drivers/soc/bcm/bcm2835-power.c +++ b/drivers/soc/bcm/bcm2835-power.c @@ -126,9 +126,6 @@ #define ASB_AXI_BRDG_ID 0x20 -#define ASB_READ(reg) readl(power->asb + (reg)) -#define ASB_WRITE(reg, val) writel(PM_PASSWORD | (val), power->asb + (reg)) - struct bcm2835_power_domain { struct generic_pm_domain base; struct bcm2835_power *power; @@ -150,7 +147,10 @@ struct bcm2835_power { static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable) { + void __iomem *base = power->asb; u64 start; + u32 val; + if (!reg) return 0; @@ -159,12 +159,13 @@ static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable /* Enable the module's async AXI bridges. */ if (enable) { - ASB_WRITE(reg, ASB_READ(reg) & ~ASB_REQ_STOP); + val = readl(base + reg) & ~ASB_REQ_STOP; } else { - ASB_WRITE(reg, ASB_READ(reg) | ASB_REQ_STOP); + val = readl(base + reg) | ASB_REQ_STOP; } + writel(PM_PASSWORD | val, base + reg); - while (ASB_READ(reg) & ASB_ACK) { + while (readl(base + reg) & ASB_ACK) { cpu_relax(); if (ktime_get_ns() - start >= 1000) return -ETIMEDOUT; @@ -622,7 +623,7 @@ static int bcm2835_power_probe(struct platform_device *pdev) power->base = pm->base; power->asb = pm->asb; - id = ASB_READ(ASB_AXI_BRDG_ID); + id = readl(power->asb + ASB_AXI_BRDG_ID); if (id != 0x62726467 /* "BRDG" */) { dev_err(dev, "ASB register ID returned 0x%08x\n", id); return -ENODEV; From patchwork Sun May 15 20:20:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12850084 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 4E326C433EF for ; Sun, 15 May 2022 20:24:40 +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=6+QeKy7tUL7zj2g50/C2qzyGwlxt1DWQ4NgnDzbgKKk=; b=rTDN8U4H5Rs81A Y7xFu7oKEvEa8PTNJiLrCrn+ok1282Fp2q4b+k+cGJQg93JBy2Pz8yN1H2V5eaXUWjnCDQ5CgOzMn MYplP+fhJFpOg5d9GuAs+oFo5JsYgyXN6Ms/I2fJ+OZatk3KJmQlxbEWL3jryTYMQkavX2t23TX9m o26ORhIxd9Tr3R+DQC5cIi1ARyL7LHuh9Zw4UMWfWrgbpLZt49R2n826I3+msthlgXC2bFQDnOIY5 Pcjk8vbuFuoVNuhwrwLF7eWz+5uYEZGHHAFfG3fWpoXfg7grBg+mvmQmIHBWXkQM6MWdb1Khq7ZUn tUanNb6h526O6ram6xEg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKm6-004v9I-5B; Sun, 15 May 2022 20:23:34 +0000 Received: from mout.kundenserver.de ([212.227.126.133]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKk6-004uAP-9J; Sun, 15 May 2022 20:21:33 +0000 Received: from localhost.localdomain ([37.4.249.94]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1McXwD-1nKJNR0aGT-00czwE; Sun, 15 May 2022 22:21:24 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Stefan Wahren Subject: [PATCH 10/11] soc: bcm: bcm2835-power: Add support for BCM2711's RPiVid ASB Date: Sun, 15 May 2022 22:20:31 +0200 Message-Id: <20220515202032.3046-11-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515202032.3046-1-stefan.wahren@i2se.com> References: <20220515202032.3046-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:/fM6OPNtRTKLgroxg6P+k+A2l+bkQQQWlbyybbize/YASC+t83X kdU1dW3QG5zFrcc8pyOjvjJ6yXQjx8lLLjy67BWcwiZQ+ix/NyhV85yRWgrr8DC3y6Ld/0P fK1r2paB3eLhpVDlXZsPfdIUGrzlVg2ZMqZOro0ucklyV4G1wskb7nH60q+bDLgM0/T+wcU NXoPYPIEBjgjcG1qWWIjQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:bSEQsKQaPLo=:5oxFBjZxP2gIaziTg9zJ3b 4QrxNfA9a/JD8J6v06/FEQI1f4ZZwFddBDxa6SEnHrWXy2F2oV3yGiR3RE4r7jo38qpYvHt/O MEpVT+eWjMlnmAS9C12UNc0e9QWfnKN6gCy2gsANk20Nyp2hPsd0swjFp6t+pTqVy6RKyw8qA /l8Ha++tUDzZh3WbitqLAr+o2aUmntLycyDNBnpLTdgG0G+6x/p1Q22SAhdG2yGBEjREBRGRh TGEvEwakNDChHGzVlJNjqj/pmm3lIc1ecKzulYMfpNeu2cycRuKtT4fvHg3FxKy66wAX/R4pu OkBR7pU2QwDmssjaXk3ANXZ6MdYTh7J8YN+egn4wNGnuEcovQ821zyAFMbKMKOGn6tiTheH19 66vIrd9Pyw2pRP3OzDX5hMhlLwwd/T4M4PWUgC04DzZtR7AUNlSpkp1Xjw+mhkJ6eNiS8NaQ6 iVDKB4keilZ0vb1g5GBxMo/n7Ovhyzqxuj0m5nGGLbAS6Kxrrf1a3aLY2fGTQ93WyzAZq/Bsa IvQMlbMvF4SkxptIVRJ65QeUtoqGPbLfmPb0SzYy525sQZGKV6EJkDr215ojo8bNHiINATN/v IFMe+BDupZpJ2faoFch0jACIeoIeyak2+vvgD2i1NqHb1sxDcLLV+CQj4qukp1j7EgPRVHzMz Yxp0rC2WLQCR5+Ec/roBQARcVnDEpZ6Zq+W9ceaoGxkTYX12Mpai1WjkBvVinam2BGt9GGNBc BRUlGEPdFKIDM3I8 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_132130_677188_0549BE2D X-CRM114-Status: GOOD ( 14.75 ) 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 In BCM2711 the new RPiVid ASB took over V3D. The old ASB is still present with the ISP and H264 bits, and V3D is in the same place in the new ASB as the old one. Use the fact that 'pm->rpivid_asb' is populated as a hint that we're on BCM2711. Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson --- drivers/soc/bcm/bcm2835-power.c | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c index fa0a13035794..1e06d91c0739 100644 --- a/drivers/soc/bcm/bcm2835-power.c +++ b/drivers/soc/bcm/bcm2835-power.c @@ -126,6 +126,8 @@ #define ASB_AXI_BRDG_ID 0x20 +#define BCM2835_BRDG_ID 0x62726467 + struct bcm2835_power_domain { struct generic_pm_domain base; struct bcm2835_power *power; @@ -139,6 +141,8 @@ struct bcm2835_power { void __iomem *base; /* AXI Async bridge registers. */ void __iomem *asb; + /* RPiVid bridge registers. */ + void __iomem *rpivid_asb; struct genpd_onecell_data pd_xlate; struct bcm2835_power_domain domains[BCM2835_POWER_DOMAIN_COUNT]; @@ -151,9 +155,15 @@ static int bcm2835_asb_control(struct bcm2835_power *power, u32 reg, bool enable u64 start; u32 val; - - if (!reg) + switch (reg) { + case 0: return 0; + case ASB_V3D_S_CTRL: + case ASB_V3D_M_CTRL: + if (power->rpivid_asb) + base = power->rpivid_asb; + break; + } start = ktime_get_ns(); @@ -622,13 +632,23 @@ static int bcm2835_power_probe(struct platform_device *pdev) power->dev = dev; power->base = pm->base; power->asb = pm->asb; + power->rpivid_asb = pm->rpivid_asb; id = readl(power->asb + ASB_AXI_BRDG_ID); - if (id != 0x62726467 /* "BRDG" */) { + if (id != BCM2835_BRDG_ID /* "BRDG" */) { dev_err(dev, "ASB register ID returned 0x%08x\n", id); return -ENODEV; } + if (power->rpivid_asb) { + id = readl(power->rpivid_asb + ASB_AXI_BRDG_ID); + if (id != BCM2835_BRDG_ID /* "BRDG" */) { + dev_err(dev, "RPiVid ASB register ID returned 0x%08x\n", + id); + return -ENODEV; + } + } + power->pd_xlate.domains = devm_kcalloc(dev, ARRAY_SIZE(power_domain_names), sizeof(*power->pd_xlate.domains), From patchwork Sun May 15 20:20:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12850085 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 775F4C433EF for ; Sun, 15 May 2022 20:24:57 +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=lJdVxq7w4F+YGAYy8B4yLLYc3wIyzcLH260pvbhZe5w=; b=ZFyDnXEpPgRKGQ pCR4gh6uZmOXxmIJ1hmPD8MN18b9KLcLqtpX07MODydsoXWzxRyvT9M6r0QVii9NijC3AjFHzdpuV Ko30hFdORrf5CPqmU5xIEG3B82qJa5R2SBzRLgkK08BiAkrDNQrTUV5u/T9FbGk0keEVrgBByIG89 UTtLUUCOzE4b11YppA8Cilyw5hEZWYABb9uflH53lIcCzTXFm9BKo9phMZN266haSwv/OFbw29iRU Fb9BZqLXKHYdcDBXZbjNYRVQRn8hRHl1jH3GtbTZv5fMjtnQaj/ogp2ynq33AJywbo7wLXcemUliz d+fV7BRqieLO1tWk1ymg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKmX-004vPg-H6; Sun, 15 May 2022 20:24:01 +0000 Received: from mout.kundenserver.de ([212.227.126.130]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nqKk7-004uBX-By; Sun, 15 May 2022 20:21:33 +0000 Received: from localhost.localdomain ([37.4.249.94]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPSA (Nemesis) id 1MrQ2R-1nVpyd3W9X-00oZSW; Sun, 15 May 2022 22:21:24 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Nicolas Saenz Julienne , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Nicolas Saenz Julienne , Stefan Wahren Subject: [PATCH 11/11] soc: bcm: bcm2835-power: Bypass power_on/off() calls Date: Sun, 15 May 2022 22:20:32 +0200 Message-Id: <20220515202032.3046-12-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220515202032.3046-1-stefan.wahren@i2se.com> References: <20220515202032.3046-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:AM0pUZJy0xWo5m49ybRT1aE4KogOzmCzVRRc51lDsfppyqziW8p qXa0MWDk24XlbJUaOYgvsg1fuy7rmQiimR+fGYefcUSnAtxEFNedH78UiTX6vyUaFepfa9h RwQbpbNkSId3Jl6cHKMN2ks3vQ1o32KFsbZCY9gWJWqdDNyWpa+gcFU7qH0UkwM56WcwHmn wc4iKSLJ3aK5YEbxhpL7A== X-UI-Out-Filterresults: notjunk:1;V03:K0:HE/ehCz5E9E=:SKkkkeDKunTh+09gigVGOR P0HH3FaHI8oiylGV844J4/J9JSWalv2BCHNnBfQP2TvXPUOGfsCuOv5u7mAyj+7OneCoz8PU6 DZueQwndkOnHMJCjzav0C4rxox+EbvHh1dfYLRvLejGvLiHIDMqbZkvfyuZ1H6rOB60090oIH RA0ZCV3YSLriKC/10b/JoYOnF7xUg9G+RDQwcCGtuCR0TXvDJlJE+EM3Q/dSrnwVGJbA0b9vy aE9uPSQGG7btK0QSA6xuKjcP6WZl1U7KJK40ZXcGgRxgDD5AzoUkzR++UdcRfS+1AnbBP2b9c OC6KvI9i79qyEcl8AXYWlzHXQXnEYfajw4Mq3kfc+97u0L0N+9UHNDBbIzsJIs8nKRZA+jBMf dqtg33rKP3qL8z2qRJtuAzf2v29xvAgWVHZ9E8gk0xcbLIRuazpfZxh3/ikfs28YsatmQT0z/ P47HZ+KkNPk082Hg25Y3/t/GS85aQ9hZOud23dGdvx6nmGGEKUHWMYmovlGUrlxkyeAIfmhbK 9AFjgeel2Ee4XpImGI8Qfl7OiUzE1/7EsYdmiVh1Q4jitgaYFxd60bSY3ElTpMyPdTbLdwjmo 1wReojduhV3fkJ95qSgIYfLzAUUeQE0sPOboK+vtvaFN+l4hPIxcshBRXKwsT8IgjmyvvNqUY lWNBGZ6SLxII58e2VWZZ2Qb4Ou7iBHX1pu28+s1bmkDBESOKv5BpepQ6ExY8ToGIeu4D38HMO 23Pl9EE/NZ/qLw9d X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220515_132131_822276_068B8F46 X-CRM114-Status: GOOD ( 11.53 ) 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: Nicolas Saenz Julienne Bypass power_on/power_off() when running on BCM2711 as they are not needed. Signed-off-by: Nicolas Saenz Julienne Signed-off-by: Stefan Wahren Reviewed-by: Peter Robinson --- drivers/soc/bcm/bcm2835-power.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/soc/bcm/bcm2835-power.c b/drivers/soc/bcm/bcm2835-power.c index 1e06d91c0739..5bcd047768b6 100644 --- a/drivers/soc/bcm/bcm2835-power.c +++ b/drivers/soc/bcm/bcm2835-power.c @@ -198,6 +198,10 @@ static int bcm2835_power_power_off(struct bcm2835_power_domain *pd, u32 pm_reg) { struct bcm2835_power *power = pd->power; + /* We don't run this on BCM2711 */ + if (power->rpivid_asb) + return 0; + /* Enable functional isolation */ PM_WRITE(pm_reg, PM_READ(pm_reg) & ~PM_ISFUNC); @@ -219,6 +223,10 @@ static int bcm2835_power_power_on(struct bcm2835_power_domain *pd, u32 pm_reg) int inrush; bool powok; + /* We don't run this on BCM2711 */ + if (power->rpivid_asb) + return 0; + /* If it was already powered on by the fw, leave it that way. */ if (PM_READ(pm_reg) & PM_POWUP) return 0;