Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp137056ybh; Mon, 9 Mar 2020 18:02:57 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvCqWMgUpmaggyKQJriO6NYdi4UIDLrEG0XmOIDQ+O49d/EJQc89Oef3hbeUuehnttGJmzz X-Received: by 2002:a54:478a:: with SMTP id o10mr1357057oic.45.1583802177682; Mon, 09 Mar 2020 18:02:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583802177; cv=none; d=google.com; s=arc-20160816; b=EnAUuIwy14jkafUJ5asmFFl5wLhiHdb2uh31BRWfjh/wD1nn7vyzGMHLkR2u5qrqW/ 5lNx3K5QuscmAohDGP6K6hVPyrOkmZVq6cgEWTNLdGH2do5fRYsQQm2KPNopzVW5jBNg /vTx4lh5WdYLiaYaAGxhgXykybRn/fk2rNVHCCW6a6QktvVB8PBR6+uiFR8UK395mkqZ E4HN+pLL+JXTlKANhZIHS6IGDmK43iThQv4LAhBxLaMvzwOHFGtLfZjJABE9oTlOxCyE YoTX5ay6LO05Dfi9xzegf2aO3LyToKQU9dmJ730QKE75v8AzpM1RmY8jNbeMinLz2GX/ HVAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=g5xnWgJ5omzmZiku6UfaNj8qU529m5YfhrjX1iEpn4A=; b=RVkTfFLwec9o5f6ST7lX2Lfeyhzvn2RBDcX6+LGXJxM+sFKMnv2IMXyPkSxsNBix9Z q6PsG+N2ltvZ6jFesW5PjXWZgdAXgvoE8iGVCz0z8IZhlQBcbuJUj2bs8pHBzpr26lVh /1WyUPh2iubJKEwdZxaQnk8vEfhyX0hUgdppAvK+kT4dr9TUid9yyrbUq92lu7d8k5DD jBpyYflEl+G3iOj9DlNyMqF7jDxH4hUfEK6++u/gL9/Fd7hMIRG3pitEQLeJghX+dBvH JiIOxcmg2FWzY0hi+t0TKHUXRTzZsqNGg0WS9AwcR7Dv45wUrWAR4Hye68v+jvRX2chv aOLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kjWV2H+E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id r129si2172030oib.123.2020.03.09.18.02.43; Mon, 09 Mar 2020 18:02:57 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=kjWV2H+E; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727589AbgCJBA6 (ORCPT + 99 others); Mon, 9 Mar 2020 21:00:58 -0400 Received: from mail-ua1-f67.google.com ([209.85.222.67]:42492 "EHLO mail-ua1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727380AbgCJBA5 (ORCPT ); Mon, 9 Mar 2020 21:00:57 -0400 Received: by mail-ua1-f67.google.com with SMTP id p2so4054217uao.9 for ; Mon, 09 Mar 2020 18:00:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=g5xnWgJ5omzmZiku6UfaNj8qU529m5YfhrjX1iEpn4A=; b=kjWV2H+ENIYP82wnkfLeoFh/cu0d6WCJIUEmu3ujdQeJGhIXy/5G1boCNlFG8g0qBr +2e4zj+IUgMgrGGmx8xi/SpqcykgxdFjE8+INLu57lfr0OaK5tzabI36l1MbeHx1erNT dYDE3RDADynW72cXRucYvQhJa+Zy4oyvr3wGA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=g5xnWgJ5omzmZiku6UfaNj8qU529m5YfhrjX1iEpn4A=; b=oXHnzdUE5+41GwxT2Mr8bB3XNSo52I8A0x4R6AF9wM3Wor66GUWlcEOrvcOEjwP0XM jtldGokjEQPKzJ30gA7ZAX5gyUMpyUsXOAvktdQZ2U4RS95eP6Uvy9pOh+5Le5jSLmlX yNwSxymc6JIMlcq9B++n3ZkpdgF12j8Mh2SzTOkXbYdgYWvChPgvW6eUe0qOcl2p/E36 /rLZ/W+9WddmJmLhP3Dr0sAL+QnQ9NdRVFzME+rhqoi89icM1fYSplV1c+s8C4L/NKgh PyihQpFlcvDc7b9ATkrqKWagp9O6lmaadiEwXFaqrLjesy6pGUeNCcmD/V6rNCdgL3TB E+MA== X-Gm-Message-State: ANhLgQ1j6jx+ARSTrgYQQQttC946uxnqm05abSXvnoU7Wqc6hKauXdFQ gthKryQ91b2dasQ/S5a9Xg5ELslwJvM= X-Received: by 2002:ab0:2a0c:: with SMTP id o12mr10514342uar.72.1583802056024; Mon, 09 Mar 2020 18:00:56 -0700 (PDT) Received: from mail-ua1-f50.google.com (mail-ua1-f50.google.com. [209.85.222.50]) by smtp.gmail.com with ESMTPSA id x12sm5831080vke.29.2020.03.09.18.00.54 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 09 Mar 2020 18:00:54 -0700 (PDT) Received: by mail-ua1-f50.google.com with SMTP id 94so4067197uat.0 for ; Mon, 09 Mar 2020 18:00:54 -0700 (PDT) X-Received: by 2002:ab0:3392:: with SMTP id y18mr2111560uap.66.1583802054012; Mon, 09 Mar 2020 18:00:54 -0700 (PDT) MIME-Version: 1.0 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> In-Reply-To: From: Evan Benn Date: Tue, 10 Mar 2020 12:00:27 +1100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/2] dt-bindings: watchdog: Add arm,smc-wdt watchdog arm,smc-wdt compatible To: Xingyu Chen Cc: Julius Werner , Guenter Roeck , Rob Herring , LKML , devicetree@vger.kernel.org, "David S. Miller" , Jonathan Cameron , Mauro Carvalho Chehab , Wim Van Sebroeck , Greg Kroah-Hartman , Mark Rutland , LINUX-WATCHDOG , Jianxin Pan , Yonghui Yu , "open list:ARM/Amlogic Meson..." Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Xingyu, I am trying to establish some clarity about what to do here. The trusted firmware review has now been accepted https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3405. I could try to add your mentioned extra operation indexes to the ATF watchdog, to try to establish a standard ATF smc watchdog interface. Hypothetically then your linux driver could connect to any of the ATF watchdogs, apart from the meson indirection layer. I do not quite understand the meson layer to be honest, would we run the meson layer on non-amlogic SOCs? It looks feasible to strip the meson part from your driver so that it works on more socs, please correct me if I am wrong. Alternatively we could also add these extra operation indexes to this linux driver. Unfortunately I would not have a way to test that. Thanks Evan On Tue, Feb 25, 2020 at 6:43 PM Xingyu Chen wrote: > > 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 > > .