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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 19870C35DF5 for ; Tue, 25 Feb 2020 07:44:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id EF0E721744 for ; Tue, 25 Feb 2020 07:44:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729615AbgBYHn5 (ORCPT ); Tue, 25 Feb 2020 02:43:57 -0500 Received: from mail-sz.amlogic.com ([211.162.65.117]:28838 "EHLO mail-sz.amlogic.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725837AbgBYHn5 (ORCPT ); Tue, 25 Feb 2020 02:43:57 -0500 Received: from [10.28.90.149] (10.28.90.149) by mail-sz.amlogic.com (10.28.11.5) with Microsoft SMTP Server id 15.1.1591.10; Tue, 25 Feb 2020 15:44:21 +0800 Subject: Re: [PATCH 1/2] dt-bindings: watchdog: Add arm,smc-wdt watchdog arm,smc-wdt compatible To: Julius Werner CC: Evan Benn , Guenter Roeck , Rob Herring , LKML , , "David S. Miller" , Jonathan Cameron , Mauro Carvalho Chehab , Wim Van Sebroeck , Greg Kroah-Hartman , Mark Rutland , , Jianxin Pan , Yonghui Yu , "open list:ARM/Amlogic Meson..." References: <20200214062637.216209-1-evanbenn@chromium.org> <20200214172512.1.I02ebc5b8743b1a71e0e15f68ea77e506d4e6f840@changeid> <20200219223046.GA16537@bogus> <20200219232005.GA9737@roeck-us.net> <1326f594-3cfd-c03d-4f2c-50eeb75724b2@amlogic.com> From: Xingyu Chen Message-ID: Date: Tue, 25 Feb 2020 15:44:18 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.4.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-Originating-IP: [10.28.90.149] Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi, Julius On 2020/2/25 9:23, Julius Werner wrote: >> The SMC function ID may be solved by the DTS, but the wdt indexs(Eg: >> SMCWD_INFO) are also different >> for each vendor. The imx_sc_wdt.c is also use the SMC to operate the >> WDT, but the wdt indexs(Eg: IMX_SIP_TIMER_START_WDOG) >> are different from ours. IMO, If the ATF can implement a common hal >> interface and index for watchdog, then writing a >> common smc wdt driver will be easier to compatible with all vendors. > The MediaTek driver is still in flux (e.g. still being reviewed in > Trusted Firmware here: > https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3405), > we can still change it. So if we can now decide on making this a > "standard" driver, we can change the MediaTek interface to match IMX > and standardize on that. (There are existing Chromebooks shipped with > a different interface, but we could handle those separately with > downstream patches. I think having a unified interface that will > prevent this problem in the future would be worth some extra > complication right now.) If the ATF provides a common watchdog hal interface and index, I am happy to match the generic sec wdt driver. Compared to the current MTK wdt index [0], the following indexes need to be supported for meson wdt [1]. - *_INIT. - *_GETTIMEOUT. - *_RESETNOW.  It is used to reset the system right now, similar to your SOFT RESET. For another platform-specific parameter "SMC function ID", the generic sec wdt driver can get it from the dts, but if the driver want to compatible with more vendors in the future, maybe we should consider Guenter's suggestion at [2] [0]: https://patchwork.kernel.org/patch/11395579/ [1]: https://patchwork.kernel.org/patch/11331271/ [2]: https://lore.kernel.org/linux-watchdog/20200220155159.GB29658@roeck-us.net/T/#md00328548222965054cd19ec7dda074f8fc09fe2 Best Regards > .