From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5332CC433EF for ; Sun, 13 Feb 2022 22:58:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238654AbiBMW6I (ORCPT ); Sun, 13 Feb 2022 17:58:08 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:60154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231864AbiBMW6I (ORCPT ); Sun, 13 Feb 2022 17:58:08 -0500 Received: from mail-ej1-x62a.google.com (mail-ej1-x62a.google.com [IPv6:2a00:1450:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7B9AA54BE0 for ; Sun, 13 Feb 2022 14:58:01 -0800 (PST) Received: by mail-ej1-x62a.google.com with SMTP id jg20so8969144ejc.3 for ; Sun, 13 Feb 2022 14:58:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LF5Yow0Ccl8RgBBOinnLuOBxgoILjhOpIvfzjfH/604=; b=GRO4wMzzwXGPITRWpic+Ht2UCSRtv6Ny9KkdGyPkkdupIYY05Wslqkz8Tr3erWYjgg 2uVMKdLBF1yQhyintnTYyoDddDMZ0OiU1C2zojAGkSxGnPFq714zZIiTd5N/QTHUFF6N N0Y+dLf+SRPXX2G8qhAqhMYLgxR3ckz8/RZd+ZuMdBuZm7LLyBlVvsVzKxC26KpgEFEA GdyLKfDKOyGa3xXja7PnKrkJad4+F0/dmHLgD4PU9lsCfr0jVCOArOD9a3oOULFKyGK0 VJdBJSj4HLGAgga3La2tDSkMRT8JCQ+QY3AfkEkOyzhcNN1r1A3edLxtC5J41YB+j1Mw sxew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LF5Yow0Ccl8RgBBOinnLuOBxgoILjhOpIvfzjfH/604=; b=MzkF0szoCqwocW/PGzwa0w6bjN9NrwgxVPCh8Hxp1cpj93lMjXhaxHTk9tqt9ZB3MJ /UAYRYC0TDIdAAXcbDmcZksaBPWqfysBgKpD1sWm83Qzqzq17rMCKwRbD1uk4cpaw2tF X9buPLwkbfXYFiJxzPc954xo8n1XSvVcFVILzDXrNqjh6S84jc0R6u4MUanr6ogaAnBi IVjitP3xJIeWe7HgnGHYdEPyLhFCSTi7a+wzrbYZNAC+lj1c1eu+OaYiSVt4C9KtoXQh IDl2Tirr70Gs4lvy29wyxnj6CUGQw23HiUyclU35gNG1rl4sY9z4cr+bNQlrOxTbqPts K1LQ== X-Gm-Message-State: AOAM531d5PswxVmObUKzRUvNGDzHa5fB4wyfD0p2mcAGp2ibMzHzewxA WJnnlybip7hGKJubXRCrlAA= X-Google-Smtp-Source: ABdhPJxDvaOfSJui8QQ/lfbUiMtSdBFKWNk7yQ/BA5q86+hue0LFJLAl0b/OY3Qm6Bjzn6OHkWQa4w== X-Received: by 2002:a17:906:779b:: with SMTP id s27mr781833ejm.389.1644793079968; Sun, 13 Feb 2022 14:57:59 -0800 (PST) Received: from morpheus.home.roving-it.com (3.e.2.0.0.0.0.0.0.0.0.0.0.0.0.0.1.8.6.2.1.1.b.f.0.b.8.0.1.0.0.2.ip6.arpa. [2001:8b0:fb11:2681::2e3]) by smtp.googlemail.com with ESMTPSA id g14sm3189163edb.55.2022.02.13.14.57.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Feb 2022 14:57:59 -0800 (PST) From: Peter Robinson To: Nicolas Saenz Julienne , Rob Herring , Florian Fainelli , Ray Jui , Scott Branden , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, Lee Jones , Emma Anholt , David Airlie , Daniel Vetter , Russell King , Arnd Bergmann , Catalin Marinas , Will Deacon Cc: Nicolas Saenz Julienne , Rob Herring , Peter Robinson Subject: [PATCH v4 01/15] dt-bindings: soc: bcm: bcm2835-pm: Convert bindings to DT schema Date: Sun, 13 Feb 2022 22:56:33 +0000 Message-Id: <20220213225646.67761-2-pbrobinson@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220213225646.67761-1-pbrobinson@gmail.com> References: <20220213225646.67761-1-pbrobinson@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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: Peter Robinson --- .../bindings/soc/bcm/brcm,bcm2835-pm.txt | 46 ----------- .../bindings/soc/bcm/brcm,bcm2835-pm.yaml | 79 +++++++++++++++++++ 2 files changed, 79 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..47b9c266ddd1 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/bcm/brcm,bcm2835-pm.yaml @@ -0,0 +1,79 @@ +# 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: + minItems: 1 + maxItems: 2 + 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; + }; -- 2.35.1