From patchwork Sat Jun 25 11:36:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12895335 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 5A927C433EF for ; Sat, 25 Jun 2022 11:39:05 +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=aqI4gcAi+RJjSb L7EsOBHkuo3dpOecEu/hLwepha64TwmEtHEoQ5jA0j1JeFYrLj/yAPreXZlb7MvpW3nQVeq4GiyYE 1aNo9AWKw0zSB+y0HIIPMBP/WK4/eJhV57IQyU5Lr6F2tbJmxE8XzKxj63R5nWiJgbpAKwLGTgStk lQdPCRmF8MI5mrFO/HzLBngUrzILc3JsCvpVqQrYwfFfpYUU2p/AnCnZDKyfOdSew+DP7DdgVnWUG VU6RJPB1+UixGZC9+IRfCVOBgFog2pUDQMaGRqHmPBqF1yjYfj+wsKDybOdzK1dvAnZLJgp4ZpKrA MLG1eBVmQU+ftu5HGtCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o546y-005moF-J4; Sat, 25 Jun 2022 11:38:00 +0000 Received: from mout.kundenserver.de ([212.227.17.13]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o5469-005mYb-H3 for linux-arm-kernel@lists.infradead.org; Sat, 25 Jun 2022 11:37:13 +0000 Received: from localhost.localdomain ([37.4.249.155]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.183]) with ESMTPSA (Nemesis) id 1N0WLC-1nhkPh1V1Y-00wTxi; Sat, 25 Jun 2022 13:37:01 +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 V4 01/11] dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema Date: Sat, 25 Jun 2022 13:36:09 +0200 Message-Id: <20220625113619.15944-2-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220625113619.15944-1-stefan.wahren@i2se.com> References: <20220625113619.15944-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:msqBF+QLUnnWMtPx4/p2yPn6zghKFQymebuRS3n1XDjJk9nJka1 r23Yv4ORbKSnV6PQGsKet8GpXQPvYvQryamimaSaHjVWC8qLpw+iIsdFoqsYmEShQ+Jsdlr H6yIl3EDxyIghzMni95c8Y0puDJoPL+W9JpEvxosem55CvbQV16R+3FfH0Y5Dzu81ME04x3 PXtVyyvEHEtXMLAx26FwA== X-UI-Out-Filterresults: notjunk:1;V03:K0:Ez0nIWd3UkI=:wNuRCL4PzCgqB9H2uGFa98 dBucIhFpQbvsjehK3nxW3b1Ot5stpY2Z+NtV8tXQx/UJXLSf41zUHe/40BwU+mi5XfPHtjpmA uCikDAlMiOhsIK8FX3uFOVTh/AWOSsRbzFj12FAyKt75YNSXZra21LlYfkukNmbOlo/q9foZm vkXxUbEAjx6fHJZijitP+VO8XcRIcYVkkrcvcpyy8M5C/4hxSrcRfsf3g5jRe2yobW9tG6bXr rnVvuCjkJVa9Mdba6ksJFQGwSLsqIrO0U91TVC7YIDSGPkh+s3go2/OD1yEQPG1UuEJ+VKJGd gz2I5A/oWBY2y7hh+6j02O8QNGmp1mbBr/w1pkXaTvwe4VeHGuWGUPfAAPZxc9gSDPxL3UB+h 5U7LMVBXFHcjyXIPKAhchqxFK/DCpvN8Mlv4gL5/j7r9wbasErBjAA4ZSLO8zGMyItR2I2kgR Oi9+eeIj1OKYlcGzW+a5cj+mmCW3JRI8xmV9xAbasAit8OACqAKN58dVQOZNfIJfGdlzxOGds Uqiu1nYTYN/2EhfqVZ2h+go2j7k3TxLiQXBJYq29vUF6JXSID/ebk5zdffHWEysVIP23Aykwh tbwBiYI/uaI+vRoqlBUODCiClyQEOvm+QgTmIRZZqhKmGCb/xH4O/DgkC49gUwmJds2FGxfMT wift5pKuCkCS7fUB/qJjW/3BhVdXrJEJoEZF3TQ2mbMPBcPf6TOwzm0qRaO2sk5XsZ4U29Ysl /QHmT+ICFrEDQdoAFsus0+G1KSyubHFcR8ix5sNePWn1Pyge0uPGcUBWK3o= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220625_043709_994076_BD4B527E X-CRM114-Status: GOOD ( 15.52 ) 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; + };