From patchwork Mon Nov 5 19:40:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 10669063 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CCE3118FD for ; Mon, 5 Nov 2018 19:40:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF50429B33 for ; Mon, 5 Nov 2018 19:40:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B395029B87; Mon, 5 Nov 2018 19:40:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6479F29BCE for ; Mon, 5 Nov 2018 19:40:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726945AbeKFFB3 (ORCPT ); Tue, 6 Nov 2018 00:01:29 -0500 Received: from mail-pl1-f196.google.com ([209.85.214.196]:43828 "EHLO mail-pl1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726608AbeKFFB2 (ORCPT ); Tue, 6 Nov 2018 00:01:28 -0500 Received: by mail-pl1-f196.google.com with SMTP id g59-v6so4942679plb.10 for ; Mon, 05 Nov 2018 11:40:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=YXYamjpF54xPI4xprjmDSNKifg3b2CSoDvPVO1+NKHw=; b=T8eSztBh3tK92GEomtjwPwnFqQIo8ELCfddp4DE7oOc8pqedXR61DAlPlHPBDtEeoq PsRBbgLBs7J8bL9q0N/qoYseN4XGSPUvHloxF7vZvGavxGszbFokcRZGy8/5BZ/Qd59z vTzTb6Sn/Q8vKWxtMVh0fFGhwsQmT9WqzaR8s= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=YXYamjpF54xPI4xprjmDSNKifg3b2CSoDvPVO1+NKHw=; b=q6dlIVNyq6uhkDaHSBkK8huYLBH8nhhl+aN1+r4rvfZ/ZzYwnZkcM+sNavqLSHlGCF xWoWsAR9yaIFeikA15FWr+Bpt2rCfGuLDoj+qo38wpQ1AaokqN2okj0s3RPFNw9h0BIp sKz2D47RtZTMkI+2gKish/sw7uLbghVsmsZqjqWKku1oQqJP2/JAyX5Q53B/QnhpMJJ0 lZtoOIdBc1U9vKrTagSWQD8yBag4pldACuNUep7Tu9iN3iyFvgwod1ikCj9iHXmuV+rw 84Y0Ignuo2MNs3q+BcLSX2qF67A8ttvMKBtQumH+6Y2NM9JEErghKKP18fgVaFho+qnI Wa7Q== X-Gm-Message-State: AGRZ1gLTBVxC5zhwlb3rNj9mJ6dwEG6C/giVN9CdgZFAB1bo1CEptVYk 2ueh8Pma+sbPYUO3hXEVYU0G2A== X-Google-Smtp-Source: AJdET5cj0j7v5OtsgSRptBWwCiht9C8Arc1XOuMdP3efF4vqzYCkYl8YpJN7P1QU4wqYF82gcjZaAg== X-Received: by 2002:a17:902:4083:: with SMTP id c3-v6mr23548669pld.181.1541446815360; Mon, 05 Nov 2018 11:40:15 -0800 (PST) Received: from smtp.gmail.com ([2620:15c:202:1:fed3:9637:a13a:6c15]) by smtp.gmail.com with ESMTPSA id q25sm700728pgb.2.2018.11.05.11.40.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Nov 2018 11:40:14 -0800 (PST) From: Stephen Boyd To: Stephen Boyd , Michael Turquette Cc: linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Rob Herring , Bjorn Andersson , Taniya Das Subject: [PATCH 1/2] dt-bindings: clk: Introduce 'protected-clocks' property Date: Mon, 5 Nov 2018 11:40:10 -0800 Message-Id: <20181105194011.43770-2-swboyd@chromium.org> X-Mailer: git-send-email 2.19.1.930.g4563a0d9d0-goog In-Reply-To: <20181105194011.43770-1-swboyd@chromium.org> References: <20181105194011.43770-1-swboyd@chromium.org> MIME-Version: 1.0 Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Cc: Taniya Das Signed-off-by: Stephen Boyd Reviewed-by: Bjorn Andersson --- .../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 = , ; + };