Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp3463848pxb; Wed, 13 Oct 2021 06:36:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyX2rk3iIZu/75yt+xMPZbWNOXfBE7vEzM1wcl7rZojMcV1fuZ6Bl9TlhBtxTrpY56Jl5ON X-Received: by 2002:a17:90b:a18:: with SMTP id gg24mr13257614pjb.18.1634132174102; Wed, 13 Oct 2021 06:36:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634132174; cv=none; d=google.com; s=arc-20160816; b=BVs8zVlsfbxmOfCfmZFYWl5vZz5F0HYBHIaFL9iSLid6QczXj+Hm7O9lIAv593y/v5 CE/1fQRm9w0xHaETcNK9FSe+kEXJG2H2TMedyJfHfPtNfuSSTPKpJJ5DdfNzjQFRoNCW IR62WWWopmdu5ReYABwsoRM0yLwUdjCPZo1pyr6nAfFn66zDPrvwfNVqY8QtBZ4HMLaN MqaADH32ABiluh6NNfZX2xnlenwRDTXtSP2xkZQYKRBf5uf+BJcHiK3AEU5Dbx1+xQhc T4GVwU7G0e/6Zx6IBGywpiQekTOnjhq3ClZcKHzSitwebdV4dMjoyluQST+T6vhrzO7k pYGg== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=QtAibD/jKHbHT2fZ2hmCY1IBJUZhTrukIpsqol6hjTI=; b=L7NdC1f6J6DhSnd7PQ16GxyfmkPb8Z+quEG7ko29ye0NiZDZUuqS2Qnrg3RJVnNdBs VtBNJkcPaw7W8vQXHUu4+kiCapgeun/BL+P4bn1TeKMAzf4bVEoKMe7xPwRSNjS8RP0c cVHDzx36EgOjvp9ESBWwYcPdzjWhXNj7RRDl47E7mOG6WiSCfjHdpTBL4YzfOaF198Cg 45MygDF862+mtiaJDyaJmYSzmFDHqlNrxIcz3EDseEKaKwEUAqto4/qd9Ho4cYeoqyzU NQdzkUHe7DtiGAH4gveFMH1WGf5IIv1c7iWzsRQGdvJVtbIn6aLjL6ps7Eg+326jLtl3 qVGA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@svanheule.net header.s=mail1707 header.b=WtUnBWkk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=svanheule.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g35si2073883pgl.237.2021.10.13.06.36.00; Wed, 13 Oct 2021 06:36:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@svanheule.net header.s=mail1707 header.b=WtUnBWkk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=svanheule.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233774AbhJMNgm (ORCPT + 99 others); Wed, 13 Oct 2021 09:36:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234032AbhJMNgk (ORCPT ); Wed, 13 Oct 2021 09:36:40 -0400 X-Greylist: delayed 323 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 13 Oct 2021 06:34:36 PDT Received: from polaris.svanheule.net (polaris.svanheule.net [IPv6:2a00:c98:2060:a004:1::200]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 04F95C061746 for ; Wed, 13 Oct 2021 06:34:36 -0700 (PDT) Received: from terra.local.svanheule.net (unknown [IPv6:2a02:a03f:eafe:c901:ca:6d5e:c3e3:69a5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: sander@svanheule.net) by polaris.svanheule.net (Postfix) with ESMTPSA id 628F0260DB5; Wed, 13 Oct 2021 15:29:10 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=svanheule.net; s=mail1707; t=1634131750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=QtAibD/jKHbHT2fZ2hmCY1IBJUZhTrukIpsqol6hjTI=; b=WtUnBWkktvxYEjKD7gb/DqRx5MW4tyxeS9QEHf9ZK8TTdEgtPe3lhf4jiR30SSCrAQZ7fw JYMRXNO5QNSFz+s+LcIvB6SZjFByZYTFnPBvReebDQJ94APLm+H8wb4WVzpvyH9N0bTmYj wq7Y9/Ca8BUqHPH3HMYqtmAOHUm3BA0hRsP2CYGpy4eXlidbymsSQ7BMb8vs9XjJ647RxU PyItgqB2RHWjtd+ySyxTMLf1FfH+S1/7EGaAv/vK4uv2LoW3W0e+Xh6jNWjhtFGfOHi0nH l4amv8i65t7fh5xPfRtkH9VqxLe6TJpGFHgRNXDeboUBXlQAN3uYcluSDb23/Q== From: Sander Vanheule To: linux-watchdog@vger.kernel.org, devicetree@vger.kernel.org Cc: Wim Van Sebroeck , Guenter Roeck , Rob Herring , linux-kernel@vger.kernel.org, Sander Vanheule Subject: [PATCH 0/2] Add Realtek Otto WDT support Date: Wed, 13 Oct 2021 15:28:58 +0200 Message-Id: X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This watchdog timer found on Realtek's Otto MIPS platforms, including the RTL838x and RTL839x series of ethernet switch SoCs. It has a number of reset modes (SoC, CPU, software), and can provide pretimeout interrupts. The timer has two timeout phases. Both phases have a maximum duration of 32 prescaled clock ticks, which is ca. 43s with a clock of 200MHz: - Phase 1: During this phase, the WDT can be pinged to reset the timeout. - Phase 2: Starts after phase 1 has timed out, and only serves to give the system some time to clean up, or notify others that it's going to reset. During this phase, pinging the WDT has no effect, and a reset is unavoidable. The driver has been tested on a Zyxel GS1900-8 (RTL8380, mainline kernel and OpenWrt), a Zyxel GS1900-48 (RTL8393, mainline), and a Netgear GS110TPPv1 (RTL8381, mainline). Sander Vanheule (2): dt-bindings: watchdog: Realtek Otto WDT binding watchdog: Add Realtek Otto watchdog timer .../bindings/watchdog/realtek,otto-wdt.yaml | 89 ++++ MAINTAINERS | 7 + drivers/watchdog/Kconfig | 13 + drivers/watchdog/Makefile | 1 + drivers/watchdog/realtek_otto_wdt.c | 411 ++++++++++++++++++ 5 files changed, 521 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/realtek,otto-wdt.yaml create mode 100644 drivers/watchdog/realtek_otto_wdt.c -- 2.31.1