From patchwork Fri Nov 12 22:14:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12617373 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C2688C433F5 for ; Fri, 12 Nov 2021 22:14:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A1FD960F39 for ; Fri, 12 Nov 2021 22:14:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232001AbhKLWRg (ORCPT ); Fri, 12 Nov 2021 17:17:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230435AbhKLWRg (ORCPT ); Fri, 12 Nov 2021 17:17:36 -0500 Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 03669C061766; Fri, 12 Nov 2021 14:14:45 -0800 (PST) Received: by mail-lj1-x22d.google.com with SMTP id u22so14381920lju.7; Fri, 12 Nov 2021 14:14:44 -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:mime-version :content-transfer-encoding; bh=xmTEhzdHehFTh2rOC5A4/85h3lppQ/OuyTKeK2Y6gpg=; b=NAtWk8j0VLJ95v6LcZaZ4NVQdq1DZusI07UgDJzg5khMwRypGFoyGXphBFvUdsP2Ym JiTSA2/3WdmcQnDJsHm4E3RqldsVgAU2AJiKMXQmX1GRQH68TO3iwK0F4vf5CtzV/OCI K0wKiHuiMr028pOUlwwzLbXqNOzRLPUkdshIdq+SkdWEvq8XGt9vnjXNay/Kas+P58wy ESRthfIm8P0jH+rCteQVZDpk+JjdFsu8MBg0L52nmVndjCR+IJeLKV2KLnlfMK9acQFg XPgWZsVA2xnro40Jn43niiqxfkgM0+ALZbebrIk+imrVL3QjtM0XFW7ep0NdyJj7ODlA Q6eA== 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:mime-version :content-transfer-encoding; bh=xmTEhzdHehFTh2rOC5A4/85h3lppQ/OuyTKeK2Y6gpg=; b=g5LSoJUy4GiPzS1kjhLdXs818r290ZOlDtGvGAWHM9YDQfSUN/mw3NlYONqoR6C8ac sRW013AB9pSXV71pRwXXVnfIJ7jXJX0FsPwKvMr3aqMTMMpGfBBpB9Cd/om22ivd+X7j 38+HIUCsh9FD7QWDxqIjfW1Kz5ABaZrrU6pzVi+6csIIsfUYYeTWCqYSJ/MxEmEcXiaj anBkqItX+UiGBaPYzlOQS4lPxV9AM+RpQGhDtMKkMDuhyGhwxy03Uo70R/JYJWSH1dRz RvDe12xynkcf6nBjoOILNyRnVcJP/uIiOZeN5YfyDh9PUYj0092guY99clocH47wDhr0 hlig== X-Gm-Message-State: AOAM5308uzW8jRhUWqMKdx9/XxOwwCIaNcfOaqBiSCMng361wzSUUzlD jxn8+6CDxvOI9kwbtZZCNMY= X-Google-Smtp-Source: ABdhPJx03w631kSQzSJha6yE2qu0BPqpA3mOCava/15g/CCSqqu/TIdGoN5xO4/QxNawim0U9+ZVEw== X-Received: by 2002:a05:651c:a11:: with SMTP id k17mr18213730ljq.243.1636755281856; Fri, 12 Nov 2021 14:14:41 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id e5sm680536lfs.51.2021.11.12.14.14.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 14:14:41 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Lee Jones , Wim Van Sebroeck , Guenter Roeck , Rob Herring Cc: Florian Fainelli , Justin Chen , bcm-kernel-feedback-list@broadcom.com, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, =?utf-8?b?UmFmYcWC?= =?utf-8?b?IE1pxYJlY2tp?= Subject: [PATCH V3 1/2] dt-bindings: watchdog: convert Broadcom's WDT to the json-schema Date: Fri, 12 Nov 2021 23:14:21 +0100 Message-Id: <20211112221422.13735-1-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org From: Rafał Miłecki This helps validating DTS files. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli --- V2: Use valid $id --- .../bindings/watchdog/brcm,bcm7038-wdt.txt | 19 --------- .../bindings/watchdog/brcm,bcm7038-wdt.yaml | 40 +++++++++++++++++++ 2 files changed, 40 insertions(+), 19 deletions(-) delete mode 100644 Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt create mode 100644 Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.yaml diff --git a/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt b/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt deleted file mode 100644 index 84122270be8f..000000000000 --- a/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.txt +++ /dev/null @@ -1,19 +0,0 @@ -BCM7038 Watchdog timer - -Required properties: - -- compatible : should be "brcm,bcm7038-wdt" -- reg : Specifies base physical address and size of the registers. - -Optional properties: - -- clocks: The clock running the watchdog. If no clock is found the - driver will default to 27000000 Hz. - -Example: - -watchdog@f040a7e8 { - compatible = "brcm,bcm7038-wdt"; - clocks = <&upg_fixed>; - reg = <0xf040a7e8 0x16>; -}; diff --git a/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.yaml b/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.yaml new file mode 100644 index 000000000000..53a3245a6193 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.yaml @@ -0,0 +1,40 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/brcm,bcm7038-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: BCM7038 watchdog timer + +allOf: + - $ref: "watchdog.yaml#" + +maintainers: + - Florian Fainelli + - Justin Chen + - Rafał Miłecki + +properties: + compatible: + const: brcm,bcm7038-wdt + + reg: + maxItems: 1 + + clocks: + description: > + The clock running the watchdog. If no clock is found the driver will + default to 27000000 Hz. + +unevaluatedProperties: false + +required: + - reg + +examples: + - | + watchdog@f040a7e8 { + compatible = "brcm,bcm7038-wdt"; + reg = <0xf040a7e8 0x16>; + clocks = <&upg_fixed>; + }; From patchwork Fri Nov 12 22:14:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= X-Patchwork-Id: 12617375 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E859DC433FE for ; Fri, 12 Nov 2021 22:14:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C2A3A60F39 for ; Fri, 12 Nov 2021 22:14:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233451AbhKLWRj (ORCPT ); Fri, 12 Nov 2021 17:17:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233116AbhKLWRi (ORCPT ); Fri, 12 Nov 2021 17:17:38 -0500 Received: from mail-lf1-x12e.google.com (mail-lf1-x12e.google.com [IPv6:2a00:1450:4864:20::12e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 37D4DC061766; Fri, 12 Nov 2021 14:14:47 -0800 (PST) Received: by mail-lf1-x12e.google.com with SMTP id p16so25739836lfa.2; Fri, 12 Nov 2021 14:14:47 -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=o/mkbhEb1uyZt1SZztusHTiZond5GP2dgg4hEXLzLtI=; b=dCWQYRllb6gdk1ThFJ4g6Pr03S285DhLr5wk28zaa2IVPzZGXDw3lplPIOaOigr9oE BjK5zT8eHdmuJe7uG+MO+Rrz58CVdNd4UxeBGr+VtM3meBFlpzDtreARadzShNUwc0im YGOLnDH6p68NMyGI4Mfol5AnJ+3czmYb50bXMYmu+G88rBEVcI63NHU2c4yqk7Myih4e l7oNoI4TiVEp9b+4v5r7trXxbO3KtKrjASSgk5liGGF6j+kOQeKiqgNBt6xjwxTUyv58 0EqlP+mDqUP5/8W95uiHAUb14GEsFd7EAqhaUgL6B4C8ADt9fNZK5usAdREiEVPiAZZ4 ikEA== 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=o/mkbhEb1uyZt1SZztusHTiZond5GP2dgg4hEXLzLtI=; b=HdpE8BIEkzaN8WBn5U/7QKOIinIbkhtDqiYBgr+pZTEh1iCiTztcbKH9BUc5KiM7tJ 0NyWAzhke7CgDOGbRAy9VJ03OAiFDlWNiWX/6R1RcfV2E6C8YYSAXiCyOR76O7NS/ZY3 BHWRX/C7PpcnVpHQXnINElgkmdSIlY4AzGOysT9mY29yuHSaP7f5vGD9Y/ifBewQmCXv e5Ggw02gru3smdldhcRLw9Nxec2QmhdwjkeZ5THrMOT9hYuMT36F/9Zg3rWc27zbXnWq 84aRDtf4woFDjYEIAk2fbW67jZTs32pgMJDZBu1jrcnV3UWXQ9FmbFOxCI3EYXXWiDQK xHbA== X-Gm-Message-State: AOAM532mIO5NWZ3VnFf9L2H0n0xu3d4nvb/Kue9KQ/X/JVAGLhhe7MIL ZmUeSicKJS50TnEXTQTwWf0= X-Google-Smtp-Source: ABdhPJxZBvlSizuoKaqTg8sINaXFYmgWU3RIwUzKXby0ANx4EbiBczHk0Py1Qamb0HDMvmeeMJrreA== X-Received: by 2002:a05:6512:1296:: with SMTP id u22mr16761074lfs.296.1636755284086; Fri, 12 Nov 2021 14:14:44 -0800 (PST) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id e5sm680536lfs.51.2021.11.12.14.14.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Nov 2021 14:14:43 -0800 (PST) From: =?utf-8?b?UmFmYcWCIE1pxYJlY2tp?= To: Lee Jones , Wim Van Sebroeck , Guenter Roeck , Rob Herring Cc: Florian Fainelli , Justin Chen , bcm-kernel-feedback-list@broadcom.com, linux-watchdog@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, =?utf-8?b?UmFmYcWC?= =?utf-8?b?IE1pxYJlY2tp?= Subject: [PATCH V3 2/2] dt-bindings: mfd: add Broadcom's Timer-Watchdog block Date: Fri, 12 Nov 2021 23:14:22 +0100 Message-Id: <20211112221422.13735-2-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211112221422.13735-1-zajec5@gmail.com> References: <20211112221422.13735-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org From: Rafał Miłecki It's a block implementing few time related functions depending on a (SoC specific) variant. At this point there is ready binding for a watchdog only. Work on remaining subblocks (e.g. "reg" based reboot) is in progress. Signed-off-by: Rafał Miłecki --- V2: Update $id, description, compatible, example & commit message V3: Drop "brcm,twd" from compatible list per Rob's review --- .../devicetree/bindings/mfd/brcm,twd.yaml | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/brcm,twd.yaml diff --git a/Documentation/devicetree/bindings/mfd/brcm,twd.yaml b/Documentation/devicetree/bindings/mfd/brcm,twd.yaml new file mode 100644 index 000000000000..634526f790b8 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/brcm,twd.yaml @@ -0,0 +1,61 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/brcm,twd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom's Timer-Watchdog (aka TWD) + +maintainers: + - Rafał Miłecki + +description: | + Broadcom has a Timer-Watchdog block used in multiple SoCs (e.g., BCM4908, + BCM63xx, BCM7038). There are few variants available (they differ slightly in + registers layout). This block consists of: timers, watchdog and optionally a + software reset handler. + +properties: + compatible: + items: + - enum: + - brcm,bcm4908-twd + - brcm,bcm7038-twd + - const: simple-mfd + - const: syscon + + reg: + maxItems: 1 + + ranges: true + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +patternProperties: + '^watchdog@[a-f0-9]+$': + $ref: /schemas/watchdog/brcm,bcm7038-wdt.yaml + +additionalProperties: false + +required: + - reg + +examples: + - | + timer-mfd@ff800400 { + compatible = "brcm,bcm4908-twd", "simple-mfd", "syscon"; + reg = <0xff800400 0x4c>; + ranges = <0x00000000 0xff800400 0x4c>; + + #address-cells = <1>; + #size-cells = <1>; + + watchdog@28 { + compatible = "brcm,bcm7038-wdt"; + reg = <0x28 0x8>; + }; + };