Skip to content

Commit

Permalink
dt-bindings: clock: Add YAML schemas for the QCOM MSS clock bindings
Browse files Browse the repository at this point in the history
The Modem Subsystem clock provider have a bunch of generic properties
that are needed in a device tree. Add a YAML schemas for those.

Add clock ids for GCC MSS and MSS clocks which are required to bring
the modem out of reset.

Signed-off-by: Taniya Das <tdas@codeaurora.org>
Link: https://lkml.kernel.org/r/1584596131-22741-2-git-send-email-tdas@codeaurora.org
Reviewed-by: Rob Herring <robh@kernel.org>
Tested-by: Sibi Sankar <sibis@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
  • Loading branch information
Taniya Das authored and Stephen Boyd committed Mar 20, 2020
1 parent eec1527 commit 53624f9
Show file tree
Hide file tree
Showing 3 changed files with 80 additions and 1 deletion.
62 changes: 62 additions & 0 deletions Documentation/devicetree/bindings/clock/qcom,sc7180-mss.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/qcom,sc7180-mss.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Modem Clock Controller Binding for SC7180

maintainers:
- Taniya Das <tdas@codeaurora.org>

description: |
Qualcomm modem clock control module which supports the clocks on SC7180.
See also:
- dt-bindings/clock/qcom,mss-sc7180.h
properties:
compatible:
const: qcom,sc7180-mss

clocks:
items:
- description: gcc_mss_mfab_axi clock from GCC
- description: gcc_mss_nav_axi clock from GCC
- description: gcc_mss_cfg_ahb clock from GCC

clock-names:
items:
- const: gcc_mss_mfab_axis
- const: gcc_mss_nav_axi
- const: cfg_ahb

'#clock-cells':
const: 1

reg:
maxItems: 1

required:
- compatible
- reg
- clocks
- '#clock-cells'

additionalProperties: false

examples:
- |
#include <dt-bindings/clock/qcom,gcc-sc7180.h>
clock-controller@41a8000 {
compatible = "qcom,sc7180-mss";
reg = <0 0x041a8000 0 0x8000>;
clocks = <&gcc GCC_MSS_MFAB_AXIS_CLK>,
<&gcc GCC_MSS_NAV_AXI_CLK>,
<&gcc GCC_MSS_CFG_AHB_CLK>;
clock-names = "gcc_mss_mfab_axis",
"gcc_mss_nav_axi",
"cfg_ahb";
#clock-cells = <1>;
};
...
7 changes: 6 additions & 1 deletion include/dt-bindings/clock/qcom,gcc-sc7180.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2019, The Linux Foundation. All rights reserved.
* Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
*/

#ifndef _DT_BINDINGS_CLK_QCOM_GCC_SC7180_H
Expand Down Expand Up @@ -132,6 +132,11 @@
#define GCC_VIDEO_GPLL0_DIV_CLK_SRC 122
#define GCC_VIDEO_THROTTLE_AXI_CLK 123
#define GCC_VIDEO_XO_CLK 124
#define GCC_MSS_CFG_AHB_CLK 125
#define GCC_MSS_MFAB_AXIS_CLK 126
#define GCC_MSS_NAV_AXI_CLK 127
#define GCC_MSS_Q6_MEMNOC_AXI_CLK 128
#define GCC_MSS_SNOC_AXI_CLK 129

/* GCC resets */
#define GCC_QUSB2PHY_PRIM_BCR 0
Expand Down
12 changes: 12 additions & 0 deletions include/dt-bindings/clock/qcom,mss-sc7180.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
*/

#ifndef _DT_BINDINGS_CLK_QCOM_MSS_SC7180_H
#define _DT_BINDINGS_CLK_QCOM_MSS_SC7180_H

#define MSS_AXI_CRYPTO_CLK 0
#define MSS_AXI_NAV_CLK 1

#endif

0 comments on commit 53624f9

Please sign in to comment.