From patchwork Fri Oct 29 20:25:04 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: 12593695 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 56A2FC433F5 for ; Fri, 29 Oct 2021 20:25:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2ECF16101E for ; Fri, 29 Oct 2021 20:25:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230411AbhJ2U1j (ORCPT ); Fri, 29 Oct 2021 16:27:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbhJ2U1i (ORCPT ); Fri, 29 Oct 2021 16:27:38 -0400 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 A567AC061570; Fri, 29 Oct 2021 13:25:09 -0700 (PDT) Received: by mail-lj1-x231.google.com with SMTP id u5so18674405ljo.8; Fri, 29 Oct 2021 13:25:09 -0700 (PDT) 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=uwSQ5O46XQWq/lDnechLXeMde+M4E9bl0BI41ywS9so=; b=qFHa+Y0nq19Wnz1rYDkGGnQ7CPH8tO2/O/fq8Kwcy7a/S7ublc/0U1PsykHPMEjRBV mJCZop8bzU6RGKjK7x686hQZBcHhBAehEraBgbAtnzqyGJ0stJ2QZm6ayAXA7lqRUJrn v4QWRBaHpRadOFfU3eyb6qfRMzYoXEQVQ8U+rAoiCXo3y/q2IzhivXi4Ds9yXi/3sst0 ozqUaeT4xVto5IVVligZHVrxdkcRDXX3+WgYrdY86uJ8Fdt9rNkpw3CcSNxjXCAr+Kay SZo4eQOQkHbsn2rPmP9MHtcsENy6zxtxT+izm2LtibT304gStT13ERDGAqRR5oY24s5Y sC4g== 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=uwSQ5O46XQWq/lDnechLXeMde+M4E9bl0BI41ywS9so=; b=NwyJh03Jmv8VLvqwNMchp8gI6pRHmYugwu9q3xlr0ciLkeoRBV9o+DlYxfs8+9d7iA akNAZIhja7UoV6Pd/VZn3C1J7+ROknS47YWwY8aCuEumuDoNDNTbESRL8T+6cbTvd6ma +FDVhRcGATkwEv36znBjY/PdXWsP+ZlBc9ji7X/m7ENoqsNGcxZQxRxaKTM93JjTO/qk uRCT1DoqxkfJUXtB8s2jrt8Qlz6EA/4VblqvKQlTlSR4kwVkPvAIOnYRj3BE1lu1TF9s kA45BEujRzNYJkeLGZmBnUR7MStF51y0lo2MgQjmLM/YlJGMsYbaNSesWT+Wqa9s9WPN QFhw== X-Gm-Message-State: AOAM530zPc8ZziO4VQZKYxiM2CEk5Xue4TxseuzsjCt2LfIOy7FTQXi/ UCq49EPa+MB3k5QnxcJNBC0= X-Google-Smtp-Source: ABdhPJwM7qQIaQzjKAfq7HyW7IxgXBps3wCGWHUVtI6GyptFa1yoEs+L5X/1tC8iQmGC3lWoaniORA== X-Received: by 2002:a05:651c:510:: with SMTP id o16mr14152214ljp.359.1635539107957; Fri, 29 Oct 2021 13:25:07 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id c19sm692715lfv.225.2021.10.29.13.25.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 13:25:07 -0700 (PDT) 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 1/2] dt-bindings: watchdog: convert Broadcom's WDT to the json-schema Date: Fri, 29 Oct 2021 22:25:04 +0200 Message-Id: <20211029202505.7106-1-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Rafał Miłecki This helps validating DTS files. Signed-off-by: Rafał Miłecki Acked-by: Florian Fainelli --- .../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..69e5a1ef6a1f --- /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,bcm63xx-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 Oct 29 20:25:05 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: 12593697 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 9A462C433F5 for ; Fri, 29 Oct 2021 20:25:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 83B1961040 for ; Fri, 29 Oct 2021 20:25:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230509AbhJ2U1m (ORCPT ); Fri, 29 Oct 2021 16:27:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbhJ2U1m (ORCPT ); Fri, 29 Oct 2021 16:27:42 -0400 Received: from mail-lj1-x230.google.com (mail-lj1-x230.google.com [IPv6:2a00:1450:4864:20::230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 46075C061570; Fri, 29 Oct 2021 13:25:13 -0700 (PDT) Received: by mail-lj1-x230.google.com with SMTP id h11so18737349ljk.1; Fri, 29 Oct 2021 13:25:13 -0700 (PDT) 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=icQv5eiQ4N6GYDvJ5duXwfTCf93mcDCEx7og4XM7esA=; b=IXkz1om3NpB5zv4dJBBE2GmC+Ltq/MAlRQNwAfS9IhGREYLy0t3Qh1oADFBcsiyb3Q xrKrVqlYU7LuU/qEsl5/R1uVUdRtOOMMa7YjqtoP0f9ksDURtgvxZDnJgxl/ye4sO3Pt gheufj7hI03dYX9pBN/zdzXccZ/xmhxw6MEk2SVEFF4ZL+DSFSwqfXZslAhk+wleFki4 mnT8yAPA02o7S0t2lxcReTT2JIgt7xj5zhHCxeqF+VS5WKjZbg4SsmhAfgOTWkycNLwL pvmi2Ni7BJoKPbDVjcgzS07ZCR0xdIf3fLA6KezsuwtL9wa2w3cLN3TFQVv2yu6lNAqy TGyw== 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=icQv5eiQ4N6GYDvJ5duXwfTCf93mcDCEx7og4XM7esA=; b=SoiZh0BoZPGPa5yvRFHqPzrltvf09a6OinzXbGbjrJGOwuIJVKNu6q49g2eUVSqEMn FG+FYdllPvsnV4hNacTxuW/2C3kBwu5cNnZ0TP3g3Dp5Hp858/WffQVRfA80C/jsAhEu FN1H/OimDUQ2RWnzKNjZFs+JCU5SLKATULphHtBSs+oUL2ZQgrsnesWDX++5sYiq9YLE IHGYKBWv6m3FBTi78B8WxcyGdRu9DG8p0xcjvBpKZqY//aVUQuVGAOx0zWMzyiv13v9f 92n98tLEGcD9IpUPO5S/PJH2FUE4IRrpJz6yvWePyUDeL17NGIxFgvyar1ptAyNlS3kR LzTg== X-Gm-Message-State: AOAM533pCxBAH98qLF7FSIkkCa0kKfbfYnJe+LdnctUdWfwhTM5we4Fl rIeu5G0mTcN4hVcDMBaZV1c= X-Google-Smtp-Source: ABdhPJxQUKhYPuhvCOhPz9Bhjj+MDj+4vHsJbyFZgdln8yL7AW/e7iq2kSug9mvKs7vdEdOn+SVRWA== X-Received: by 2002:a05:651c:4c6:: with SMTP id e6mr5974781lji.447.1635539111354; Fri, 29 Oct 2021 13:25:11 -0700 (PDT) Received: from localhost.lan (ip-194-187-74-233.konfederacka.maverick.com.pl. [194.187.74.233]) by smtp.gmail.com with ESMTPSA id c19sm692715lfv.225.2021.10.29.13.25.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Oct 2021 13:25:10 -0700 (PDT) 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 2/2] dt-bindings: mfd: add Broadcom's timer MFD block Date: Fri, 29 Oct 2021 22:25:05 +0200 Message-Id: <20211029202505.7106-2-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211029202505.7106-1-zajec5@gmail.com> References: <20211029202505.7106-1-zajec5@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org From: Rafał Miłecki This block is called timer in documentation but it actually behaves like a MFD. Signed-off-by: Rafał Miłecki --- .../bindings/mfd/brcm,timer-mfd.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/brcm,timer-mfd.yaml diff --git a/Documentation/devicetree/bindings/mfd/brcm,timer-mfd.yaml b/Documentation/devicetree/bindings/mfd/brcm,timer-mfd.yaml new file mode 100644 index 000000000000..0060b6c443a7 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/brcm,timer-mfd.yaml @@ -0,0 +1,64 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/brcm,timer-mfd.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom's timer MFD + +maintainers: + - Rafał Miłecki + +description: | + Broadcom's timer is a block used in multiple SoCs (e.g., BCM4908, BCM63xx, + BCM7038). Despite its name it's not strictly a timer device. It consists of: + timers, watchdog and software reset handler. + +properties: + compatible: + items: + - const: brcm,timer-mfd + - const: simple-mfd + - const: syscon + + reg: + maxItems: 1 + + ranges: true + + "#address-cells": + const: 1 + + "#size-cells": + const: 1 + +patternProperties: + '^watchdog@[a-f0-9]+$': + $ref: ../watchdog/brcm,bcm7038-wdt.yaml + +additionalProperties: false + +required: + - reg + +examples: + - | + timer_mfd: timer-mfd@ff800400 { + compatible = "brcm,timer-mfd", "simple-mfd", "syscon"; + reg = <0xff800400 0x4c>; + ranges = <0x0 0xff800400 0x4c>; + #address-cells = <1>; + #size-cells = <1>; + + watchdog@28 { + compatible = "brcm,bcm7038-wdt"; + reg = <0x28 0x8>; + }; + }; + + reboot { + compatible = "syscon-reboot"; + regmap = <&timer_mfd>; + offset = <0x34>; + mask = <1>; + };