From patchwork Sat Nov 13 11:46:44 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: 12617671 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 E7C0CC433F5 for ; Sat, 13 Nov 2021 11:47:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD6456108E for ; Sat, 13 Nov 2021 11:47:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235377AbhKMLtz (ORCPT ); Sat, 13 Nov 2021 06:49:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232651AbhKMLtx (ORCPT ); Sat, 13 Nov 2021 06:49:53 -0500 Received: from mail-lj1-x231.google.com (mail-lj1-x231.google.com [IPv6:2a00:1450:4864:20::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3305EC061766; Sat, 13 Nov 2021 03:47:01 -0800 (PST) Received: by mail-lj1-x231.google.com with SMTP id z8so23837144ljz.9; Sat, 13 Nov 2021 03:47: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:mime-version :content-transfer-encoding; bh=7KkUIV1LwFCMjUl/KiUeHScGU6JLrELrF5Hve79Ozkg=; b=Tiq/Vq0YRfm7QAGYOD6YtRdJihK9+CoePNBVXFNNVxfaUpqEnlEG4OspmsyVUoVy/o vTroDEKfVz9f+pZ2V8CKrQrI3o/qV9fg2tZNAuDf3/t9xz7xDcJYq0hFBA0VJFCh2Fm4 Gbh/Tx/ya+rWtbO+OwBBOMTtfKeVJxq0FTtoRnhTtTuJooexTFfafVmp2/co3tIFrW74 YjBDimlBPxrdjQPwhiTSvGVsBXEUx7QDCFnKXbCEQBvHD1fpH/TLyhsw0D/bCbQ5Qeo+ xaYYzpumSwwIWhtJ4mDAh4AKkphCyIQHyVg4IeXZB+dmn+9pU1zTJTsh2ilGUUOvc6IY mA0A== 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=7KkUIV1LwFCMjUl/KiUeHScGU6JLrELrF5Hve79Ozkg=; b=GWzhtlCSCXxz45UI0736D3Q1ScDWVNEH1rAi3fw3tc4LD5mqdnpyhi82qSUjIZtL6f b9tVm5886fG8oLAtw/kcdLTKfxMproN20AWOX/kSMuf9rEbT2nsEcNKOZRT4YkqF3C+s aZPnjNK+9wpqQYk3cVHFkeDXBGu46zOWxSbFxZ1xNBM4uIGoEWs+CLeFZmoMhQnMHg+S TP/fwv4Xiz4uyd6QKja1B1ZDiIcRUNBDrcVyM8C0MIriS3AkePwvICxzFICLwsVHkvzX rvdUZo84ZP2SRKO5/jw8oN9nX1zNNv/zCRHRUs/TX33jmXxpbgWseWCpafBnYrPGnitg RyDw== X-Gm-Message-State: AOAM530PNG/x2Dn0lFQf+zsFaKbCKj8V3uiL8VLTG4piSvmRvp5v9RNf HpQZunkzgWGAup5hzEvBcQM= X-Google-Smtp-Source: ABdhPJxDvsFT7jq2E3FeQ+QBy8tzZ3rJlzya8Tm+RUV+xahNrNmGKPkDEZaWcBeAiVVGeCMKMpNj5w== X-Received: by 2002:a2e:890d:: with SMTP id d13mr22127238lji.396.1636804019397; Sat, 13 Nov 2021 03:46:59 -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 m8sm941676lfg.140.2021.11.13.03.46.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Nov 2021 03:46:58 -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 1/2] dt-bindings: watchdog: convert Broadcom's WDT to the json-schema Date: Sat, 13 Nov 2021 12:46:44 +0100 Message-Id: <20211113114645.27360-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 V3: Add "clocks" maxItems and include Rob's Reviewed-by --- .../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 Sat Nov 13 11:46:45 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: 12617673 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 650E3C43217 for ; Sat, 13 Nov 2021 11:47:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 448E361156 for ; Sat, 13 Nov 2021 11:47:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232651AbhKMLtz (ORCPT ); Sat, 13 Nov 2021 06:49:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41164 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234372AbhKMLtz (ORCPT ); Sat, 13 Nov 2021 06:49:55 -0500 Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E0B8C061766; Sat, 13 Nov 2021 03:47:02 -0800 (PST) Received: by mail-lf1-x12a.google.com with SMTP id k37so29183712lfv.3; Sat, 13 Nov 2021 03:47:02 -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=EACvDY4D3mB3Si/gjQbY9KAzfrF6MJRZ6GtiTj+KRnyp/6+e0xthGIk3P3om983TNA fXBSLGyaug8icy7/kmW6XQ+rRwDzt8XQx1+bEsQh3MmaVtiwtLoE/l70aRll/s1MDWHO W4bTLf+HSrnU84QQ5Tg3NbVz8TnZOotzX5Ffe61jgLhmRPrzDtBkDTe36o2bRMK8/LAn zKmRSvzBR6zlB66IbN3bArUP0otUerHr4zrxg3Ok7hACpRoGppdxuL/6mRNs0ltdTL78 fZTTcNiccsVXdBlvaOSvKfG1BctCZtrbGaWU2KhO6RfKUV3aTK6aSrseLEZIHTl9Sg0G a3vA== 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=UKmX8fQcvmmGzsME9ROoI/venFn7bOM+gW22Rtv0WU3jB3sMKagLfN7dtAQK9VkSsf x06oE0Dwfcx/e9nb7P13M9jfXlm2bB01irSGNhBYXWDb8XhRcDbXiFz7+NSmoTybpljl vs0tMgp7eSV0mD7F8At9MOvZpNsQ7YeWRTqmgXRUIQN298m3xgCvXXJdQI2fO2yfMahz t3Dwu0hMz4hZJykB/P4z7W7F9GWscgEC9/Nfs07kRky4iHOPBB6hsY35xbhCsDv3rKEF 42Z0KrATR2TSsBTFJGiybog/cNTwymX7GfjZQJP/yqrXU0eYEbzIlLK7XE5H5vSANWfD 1pUQ== X-Gm-Message-State: AOAM533Jlh7aQSitl91E1GrUaCGJ25XXJd/1N+X5fxVd82eQWpgYj6Jt e46/aXj4ZwY+Zpkg6PK+HoU= X-Google-Smtp-Source: ABdhPJzLh+TG6zpNdV+lzp/25s3Gzt2l7hc5dGJPc6FCRfTQpKWWS7eBbbS4Hu+rwIGzUuE+Smt9Jw== X-Received: by 2002:a05:6512:3f86:: with SMTP id x6mr20906852lfa.389.1636804020908; Sat, 13 Nov 2021 03:47:00 -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 m8sm941676lfg.140.2021.11.13.03.47.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Nov 2021 03:47:00 -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 2/2] dt-bindings: mfd: add Broadcom's Timer-Watchdog block Date: Sat, 13 Nov 2021 12:46:45 +0100 Message-Id: <20211113114645.27360-2-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211113114645.27360-1-zajec5@gmail.com> References: <20211113114645.27360-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>; + }; + };