Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1865007ybv; Sun, 23 Feb 2020 17:11:31 -0800 (PST) X-Google-Smtp-Source: APXvYqwOtGEWpbcKBZ6jduaHSwYd6xpZM8jCUo5PUn8jeBDPHzFs4dp4FET/uGK6QubDj74h8AE6 X-Received: by 2002:a54:4106:: with SMTP id l6mr10588097oic.76.1582506691833; Sun, 23 Feb 2020 17:11:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582506691; cv=none; d=google.com; s=arc-20160816; b=f91vYU6OQh+fBAMJwNNF2LHZ59WD491h7mFa/oXeLsHwRDKns9u0t5yxhvF4A9MqwU ZTeAc7DrT7k2pdKlvrPu7myltmmw2dn+hQronF05QFaa6lnu21LYWeCgE49ovPfhQC9z KqEIdeA6wp2OSJuYR5mYtm6Vg8yvr0eWlpuEAl04Ul4CygjYq+85tSf4+nCLRRrovzli 6gyKFUbuR+u+7Mgan33zVzHChWKnZA/ahyga9xPtzGa80xKcTbUtR+rGFxHb2CanUzQ8 uI6cuf2hUSecBdgfXIqgjkIkjanIhQL3QasC2vVkRml5d9QuPlKiaf7f7lOYWQZeujiO kGtw== 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=zT10dhFzTQfQk4qZLNGzW74d8YteQDI8/eIgEFfv+OM=; b=Ht9XoRuvYlvSeDOIpj3BOwgiA5qg/IqErah/PPrknkB/+y1huc32XXU/37TRJAl1Xx IDEk2i/BBnmwf7srq9sSViH/+nTZRNmycDlmRt/IwZj4IZbUfSZjUdCvYHxsphaIGXUa w8S47C+6dOeihW3xoOj3wX/30M5Kv8Sltxnn823TH3/ic0TyxjkUf5sKL7SEyFGHSFri AsLUq4JToA68cbIc7k7zNxMJHmC95L2ARVrKo6qFNkz2zWNr8F9DVUJNKZmIzuj9QLaQ d5ulVV/24CjoXqtmWAPpYz6dBwx6qP1hPwFuI4uOFLqMXBvFjQRMjxHcgIbz7rizSSBo UXqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=n8isivMf; 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 l9si4939327oti.229.2020.02.23.17.11.18; Sun, 23 Feb 2020 17:11:31 -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; dkim=pass header.i=@chromium.org header.s=google header.b=n8isivMf; 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 S1727197AbgBXBLI (ORCPT + 99 others); Sun, 23 Feb 2020 20:11:08 -0500 Received: from mail-ua1-f67.google.com ([209.85.222.67]:34087 "EHLO mail-ua1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727167AbgBXBLI (ORCPT ); Sun, 23 Feb 2020 20:11:08 -0500 Received: by mail-ua1-f67.google.com with SMTP id 1so2658237uao.1 for ; Sun, 23 Feb 2020 17:11:06 -0800 (PST) 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=zT10dhFzTQfQk4qZLNGzW74d8YteQDI8/eIgEFfv+OM=; b=n8isivMfbvLTUE8W5OF33bsEQHbC9GWAfYDMGxgEsCd67xnLu5gDVB9DXvZR6Rsx1O 55Mu59uQZ9ycLOFST2i7wZ7g5Hz2Km/BWEoh8CuZd9UfD8ypdnoG0zR2phZcKA7ScuyY 3/UoFGfVGlgcXlM70PiZd0OSnnRxK7cvW1Uw4= 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=zT10dhFzTQfQk4qZLNGzW74d8YteQDI8/eIgEFfv+OM=; b=BIRkTyvj9Q6NgFEyOO6eCrgJeJYMek5B2ecpKpZhk5zYOzXY8ljGuhtWndFiHSCQi+ 7gOoHI5WABUANm2BfM/8NbZFcr5dDSipV8NKL/5hyKIEXBSAyvvOh3jtUGc5NBYUyq7h bhDq3x8RD1SL29QrHg9QMfcAzlGRGwG5xXlUD3CJkZ5Cv4dkLXbTKr78DHWI/0PigiRA BouSdzzaVVsFzXq+eW8ipIFuJ63ohdYRw3uG+VfnEHh1rt5EL7H9Og9iV58IGzXnuCYF e4mJBbbEkiYzw0aYXbkdMtwLokl8Ir8dT5HDK2pCadlxUVmava1PRq3xpAwVJfRZxZy9 TjSQ== X-Gm-Message-State: APjAAAXRO3DNohB8JhjhWtIi9MLx3thgo4gjC+e0PiwpgboNP7Pk7FSk HHYOmf6zl5qpjp24/HQoJry6CvR5Kts= X-Received: by 2002:ab0:4e0e:: with SMTP id g14mr23324642uah.20.1582506665247; Sun, 23 Feb 2020 17:11:05 -0800 (PST) Received: from mail-vk1-f175.google.com (mail-vk1-f175.google.com. [209.85.221.175]) by smtp.gmail.com with ESMTPSA id i22sm2678602uap.17.2020.02.23.17.11.03 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 23 Feb 2020 17:11:04 -0800 (PST) Received: by mail-vk1-f175.google.com with SMTP id t129so2092878vkg.6 for ; Sun, 23 Feb 2020 17:11:03 -0800 (PST) X-Received: by 2002:a1f:add3:: with SMTP id w202mr22215488vke.30.1582506662987; Sun, 23 Feb 2020 17:11:02 -0800 (PST) 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: <1326f594-3cfd-c03d-4f2c-50eeb75724b2@amlogic.com> From: Evan Benn Date: Mon, 24 Feb 2020 12:10:37 +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@vger.kernel.org, Jianxin Pan , Yonghui Yu 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 Hello, I think the intention is that this driver talks to a 'standard' arm smc firmware watchdog call: https://review.trustedfirmware.org/c/TF-A/trusted-firmware-a/+/3405 Each device could re-implement that ATF driver to talk to the specific hardware, and could perhaps use a custom SMCWD_FUNC_ID, defined in the dts. The goal was to provide an ATF patch and linux driver patch that would be generic. But the above ATF patch is only for mt8173. Right now it just specifies an interface. It has less functionality than your meson driver Xingyu. If it is not suitable, that is fine. The above ATF patch is deployed on oak, elm, and hana mt8173 chromebook devices, this driver is intended to support those devices. Evan On Sat, Feb 22, 2020 at 3:01 PM Xingyu Chen wrote: > > Hi, Julius > > On 2020/2/22 3:41, Julius Werner wrote: > >> Because the ATF does not define standard wdt index, each vendor defines > >> its own index. > >> So I don't think that the current driver[0] can fully cover my usecases. > > I think the best way to solve this would be to put the SMC function ID > > as another field into the device tree, so that multiple vendors could > > share the same driver even if their firmware interface uses a > > different SMC. But they still have to implement the same API for that > > SMC, of course, not sure if the Meson driver is suitable for that (but > > if it is then I think merging those drivers would be a good idea). > 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. > > Best Regards > > > > .