Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1989056ybz; Sun, 26 Apr 2020 08:39:23 -0700 (PDT) X-Google-Smtp-Source: APiQypKl/CY5sE+QDQpgsJ6iOP0jW7bQT5G7KDh1j9BJTcoH80DXNYCwQ0Fp9XblIspZbNE6BbAh X-Received: by 2002:a17:907:9483:: with SMTP id dm3mr16506202ejc.280.1587915563810; Sun, 26 Apr 2020 08:39:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1587915563; cv=none; d=google.com; s=arc-20160816; b=jcvCDZDO6tVgpa1V5+5F7slh18gYM8KeazpiSCoolag+JMIcWkexygijdHgo/+kv6y s8I6S+HHH90xn2YKAJACiQFXIrlkZNLeBSFQ2zf4lazQ3V5wZzL/aF2vZulMoUxmb/4/ HbwsMSLdCJt0mpSbvmAk3W4q/TbLEZZtBs8MFWNGERsyakfU93d026L5K1fY1cnnuEVv 0WWdkomhm5qWWyWnsOZOGISpx32KaWBXfHDwXXl0jWGWxcvQWG8jEqA7YD93JN0vI1hq WKb2b33m6rIRC0g3eSONaakc63Cv9F6lCTA0ENVPr5bMgAoglXOO3rqrYZS5fMjHOC2H vV0w== 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=X77CRMCQDDgdc4Bur39RULXQxF3a/MrJ/qM13TQRcl0=; b=azTPXlqTgxHaUXBwred64uMMtqSV7plAJXNBpKk5Y0w2RB8etW1GMTqMXsWYXayAHL pLa/Mz/dkNCmeqE17MyokgrOIQDZq/QYkThCVZ0GHFmZQJIh2JzU6Gi4xuGv5hilhxRP +y4sDjfbXPvaVb93cR7Y5eUqOPMBvzcCLtQsyKZmxXjaXrkRGyRXKBSMuFvg3hiJApMW RqYe3ldBDd57nVKwL1iFt18OQWgGHnKnfnZFu+6nq6Np7vtEj4cLjNhjDS4U3Xh4s6sF Y3QLPzVOevC7XcjcfvB2rMe5WB32AZCNZCd4+nzbePjjm77B5+ZoHU4rxdxryf8LpoUF bxPA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NYVYUIdX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 4si4522143edh.424.2020.04.26.08.39.00; Sun, 26 Apr 2020 08:39:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NYVYUIdX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726188AbgDZPge (ORCPT + 99 others); Sun, 26 Apr 2020 11:36:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726143AbgDZPgd (ORCPT ); Sun, 26 Apr 2020 11:36:33 -0400 Received: from mail-lj1-x242.google.com (mail-lj1-x242.google.com [IPv6:2a00:1450:4864:20::242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D1C3C09B050 for ; Sun, 26 Apr 2020 08:36:33 -0700 (PDT) Received: by mail-lj1-x242.google.com with SMTP id b2so14882872ljp.4 for ; Sun, 26 Apr 2020 08:36:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=X77CRMCQDDgdc4Bur39RULXQxF3a/MrJ/qM13TQRcl0=; b=NYVYUIdXiXEUEPYYT3I/R1qAnkPPt3cT7aB7wcoSmtGOcWinkwL3B4FAZKsqUsBC+7 EbE20jkfrnneUQiwAC3g3XB+K72YRxyC7g9/b3z8XqRwKEs7Phsfd9nQiLH0aY5a4sPy YpSzGv+bVifsrIV7RfYcYTkf/rKBasnwAMVUHprWphf0HsikZIOwrJ16GBbbvY1+ObKA VGvJ+y7WwtkxvVTJTuf8cZI1zMMyyY+sqfhGajVIPN+M2rDln91qxhZ+ewxRuOrRrKJV mdxDKAYaguUjc/Dg6MV3ccxQP/KAwqmIJPUqWulw+eEM1J2C6XmPJZ5zx39OHRyBhDOK qXyg== 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=X77CRMCQDDgdc4Bur39RULXQxF3a/MrJ/qM13TQRcl0=; b=Mq/gk6ljG+4TDPpBLehddL4OykPmbfLCJVIhzjhuQ9+F2j20Cc4ZkQ4dsNJJf+7zQ4 EMhFFHTBYcwFSyxKQsUb6BqxiugKfbfvQR1Z4ZTA6fAWhU/OSPgDihrHg5crIxnigQjn I5LsMDE0K+aOlbSwH3AM/jpLYp7hp2tf774ldlA7VSlMij2cyMOPyjjT9Pkh7oQhxTqy AcY053LCpCguZNLr1bYVb1GmoMWO7Oz7UQ+HvQEFascVwj+eE+bGmRdPUXxk4Ibcwyb9 dRZhH69+qBtS+12knR17YenKRZrYV716IO1/nskWx/HHRKEcbkV38zqhjDR7Sy3KbsTb 1/8Q== X-Gm-Message-State: AGi0PuaEw7YFQ2hZ3jkOYVh2R1LpPOi8GCgLmz7mn+SyDsDJFUmw/ilI abNICYx1ON/TTffW/UNTUlzW4yVpg+fZB5dmIZzXAQ== X-Received: by 2002:a2e:553:: with SMTP id 80mr11651325ljf.147.1587915391895; Sun, 26 Apr 2020 08:36:31 -0700 (PDT) MIME-Version: 1.0 References: <20200423064808.10468-1-etienne.carriere@linaro.org> <20200423064808.10468-2-etienne.carriere@linaro.org> In-Reply-To: From: Etienne Carriere Date: Sun, 26 Apr 2020 17:36:20 +0200 Message-ID: Subject: Re: [RFC PATCH 1/2] dt-bindings: arm: Add secure-clocks binding description To: Rob Herring Cc: "linux-kernel@vger.kernel.org" , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , devicetree@vger.kernel.org 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 On Sat, 25 Apr 2020 at 00:06, Rob Herring wrote: > > On Thu, Apr 23, 2020 at 1:49 AM Etienne Carriere > wrote: > > > > Describe how clocks property can leverage secure- property prefix > > for clocks handled exclusively or shared by secure and non-secure > > worlds. > > > > Signed-off-by: Etienne Carriere > > --- > > .../devicetree/bindings/arm/secure.txt | 19 +++++++++++++++++++ > > 1 file changed, 19 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/arm/secure.txt b/Documentation/devicetree/bindings/arm/secure.txt > > index f27bbff2c780..9bc94921f2a6 100644 > > --- a/Documentation/devicetree/bindings/arm/secure.txt > > +++ b/Documentation/devicetree/bindings/arm/secure.txt > > @@ -53,6 +53,25 @@ Valid Secure world properties > > status = "disabled"; /* disabled in both */ > > status = "disabled"; secure-status = "disabled"; /* disabled in both */ > > > > +- secure-clocks : specifies the Phandle list secure world shall use > > + for the related clocks whereas property "clocks" specifies the > > + clock Phandle list non-secure shall use for the that clocks. > > + This configuration can apply for example when a hardware clock is > > + shared by the 2 worlds and the hardware implements a specific interface > > + for each world, i.e.: > > + > > + clocks = <&clk DMA_NS>; /* NS relies on clock handle DMA_NS */ > > + secure-clocks = <&clk DMA_S>; /* S relies on clock handle DMA_S */ > > The device has to know what it's clocks are for and should know if > some clocks are secure only. > > > + Another example where use of "clocks" and "secure-clocks" can apply > > + is when hardware implements a clock that secure and non-secure must > > + share, as a shared GPIO bank clock, and secure world relies on clock > > + device driver whereas non-secure world relies on a software service > > + exposed by secure world as SCMI clock device. I.e.: > > + > > + clocks = <&scmi_clk 2>; /* NS relies on SCMI resources */ > > + secure-clocks= <&clk 5>; /* S accesses the SoC reset interfaces */ > > If you have this case, I don't think this is the solution. I don't > think it scales well and you probably need separate DTs. It's > something to solve in the system DT project. Acked, Thanks, Etienne > > Rob