Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp29938ybz; Tue, 21 Apr 2020 04:07:50 -0700 (PDT) X-Google-Smtp-Source: APiQypK60HJIFIgPIpihnTVGa/QJBcfXNVq9onqr5ywcFWaHFsgZHb+O0Qcsu6qhaGMHvgjPbXFt X-Received: by 2002:a17:906:1cd5:: with SMTP id i21mr20620394ejh.251.1587467269736; Tue, 21 Apr 2020 04:07:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587467269; cv=none; d=google.com; s=arc-20160816; b=to3b45LnpVG5+5ZrmAIJjoWBdy/5bgc9qr1Eil1XV12pxoh2VGBk/XOt8wgQaHltps uJFZdclrKGlKiCRLnjh2gyHjiWXdR9/97LM8zD78luDOnZI2MoVJIAg2VjRdnYSoBvNb s0Eda54eYHdFOKICyAOxZ8dpf4Jy8GoCt3WJYlIRmYDgERAlxYAMv3zArlsHYbdivnbS 2oC61ZQGN6vTCYlfdxqWN0tE8qQMw1s8d3zW6DCXHebKAV47HJGRiF7Hn8vtK787MLUk fnC5GNAOlb4XuzyXj1V0hfnyJbn+LuwA+g8RhuJZgKzZZBB4loE4hCyWsWrXZunbhbih gi5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=WvF21qmP3gF9P7JZJ1ONcszxypmYyGE19tvUhWUTsVs=; b=jcr/2iWoTMKVrgMbbz0QN8B7dQ6sKOe0GlmRi5caFiCMXJqvk0vmHGAooIJtrOYGqJ NvU6Kb0kimukEWAaPlmx0vx2ByE0MBYGHPK8BQrGqaj05HYUcSmwFcCCCPi3Ddy96nHL CabG3dEG3cOv9kDaxX62eRuanUPXDV3TZUQGS9QUttorE+xeB7sNTjmWeC778/RXlHNy 3Z06JqMfu8h6remO0V9iaezD/rqWWVzTaiDQGPSwO76UaXWcFwGh2f3dW9sMoW5d91K5 9V/+A2SNa0x3urLIYMhcte21BPCcQw/5YfqS7hrK4KBSo2iGIBOrld8dX1DTcr7MgUPW yB9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=h+1WGBmh; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp13si1747166ejc.251.2020.04.21.04.07.26; Tue, 21 Apr 2020 04:07:49 -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=@chromium.org header.s=google header.b=h+1WGBmh; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728588AbgDULFi (ORCPT + 99 others); Tue, 21 Apr 2020 07:05:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727120AbgDULFh (ORCPT ); Tue, 21 Apr 2020 07:05:37 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 02AD9C061A41 for ; Tue, 21 Apr 2020 04:05:37 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id x26so6601370pgc.10 for ; Tue, 21 Apr 2020 04:05:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WvF21qmP3gF9P7JZJ1ONcszxypmYyGE19tvUhWUTsVs=; b=h+1WGBmhpgBtdaANZUwwMqTOtqCaHeP8LEw5UWv2vHgLHr/sm2q1g/zutfJc3XCFY5 2a426+CkciRwHnsNtSmp2IC36uhc193CxU8uvnyojGagWNbqLGXkCrqZycjGRJass4yv v08www/I7ltHOkci3lA0Ub2nYKge1VZpCKO3k= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=WvF21qmP3gF9P7JZJ1ONcszxypmYyGE19tvUhWUTsVs=; b=XcEUggqfJwSMbh8NhMFkUNUnWztUd/mCRRUk/1LYRMZHJciGAFLCOjZxqGob/mQQiA zgX/FU3zFfRQUr3dPhoseoZe9eor5gw6NLkbWTaPlMgrvgUQHEtBd4gH9au5ABkb2VEs xl5ppEYfTFHtXF9eXEw0hpvK2Zp6nWyb/YCkEMqtk3vgebcC5DOmfixb4bPQFEWr/dcA ZvEcHur+IUfbGhIUwVNrFrL+DPPnZY4bI3Ga0RakKedTGZCoA/CwB63SoXqpDfFsLKWy 1KJbU2/pb5weghUNlHkQApi6e2rrEgMA9pNwxWv4yM/9JZyrzvwLJB3ZeeNkbqyWpQ6g 6FIQ== X-Gm-Message-State: AGi0PuZHhBdj3tdHnal5SU0IXyrfQeGOQLG7ipYQIwWS0SHRqDZuK92q HSO+n4945sBh+KO1r6hxjSRdpKzHBl8= X-Received: by 2002:a63:1d52:: with SMTP id d18mr20242532pgm.443.1587467136316; Tue, 21 Apr 2020 04:05:36 -0700 (PDT) Received: from localhost ([2401:fa00:9:14:1105:3e8a:838d:e326]) by smtp.gmail.com with ESMTPSA id j10sm2217695pfa.57.2020.04.21.04.05.27 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 21 Apr 2020 04:05:35 -0700 (PDT) From: Evan Benn To: LKML Cc: xingyu.chen@amlogic.com, jwerner@chromium.org, Evan Benn , Anson Huang , Bjorn Andersson , Catalin Marinas , "David S. Miller" , Geert Uytterhoeven , Greg Kroah-Hartman , Guenter Roeck , Leonard Crestez , Li Yang , Marcin Juszkiewicz , Matthias Brugger , Mauro Carvalho Chehab , Olof Johansson , Rob Herring , Rob Herring , Shawn Guo , Valentin Schneider , Will Deacon , Wim Van Sebroeck , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-watchdog@vger.kernel.org Subject: [PATCH v2 0/2] Add a watchdog driver that uses ARM Secure Monitor Calls. Date: Tue, 21 Apr 2020 21:05:18 +1000 Message-Id: <20200421110520.197930-1-evanbenn@chromium.org> X-Mailer: git-send-email 2.26.1.301.g55bc3eb7cb9-goog MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is currently supported in firmware deployed on oak, hana and elm mt8173 chromebook devices. The kernel driver is written to be a generic SMC watchdog driver. Arm Trusted Firmware upstreaming review: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3405 Patch to add oak, hana, elm device tree: https://lore.kernel.org/linux-arm-kernel/20200110073730.213789-1-hsinyi@chromium.org/ I would like to add the device tree support after the above patch is accepted. Changes in v4: - Add arm,smc-id property - Get smc-id from of property - Return a1 instead of a0 in timeleft Changes in v3: - Change name back to arm - Add optional get_timeleft op - change name to arm_smc_wdt Changes in v2: - Change name arm > mt8173 - use watchdog_stop_on_reboot - use watchdog_stop_on_unregister - use devm_watchdog_register_device - remove smcwd_shutdown, smcwd_remove - change error codes Evan Benn (1): dt-bindings: watchdog: Add ARM smc wdt for mt8173 watchdog Julius Werner (1): watchdog: Add new arm_smc_wdt watchdog driver .../bindings/watchdog/arm-smc-wdt.yaml | 36 ++++ MAINTAINERS | 7 + arch/arm64/configs/defconfig | 1 + drivers/watchdog/Kconfig | 13 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/arm_smc_wdt.c | 194 ++++++++++++++++++ 6 files changed, 252 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/arm-smc-wdt.yaml create mode 100644 drivers/watchdog/arm_smc_wdt.c -- 2.26.1.301.g55bc3eb7cb9-goog