From patchwork Wed Jun 1 12:53:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Wahren X-Patchwork-Id: 12866888 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 8D79DC433EF for ; Wed, 1 Jun 2022 12:56:34 +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=oR3bCdZikEGioa FJEAx4xK3A8YzLf2L0wNc4u7cbboEZ+i8fW5AlSuZFcH0rrOhD8540dA1j7xK2IhYorDNUsVVDLY6 THDe/hWfTnb22OqV7GILxtFX0DKZeT7WQLhHNCHvLTWrw+m84RWjPX2TibUXWyAqmeL7RIFG01/i5 UzqVzJ2xjc4I6niNfFbGe2TmXSyrjMyz7cdQNcXQZBXp45TB8h7eDrBeCNNr0L6r1caZHUXhiAQwR aS8OnIlZloAzQPvpZfIhc8t+KxfGZKrzvLx2XfCZGRBtpJIkrZ1x5vhWUAdw9kyN/wyLydUBtA2ze o1Yoaxldy68McJcmPojw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwNsU-00G7t0-Ap; Wed, 01 Jun 2022 12:55:10 +0000 Received: from mout.kundenserver.de ([217.72.192.74]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nwNrX-00G7XL-W8; Wed, 01 Jun 2022 12:54:15 +0000 Received: from localhost.localdomain ([37.4.249.170]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MStGi-1oNFAN0tR8-00UKyQ; Wed, 01 Jun 2022 14:54:01 +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 V2 01/11] dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema Date: Wed, 1 Jun 2022 14:53:34 +0200 Message-Id: <20220601125344.60602-2-stefan.wahren@i2se.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220601125344.60602-1-stefan.wahren@i2se.com> References: <20220601125344.60602-1-stefan.wahren@i2se.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:RzxRajtazIqq4GJgCi+hIZLhcI5nsPEOxAMeD2yIwbwS1wgAcXC TU2fpv5hh9D3yu8x/56se4Xtn72zfWA5nNzrcoqoKiJ6CabbupF+wAhpA8O57sA2MLvbsor QEmukNWkpa+mztMYkVQlZ3y6DnVDiFrcErOV55YoPQ36ev4NFssuHEKUvpoc2mF88XeodAR sKbfg8mabqDJw2708OO/A== X-UI-Out-Filterresults: notjunk:1;V03:K0:F52cKKHi00A=:6foQ7EocwyHvGVzcoI78pO myqBY/sA5vXRxk0KQPSI+GHaRJXqTYFmFeSUGM2BPOgm5aoKV7U6qhBAXf7wBDB67QB+v7HzL nTKbfCNzKBCLsccmx4EMLheWq40c+JWRg21SGE1tsMjQ2nQd92xO6LuLzqJpiFmFiJ4drUtPl /Y/s7yCDpvpkBN7N5aXmZ9aEQdUwj2shUKQ2/CSbfpkE1EqixH0uikfOXzL0aJwVyN0xSxL0U Z9BqExLdufPdGVa/xI2aAjjeqACKwXAS6qPL+zvnU2aXGKgdifaWOefNjmgQThvlA5g4Q0l9/ 7RVVRL+BMH5CO53PrmyRRlm4mG6jC0TNVapI106QplhKvi8qS5BQcdafC2ednewCbPkxTkQd4 0zZup4VdYelLcW2QjfRRa2Yh1IMOeDZfhD9GO7zhSJKsO7Z/2ffYlUFQ5bStMtpfZ8eT/A7w/ ue4Mq3R/RVzmtw56fOaTSjBE0ZSjUbNbWmPfErTo6axEsnOS1XNCUM6oXOiVyfN3aV7uF4GSa SwCeO2tFWMLKFkdj1XfCtatkQajUuhXPC5S2nZtjoqq/xyKtIuOSKn8d/Osc3iuF9Gh4apab9 drYc5Gy33hs+t/1oYiAQpLtG47LSDE42yR++zJ5/dh/Dc6z/b/rQACFj4/fnmrkJg6LSkNJyS gPY0m0a9X4H1IOHp/XhhJS38yhoHWbOohCx3zxY2a40yfdWMc5qJZsyEyEN8FYz8tAoy28O+/ 1ptANg0EjAmF3l/o53yTn1hTj9mSVhNvBwrRh5KSFOhTKADt4nMD9sVd7YY= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220601_055412_403419_EBA71C2C X-CRM114-Status: GOOD ( 15.57 ) 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; + };