From patchwork Tue Mar 14 13:24:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xingyu Wu X-Patchwork-Id: 69638 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1777774wrd; Tue, 14 Mar 2023 07:05:22 -0700 (PDT) X-Google-Smtp-Source: AK7set9AA+UIYqOiTBa2tYLVgi072AV880VJWiVXLxFRNw2+32vTC7Oj1LUBJ+5D6iTr6N+PX/wQ X-Received: by 2002:a05:6a20:9150:b0:be:d389:7abf with SMTP id x16-20020a056a20915000b000bed3897abfmr41552228pzc.3.1678802721898; Tue, 14 Mar 2023 07:05:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678802721; cv=none; d=google.com; s=arc-20160816; b=s3ceOPV+5lV+kgzRoATBwEqWe2WwDYeZUqvS3PYQu57KnlAaTRLO3iMVXpSqKRVZrk 9Xcc17eIA77OfJpY4aTV4xuooOdnVlIg7m29UDRxaNEH1kdOIekBEXwKPFNr9N9hASi6 q+3u4B9rVuTmYBBtwi0G2G77hYrDCS+UQBdrhsR0/byn/Zx0dYYe/dZdL1WhlA/5KmLv ICPJKQZ3dVFcKkwUeezEgJaqZ0L00xU8VEh8EU/yCbC9rm382GNIKH/N26Oh3TeMjNyB I6ZxsMagr/Pfl2otc7FnxVG6VVZegYTDQVaQuxTfIyPoFr2SNXGKD6o5Cinz3e++xB/f VAkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=OZCH2HWeoJd9V4o6WG3iTnf0/msuAoBpC26KzkRi3Jg=; b=sBcjjX7pGl+8LqROFrUimt/47Sz3bLCSyZ4iZWDeeJUUVFNTbmLa1T9hpIgHi1ufhG hyV6Pd/W8u3KdDfq8vhVQTGlXlF7tLTo8TOI8AkjivCug38zaCFFrInzZX34enG4Drzx rCb1f1Jhu7QSSLmlZKY0JIsTl8KEDeIaO3cJy6Ka1+6lDYSxhOd/3+a5moSSL9RMPa9p Sw0nCXt4bsH+/i/skeKJrCQbt9glLQAMkX84RRolONJC9h8EAeB/36X1BOY9rwh6grU2 +gnKZMzqy3q8hUlGAGL6sfolXMHRzLr+xqndNbhI7bDHveum8y4dkwRIBcwo1FoYDQtv u4FQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z14-20020aa79f8e000000b005a91c22496esi67210pfr.159.2023.03.14.07.05.07; Tue, 14 Mar 2023 07:05:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232335AbjCNN1p convert rfc822-to-8bit (ORCPT + 99 others); Tue, 14 Mar 2023 09:27:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229582AbjCNN1X (ORCPT ); Tue, 14 Mar 2023 09:27:23 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2735D73AC3; Tue, 14 Mar 2023 06:24:44 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 76F7124E300; Tue, 14 Mar 2023 21:24:42 +0800 (CST) Received: from EXMBX061.cuchost.com (172.16.6.61) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 14 Mar 2023 21:24:42 +0800 Received: from localhost.localdomain (113.72.145.194) by EXMBX061.cuchost.com (172.16.6.61) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Tue, 14 Mar 2023 21:24:38 +0800 From: Xingyu Wu To: , , , Wim Van Sebroeck , Guenter Roeck , Krzysztof Kozlowski , Emil Renner Berthing , Conor Dooley CC: Rob Herring , Paul Walmsley , Palmer Dabbelt , Albert Ou , Philipp Zabel , Xingyu Wu , Samin Guo , Subject: [PATCH v5 1/3] dt-bindings: watchdog: Add watchdog for StarFive JH7100 and JH7110 Date: Tue, 14 Mar 2023 21:24:35 +0800 Message-ID: <20230314132437.121534-2-xingyu.wu@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230314132437.121534-1-xingyu.wu@starfivetech.com> References: <20230314132437.121534-1-xingyu.wu@starfivetech.com> MIME-Version: 1.0 X-Originating-IP: [113.72.145.194] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) To EXMBX061.cuchost.com (172.16.6.61) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760352243131903089?= X-GMAIL-MSGID: =?utf-8?q?1760352243131903089?= Add bindings to describe the watchdog for the StarFive JH7100/JH7110 SoC. And Use JH7100 as first StarFive SoC with watchdog. Signed-off-by: Xingyu Wu Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck --- .../watchdog/starfive,jh7100-wdt.yaml | 71 +++++++++++++++++++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/starfive,jh7100-wdt.yaml diff --git a/Documentation/devicetree/bindings/watchdog/starfive,jh7100-wdt.yaml b/Documentation/devicetree/bindings/watchdog/starfive,jh7100-wdt.yaml new file mode 100644 index 000000000000..68f3f6fd08a6 --- /dev/null +++ b/Documentation/devicetree/bindings/watchdog/starfive,jh7100-wdt.yaml @@ -0,0 +1,71 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/watchdog/starfive,jh7100-wdt.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive Watchdog for JH7100 and JH7110 SoC + +maintainers: + - Xingyu Wu + - Samin Guo + +description: + The JH7100 and JH7110 watchdog both are 32 bit counters. JH7100 watchdog + has only one timeout phase and reboots. And JH7110 watchdog has two + timeout phases. At the first phase, the signal of watchdog interrupt + output(WDOGINT) will rise when counter is 0. The counter will reload + the timeout value. And then, if counter decreases to 0 again and WDOGINT + isn't cleared, the watchdog will reset the system unless the watchdog + reset is disabled. + +allOf: + - $ref: watchdog.yaml# + +properties: + compatible: + enum: + - starfive,jh7100-wdt + - starfive,jh7110-wdt + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: APB clock + - description: Core clock + + clock-names: + items: + - const: apb + - const: core + + resets: + items: + - description: APB reset + - description: Core reset + +required: + - compatible + - reg + - clocks + - clock-names + - resets + +unevaluatedProperties: false + +examples: + - | + watchdog@12480000 { + compatible = "starfive,jh7100-wdt"; + reg = <0x12480000 0x10000>; + clocks = <&clk 171>, + <&clk 172>; + clock-names = "apb", "core"; + resets = <&rst 99>, + <&rst 100>; + };