From patchwork Mon Nov 15 05:53:53 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: 12618707 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 DAAC7C4332F for ; Mon, 15 Nov 2021 05:54:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B4A72630EF for ; Mon, 15 Nov 2021 05:54:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230166AbhKOF5S (ORCPT ); Mon, 15 Nov 2021 00:57:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230093AbhKOF5I (ORCPT ); Mon, 15 Nov 2021 00:57:08 -0500 Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 400DCC061746; Sun, 14 Nov 2021 21:54:09 -0800 (PST) Received: by mail-lj1-x22a.google.com with SMTP id 1so33060356ljv.2; Sun, 14 Nov 2021 21:54:09 -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=8qflnB7MYgfziBXsT+LtjTucbsoWLob914EY3p4OTsQ=; b=K+ISysR7l4RTt12UPbkyLNCunsqekRgtKdrbxcG72ND5Uqvd/bVx8YI+spx3ccPa3+ cnBCAk/Z0ZVY1XkesS5Fm3Jy6/Ey7n+XsXxYtqqCx3RkKf5XqETAcA3nTqvUGyPcdII8 07w6fXgUewxdWbBezCFEVk+o9Dv/H0GhXH2tAWORwu1Sg7m75OWs9N0udMT2+XDMgYQa 9S07cYCS0SXawTtmZXZFUkrPXzSdiFFayOycnuTNlMyV65oDHQghrN8G0RlUYq5NNaCH srPK7M8dSunw+8e5FzmE3B+rOf/PoRTXHMfxk5gO6sQLrRw/D/b+M91yZTuocf3ntSFl IjwA== 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=8qflnB7MYgfziBXsT+LtjTucbsoWLob914EY3p4OTsQ=; b=IqVJ86OPQI6EnF4dBw9c9K6kL5NGZtNtlasTCGSTYr3K7hyLGbdKyVx2hqCBH8DUAH +Fmxezz7fePMWV8LEH4CaU99BEi+bR50zRlzPl6sUTub5mPwhQ5QkQH5N2Qbz2JkUznm QQ+oG80krbD85wYWJ7xu15O9Ah0H3JxMkFnSxlpTC7yYN/M2c2bysFdbkzEi3vrEHEfb eXxAxDQSCM0Nx0ulzWhlnkKo3Tpr4vs1kx7TM/aETQk95uirj3hGfK6Y+rn/1Q3nuAD3 1ezxN0U8fXwNTnW+kZUDeDgSIQMmpQF8OfTD4PR3JsTRd02qF21gQXRoYikhfFTu+pPU QEEg== X-Gm-Message-State: AOAM533pnKE/mqFZo6WmkIrM+hY0zoLh9OItN0vyqNqnp3IrjhyWIJqY QseZLZn1hjWJQJKei2s1gV7aLTtiTrU= X-Google-Smtp-Source: ABdhPJyZaHVXNgDAuGbMz7OLoG2mleARlbDaV7o3MGSGjKAWPeHcioFgyl4hXtX9R5+er/99PjoKig== X-Received: by 2002:a2e:4952:: with SMTP id b18mr36117251ljd.352.1636955645266; Sun, 14 Nov 2021 21:54:05 -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 i13sm1308668lfb.45.2021.11.14.21.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Nov 2021 21:54:04 -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?= , Rob Herring Subject: [PATCH V4 RESEND 1/2] dt-bindings: watchdog: convert Broadcom's WDT to the json-schema Date: Mon, 15 Nov 2021 06:53:53 +0100 Message-Id: <20211115055354.6089-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 Reviewed-by: Rob Herring --- V2: Use valid $id V4: Add "clocks" maxItems and include Rob's Reviewed-by RESEND: Patchwork lost 1/2, marc.info lost 2/2 --- .../bindings/watchdog/brcm,bcm7038-wdt.txt | 19 --------- .../bindings/watchdog/brcm,bcm7038-wdt.yaml | 41 +++++++++++++++++++ 2 files changed, 41 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..ed6210666ead --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/brcm,bcm7038-wdt.yaml @@ -0,0 +1,41 @@ +# 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: + maxItems: 1 + 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 Mon Nov 15 05:53:54 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: 12618709 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 569ACC433EF for ; Mon, 15 Nov 2021 05:54:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 328F8630EF for ; Mon, 15 Nov 2021 05:54:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230017AbhKOF5W (ORCPT ); Mon, 15 Nov 2021 00:57:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230107AbhKOF5T (ORCPT ); Mon, 15 Nov 2021 00:57:19 -0500 Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A68C9C061766; Sun, 14 Nov 2021 21:54:17 -0800 (PST) Received: by mail-lf1-x131.google.com with SMTP id f18so40544914lfv.6; Sun, 14 Nov 2021 21:54:17 -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=0ITzm3kF2CTjx8s3ujmiTGO0Uq6IhLwpCFtlE2jGWfg=; b=aoOj9BmpH4wlK0zab+wtjijrWVmtQ4xi1jOJjv6ytq5zQIwDHB6j4PWiuHdABmMAcG jKkeKBOVQcpGKbpNuZkWc0NUiLq4eKXBe+zVpph/2LNCibt51n6StqGRS7WUuntduyYJ edgGphqzQ770deGyxl7M4vH+dtoHbw2SD6hPQWt1kVNbrbJMf5nwA65epAfG+VwRElK6 4pQzNoJGasQgeJcKcfS+KRIr7YrDzlnxXYSRnLI+SAWz1Wh8SBtpasyn2FaGBK2Z6qsW GvjJh42UCIDnyYIcZ1NkeQhHV0R8KVR6som0znoFT35XVMs85XQUl0VjgwxigTxI/V9c 0BVQ== 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=0ITzm3kF2CTjx8s3ujmiTGO0Uq6IhLwpCFtlE2jGWfg=; b=JZz9i29H9FPVcJiN6vgaV7mdDyrVrpZrjjZSaG7uxLd7TskG7hIu9SxhRTPIsAZky9 QiF/Vl5HQ7lPs8C/yY9BdWcpQbU/qJP1ZBl7Ov5U/7bszBmnGA3qgyr4WTg0vqVJFHuj iBh/Mn0ub7QFhHTyA6AhAvIBmNv6asJ5Zn8fyBym3C8CiYirDF5pdXvH2jLWsj0Vt8gc 40xrQDRGwGgVVHC8wDtlYENk9ZTQOdPvuudbpMFjqWd6a7o2oMj4IgbzMeEBmHoreLi7 NNM/uHnRqf/7VtbJZLhjuDy4aq06UatyH25hvkKPvkgkU6An3S2VlB6jejt2ytCceDZU V4wA== X-Gm-Message-State: AOAM533iR0o/H5QdohdfyyGhGmxga9Ku54YWlHP8ynMxHD5PHHsbdzn7 AIqVfhRdtXjGI7TVbpo5Fq0= X-Google-Smtp-Source: ABdhPJxaH7HFu5Imhc8iMFDJJWTHVcWL9DV95cUFtBv5nGIoWSJEtBa9ewhxIb4K6hGUEIFHuLRjxw== X-Received: by 2002:ac2:4e11:: with SMTP id e17mr32541121lfr.126.1636955655599; Sun, 14 Nov 2021 21:54:15 -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 i13sm1308668lfb.45.2021.11.14.21.54.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 14 Nov 2021 21:54:15 -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 V4 RESEND 2/2] dt-bindings: mfd: add Broadcom's Timer-Watchdog block Date: Mon, 15 Nov 2021 06:53:54 +0100 Message-Id: <20211115055354.6089-2-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211115055354.6089-1-zajec5@gmail.com> References: <20211115055354.6089-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 Reviewed-by: Rob Herring --- V2: Update $id, description, compatible, example & commit message V3: Drop "brcm,twd" from compatible list per Rob's review RESEND: Patchwork lost 1/2, marc.info lost 2/2 --- .../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>; + }; + };