From patchwork Sun Feb 13 22:56:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Robinson X-Patchwork-Id: 12744720 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 31079C433EF for ; Sun, 13 Feb 2022 22:59:42 +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=KivHI06XX57+UULpwJNk64w8obki8Bxz3/qQigoLM/s=; b=sZQ+GGlUqyxRX5 xAL1qEiyJkCpvqxrbNO8MZzJKdawjE73j9XtxatQWFH4Ki4yKasmvGAVP7AsA0u2yammaF2gvflK9 NfgNElTxedpLIlCePz02qkcmeVfhn/cVSuIQqQGXCCgfdwErFdsycc19C3f64GMe8Ii+p3es/Zh7+ GbHIK293cmffWhvlOWY7MENyL9VUcPP5L9lRZd1VYzcHbxq9293brIPxU+xLVvRwE6Z97UxDxJbBy +eqqRxCoMSrTCx1QY5rXNvoMCO4VK42dH5DUKlHCBAfSXayRDJ9TPIACqxNkg/nPNlpdgOhEqL5MP +6IAsnh/s45KWvK1dLHg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJNp0-00CiFK-4p; Sun, 13 Feb 2022 22:58:22 +0000 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nJNoh-00Ci1y-5e; Sun, 13 Feb 2022 22:58:05 +0000 Received: by mail-ej1-x631.google.com with SMTP id jg20so8969145ejc.3; 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=Js0ktmuKTZxFJAF/2Jk+lZYtjXoioDT4Eyb8Ga1FMSmi0ShY5Ae+LQ9zd6GPay9CrA 3VO4xnB5Yc89KWYIjhXHWD5gYaK7sL1ThtiHnTioZxGFPQ7T2ERkYeG0VnIo5POksn6j JXfbtkMQ6iny50bHodgrsdjGQBY+slEs02c72qZBeTyrMM5yEqgMGhjXfwGJ5/6WE4KZ 3vpvpfOy9S6UT6H895fqe/XB71Uz2yTpLFepJZhBD2pWvKyUcZrn+1qROJrMH2Gq3bqL QvN79RvKBwQ0aQuCp9zFqt2opFfQ8FkrO2Xy6W/T3vJgMhwAH8BiifBiT9+mxHcMP2bg 1UyA== X-Gm-Message-State: AOAM532HXbg7zm3KNSkfgScLm3r9zQ/4o5qKHthLVcEOXVnn+AcJ6rUB yOvP/NIXyQbjzlP0wGscLIU= 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 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220213_145803_246210_A194F28F X-CRM114-Status: GOOD ( 16.33 ) 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: 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; + };