From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bjorn Andersson Subject: Re: [PATCH 1/2] dt-bindings: clk: Introduce 'protected-clocks' property Date: Mon, 5 Nov 2018 17:04:26 -0800 Message-ID: <20181106010426.GX2523@minitux> References: <20181105194011.43770-1-swboyd@chromium.org> <20181105194011.43770-2-swboyd@chromium.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20181105194011.43770-2-swboyd@chromium.org> Sender: linux-kernel-owner@vger.kernel.org To: Stephen Boyd Cc: Stephen Boyd , Michael Turquette , linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Taniya Das List-Id: devicetree@vger.kernel.org On Mon 05 Nov 11:40 PST 2018, Stephen Boyd wrote: > Add a generic clk property for clks which are not intended to be used by > the OS due to security restrictions put in place by firmware. For > example, on some Qualcomm firmwares reading or writing certain clk > registers causes the entire system to reboot, but on other firmwares > reading and writing those same registers is required to make devices > like QSPI work. Rather than adding one-off properties each time a new > set of clks appears to be protected, let's add a generic clk property to > describe any set of clks that shouldn't be touched by the OS. This way > we never need to register the clks or use them in certain firmware > configurations. > > Cc: Rob Herring > Cc: Bjorn Andersson Reviewed-by: Bjorn Andersson Regards, Bjorn > Cc: Taniya Das > Signed-off-by: Stephen Boyd > --- > .../devicetree/bindings/clock/clock-bindings.txt | 16 ++++++++++++++++ > 1 file changed, 16 insertions(+) > > diff --git a/Documentation/devicetree/bindings/clock/clock-bindings.txt b/Documentation/devicetree/bindings/clock/clock-bindings.txt > index 2ec489eebe72..b646bbcf7f92 100644 > --- a/Documentation/devicetree/bindings/clock/clock-bindings.txt > +++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt > @@ -168,3 +168,19 @@ a shared clock is forbidden. > > Configuration of common clocks, which affect multiple consumer devices can > be similarly specified in the clock provider node. > + > +==Protected clocks== > + > +Some platforms or firmwares may not fully expose all the clocks to the OS, such > +as in situations where those clks are used by drivers running in ARM secure > +execution levels. Such a configuration can be specified in device tree with the > +protected-clocks property in the form of a clock specifier list. This property should > +only be specified in the node that is providing the clocks being protected: > + > + clock-controller@a000f000 { > + compatible = "vendor,clk95; > + reg = <0xa000f000 0x1000> > + #clocks-cells = <1>; > + ... > + protected-clocks = , ; > + }; > -- > Sent by a computer through tubes >