Skip to content

Commit 381cc6f

Browse files
Taniya Dasbebarino
authored andcommitted
dt-bindings: clock: Add YAML schemas for LPASS clocks on SC7180
The LPASS(Low Power Audio Subsystem) clock provider have a bunch of generic properties that are needed in a device tree. Also add clock ids for GCC LPASS and LPASS Core clock IDs for LPASS client to request for the clocks. Signed-off-by: Taniya Das <tdas@codeaurora.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/1595606878-2664-3-git-send-email-tdas@codeaurora.org Signed-off-by: Stephen Boyd <sboyd@kernel.org>
1 parent 1737229 commit 381cc6f

3 files changed

Lines changed: 132 additions & 0 deletions

File tree

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/clock/qcom,sc7180-lpasscorecc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm LPASS Core Clock Controller Binding for SC7180
8+
9+
maintainers:
10+
- Taniya Das <tdas@codeaurora.org>
11+
12+
description: |
13+
Qualcomm LPASS core clock control module which supports the clocks and
14+
power domains on SC7180.
15+
16+
See also:
17+
- dt-bindings/clock/qcom,lpasscorecc-sc7180.h
18+
19+
properties:
20+
compatible:
21+
enum:
22+
- qcom,sc7180-lpasshm
23+
- qcom,sc7180-lpasscorecc
24+
25+
clocks:
26+
items:
27+
- description: gcc_lpass_sway clock from GCC
28+
29+
clock-names:
30+
items:
31+
- const: iface
32+
33+
power-domains:
34+
maxItems: 1
35+
36+
'#clock-cells':
37+
const: 1
38+
39+
'#power-domain-cells':
40+
const: 1
41+
42+
reg:
43+
minItems: 1
44+
items:
45+
- description: lpass core cc register
46+
- description: lpass audio cc register
47+
48+
reg-names:
49+
items:
50+
- const: lpass_core_cc
51+
- const: lpass_audio_cc
52+
53+
if:
54+
properties:
55+
compatible:
56+
contains:
57+
const: qcom,sc7180-lpasshm
58+
then:
59+
properties:
60+
reg:
61+
maxItems: 1
62+
63+
else:
64+
properties:
65+
reg:
66+
minItems: 2
67+
68+
required:
69+
- compatible
70+
- reg
71+
- clocks
72+
- clock-names
73+
- '#clock-cells'
74+
- '#power-domain-cells'
75+
76+
additionalProperties: false
77+
78+
examples:
79+
- |
80+
#include <dt-bindings/clock/qcom,gcc-sc7180.h>
81+
#include <dt-bindings/clock/qcom,lpasscorecc-sc7180.h>
82+
clock-controller@63000000 {
83+
compatible = "qcom,sc7180-lpasshm";
84+
reg = <0x63000000 0x28>;
85+
clocks = <&gcc GCC_LPASS_CFG_NOC_SWAY_CLK>;
86+
clock-names = "iface";
87+
#clock-cells = <1>;
88+
#power-domain-cells = <1>;
89+
};
90+
91+
- |
92+
clock-controller@62d00000 {
93+
compatible = "qcom,sc7180-lpasscorecc";
94+
reg = <0x62d00000 0x50000>, <0x62780000 0x30000>;
95+
reg-names = "lpass_core_cc", "lpass_audio_cc";
96+
clocks = <&gcc GCC_LPASS_CFG_NOC_SWAY_CLK>;
97+
clock-names = "iface";
98+
power-domains = <&lpass_hm LPASS_CORE_HM_GDSCR>;
99+
#clock-cells = <1>;
100+
#power-domain-cells = <1>;
101+
};
102+
...

‎include/dt-bindings/clock/qcom,gcc-sc7180.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@
138138
#define GCC_MSS_Q6_MEMNOC_AXI_CLK 128
139139
#define GCC_MSS_SNOC_AXI_CLK 129
140140
#define GCC_SEC_CTRL_CLK_SRC 130
141+
#define GCC_LPASS_CFG_NOC_SWAY_CLK 131
141142

142143
/* GCC resets */
143144
#define GCC_QUSB2PHY_PRIM_BCR 0
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/* SPDX-License-Identifier: GPL-2.0-only */
2+
/*
3+
* Copyright (c) 2020, The Linux Foundation. All rights reserved.
4+
*/
5+
6+
#ifndef _DT_BINDINGS_CLK_QCOM_LPASS_CORE_CC_SC7180_H
7+
#define _DT_BINDINGS_CLK_QCOM_LPASS_CORE_CC_SC7180_H
8+
9+
/* LPASS_CORE_CC clocks */
10+
#define LPASS_LPAAUDIO_DIG_PLL 0
11+
#define LPASS_LPAAUDIO_DIG_PLL_OUT_ODD 1
12+
#define CORE_CLK_SRC 2
13+
#define EXT_MCLK0_CLK_SRC 3
14+
#define LPAIF_PRI_CLK_SRC 4
15+
#define LPAIF_SEC_CLK_SRC 5
16+
#define LPASS_AUDIO_CORE_CORE_CLK 6
17+
#define LPASS_AUDIO_CORE_EXT_MCLK0_CLK 7
18+
#define LPASS_AUDIO_CORE_LPAIF_PRI_IBIT_CLK 8
19+
#define LPASS_AUDIO_CORE_LPAIF_SEC_IBIT_CLK 9
20+
#define LPASS_AUDIO_CORE_SYSNOC_MPORT_CORE_CLK 10
21+
22+
/* LPASS Core power domains */
23+
#define LPASS_CORE_HM_GDSCR 0
24+
25+
/* LPASS Audio power domains */
26+
#define LPASS_AUDIO_HM_GDSCR 0
27+
#define LPASS_PDC_HM_GDSCR 1
28+
29+
#endif

0 commit comments

Comments
 (0)