Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: clk: Introduce 'protected-clocks' property

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 <robh+dt@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Taniya Das <tdas@codeaurora.org>
Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>

authored by

Stephen Boyd and committed by
Stephen Boyd
48d7f160 65102238

+16
+16
Documentation/devicetree/bindings/clock/clock-bindings.txt
··· 168 168 169 169 Configuration of common clocks, which affect multiple consumer devices can 170 170 be similarly specified in the clock provider node. 171 + 172 + ==Protected clocks== 173 + 174 + Some platforms or firmwares may not fully expose all the clocks to the OS, such 175 + as in situations where those clks are used by drivers running in ARM secure 176 + execution levels. Such a configuration can be specified in device tree with the 177 + protected-clocks property in the form of a clock specifier list. This property should 178 + only be specified in the node that is providing the clocks being protected: 179 + 180 + clock-controller@a000f000 { 181 + compatible = "vendor,clk95; 182 + reg = <0xa000f000 0x1000> 183 + #clocks-cells = <1>; 184 + ... 185 + protected-clocks = <UART3_CLK>, <SPI5_CLK>; 186 + };