From patchwork Tue Jun 7 20:42:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12872366 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 AA25DC43334 for ; Tue, 7 Jun 2022 20:44:44 +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=cLA5K2AMVrHmiE P9mAbiAR7a6rF/bI6SSe+hluT+BZYYTR9RU/8C2xe4/Ct/deaJG340aLpwKPmKQtfOqVfUaQ3mX4J F3UX2o0+Zrq6KAZz+DuBsE6byG2OGL+B8kT07B8ld8pnoBkCWoAp2gUI8H8w7+5TQeCYO+OA/Dpy/ ARFyqTuRsPUT4mpLkBOJveM51+tWQYdmha9Io7jSxQ/wVSD5+LYYdBPzzvGGGHbBjBIodiMvkEc5j rCM3CgDpx+rBskredairQOHn2uNvVOMGQH9dhfGt7dAII0G1Nszx6nGL4alV2TYdVfdDNGsPRnUKP 8WoIb7mb6mTUX3NFtw1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyg3F-009a0n-Nq; Tue, 07 Jun 2022 20:43:45 +0000 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nyg2Y-009Zaj-09 for linux-arm-kernel@lists.infradead.org; Tue, 07 Jun 2022 20:43:05 +0000 Received: from localhost.localdomain ([37.4.249.155]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MiIhU-1nJHY21Qc2-00fQtG; Tue, 07 Jun 2022 22:42:52 +0200 From: Stefan Wahren To: Florian Fainelli , Ray Jui , Scott Branden , Lee Jones Cc: Peter Robinson , Melissa Wen , Phil Elwell , bcm-kernel-feedback-list@broadcom.com, Maxime Ripard , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Nicolas Saenz Julienne , Rob Herring , Stefan Wahren Subject: [PATCH V3 01/11] dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema Date: Tue, 7 Jun 2022 22:42:16 +0200 Message-Id: <20220607204226.8703-2-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220607204226.8703-1-stefan.wahren@i2se.com> References: <20220607204226.8703-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:4WTGubwhOIVPr9YwhBaJaKf8PK9nlhfAowCd86yrz3xA4TegCkE N/p5ejcPyEBqksMhsnV0TMuBnEVOe3FZXKoXw0XVq5FgO4c7WvwkOpr8+c2qDQJrLs1p6oN hutyED7/njCGliDuttpRkvivsszgOyZwEImbJTL1TiVgk8t6K47P4scmiNUFrWSjPyHIrzk Berda73yOzwsmLN8yhKVw== X-UI-Out-Filterresults: notjunk:1;V03:K0:AwEqJ+A2ruM=:31NUqNIjyLhYnisTfWLWuA QXxoKjlVInZ+XEWnjjsPRQnLhu+UhVDKI/+50j+R3YcU9ZDrXWXAPXl5GtPZXZ+5nS1XJZU41 LncF8s/CLziR2L5bWuUPOhJDNSHl3C5Fo2hHe85/joo6tPLld6r52O47tmA6iEMbG1xAsgcZo A++nrTqp1ukaIf1ZAM06kWXcV3dcSzKIpUWT6JL8fGptn+ezRCecaN+YMbnjBmGm5/11ehoYR lUeUDY0aeLcq2mocF0YgpS2fErGnKrgJXX/3f5IfW6/3lGRrZ8o4SN/ypP5ApseRSrAoVOjYw 14NSldyC3YdtWW5lzq7MpSIK2Q+6bq79JGaBnWKA2RiFI2w71VQm9qzTAWzNJFPnxHYic0ROT IW+S/HuqRJAmU2oBSq+SkvjbGPT8InWMUq36HeMXTAIJOOsCvCqDTBhntDu+KnpSZY+vL9GGA sS5Z+k2UNJjkKnT1Yrx+tynPAYKfY2VqZ3mukeEa30KNvBHZetsJFaklFStX+HyIqqvdK/OSO nwQ60/lWv+3PWFx0HyI4c044jGtHY9Dqaa5yqWPne6/gX7j/4NBNoouiJ+u+3JbT6q6ydO937 7IG47R9wTliyRNZquyaKbgBcgPxh94qabnLNQ//yj7707J/rulJtkuBoQeetArgcGHKCBnYHw Op58hD+u53WylTZkujZD8/zAaimFP+Qq9MiObT80O4iOiZOCUE+sHeIVIiQE4nEh9AsBUDVro uEui8Zu+2ReTKGAc9ElzFSMcXDYql2lOl6xeZ/d0IjPtRe+1ih3XDSc9ObA= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220607_134302_410877_80C00EAA X-CRM114-Status: GOOD ( 15.81 ) 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; + };