Skip to content

Commit afd7b4d

Browse files
Ansuelandersson
authored andcommitted
dt-bindings: arm: msm: Rework kpss-gcc driver Documentation to yaml
Rework kpss-gcc driver Documentation to yaml Documentation and move it to clock as it's a clock-controller. The current kpss-gcc Documentation have major problems and can't be converted directly. Introduce various changes to the original Documentation. Add #clock-cells additional binding as this clock outputs a static clk named acpu_l2_aux with supported compatible. Only some compatible require and outputs a clock, for the others, set only the reg as a required binding to correctly export the kpss-gcc registers. As the reg is shared also add the required syscon compatible. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20230116204751.23045-4-ansuelsmth@gmail.com
1 parent 4260ddf commit afd7b4d

2 files changed

Lines changed: 88 additions & 44 deletions

File tree

Documentation/devicetree/bindings/arm/msm/qcom,kpss-gcc.txt

Lines changed: 0 additions & 44 deletions
This file was deleted.
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
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,kpss-gcc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Krait Processor Sub-system (KPSS) Global Clock Controller (GCC)
8+
9+
maintainers:
10+
- Christian Marangi <ansuelsmth@gmail.com>
11+
12+
description:
13+
Krait Processor Sub-system (KPSS) Global Clock Controller (GCC). Used
14+
to control L2 mux (in the current implementation) and provide access
15+
to the kpss-gcc registers.
16+
17+
properties:
18+
compatible:
19+
items:
20+
- enum:
21+
- qcom,kpss-gcc-ipq8064
22+
- qcom,kpss-gcc-apq8064
23+
- qcom,kpss-gcc-msm8974
24+
- qcom,kpss-gcc-msm8960
25+
- qcom,kpss-gcc-msm8660
26+
- qcom,kpss-gcc-mdm9615
27+
- const: qcom,kpss-gcc
28+
- const: syscon
29+
30+
reg:
31+
maxItems: 1
32+
33+
clocks:
34+
minItems: 2
35+
maxItems: 2
36+
37+
clock-names:
38+
items:
39+
- const: pll8_vote
40+
- const: pxo
41+
42+
'#clock-cells':
43+
const: 0
44+
45+
required:
46+
- compatible
47+
- reg
48+
49+
if:
50+
properties:
51+
compatible:
52+
contains:
53+
enum:
54+
- qcom,kpss-gcc-ipq8064
55+
- qcom,kpss-gcc-apq8064
56+
- qcom,kpss-gcc-msm8974
57+
- qcom,kpss-gcc-msm8960
58+
then:
59+
required:
60+
- clocks
61+
- clock-names
62+
- '#clock-cells'
63+
else:
64+
properties:
65+
clock: false
66+
clock-names: false
67+
'#clock-cells': false
68+
69+
additionalProperties: false
70+
71+
examples:
72+
- |
73+
#include <dt-bindings/clock/qcom,gcc-ipq806x.h>
74+
75+
clock-controller@2011000 {
76+
compatible = "qcom,kpss-gcc-ipq8064", "qcom,kpss-gcc", "syscon";
77+
reg = <0x2011000 0x1000>;
78+
clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
79+
clock-names = "pll8_vote", "pxo";
80+
#clock-cells = <0>;
81+
};
82+
83+
- |
84+
clock-controller@2011000 {
85+
compatible = "qcom,kpss-gcc-mdm9615", "qcom,kpss-gcc", "syscon";
86+
reg = <0x02011000 0x1000>;
87+
};
88+
...

0 commit comments

Comments
 (0)