From patchwork Thu Mar 2 12:40:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 63401 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4214829wrd; Thu, 2 Mar 2023 04:48:31 -0800 (PST) X-Google-Smtp-Source: AK7set8UIrkZWHj4nJ/keOlF+yyIcURDLIZp7TsY9xq3daNYOr4eJrNQFHZKv6Qx4bwlMUA5zV4y X-Received: by 2002:a17:907:a588:b0:878:673f:5492 with SMTP id vs8-20020a170907a58800b00878673f5492mr10599101ejc.40.1677761311176; Thu, 02 Mar 2023 04:48:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677761311; cv=none; d=google.com; s=arc-20160816; b=w3/WMSN/eOhuopJ4nNHVNMy73Ddtq3heTT1B2eU7U8W4gAhO89m/KwNli4cMWxC4De N+itcUIJxMnst+TqsWAiCbogbHsp7Xr45kTSrEmpvSHUriLEgaTesLX18xjh4ECzi8TQ WYIhrYPJ+iURvQrSZkGwiZYJP8lO2xPw/wtEnMMTXCedsXpgkiD9f0CROj/7UD7oDHEj 5ZK1GHwVNmMPrYmJb9zU+BLVmEfx9qVJuXBQLyPveOCU22X2asr/XjrIbsFohAWSA+ir zOkiQ5MyXsnzP7v0ZuhshzhuoFLCPmFvL233lsu9qd/4V6QUFwz0M/rXIY7HuOMAyd+Y hZlQ== 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 :dkim-signature; bh=NjhrqpxloWE6ONs+Pg7avedoS40plQhwR7tQyDf+1NI=; b=NwWSkKVk3Ljwrj9BqbueDt95hT4aHqUiAFOjU+65aTNzXG9pnhST2gSm0SQEoYx28M pS81q55XQ2x4cQP24f3CCV2Pod4+UxIr3X9346i6y1ANdk+h3AXmK+iiELJs3Mo/dllm 7tGzhyLIV9bBZayCD9fa/Z5dIgP+bclRyYGfvGknVDElitqQmsnhRYD6sFMj9doGanYx O9YnXqGm52MIj+1LC8qK+xiGtkp+zRyLIc7ZuxjU6d/bEewwwW+BMJnixJAc2ATbFmY5 hv5dx++jA/fHvfQd91oyV1lr/pIeG3fHxECj7waYBBKUdU6XIvgMtpXewz8UcOJ7NaOP ghfA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gbmgoI6l; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u21-20020a1709060b1500b008cdf4a9c9a1si3264132ejg.622.2023.03.02.04.48.08; Thu, 02 Mar 2023 04:48:31 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=gbmgoI6l; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229498AbjCBMkw (ORCPT + 99 others); Thu, 2 Mar 2023 07:40:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229673AbjCBMku (ORCPT ); Thu, 2 Mar 2023 07:40:50 -0500 Received: from mail-ed1-x530.google.com (mail-ed1-x530.google.com [IPv6:2a00:1450:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 646964BEB8; Thu, 2 Mar 2023 04:40:49 -0800 (PST) Received: by mail-ed1-x530.google.com with SMTP id f13so67024411edz.6; Thu, 02 Mar 2023 04:40:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677760848; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NjhrqpxloWE6ONs+Pg7avedoS40plQhwR7tQyDf+1NI=; b=gbmgoI6laQc6/BL/YNgDPvv1PN2ZRWGhLBi8S8/A7u4bqe/ANj4oQc6GPQglRPVuA9 Yy5YRPkTen1Z/Swqt6UwBSkjqBHDXSRN2O3YqSWBDguoqCFFm6gCQccnR5IsA258ikYg oMCBC4P720JczFNcfpEA3H0dXicB8rkA6JzF9u/wTpJXi5Ks81wDDmhY0ZD9GUKzGbW+ 0hv0t5GhorZ1+n8e8b01+06ahUUp/ZJW7nVQag2BC6XZhB5kR6BqzFUaMOK4SIubEVJ5 77OlUgZ/nl/Z3IOneSqFlKA12SHBmJy9GApBvWJFi9B4VQueoGcGfT3oOBZqYz5vcTTk lcGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677760848; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NjhrqpxloWE6ONs+Pg7avedoS40plQhwR7tQyDf+1NI=; b=bRG6yHty25WsLSHzRKGhlw+QpzPmoS8pdwzo6S0yghTcT3ARA8XnEjXtp2mXLRJiu1 Y5BA0sgQyNIljsxIQLL5Je8b7aHwZLT6vNZVKAUPMUrwdFWCAg3ANo9qUkVwe9RseeJk vlW2CzBG7QGw7o1m3Ve2hP4JpfCCnJ726NPNUwsIkITt2iQbHgZEu3hQ4xIGxGJ4eVCI qnBUzKC0DZjKCjG4n2f/9Zjv35MA8db78GEGhfpyRMAxb8EpfHfgK4RKyM/+rQjRqMH8 leJ4K0jHbwWt0qzlZBYLZdB0+RfIQCw/m8W0ZIu9ArFAqBhjBB4IoGE5P1/le6vcUVLn xF8w== X-Gm-Message-State: AO0yUKUsXPW/M9V1Aych7k8vQpO5wLhS+V/ms8zuDQdQO2/Tg22I4oIe qXO2RShw1eHL0RIFTxOkriw= X-Received: by 2002:aa7:d6d8:0:b0:4bf:d8d9:4b0e with SMTP id x24-20020aa7d6d8000000b004bfd8d94b0emr2145093edr.22.1677760847970; Thu, 02 Mar 2023 04:40:47 -0800 (PST) Received: from localhost.localdomain ([95.183.227.97]) by smtp.gmail.com with ESMTPSA id c22-20020a50f616000000b004c07b11deb8sm599036edn.64.2023.03.02.04.40.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 04:40:47 -0800 (PST) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Philipp Zabel Cc: Yassine Oudjana , Yassine Oudjana , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 1/2] dt-bindings: reset: Add binding for MediaTek MT6735 TOPRGU/WDT Date: Thu, 2 Mar 2023 15:40:14 +0300 Message-Id: <20230302124015.75546-2-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230302124015.75546-1-y.oudjana@protonmail.com> References: <20230302124015.75546-1-y.oudjana@protonmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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?1759260244585641405?= X-GMAIL-MSGID: =?utf-8?q?1759260244585641405?= From: Yassine Oudjana Add a DT binding for the MT6735 top reset generation unit/watchdog timer. Signed-off-by: Yassine Oudjana Reviewed-by: AngeloGioacchino Del Regno Reviewed-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck --- .../bindings/watchdog/mediatek,mtk-wdt.yaml | 1 + include/dt-bindings/reset/mediatek,mt6735-wdt.h | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 include/dt-bindings/reset/mediatek,mt6735-wdt.h diff --git a/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml b/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml index 55b34461df1b..009ccdb60b84 100644 --- a/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml +++ b/Documentation/devicetree/bindings/watchdog/mediatek,mtk-wdt.yaml @@ -22,6 +22,7 @@ properties: - enum: - mediatek,mt2712-wdt - mediatek,mt6589-wdt + - mediatek,mt6735-wdt - mediatek,mt6795-wdt - mediatek,mt7986-wdt - mediatek,mt8183-wdt diff --git a/include/dt-bindings/reset/mediatek,mt6735-wdt.h b/include/dt-bindings/reset/mediatek,mt6735-wdt.h new file mode 100644 index 000000000000..c6056e676d46 --- /dev/null +++ b/include/dt-bindings/reset/mediatek,mt6735-wdt.h @@ -0,0 +1,17 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ + +#ifndef _DT_BINDINGS_RESET_MEDIATEK_MT6735_WDT_H_ +#define _DT_BINDINGS_RESET_MEDIATEK_MT6735_WDT_H_ + +#define MT6735_TOPRGU_MM_RST 1 +#define MT6735_TOPRGU_MFG_RST 2 +#define MT6735_TOPRGU_VENC_RST 3 +#define MT6735_TOPRGU_VDEC_RST 4 +#define MT6735_TOPRGU_IMG_RST 5 +#define MT6735_TOPRGU_MD_RST 7 +#define MT6735_TOPRGU_CONN_RST 9 +#define MT6735_TOPRGU_C2K_SW_RST 14 +#define MT6735_TOPRGU_C2K_RST 15 +#define MT6735_TOPRGU_RST_NUM 9 + +#endif From patchwork Thu Mar 2 12:40:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yassine Oudjana X-Patchwork-Id: 63402 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp4215008wrd; Thu, 2 Mar 2023 04:48:58 -0800 (PST) X-Google-Smtp-Source: AK7set90Y87lfDVfwyWSNI1fTVe6VLbJIa8AyF9AgdTMGx/NT3NtMIDc3QrlrEUvZTOML7mn+huJ X-Received: by 2002:a05:6402:2145:b0:4ae:eb0f:4220 with SMTP id bq5-20020a056402214500b004aeeb0f4220mr9117512edb.38.1677761338781; Thu, 02 Mar 2023 04:48:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677761338; cv=none; d=google.com; s=arc-20160816; b=Qr6kg2azsxIjCaqfxSWF1Ue5dVv4a8xpNMteGXiDX82cF761e+amrn/8vmtzQzImdb zfrwxqD8xhwG+m1mCEKVqEA4Zeb211LKrfzGEJYlWWb11Xy0f9wkY/Zc2cbDPgdIrMws KWnvT5mwAsFsVQHicNYE6GTtPzcvhNlFAD/n7n3KFbPwNoe8guaq2hIkqwnobiUND6yy AiUqRBjAK538QqlGbLq/NxXpEy03rqA3FM/pS1Ik38b7KXM6cxRL2Tu2qNBRp3p2lnco z+/ST6GRdoe7oM2Naaw2zeen4+/PhE5cmqqnX+cvCdZcsp9QbH036EVwpol53XLuESVk hVeQ== 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 :dkim-signature; bh=PDLWBsaXf+EBRK3loI+aJuSsf0blQx7K7EQNqTkpYHQ=; b=MlOkNoSZ6zkXAUi00n3MY8aPWWSEHelMxGXjKVpoTK98KdT/ew3+DQQ8T7/hkiE+KZ Cg/j6Bsr9YVXg28F5x6mcactBFeKg4mgHnCvR7/03xMj8VVDPaa7UMmGMEfrYwz70LkQ R8K5czhj3TB/Kz01s1kc59nBvzIyrQPvi6sgBUH37fM/4/W36Nrd5Udiw3J85vKeOg4z izOjFU14PssXXgy3hAD1KQPRgNXM2JRHRp/U+/NrPMMysYszQJz1Nvx63oGfEURt8pTP Tyi9CM5S2y+6ElAN17/5A3sZa/psAGT7n0apu8lqhhcKnJu59OAubRTvuu9L+fwNujZ4 ZT9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Zn60fe0f; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m23-20020aa7d357000000b004bc026faea3si4677154edr.337.2023.03.02.04.48.36; Thu, 02 Mar 2023 04:48:58 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Zn60fe0f; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229816AbjCBMk4 (ORCPT + 99 others); Thu, 2 Mar 2023 07:40:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37676 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbjCBMkx (ORCPT ); Thu, 2 Mar 2023 07:40:53 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D0F8497C0; Thu, 2 Mar 2023 04:40:52 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id s11so3034057edy.8; Thu, 02 Mar 2023 04:40:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1677760851; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PDLWBsaXf+EBRK3loI+aJuSsf0blQx7K7EQNqTkpYHQ=; b=Zn60fe0foaPBdbdW+KOWbitV44Eb5w5/+zFbZZXAX9mc/cDPXLg8q2hMKw9d4Ahg6M BE3jauOKS5qegUeCtDgbKMlz7dZB384zEr8qqDkerc6DHPVGdA7+70gLMFA7dbl2oj/1 mqTmB3qqV4x6qjYGnat9ILzryi6QeqtWJWk8qtJG+C2vxAqoVEhNIB3hpHyKs8vjX98P 1Iyr25oDpYuzBYIw99i1PEq2EwPr3BeF6cXIMNnNZLU0utk66SMfiup3xH5+WPE8eMk5 B2fmOsxjFU3NJ+C+rTzkk+kb/tcdqYmdzKcOooDuKfyP+XE4tC9AK/gLHg3BAHaqb/iA JzIw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1677760851; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=PDLWBsaXf+EBRK3loI+aJuSsf0blQx7K7EQNqTkpYHQ=; b=KuozgAM3e3t7/CR4r/P/Vezo1wLO5acAXBz5QsRh/fDLJvKR7prG+DieHVriXALybE +VaHLWW1XN1BFO+Onzq4qRcf8u/soXZyic7NYO+cBfyn7yBTQ6YZQs/dgl/SgVQtL2Ki 5qvY2L3auURg4q64WMb36WUoFu1qGxjgste7lcrbMwLT5HtPRuNnSsBaETACnph2DrWh uer/IFAty+6sA1j0nT64uRe10C2GJxH+9Bj5TwGyrHCd5IkuInbgFXj7znJnSSUPz+n1 6OZlv6QY38DPoguf3gWP5MJkkTILduMytK8Q9Q0tAaYdGcEUP4WHz3Jwq/45S2wPHjFn SVkg== X-Gm-Message-State: AO0yUKU8DCrd1FaiNCF4Se2hCqQ4Pift8ohVR5xDlV46q2WqvuAgLcgJ jqBJlq4W97T8jQMvVK8yfyY= X-Received: by 2002:a05:6402:2d8:b0:4bd:6b93:128c with SMTP id b24-20020a05640202d800b004bd6b93128cmr4444479edx.25.1677760850927; Thu, 02 Mar 2023 04:40:50 -0800 (PST) Received: from localhost.localdomain ([95.183.227.97]) by smtp.gmail.com with ESMTPSA id c22-20020a50f616000000b004c07b11deb8sm599036edn.64.2023.03.02.04.40.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Mar 2023 04:40:50 -0800 (PST) From: Yassine Oudjana X-Google-Original-From: Yassine Oudjana To: Wim Van Sebroeck , Guenter Roeck , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Philipp Zabel Cc: Yassine Oudjana , Yassine Oudjana , linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org Subject: [PATCH 2/2] watchdog: mtk_wdt: Add support for MT6735 WDT Date: Thu, 2 Mar 2023 15:40:15 +0300 Message-Id: <20230302124015.75546-3-y.oudjana@protonmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230302124015.75546-1-y.oudjana@protonmail.com> References: <20230302124015.75546-1-y.oudjana@protonmail.com> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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?1759260273421124228?= X-GMAIL-MSGID: =?utf-8?q?1759260273421124228?= From: Yassine Oudjana Add support for the watchdog timer/top reset generation unit found on MT6735. Disable WDT_MODE_IRQ_EN in mtk_wdt_restart in order to make TOPRGU assert the SYSRST pin instead of issuing an IRQ. This change may be needed in other SoCs as well. Signed-off-by: Yassine Oudjana --- drivers/watchdog/mtk_wdt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index a9c437598e7e..5a7a7b2b3727 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include @@ -82,6 +83,10 @@ static const struct mtk_wdt_data mt2712_data = { .toprgu_sw_rst_num = MT2712_TOPRGU_SW_RST_NUM, }; +static const struct mtk_wdt_data mt6735_data = { + .toprgu_sw_rst_num = MT6735_TOPRGU_RST_NUM, +}; + static const struct mtk_wdt_data mt6795_data = { .toprgu_sw_rst_num = MT6795_TOPRGU_SW_RST_NUM, }; @@ -187,9 +192,15 @@ static int mtk_wdt_restart(struct watchdog_device *wdt_dev, { struct mtk_wdt_dev *mtk_wdt = watchdog_get_drvdata(wdt_dev); void __iomem *wdt_base; + u32 reg; wdt_base = mtk_wdt->wdt_base; + /* Enable reset in order to issue a system reset instead of an IRQ */ + reg = readl(wdt_base + WDT_MODE); + reg &= ~WDT_MODE_IRQ_EN; + writel(reg | WDT_MODE_KEY, wdt_base + WDT_MODE); + while (1) { writel(WDT_SWRST_KEY, wdt_base + WDT_SWRST); mdelay(5); @@ -443,6 +454,7 @@ static int mtk_wdt_resume(struct device *dev) static const struct of_device_id mtk_wdt_dt_ids[] = { { .compatible = "mediatek,mt2712-wdt", .data = &mt2712_data }, { .compatible = "mediatek,mt6589-wdt" }, + { .compatible = "mediatek,mt6735-wdt", .data = &mt6735_data }, { .compatible = "mediatek,mt6795-wdt", .data = &mt6795_data }, { .compatible = "mediatek,mt7986-wdt", .data = &mt7986_data }, { .compatible = "mediatek,mt8183-wdt", .data = &mt8183_data },