From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F347EC33CAD for ; Tue, 14 Jan 2020 03:45:56 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C0434207FD for ; Tue, 14 Jan 2020 03:45:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="iBrr7p8N" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C0434207FD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=amlogic.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=/xNC2/OWykG5jxT0lHVaHjGisR5XQKEHcMJcEUzo8vA=; b=iBrr7p8Nwms50W 4dGUO68ks4OSeIF/SEfXVXPcqY3ItEsFSiOJhEwVUg0YAHA2ZG+yG7boI8wvA82xMSU13ZHl6fqAZ hGwNgZRzgu+UN1MlKHtST64ueYbeZeBCEdt45/1kLMx8su+PkIShjsAnHqJ+R5lX9xKR674VqXVWD oxTxvq2q/cbTyE2u/LhrWsmixe1bJyWVg0+Giy1kUTMctDljScULGex1rq7jNIJaWqufg9jiyL4hg fJA6BM+XLoeCWbI2lkAHxCAwBek2u7QPBsgbcgz8FhzIcWQEDXCYzJ9AvZrHeuVIt5v2Wx0z6iEv8 jBhfud6JgTs1sG4V7PfA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1irD9I-0000b4-VD; Tue, 14 Jan 2020 03:45:48 +0000 Received: from mail-sz.amlogic.com ([211.162.65.117]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1irD9G-0000ZK-6E; Tue, 14 Jan 2020 03:45:47 +0000 Received: from droid12-sz.software.amlogic (10.28.8.22) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server id 15.1.1591.10; Tue, 14 Jan 2020 11:45:58 +0800 From: Xingyu Chen To: Wim Van Sebroeck , Guenter Roeck , Kevin Hilman , Neil Armstrong Subject: [PATCH v6 0/5] add meson secure watchdog driver Date: Tue, 14 Jan 2020 11:45:22 +0800 Message-ID: <1578973527-4759-1-git-send-email-xingyu.chen@amlogic.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.28.8.22] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200113_194546_408827_40C95108 X-CRM114-Status: GOOD ( 11.73 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Qianggui Song , devicetree@vger.kernel.org, linux-watchdog@vger.kernel.org, Jianxin Pan , Martin Blumenstingl , linux-kernel@vger.kernel.org, Rob Herring , Jian Hu , linux-arm-kernel@lists.infradead.org, linux-amlogic@lists.infradead.org, Xingyu Chen , Jerome Brunet Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+linux-amlogic=archiver.kernel.org@lists.infradead.org The watchdog controller on the Meson-A/C series SoCs is moved to secure world, We have to call SMC instruction to trap the ATF for watchdog operation. These operations are different from previous SoCs, so we introduce a new watchdog driver to support this kind of SoCs. Changes since v5 at [4]: - take the wdt node as child node of secure-monitor - update dt-binding description - invoke of_platform_default_populate() instantiate wdt device according to Rob's suggestion at [5] - find the secure-monitor node through the wdt parent node instead of of_find_compatible_node() - add Guenter's Reviewed-by Changes since v4 at [3]: - add watchdog node in dts, and introduce a new optional property "timeout-sec" - add dt-binding for meson secure watchdog - instantiate wdt device through dts node instead of platform_device_register_simple() Changes since v3 at [2]: - add SM_A1_ prefix for WATCHDOG_OPS - remove phandle to secure-monitor node - remove watchdog node from dts, and register wdt device by platform_device_register_simple() - remove dt-binding for meson secure watchdog - use the msec as unit of timeout parameter which is passed to fw side Changes since v2 at [1]: - remove useless dependency in Kconfig - return zero when getting left time value fails Changes since v1 at [0]: - add a new dependency in Kconfig - simplify/add the return operation - remove useless ping operation when setting the timeout - fix some return values - fix the license statement [0]:https://lore.kernel.org/linux-amlogic/1570874721-36077-1-git-send-email-xingyu.chen@amlogic.com [1]:https://lore.kernel.org/linux-amlogic/1571387622-35132-1-git-send-email-xingyu.chen@amlogic.com [2]:https://lore.kernel.org/linux-amlogic/1571983984-11771-1-git-send-email-xingyu.chen@amlogic.com [3]:https://lore.kernel.org/linux-amlogic/1574685218-31164-1-git-send-email-xingyu.chen@amlogic.com [4]:https://lore.kernel.org/linux-amlogic/1576153187-28378-1-git-send-email-xingyu.chen@amlogic.com [5]:https://patchwork.kernel.org/patch/11288017 Xingyu Chen (5): firmware: meson_sm: add new SMC ID support for accessing secure watchdog firmware: meson_sm: populate platform device based on the child node dt-bindings: watchdog: add new binding for meson secure watchdog watchdog: add meson secure watchdog driver arm64: dts: a1: add secure watchdog controller .../bindings/watchdog/amlogic,meson-sec-wdt.yaml | 40 +++++ arch/arm64/boot/dts/amlogic/meson-a1.dtsi | 6 + drivers/firmware/meson/meson_sm.c | 3 + drivers/watchdog/Kconfig | 16 ++ drivers/watchdog/Makefile | 1 + drivers/watchdog/meson_sec_wdt.c | 185 +++++++++++++++++++++ include/linux/firmware/meson/meson_sm.h | 1 + 7 files changed, 252 insertions(+) create mode 100644 Documentation/devicetree/bindings/watchdog/amlogic,meson-sec-wdt.yaml create mode 100644 drivers/watchdog/meson_sec_wdt.c -- 2.7.4 _______________________________________________ linux-amlogic mailing list linux-amlogic@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-amlogic