1714fc4e6f62403f9ec7bb1308fc39af72b5566f
[openwrt/staging/linusw.git] /
1 From: Devi Priya <quic_devipriy@quicinc.com>
2 Subject: [PATCH] dt-bindings: mfd: qcom,tcsr: Add simple-mfd support for IPQ6018
3 Date: Thu, 5 Oct 2023 21:35:49 +0530
4
5 Update the binding to include pwm as the child node to TCSR block and
6 add simple-mfd support for IPQ6018.
7
8 Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
9 Signed-off-by: Devi Priya <quic_devipriy@quicinc.com>
10 ---
11 .../devicetree/bindings/mfd/qcom,tcsr.yaml | 112 +++++++++++++-----
12 1 file changed, 81 insertions(+), 31 deletions(-)
13
14 --- a/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
15 +++ b/Documentation/devicetree/bindings/mfd/qcom,tcsr.yaml
16 @@ -15,49 +15,101 @@ description:
17
18 properties:
19 compatible:
20 - items:
21 - - enum:
22 - - qcom,msm8976-tcsr
23 - - qcom,msm8998-tcsr
24 - - qcom,qcs404-tcsr
25 - - qcom,sc7180-tcsr
26 - - qcom,sc7280-tcsr
27 - - qcom,sc8280xp-tcsr
28 - - qcom,sdm630-tcsr
29 - - qcom,sdm845-tcsr
30 - - qcom,sdx55-tcsr
31 - - qcom,sdx65-tcsr
32 - - qcom,sm8150-tcsr
33 - - qcom,sm8450-tcsr
34 - - qcom,tcsr-apq8064
35 - - qcom,tcsr-apq8084
36 - - qcom,tcsr-ipq5332
37 - - qcom,tcsr-ipq6018
38 - - qcom,tcsr-ipq8064
39 - - qcom,tcsr-ipq8074
40 - - qcom,tcsr-ipq9574
41 - - qcom,tcsr-mdm9615
42 - - qcom,tcsr-msm8226
43 - - qcom,tcsr-msm8660
44 - - qcom,tcsr-msm8916
45 - - qcom,tcsr-msm8953
46 - - qcom,tcsr-msm8960
47 - - qcom,tcsr-msm8974
48 - - qcom,tcsr-msm8996
49 - - const: syscon
50 + oneOf:
51 + - items:
52 + - enum:
53 + - qcom,msm8976-tcsr
54 + - qcom,msm8998-tcsr
55 + - qcom,qcs404-tcsr
56 + - qcom,sc7180-tcsr
57 + - qcom,sc7280-tcsr
58 + - qcom,sc8280xp-tcsr
59 + - qcom,sdm630-tcsr
60 + - qcom,sdm845-tcsr
61 + - qcom,sdx55-tcsr
62 + - qcom,sdx65-tcsr
63 + - qcom,sm4450-tcsr
64 + - qcom,sm8150-tcsr
65 + - qcom,sm8450-tcsr
66 + - qcom,tcsr-apq8064
67 + - qcom,tcsr-apq8084
68 + - qcom,tcsr-ipq5332
69 + - qcom,tcsr-ipq8064
70 + - qcom,tcsr-ipq8074
71 + - qcom,tcsr-ipq9574
72 + - qcom,tcsr-mdm9615
73 + - qcom,tcsr-msm8226
74 + - qcom,tcsr-msm8660
75 + - qcom,tcsr-msm8916
76 + - qcom,tcsr-msm8953
77 + - qcom,tcsr-msm8960
78 + - qcom,tcsr-msm8974
79 + - qcom,tcsr-msm8996
80 + - const: syscon
81 + - items:
82 + - const: qcom,tcsr-ipq6018
83 + - const: syscon
84 + - const: simple-mfd
85
86 reg:
87 maxItems: 1
88
89 + ranges: true
90 +
91 + "#address-cells":
92 + const: 1
93 +
94 + "#size-cells":
95 + const: 1
96 +
97 +patternProperties:
98 + "pwm@[a-f0-9]+$":
99 + type: object
100 + $ref: /schemas/pwm/qcom,ipq6018-pwm.yaml
101 +
102 +
103 required:
104 - compatible
105 - reg
106
107 +allOf:
108 + - if:
109 + not:
110 + properties:
111 + compatible:
112 + contains:
113 + enum:
114 + - qcom,tcsr-ipq6018
115 + then:
116 + patternProperties:
117 + "pwm@[a-f0-9]+$": false
118 +
119 additionalProperties: false
120
121 examples:
122 + # Example 1 - Syscon node found on MSM8960
123 - |
124 syscon@1a400000 {
125 compatible = "qcom,tcsr-msm8960", "syscon";
126 reg = <0x1a400000 0x100>;
127 };
128 + # Example 2 - Syscon node found on IPQ6018
129 + - |
130 + #include <dt-bindings/clock/qcom,gcc-ipq6018.h>
131 +
132 + syscon@1937000 {
133 + compatible = "qcom,tcsr-ipq6018", "syscon", "simple-mfd";
134 + reg = <0x01937000 0x21000>;
135 + ranges = <0 0x1937000 0x21000>;
136 + #address-cells = <1>;
137 + #size-cells = <1>;
138 +
139 + pwm: pwm@a010 {
140 + compatible = "qcom,ipq6018-pwm";
141 + reg = <0xa010 0x20>;
142 + clocks = <&gcc GCC_ADSS_PWM_CLK>;
143 + assigned-clocks = <&gcc GCC_ADSS_PWM_CLK>;
144 + assigned-clock-rates = <100000000>;
145 + #pwm-cells = <2>;
146 + };
147 + };
148 \ No newline at end of file