Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp3358665ybv; Mon, 24 Feb 2020 23:44:29 -0800 (PST) X-Google-Smtp-Source: APXvYqy8ZBaUxL7RGHsd5OE4FGSxYoT+Y5K3IYEF6BhQ86k/7VBuVU+OZTVi3xEQi9gORK/uPYRA X-Received: by 2002:a54:4003:: with SMTP id x3mr2339737oie.0.1582616669205; Mon, 24 Feb 2020 23:44:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582616669; cv=none; d=google.com; s=arc-20160816; b=L9vEuMIOlVtUEGAo2t/cJE+ePlPXYWsEIFpS0pzwatpXIVTdMi/dQFoI+N/iKrYbmj Okc9jm4agu2neUtgvL892zq0KE3Ga2D6raHXoZpNohI0htyPQhG21gv65a6aer8G/kmw QZZeSLcTDVWZ++4XSggh55C2XVcIsPOeDcTqP4DToSH8wA7AO9GyJ7QhAyMaNyLyEfN3 3EAreppm1LPTaqaNeY4GC+uWYW5DsO7nIUYLkkXfCaQdLoZK1JKbXjKeuK6LjG1U8C40 XBPN/OoHuUz4ZiK2FhZafUm8gzsbhwUtHHiQn+Tm/gqYzN75Gs38PTVsuMElql+w9Eon N5HA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=EtHbkgLdXRvP17FAxc915VZZVGD6YujnT+0VX3JkIVc=; b=yTGqeRdglgk5I4PKEn0JtHG1Rx8yjmdC0Q0WYM55Ad9VvkwdpobCC5KJQsVozeEYbH qEA+1BIW2gzguFcUxRkITHN4SojTZY2R2axkAIgaWvWbx6HsRpqB47IVh8ebRAx21bNY MFBXfAavM3JfQnbAN/Nk39zPs+v0AuybnIvwOiBObZPH1x1P4YMiNwLshVCECgqNKn+/ 59IDu9zVTUzP1GpHuSTYhW6hxUT7FMd3j3Sr3U/HkkXGzz64bGqg5taD0abXY/AoAyNq IKL7fVq7KHsXCyxom0ojXng+Ra/tVL35yFAAraFeXcrFoxkADDvmw7x3IJsUd7FHI0Mi tK9Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m5si7496941ote.187.2020.02.24.23.44.16; Mon, 24 Feb 2020 23:44:29 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729623AbgBYHn6 (ORCPT + 99 others); Tue, 25 Feb 2020 02:43:58 -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: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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 > .