From patchwork Mon Apr 24 12:34:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin X-Patchwork-Id: 676784 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8AC73C77B7E for ; Mon, 24 Apr 2023 10:35:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230489AbjDXKfE (ORCPT ); Mon, 24 Apr 2023 06:35:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57588 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231139AbjDXKeq (ORCPT ); Mon, 24 Apr 2023 06:34:46 -0400 Received: from forward502c.mail.yandex.net (forward502c.mail.yandex.net [178.154.239.210]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E8391712; Mon, 24 Apr 2023 03:34:21 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:261e:0:640:2e3d:0]) by forward502c.mail.yandex.net (Yandex) with ESMTP id 5B0B55EC42; Mon, 24 Apr 2023 12:35:43 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id JZBb1pbWwKo0-9lS57oD4; Mon, 24 Apr 2023 12:35:42 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1682328943; bh=2RREFI9NgYDsw84diD52pyQr0vgUs5EY6Rekcc3/M/0=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=NIQe9vf98zd3U2GZrjYkcEZGBmyA8SWIEWCNPgrh8QpRuO+zPNavaB/hZmYD/qOTk 5wGVZvlvJO+1J6s4maZZUuRIvPW5gC1YvxnraiZVpkow4Fb1WsKBHQhnWx6clvdbq1 f+6fF2uxjp1Pxk2tyCNG49DiOgDpCCy4YRkQWr+E= Authentication-Results: mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin Cc: Arnd Bergmann , Linus Walleij , Alexander Sverdlin , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 09/43] dt-bindings: watchdog: add DT bindings for Cirrus EP93x Date: Mon, 24 Apr 2023 15:34:25 +0300 Message-Id: <20230424123522.18302-10-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me> References: <20230424123522.18302-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org This adds device tree bindings for the Cirrus Logic EP93xx watchdog block used in these SoCs. Signed-off-by: Nikita Shubin --- .../bindings/watchdog/cirrus,ep93xx-wdt.yaml | 38 +++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml diff --git a/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml new file mode 100644 index 000000000000..f39d6b14062d --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/cirrus,ep93xx-wdt.yaml @@ -0,0 +1,38 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/cirrus,ep93xx-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic EP93xx Watchdog Timer + +maintainers: + - Wim Van Sebroeck + +description: + Watchdog driver for Cirrus Logic EP93xx family of devices. + +allOf: + - $ref: "watchdog.yaml#" + +properties: + compatible: + enum: + - cirrus,ep9301-wdt + + reg: + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + wdt0: watchdog@80940000 { + compatible = "cirrus,ep9301-wdt"; + reg = <0x80940000 0x08>; + }; + From patchwork Mon Apr 24 12:34:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin X-Patchwork-Id: 677117 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1DF72C77B7F for ; Mon, 24 Apr 2023 10:21:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231668AbjDXKVU (ORCPT ); Mon, 24 Apr 2023 06:21:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231415AbjDXKU6 (ORCPT ); Mon, 24 Apr 2023 06:20:58 -0400 Received: from forward502b.mail.yandex.net (forward502b.mail.yandex.net [178.154.239.146]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7BBD519B3; Mon, 24 Apr 2023 03:20:46 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:261e:0:640:2e3d:0]) by forward502b.mail.yandex.net (Yandex) with ESMTP id EE11B5ED42; Mon, 24 Apr 2023 12:35:43 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id JZBb1pbWwKo0-AZ7pI60e; Mon, 24 Apr 2023 12:35:43 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1682328943; bh=Ykq/wbEgP3PIeiGBN7Mik/1VdEeec2rPLqi1x7QHMOk=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=X0ySFbm28PrBbp8i8IjzZMwqHRpl49jkfcAEIRgxnS+737rkjp2GoRoeqEDegkfKb lrqNd+8jzB6vzQ/Qo3r7giKJ8ZtUln/AH6KzpnI27dcqEY4NVuPMgj3bs4e79nBGDt ikwiuzdY7+dh942zHzbIw6qHgA0jmeK9vTgusp9M= Authentication-Results: mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin Cc: Arnd Bergmann , Linus Walleij , Alexander Sverdlin , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 10/43] watchdog: ep93xx: add DT support for Cirrus EP93xx Date: Mon, 24 Apr 2023 15:34:26 +0300 Message-Id: <20230424123522.18302-11-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me> References: <20230424123522.18302-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org - Find register range from the device tree. Signed-off-by: Nikita Shubin --- Notes: Arnd Bergmann: - wildcards ep93xx to something meaningful, i.e. ep9301 - drop wrappers drivers/watchdog/ep93xx_wdt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c index 38e26f160b9a..0f9b1b3b4307 100644 --- a/drivers/watchdog/ep93xx_wdt.c +++ b/drivers/watchdog/ep93xx_wdt.c @@ -21,6 +21,7 @@ * daemon dies. */ +#include #include #include #include @@ -130,9 +131,16 @@ static int ep93xx_wdt_probe(struct platform_device *pdev) return 0; } +static const struct of_device_id ep93xx_wdt_of_ids[] = { + { .compatible = "cirrus,ep9301-wdt" }, + {}, +}; +MODULE_DEVICE_TABLE(of, ep93xx_wdt_of_ids); + static struct platform_driver ep93xx_wdt_driver = { .driver = { .name = "ep93xx-wdt", + .of_match_table = ep93xx_wdt_of_ids, }, .probe = ep93xx_wdt_probe, }; From patchwork Thu Jun 1 05:34:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin X-Patchwork-Id: 689013 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 329B8C7EE2E for ; Thu, 1 Jun 2023 05:38:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231376AbjFAFiR (ORCPT ); Thu, 1 Jun 2023 01:38:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231349AbjFAFiD (ORCPT ); Thu, 1 Jun 2023 01:38:03 -0400 Received: from forward102c.mail.yandex.net (forward102c.mail.yandex.net [178.154.239.213]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5EC0A180; Wed, 31 May 2023 22:37:12 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net [IPv6:2a02:6b8:c14:c83:0:640:84f9:0]) by forward102c.mail.yandex.net (Yandex) with ESMTP id E2EDC6002D; Thu, 1 Jun 2023 08:37:10 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id OaGNfZvWv8c0-YM7OtAbF; Thu, 01 Jun 2023 08:37:10 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1685597830; bh=tbntiGejzUX9Xa7D02DcVIzLdCU/SNV9zJmM1dCdOAM=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=su6Vrc1ACopG+w/X8BL0atMVhqY2XhPeLhyc17GBJEqlMO7CCYGu2U/8ePY0+euHJ Pco3/BZ2HM/CJ2EqJwJ6clPTr9s8oVX3zO4MbSZbd/n/V4+RKehElzUJnNyIwRrnqz vT0C44DCNiFozHpsLUr4JtmxBuLZBwTmBe10U7uI= Authentication-Results: mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin To: Alexander Sverdlin , Arnd Bergmann , Linus Walleij , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Nikita Shubin Cc: Michael Peters , Kris Bahnsen , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 12/43] dt-bindings: watchdog: Add Cirrus EP93x Date: Thu, 1 Jun 2023 08:34:03 +0300 Message-Id: <20230601053546.9574-13-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me> References: <20230424123522.18302-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org This adds device tree bindings for the Cirrus Logic EP93xx watchdog block used in these SoCs. Signed-off-by: Nikita Shubin --- Notes: v0 -> v1: Krzysztof Kozlowski: - replaced maintainers to me and Alexander - removed wildcards - use fallback compatible and list all possible compatibles - dropped label - dropped quotes in ref - fix ident - fixed description .../bindings/watchdog/cirrus,ep9301-wdt.yaml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/cirrus,ep9301-wdt.yaml diff --git a/Documentation/devicetree/bindings/watchdog/cirrus,ep9301-wdt.yaml b/Documentation/devicetree/bindings/watchdog/cirrus,ep9301-wdt.yaml new file mode 100644 index 000000000000..d54595174a12 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/cirrus,ep9301-wdt.yaml @@ -0,0 +1,46 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/cirrus,ep9301-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Cirrus Logic EP93xx Watchdog Timer + +maintainers: + - Nikita Shubin + - Alexander Sverdlin + +description: + Cirrus Logic EP93xx SoC family has it's own watchdog implementation + +allOf: + - $ref: watchdog.yaml# + +properties: + compatible: + oneOf: + - const: cirrus,ep9301-wdt + - items: + - enum: + - cirrus,ep9302-wdt + - cirrus,ep9307-wdt + - cirrus,ep9312-wdt + - cirrus,ep9315-wdt + - const: cirrus,ep9301-wdt + + reg: + maxItems: 1 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + watchdog@80940000 { + compatible = "cirrus,ep9301-wdt"; + reg = <0x80940000 0x08>; + }; + From patchwork Thu Jun 1 05:34:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin X-Patchwork-Id: 688188 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BFB68C7EE2C for ; Thu, 1 Jun 2023 05:38:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231499AbjFAFiZ (ORCPT ); Thu, 1 Jun 2023 01:38:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47266 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231379AbjFAFiO (ORCPT ); Thu, 1 Jun 2023 01:38:14 -0400 Received: from forward101c.mail.yandex.net (forward101c.mail.yandex.net [178.154.239.212]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9F211A7; Wed, 31 May 2023 22:37:18 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net [IPv6:2a02:6b8:c14:c83:0:640:84f9:0]) by forward101c.mail.yandex.net (Yandex) with ESMTP id B0F66600D1; Thu, 1 Jun 2023 08:37:11 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id OaGNfZvWv8c0-ru09HF4J; Thu, 01 Jun 2023 08:37:11 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1685597831; bh=nCmh1471Kw/0ZT+tYC9QuJaR7Yngw3kQYxKNh7LKQTQ=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=Pr2sG/5cTKRaLxieVR5g5bdTsoLk6KGlrNpkQSWrHeqPvphrFzBHAH7LTeYb5nSKo rJvEIz/8x7rNVMCDuJ8qW4/QWsYVF/OFHEpLTt3wpLv17cRuP2dWIHfxBRoDbQVZnL Xgpul3zViS+czi+omJA7yt27bfrMiHZXW+GLecTM= Authentication-Results: mail-nwsmtp-smtp-production-main-45.sas.yp-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin To: Alexander Sverdlin , Arnd Bergmann , Linus Walleij , Wim Van Sebroeck , Guenter Roeck Cc: Nikita Shubin , Michael Peters , Kris Bahnsen , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 13/43] watchdog: ep93xx: add DT support for Cirrus EP93xx Date: Thu, 1 Jun 2023 08:34:04 +0300 Message-Id: <20230601053546.9574-14-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me> References: <20230424123522.18302-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org - Find register range from the device tree. Signed-off-by: Nikita Shubin --- drivers/watchdog/ep93xx_wdt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/watchdog/ep93xx_wdt.c b/drivers/watchdog/ep93xx_wdt.c index 38e26f160b9a..088b88aad94f 100644 --- a/drivers/watchdog/ep93xx_wdt.c +++ b/drivers/watchdog/ep93xx_wdt.c @@ -21,6 +21,7 @@ * daemon dies. */ +#include #include #include #include @@ -130,9 +131,16 @@ static int ep93xx_wdt_probe(struct platform_device *pdev) return 0; } +static const struct of_device_id ep93xx_wdt_of_ids[] = { + { .compatible = "cirrus,ep9301-wdt" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, ep93xx_wdt_of_ids); + static struct platform_driver ep93xx_wdt_driver = { .driver = { .name = "ep93xx-wdt", + .of_match_table = ep93xx_wdt_of_ids, }, .probe = ep93xx_wdt_probe, }; From patchwork Mon Apr 24 12:34:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin X-Patchwork-Id: 676786 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CF11C77B76 for ; Mon, 24 Apr 2023 09:51:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231520AbjDXJvl (ORCPT ); Mon, 24 Apr 2023 05:51:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231361AbjDXJvj (ORCPT ); Mon, 24 Apr 2023 05:51:39 -0400 X-Greylist: delayed 320 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 24 Apr 2023 02:51:33 PDT Received: from forward501b.mail.yandex.net (forward501b.mail.yandex.net [IPv6:2a02:6b8:c02:900:1:45:d181:d501]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A536A30ED; Mon, 24 Apr 2023 02:51:32 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:261e:0:640:2e3d:0]) by forward501b.mail.yandex.net (Yandex) with ESMTP id EA3AB5EB34; Mon, 24 Apr 2023 12:36:03 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id JZBb1pbWwKo0-Qq9jPfHD; Mon, 24 Apr 2023 12:36:03 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1682328963; bh=MwMLTayp0HWys1iBszBqm87up2I6e5D4xWwTL2iUXGA=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=qnsIM3s4872q0KHboA9Et3gXfLnlrYx9lWPyd36l2BnEgvEtG53vznqXcUxIC+dG0 K0vuBQJoyfzzDrS3zZOS8Fksy4b1R3CPdTy/vBvoHJc5TRT8izE4sQFVlHoMOJUURD +VbFQbBdMLS9+C+AHT9q0NDh4hLDjwEjB0xVoAI0= Authentication-Results: mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin Cc: Arnd Bergmann , Linus Walleij , Alexander Sverdlin , Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 30/43] dt-bindings: wdt: Add DT binding ts72xx wdt Date: Mon, 24 Apr 2023 15:34:46 +0300 Message-Id: <20230424123522.18302-31-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me> References: <20230424123522.18302-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org Add DT binding for Technologic Systems TS-72xx watchdog. Signed-off-by: Nikita Shubin --- .../watchdog/technologic,ts72xx-wdt.yaml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/technologic,ts72xx-wdt.yaml diff --git a/Documentation/devicetree/bindings/watchdog/technologic,ts72xx-wdt.yaml b/Documentation/devicetree/bindings/watchdog/technologic,ts72xx-wdt.yaml new file mode 100644 index 000000000000..0e06dbaec85f --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/technologic,ts72xx-wdt.yaml @@ -0,0 +1,39 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/technologic,ts72xx-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Technologic Systems TS-72xx based SBCs watchdog bindings + +maintainers: + - Wim Van Sebroeck + - Guenter Roeck + +allOf: + - $ref: "watchdog.yaml#" + +properties: + compatible: + enum: + - technologic,ts7200-wdt + + reg: + maxItems: 2 + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + watchdog0: watchdog@5a002000 { + compatible = "technologic,ts7200-wdt"; + reg = <0x23800000 0x01>, <0x23c00000 0x01>; + timeout-sec = <30>; + }; + +... + From patchwork Mon Apr 24 12:34:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin X-Patchwork-Id: 677118 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DC935C77B61 for ; Mon, 24 Apr 2023 09:57:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231280AbjDXJ53 (ORCPT ); Mon, 24 Apr 2023 05:57:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57120 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231133AbjDXJ51 (ORCPT ); Mon, 24 Apr 2023 05:57:27 -0400 Received: from forward502b.mail.yandex.net (forward502b.mail.yandex.net [IPv6:2a02:6b8:c02:900:1:45:d181:d502]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CDB3196; Mon, 24 Apr 2023 02:57:26 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net [IPv6:2a02:6b8:c12:261e:0:640:2e3d:0]) by forward502b.mail.yandex.net (Yandex) with ESMTP id 920515EBE4; Mon, 24 Apr 2023 12:36:04 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id JZBb1pbWwKo0-Lb5xZorK; Mon, 24 Apr 2023 12:36:04 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1682328964; bh=X2ZnF8z0MJVwVfnTxaJeQDmtpEYIwg62QlS6BVN0m0c=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=S6TlKmzSb8mNgS6HtrmGROmKsWLrDtphmKY5TD7km/ETt/mRUm4XbxPgbMLqweMoQ YkJ4UglWWycr7ZEJZ0Hm/dm+WozxYlX4tlUpjgnaIram/ik3LWCZ+p5JqCzu0u2FPd 7G/UZPfpZVKs+61TIneJoVh7MWDYEvcH5Vjd1aJU= Authentication-Results: mail-nwsmtp-smtp-production-main-39.myt.yp-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin Cc: Arnd Bergmann , Linus Walleij , Alexander Sverdlin , Wim Van Sebroeck , Guenter Roeck , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 31/43] wdt: ts72xx: add DT support for ts72xx Date: Mon, 24 Apr 2023 15:34:47 +0300 Message-Id: <20230424123522.18302-32-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me> References: <20230424123522.18302-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org - get regs from device tree Signed-off-by: Nikita Shubin --- Notes: Arnd Bergmann: - wildcards ep93xx to something meaningful, i.e. ep9301 - drop wrappers drivers/watchdog/ts72xx_wdt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c index bf918f5fa131..72bbb4db983e 100644 --- a/drivers/watchdog/ts72xx_wdt.c +++ b/drivers/watchdog/ts72xx_wdt.c @@ -13,6 +13,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -162,10 +163,17 @@ static int ts72xx_wdt_probe(struct platform_device *pdev) return 0; } +static const struct of_device_id ts72xx_wdt_of_ids[] = { + { .compatible = "technologic,ts7200-wdt" }, + {}, +}; +MODULE_DEVICE_TABLE(of, ts72xx_wdt_of_ids); + static struct platform_driver ts72xx_wdt_driver = { .probe = ts72xx_wdt_probe, .driver = { .name = "ts72xx-wdt", + .of_match_table = ts72xx_wdt_of_ids, }, }; From patchwork Thu Jun 1 05:45:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nikita Shubin X-Patchwork-Id: 688187 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id BF1DAC7EE2E for ; Thu, 1 Jun 2023 05:47:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231695AbjFAFrk (ORCPT ); Thu, 1 Jun 2023 01:47:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231622AbjFAFqy (ORCPT ); Thu, 1 Jun 2023 01:46:54 -0400 Received: from forward100a.mail.yandex.net (forward100a.mail.yandex.net [178.154.239.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BD4C10CA; Wed, 31 May 2023 22:46:24 -0700 (PDT) Received: from mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net (mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net [IPv6:2a02:6b8:c1f:5e51:0:640:23ee:0]) by forward100a.mail.yandex.net (Yandex) with ESMTP id A295346C98; Thu, 1 Jun 2023 08:46:21 +0300 (MSK) Received: by mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net (smtp/Yandex) with ESMTPSA id pjGDMhnDduQ0-JqyCyMqJ; Thu, 01 Jun 2023 08:46:21 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maquefel.me; s=mail; t=1685598381; bh=v3HJXmUEkmSAb+uuyo4K6MLRD4SD7v0NXouWjuBUnQA=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=gxI9T0/DLoDkOfh/B0UPamKZjd0peL81BdPJz2mjbkSoFuOuzFzkdtJUHQrTKZPzQ D+XVLTf9dwfRFZFoywCu41WdJ9Geoe4s7H8ql/gnYAfOUUjKUVTIYcGGUvNIBKhqh6 pR+151PMdmlrUZ4lEpgBkd+PHrxvgOBf1Ddh06jA= Authentication-Results: mail-nwsmtp-smtp-production-main-51.vla.yp-c.yandex.net; dkim=pass header.i=@maquefel.me From: Nikita Shubin To: Alexander Sverdlin , Arnd Bergmann , Linus Walleij , Wim Van Sebroeck , Guenter Roeck Cc: Nikita Shubin , Michael Peters , Kris Bahnsen , linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 32/43] wdt: ts72xx: add DT support for ts72xx Date: Thu, 1 Jun 2023 08:45:37 +0300 Message-Id: <20230601054549.10843-14-nikita.shubin@maquefel.me> X-Mailer: git-send-email 2.37.4 In-Reply-To: <20230424123522.18302-1-nikita.shubin@maquefel.me> References: <20230424123522.18302-1-nikita.shubin@maquefel.me> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-watchdog@vger.kernel.org - get regs from device tree Signed-off-by: Nikita Shubin --- Notes: v0 -> v1: - dropped coma in id table drivers/watchdog/ts72xx_wdt.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/watchdog/ts72xx_wdt.c b/drivers/watchdog/ts72xx_wdt.c index bf918f5fa131..c3dbeffbb85d 100644 --- a/drivers/watchdog/ts72xx_wdt.c +++ b/drivers/watchdog/ts72xx_wdt.c @@ -13,6 +13,7 @@ * warranty of any kind, whether express or implied. */ +#include #include #include #include @@ -162,10 +163,17 @@ static int ts72xx_wdt_probe(struct platform_device *pdev) return 0; } +static const struct of_device_id ts72xx_wdt_of_ids[] = { + { .compatible = "technologic,ts7200-wdt" }, + { /* sentinel */ } +}; +MODULE_DEVICE_TABLE(of, ts72xx_wdt_of_ids); + static struct platform_driver ts72xx_wdt_driver = { .probe = ts72xx_wdt_probe, .driver = { .name = "ts72xx-wdt", + .of_match_table = ts72xx_wdt_of_ids, }, };