From patchwork Tue Nov 2 16:06:14 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: 12599195 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 412C7C433F5 for ; Tue, 2 Nov 2021 16:07:59 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 02FF960720 for ; Tue, 2 Nov 2021 16:07:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 02FF960720 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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: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:In-Reply-To:References: List-Owner; bh=cVZPe4+6ZK9nBmTCi4ns7oAp6myRJnM3iIfT3KBH85c=; b=wE9QiIVwd/7s5n 0uGviTnrCVCQHN3u3/jrTWLihT4cEPULd93iEhydY3puoEvOJvKIafMtWcG/HatUa0k09ptIHuGQG nHHMtbGS0ntM7XgmHDZ0QpCe9obj35h9CkI/gVKWU7FZ/mnYZwmJjrF3MAGlQDE9zj2ZLbwA3Tkt7 +66oJ2UcVCmj7ooQ12CbgvyaHjnXnInW+etIDCU2IF6fACoKimaJY6f6oOBPN6QtwOiZpBCb2nwD2 2jcvPyM1Ej4lBhWZQj4VD5B27UJKU11b6KRLVA5kdnnQSLFknNM9kYbxCgHq7yWuJpzr6QswPtUq7 VQ/zg64RbZNZGcI4hPKw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhwIv-002E3y-OO; Tue, 02 Nov 2021 16:06:29 +0000 Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhwIr-002E2y-If for linux-arm-kernel@lists.infradead.org; Tue, 02 Nov 2021 16:06:27 +0000 Received: by mail-lf1-x12f.google.com with SMTP id j2so43940596lfg.3 for ; Tue, 02 Nov 2021 09:06:23 -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=xmTEhzdHehFTh2rOC5A4/85h3lppQ/OuyTKeK2Y6gpg=; b=jbSdoRSnZpJpb1xMwfliQYqi6BWpzh3/POXa3M5Jp44Zr4DPvR4+7wbPW2cUwEdqDd tU5b4TRmU8xO5NVWglio3BZBKYWo87hqPMpHAI/D7JgWrX5E/G1du7NHNineE1KbWr/n pIgCY5KXOasUP5DvhiUpdUbuHerH5oxqa2Ivtr6fSK1zumgIh5PflpgfH8vD+DiVH8/L ppFYakoo+2aLolP4cB8AJZ3t305QyCVbksqOTuvJCeSJKhhCtAAWr/N3Xq2bVWOJ+FjS 3+WHaZPF0NhI3wnWfMeuCFspvL7v+WMQEKwQGiNemLp8YlBI2jUorw9hZRNFY9h8SAL/ AoBg== 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=CT80nwJor48cbviXMlbFWvbV/+Uyx2m+Y6Ykj6+jX5yLtwHTRRweQozSXNmx/QKei3 S+bTS+n7xtldfX3JsT9IWu4MklZ/uCLep68Shz3cC08BlngrVph5G6n1EZo7x4npKBPZ 4G9aWXawaXbE6xOy2SNJpa+04Y2QrOIpmuyrBzyE+iw42nHX/iLv9lzkAQ2vtnSPra9s i8/PkIqjAZNO7yiIzlTPX2jNns8Y9KXWTtPxGIpAJBgU/eohWeuz0XRmwGMigil6fVmf hdcpCFBT7Y+MAOb5bRRWJxYMjayDiqIfVlJY6LTly/Iobmgh+9dkD18GyPxCSfbNVy8M lb9g== X-Gm-Message-State: AOAM530axIzwr3HTmdb8LMStMoWRIBd1QdbMQ7P2MY4f8nZugHv9wBY8 3IEngxUCsql/jr/bukMdu74= X-Google-Smtp-Source: ABdhPJwN3SfVNJzWLHd2NoXaXIsz6B3j4SquFe0BqjmcyzICL+jbvu0vWMByQvIqdObcheKvoz06jg== X-Received: by 2002:a05:6512:aca:: with SMTP id n10mr6248506lfu.352.1635869181799; Tue, 02 Nov 2021 09:06:21 -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 t6sm1798895lji.109.2021.11.02.09.06.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 09:06:21 -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 V2 1/2] dt-bindings: watchdog: convert Broadcom's WDT to the json-schema Date: Tue, 2 Nov 2021 17:06:14 +0100 Message-Id: <20211102160615.14672-1-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211102_090625_660627_76626C4B X-CRM114-Status: GOOD ( 17.54 ) 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: 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 Tue Nov 2 16:06:15 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: 12599193 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 510A6C433FE for ; Tue, 2 Nov 2021 16:07:59 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 20F90604DC for ; Tue, 2 Nov 2021 16:07:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 20F90604DC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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=pyhvg9FOplV7hXjuuEdRszpnVpN6VeqLpvBP/0JWspQ=; b=o3RnzqwjELXSSF c8uYV9Iu7G3KdxEfNHRT0ZoLKohtb1W34cpHPW+uCgpScUq5u3+/UqDCsZ+neiGIg2aEISuK84th7 tTlsMWA2NoG9n4UwWqLqleA7BE/KWv5WHC99LWFkHrz0qPtYVxx55MSPNsfGswzeQO+b8GvoS8vWx w5PWnTQCuRcHt7rOI1do+AQttd4M6bdo8nCxoQG/f78BL9PxZHc3fn37IX1tTggj502Ad+sI9r5yK gD4SVt2lAYsbL4QeXJ0v1TCObnTJpoeR9A3mlkMqOD0GgeRtSlSf2Fw9ZTQRxpNI41pyYSmCijw2k MX8nF+dQJzUqvEwadrMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhwJ7-002E5x-EY; Tue, 02 Nov 2021 16:06:41 +0000 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhwIu-002E3T-PW for linux-arm-kernel@lists.infradead.org; Tue, 02 Nov 2021 16:06:31 +0000 Received: by mail-lj1-x230.google.com with SMTP id v23so2998169ljk.5 for ; Tue, 02 Nov 2021 09:06:27 -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=5we+ngsabeSIgxk8EL0owZimFzpBYd2svuAuN0pJ4yE=; b=WtRtW2Nmyd5DSdXZWaxLgDqKEf/VPM3+3pnx50sujC8E0ge5De48uNQpMaVy7FqHBx LT565HDhRvPjASD9k5RlqBS3RNfGBZJYeLJhYO5DP8Z5wFNbPleEBs1x+XzZvVOu/fOo O3hGsYgDWbAn13dRYImuGonhbpWQZd4H6qwOU7LaAMtJBQ56UnXONku0kmW21ozuPLjW Bu6WLqS8mwRI14MfZ8xr85lkKdQ2lkpk5qEqdjrNc9OO/a7SjZ6SEmJEHPKwOO+Zfa7z yRKl+whCiCGlF79jxCbV/W3SQlmLcgsi/0xIG5CkvjzswyHJqfZHnOYtlUQbBgIDb58P 1Mig== 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=5we+ngsabeSIgxk8EL0owZimFzpBYd2svuAuN0pJ4yE=; b=gW/QZRrspZpuKQV+zZ3be+vq/4arMCqOlGIrra8omnh6f/M5XMPvXtb+UxvGMor5cS 618MfzZ8c1jayf6LwATy79TfFslp8giP0kOdm9LAy3Ws9rWmQ680SvL2lvNZCwyjmkba Po6ymz8ZCgczBX9ngD/Wymu+fQubzg+7xRIJHlDL3EfMrm9Z94aJqA15czy6jQ1x6Z+V FN3xWrGj274Vf01297eotxI+D+llMpqGG7dfUpwgfm9GLOLaTop6OEqRx3y/7+AfKFm3 oiqloJVQ5+GLwwyJS/6ucLa9oH8arxpD97BsKThDNvtDmAX+cFIfGZV57CpbXaej2QEA uZAQ== X-Gm-Message-State: AOAM533u3egLhSJVNnv3zoPw9vUOjaT6KoasIrySONEFdxLXYJj85+fE BwDVbZtgDw53w28YdsYMU0g= X-Google-Smtp-Source: ABdhPJw8yJGezU5RdVmSwZoRkcyQObCFHZkbMgHpvZdlEGRwIuwDDqRWRIJ1u6r0z7FfDiwehDojBA== X-Received: by 2002:a2e:a587:: with SMTP id m7mr18156500ljp.330.1635869185832; Tue, 02 Nov 2021 09:06:25 -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 t6sm1798895lji.109.2021.11.02.09.06.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 02 Nov 2021 09:06:25 -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 V2 2/2] dt-bindings: mfd: add Broadcom's Timer-Watchdog block Date: Tue, 2 Nov 2021 17:06:15 +0100 Message-Id: <20211102160615.14672-2-zajec5@gmail.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211102160615.14672-1-zajec5@gmail.com> References: <20211102160615.14672-1-zajec5@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211102_090628_888089_F36C752C X-CRM114-Status: GOOD ( 16.54 ) 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: 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 --- .../devicetree/bindings/mfd/brcm,twd.yaml | 62 +++++++++++++++++++ 1 file changed, 62 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..ed167055be06 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/brcm,twd.yaml @@ -0,0 +1,62 @@ +# 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: brcm,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", "brcm,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>; + }; + };