* [PATCH v4 0/4] initial clock support for exynosauto v920 SoC
[not found] <CGME20240722223340epcas2p380657369f0b57c9e21f05f250066a711@epcas2p3.samsung.com>
@ 2024-07-22 22:33 ` Sunyeal Hong
2024-07-22 22:33 ` [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings Sunyeal Hong
` (3 more replies)
0 siblings, 4 replies; 23+ messages in thread
From: Sunyeal Hong @ 2024-07-22 22:33 UTC (permalink / raw)
To: Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
Alim Akhtar, Michael Turquette, Stephen Boyd, Rob Herring,
Conor Dooley
Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
linux-kernel, Sunyeal Hong
This patchset adds initial clock driver support for Exynos Auto v920 SoC.
This driver uses HW Auto Clock gating. So all gate clocks did not register.
Below CMU blocks are supported in this patchset and remains will be
implemented later.
- CMU_TOP
- CMU_PERIC0
Changes in v4:
- Change PLL_531x fdiv type and mask bit
- Change PLL_531x mdiv type
Changes in v3:
- Change SoC name from Exynos Auto to ExynosAuto
- Change the makefile order to the bottom of exynosautov9
- Add PLL_531x formula for integer PLL
Changes in v2:
- Fix typo from v209 to v920
- Change USI clock to appropriate
- Merge headers into binding patches
- Change clock-name to the recommended name
Sunyeal Hong (4):
dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
arm64: dts: exynos: add initial CMU clock nodes in ExynosAuto v920
clk: samsung: clk-pll: Add support for pll_531x
clk: samsung: add top clock support for ExynosAuto v920 SoC
.../clock/samsung,exynosautov920-clock.yaml | 115 ++
.../arm64/boot/dts/exynos/exynosautov920.dtsi | 40 +-
drivers/clk/samsung/Makefile | 1 +
drivers/clk/samsung/clk-exynosautov920.c | 1173 +++++++++++++++++
drivers/clk/samsung/clk-pll.c | 44 +
drivers/clk/samsung/clk-pll.h | 1 +
.../clock/samsung,exynosautov920.h | 191 +++
7 files changed, 1552 insertions(+), 13 deletions(-)
create mode 100644 Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
create mode 100644 drivers/clk/samsung/clk-exynosautov920.c
create mode 100644 include/dt-bindings/clock/samsung,exynosautov920.h
--
2.45.2
^ permalink raw reply [flat|nested] 23+ messages in thread
* [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-22 22:33 ` [PATCH v4 0/4] initial clock support for exynosauto v920 SoC Sunyeal Hong
@ 2024-07-22 22:33 ` Sunyeal Hong
2024-07-23 20:57 ` Rob Herring
2024-07-24 10:12 ` Krzysztof Kozlowski
2024-07-22 22:33 ` [PATCH v4 2/4] arm64: dts: exynos: add initial CMU clock nodes in ExynosAuto v920 Sunyeal Hong
` (2 subsequent siblings)
3 siblings, 2 replies; 23+ messages in thread
From: Sunyeal Hong @ 2024-07-22 22:33 UTC (permalink / raw)
To: Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
Alim Akhtar, Michael Turquette, Stephen Boyd, Rob Herring,
Conor Dooley
Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
linux-kernel, Sunyeal Hong
Add dt-schema for ExynosAuto v920 SoC clock controller.
Add device tree clock binding definitions for below CMU blocks.
- CMU_TOP
- CMU_PERIC0
Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
---
.../clock/samsung,exynosautov920-clock.yaml | 115 +++++++++++
.../clock/samsung,exynosautov920.h | 191 ++++++++++++++++++
2 files changed, 306 insertions(+)
create mode 100644 Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
create mode 100644 include/dt-bindings/clock/samsung,exynosautov920.h
diff --git a/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
new file mode 100644
index 000000000000..90f9f17da959
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
@@ -0,0 +1,115 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/samsung,exynosautov920-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Samsung ExynosAuto v920 SoC clock controller
+
+maintainers:
+ - Sunyeal Hong <sunyeal.hong@samsung.com>
+ - Chanwoo Choi <cw00.choi@samsung.com>
+ - Krzysztof Kozlowski <krzk@kernel.org>
+ - Sylwester Nawrocki <s.nawrocki@samsung.com>
+
+description: |
+ ExynosAuto v920 clock controller is comprised of several CMU units, generating
+ clocks for different domains. Those CMU units are modeled as separate device
+ tree nodes, and might depend on each other. Root clocks in that clock tree are
+ two external clocks:: OSCCLK/XTCXO (38.4 MHz) and RTCCLK/XrtcXTI (32768 Hz).
+ The external OSCCLK must be defined as fixed-rate clock in dts.
+
+ CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
+ dividers; all other clocks of function blocks (other CMUs) are usually
+ derived from CMU_TOP.
+
+ Each clock is assigned an identifier and client nodes can use this identifier
+ to specify the clock which they consume. All clocks available for usage
+ in clock consumer nodes are defined as preprocessor macros in
+ 'include/dt-bindings/clock/samsung,exynosautov920.h' header.
+
+properties:
+ compatible:
+ enum:
+ - samsung,exynosautov920-cmu-top
+ - samsung,exynosautov920-cmu-peric0
+
+ clocks:
+ minItems: 1
+ maxItems: 3
+
+ clock-names:
+ minItems: 1
+ maxItems: 3
+
+ "#clock-cells":
+ const: 1
+
+ reg:
+ maxItems: 1
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: samsung,exynosautov920-cmu-top
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: External reference clock (38.4 MHz)
+
+ clock-names:
+ items:
+ - const: oscclk
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: samsung,exynosautov920-cmu-peric0
+
+ then:
+ properties:
+ clocks:
+ items:
+ - description: External reference clock (38.4 MHz)
+ - description: CMU_PERIC0 NOC clock (from CMU_TOP)
+ - description: CMU_PERIC0 IP clock (from CMU_TOP)
+
+ clock-names:
+ items:
+ - const: oscclk
+ - const: noc
+ - const: ip
+
+required:
+ - compatible
+ - "#clock-cells"
+ - clocks
+ - clock-names
+ - reg
+
+additionalProperties: false
+
+examples:
+ # Clock controller node for CMU_PERIC0
+ - |
+ #include <dt-bindings/clock/samsung,exynosautov920.h>
+
+ cmu_peric0: clock-controller@10800000 {
+ compatible = "samsung,exynosautov920-cmu-peric0";
+ reg = <0x10800000 0x8000>;
+ #clock-cells = <1>;
+
+ clocks = <&xtcxo>,
+ <&cmu_top DOUT_CLKCMU_PERIC0_NOC>,
+ <&cmu_top DOUT_CLKCMU_PERIC0_IP>;
+ clock-names = "oscclk",
+ "noc",
+ "ip";
+ };
+
+...
diff --git a/include/dt-bindings/clock/samsung,exynosautov920.h b/include/dt-bindings/clock/samsung,exynosautov920.h
new file mode 100644
index 000000000000..ad89728a4396
--- /dev/null
+++ b/include/dt-bindings/clock/samsung,exynosautov920.h
@@ -0,0 +1,191 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Author: Sunyeal Hong <sunyeal.hong@samsung.com>
+ *
+ * Device Tree binding constants for ExynosAuto v920 clock controller.
+ */
+
+#ifndef _DT_BINDINGS_CLOCK_EXYNOSAUTOV920_H
+#define _DT_BINDINGS_CLOCK_EXYNOSAUTOV920_H
+
+/* CMU_TOP */
+#define FOUT_SHARED0_PLL 1
+#define FOUT_SHARED1_PLL 2
+#define FOUT_SHARED2_PLL 3
+#define FOUT_SHARED3_PLL 4
+#define FOUT_SHARED4_PLL 5
+#define FOUT_SHARED5_PLL 6
+#define FOUT_MMC_PLL 7
+
+/* MUX in CMU_TOP */
+#define MOUT_SHARED0_PLL 101
+#define MOUT_SHARED1_PLL 102
+#define MOUT_SHARED2_PLL 103
+#define MOUT_SHARED3_PLL 104
+#define MOUT_SHARED4_PLL 105
+#define MOUT_SHARED5_PLL 106
+#define MOUT_MMC_PLL 107
+#define MOUT_CLKCMU_CMU_BOOST 108
+#define MOUT_CLKCMU_CMU_CMUREF 109
+#define MOUT_CLKCMU_ACC_NOC 110
+#define MOUT_CLKCMU_ACC_ORB 111
+#define MOUT_CLKCMU_APM_NOC 112
+#define MOUT_CLKCMU_AUD_CPU 113
+#define MOUT_CLKCMU_AUD_NOC 114
+#define MOUT_CLKCMU_CPUCL0_SWITCH 115
+#define MOUT_CLKCMU_CPUCL0_CLUSTER 116
+#define MOUT_CLKCMU_CPUCL0_DBG 117
+#define MOUT_CLKCMU_CPUCL1_SWITCH 118
+#define MOUT_CLKCMU_CPUCL1_CLUSTER 119
+#define MOUT_CLKCMU_CPUCL2_SWITCH 120
+#define MOUT_CLKCMU_CPUCL2_CLUSTER 121
+#define MOUT_CLKCMU_DNC_NOC 122
+#define MOUT_CLKCMU_DPTX_NOC 123
+#define MOUT_CLKCMU_DPTX_DPGTC 124
+#define MOUT_CLKCMU_DPTX_DPOSC 125
+#define MOUT_CLKCMU_DPUB_NOC 126
+#define MOUT_CLKCMU_DPUB_DSIM 127
+#define MOUT_CLKCMU_DPUF0_NOC 128
+#define MOUT_CLKCMU_DPUF1_NOC 129
+#define MOUT_CLKCMU_DPUF2_NOC 130
+#define MOUT_CLKCMU_DSP_NOC 131
+#define MOUT_CLKCMU_G3D_SWITCH 132
+#define MOUT_CLKCMU_G3D_NOCP 133
+#define MOUT_CLKCMU_GNPU_NOC 134
+#define MOUT_CLKCMU_HSI0_NOC 135
+#define MOUT_CLKCMU_HSI1_NOC 136
+#define MOUT_CLKCMU_HSI1_USBDRD 137
+#define MOUT_CLKCMU_HSI1_MMC_CARD 138
+#define MOUT_CLKCMU_HSI2_NOC 139
+#define MOUT_CLKCMU_HSI2_NOC_UFS 140
+#define MOUT_CLKCMU_HSI2_UFS_EMBD 141
+#define MOUT_CLKCMU_HSI2_ETHERNET 142
+#define MOUT_CLKCMU_ISP_NOC 143
+#define MOUT_CLKCMU_M2M_NOC 144
+#define MOUT_CLKCMU_M2M_JPEG 145
+#define MOUT_CLKCMU_MFC_MFC 146
+#define MOUT_CLKCMU_MFC_WFD 147
+#define MOUT_CLKCMU_MFD_NOC 148
+#define MOUT_CLKCMU_MIF_SWITCH 149
+#define MOUT_CLKCMU_MIF_NOCP 150
+#define MOUT_CLKCMU_MISC_NOC 151
+#define MOUT_CLKCMU_NOCL0_NOC 152
+#define MOUT_CLKCMU_NOCL1_NOC 153
+#define MOUT_CLKCMU_NOCL2_NOC 154
+#define MOUT_CLKCMU_PERIC0_NOC 155
+#define MOUT_CLKCMU_PERIC0_IP 156
+#define MOUT_CLKCMU_PERIC1_NOC 157
+#define MOUT_CLKCMU_PERIC1_IP 158
+#define MOUT_CLKCMU_SDMA_NOC 159
+#define MOUT_CLKCMU_SNW_NOC 160
+#define MOUT_CLKCMU_SSP_NOC 161
+#define MOUT_CLKCMU_TAA_NOC 162
+
+/* DIV in CMU_TOP */
+#define DOUT_SHARED0_DIV1 201
+#define DOUT_SHARED0_DIV2 202
+#define DOUT_SHARED0_DIV3 203
+#define DOUT_SHARED0_DIV4 204
+#define DOUT_SHARED1_DIV1 205
+#define DOUT_SHARED1_DIV2 206
+#define DOUT_SHARED1_DIV3 207
+#define DOUT_SHARED1_DIV4 208
+#define DOUT_SHARED2_DIV1 209
+#define DOUT_SHARED2_DIV2 210
+#define DOUT_SHARED2_DIV3 211
+#define DOUT_SHARED2_DIV4 212
+#define DOUT_SHARED3_DIV1 213
+#define DOUT_SHARED3_DIV2 214
+#define DOUT_SHARED3_DIV3 215
+#define DOUT_SHARED3_DIV4 216
+#define DOUT_SHARED4_DIV1 217
+#define DOUT_SHARED4_DIV2 218
+#define DOUT_SHARED4_DIV3 219
+#define DOUT_SHARED4_DIV4 220
+#define DOUT_SHARED5_DIV1 221
+#define DOUT_SHARED5_DIV2 222
+#define DOUT_SHARED5_DIV3 223
+#define DOUT_SHARED5_DIV4 224
+#define DOUT_CLKCMU_CMU_BOOST 225
+#define DOUT_CLKCMU_ACC_NOC 226
+#define DOUT_CLKCMU_ACC_ORB 227
+#define DOUT_CLKCMU_APM_NOC 228
+#define DOUT_CLKCMU_AUD_CPU 229
+#define DOUT_CLKCMU_AUD_NOC 230
+#define DOUT_CLKCMU_CPUCL0_SWITCH 231
+#define DOUT_CLKCMU_CPUCL0_CLUSTER 232
+#define DOUT_CLKCMU_CPUCL0_DBG 233
+#define DOUT_CLKCMU_CPUCL1_SWITCH 234
+#define DOUT_CLKCMU_CPUCL1_CLUSTER 235
+#define DOUT_CLKCMU_CPUCL2_SWITCH 236
+#define DOUT_CLKCMU_CPUCL2_CLUSTER 237
+#define DOUT_CLKCMU_DNC_NOC 238
+#define DOUT_CLKCMU_DPTX_NOC 239
+#define DOUT_CLKCMU_DPTX_DPGTC 240
+#define DOUT_CLKCMU_DPTX_DPOSC 241
+#define DOUT_CLKCMU_DPUB_NOC 242
+#define DOUT_CLKCMU_DPUB_DSIM 243
+#define DOUT_CLKCMU_DPUF0_NOC 244
+#define DOUT_CLKCMU_DPUF1_NOC 245
+#define DOUT_CLKCMU_DPUF2_NOC 246
+#define DOUT_CLKCMU_DSP_NOC 247
+#define DOUT_CLKCMU_G3D_SWITCH 248
+#define DOUT_CLKCMU_G3D_NOCP 249
+#define DOUT_CLKCMU_GNPU_NOC 250
+#define DOUT_CLKCMU_HSI0_NOC 251
+#define DOUT_CLKCMU_HSI1_NOC 252
+#define DOUT_CLKCMU_HSI1_USBDRD 253
+#define DOUT_CLKCMU_HSI1_MMC_CARD 254
+#define DOUT_CLKCMU_HSI2_NOC 255
+#define DOUT_CLKCMU_HSI2_NOC_UFS 256
+#define DOUT_CLKCMU_HSI2_UFS_EMBD 257
+#define DOUT_CLKCMU_HSI2_ETHERNET 258
+#define DOUT_CLKCMU_ISP_NOC 259
+#define DOUT_CLKCMU_M2M_NOC 260
+#define DOUT_CLKCMU_M2M_JPEG 261
+#define DOUT_CLKCMU_MFC_MFC 262
+#define DOUT_CLKCMU_MFC_WFD 263
+#define DOUT_CLKCMU_MFD_NOC 264
+#define DOUT_CLKCMU_MIF_NOCP 265
+#define DOUT_CLKCMU_MISC_NOC 266
+#define DOUT_CLKCMU_NOCL0_NOC 267
+#define DOUT_CLKCMU_NOCL1_NOC 268
+#define DOUT_CLKCMU_NOCL2_NOC 269
+#define DOUT_CLKCMU_PERIC0_NOC 270
+#define DOUT_CLKCMU_PERIC0_IP 271
+#define DOUT_CLKCMU_PERIC1_NOC 272
+#define DOUT_CLKCMU_PERIC1_IP 273
+#define DOUT_CLKCMU_SDMA_NOC 274
+#define DOUT_CLKCMU_SNW_NOC 275
+#define DOUT_CLKCMU_SSP_NOC 276
+#define DOUT_CLKCMU_TAA_NOC 277
+
+/* CMU_PERIC0 */
+#define CLK_MOUT_PERIC0_IP_USER 1
+#define CLK_MOUT_PERIC0_NOC_USER 2
+#define CLK_MOUT_PERIC0_USI00_USI 3
+#define CLK_MOUT_PERIC0_USI01_USI 4
+#define CLK_MOUT_PERIC0_USI02_USI 5
+#define CLK_MOUT_PERIC0_USI03_USI 6
+#define CLK_MOUT_PERIC0_USI04_USI 7
+#define CLK_MOUT_PERIC0_USI05_USI 8
+#define CLK_MOUT_PERIC0_USI06_USI 9
+#define CLK_MOUT_PERIC0_USI07_USI 10
+#define CLK_MOUT_PERIC0_USI08_USI 11
+#define CLK_MOUT_PERIC0_USI_I2C 12
+#define CLK_MOUT_PERIC0_I3C 13
+
+#define CLK_DOUT_PERIC0_USI00_USI 14
+#define CLK_DOUT_PERIC0_USI01_USI 15
+#define CLK_DOUT_PERIC0_USI02_USI 16
+#define CLK_DOUT_PERIC0_USI03_USI 17
+#define CLK_DOUT_PERIC0_USI04_USI 18
+#define CLK_DOUT_PERIC0_USI05_USI 19
+#define CLK_DOUT_PERIC0_USI06_USI 20
+#define CLK_DOUT_PERIC0_USI07_USI 21
+#define CLK_DOUT_PERIC0_USI08_USI 22
+#define CLK_DOUT_PERIC0_USI_I2C 23
+#define CLK_DOUT_PERIC0_I3C 24
+
+#endif /* _DT_BINDINGS_CLOCK_EXYNOSAUTOV920_H */
--
2.45.2
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v4 2/4] arm64: dts: exynos: add initial CMU clock nodes in ExynosAuto v920
2024-07-22 22:33 ` [PATCH v4 0/4] initial clock support for exynosauto v920 SoC Sunyeal Hong
2024-07-22 22:33 ` [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings Sunyeal Hong
@ 2024-07-22 22:33 ` Sunyeal Hong
2024-07-24 10:13 ` Krzysztof Kozlowski
2024-07-24 11:17 ` Tudor Ambarus
2024-07-22 22:33 ` [PATCH v4 3/4] clk: samsung: clk-pll: Add support for pll_531x Sunyeal Hong
2024-07-22 22:33 ` [PATCH v4 4/4] clk: samsung: add top clock support for ExynosAuto v920 SoC Sunyeal Hong
3 siblings, 2 replies; 23+ messages in thread
From: Sunyeal Hong @ 2024-07-22 22:33 UTC (permalink / raw)
To: Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
Alim Akhtar, Michael Turquette, Stephen Boyd, Rob Herring,
Conor Dooley
Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
linux-kernel, Sunyeal Hong
Add cmu_top, cmu_peric0 clock nodes and
switch USI clocks instead of dummy fixed-rate-clock.
Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
---
.../arm64/boot/dts/exynos/exynosautov920.dtsi | 40 +++++++++++++------
1 file changed, 27 insertions(+), 13 deletions(-)
diff --git a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
index c1c8566d74f5..54fc32074379 100644
--- a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
+++ b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
@@ -6,6 +6,7 @@
*
*/
+#include <dt-bindings/clock/samsung,exynosautov920.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/soc/samsung,exynos-usi.h>
@@ -38,17 +39,6 @@ xtcxo: clock {
clock-output-names = "oscclk";
};
- /*
- * FIXME: Keep the stub clock for serial driver, until proper clock
- * driver is implemented.
- */
- clock_usi: clock-usi {
- compatible = "fixed-clock";
- #clock-cells = <0>;
- clock-frequency = <200000000>;
- clock-output-names = "usi";
- };
-
cpus: cpus {
#address-cells = <2>;
#size-cells = <0>;
@@ -182,6 +172,28 @@ chipid@10000000 {
reg = <0x10000000 0x24>;
};
+ cmu_peric0: clock-controller@10800000 {
+ compatible = "samsung,exynosautov920-cmu-peric0";
+ reg = <0x10800000 0x8000>;
+ #clock-cells = <1>;
+
+ clocks = <&xtcxo>,
+ <&cmu_top DOUT_CLKCMU_PERIC0_NOC>,
+ <&cmu_top DOUT_CLKCMU_PERIC0_IP>;
+ clock-names = "oscclk",
+ "noc",
+ "ip";
+ };
+
+ cmu_top: clock-controller@11000000 {
+ compatible = "samsung,exynosautov920-cmu-top";
+ reg = <0x11000000 0x8000>;
+ #clock-cells = <1>;
+
+ clocks = <&xtcxo>;
+ clock-names = "oscclk";
+ };
+
gic: interrupt-controller@10400000 {
compatible = "arm,gic-v3";
#interrupt-cells = <3>;
@@ -213,7 +225,8 @@ usi_0: usi@108800c0 {
#address-cells = <1>;
#size-cells = <1>;
ranges;
- clocks = <&clock_usi>, <&clock_usi>;
+ clocks = <&cmu_peric0 CLK_MOUT_PERIC0_NOC_USER>,
+ <&cmu_peric0 CLK_DOUT_PERIC0_USI00_USI>;
clock-names = "pclk", "ipclk";
status = "disabled";
@@ -224,7 +237,8 @@ serial_0: serial@10880000 {
interrupts = <GIC_SPI 764 IRQ_TYPE_LEVEL_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&uart0_bus>;
- clocks = <&clock_usi>, <&clock_usi>;
+ clocks = <&cmu_peric0 CLK_MOUT_PERIC0_NOC_USER>,
+ <&cmu_peric0 CLK_DOUT_PERIC0_USI00_USI>;
clock-names = "uart", "clk_uart_baud0";
samsung,uart-fifosize = <256>;
status = "disabled";
--
2.45.2
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v4 3/4] clk: samsung: clk-pll: Add support for pll_531x
2024-07-22 22:33 ` [PATCH v4 0/4] initial clock support for exynosauto v920 SoC Sunyeal Hong
2024-07-22 22:33 ` [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings Sunyeal Hong
2024-07-22 22:33 ` [PATCH v4 2/4] arm64: dts: exynos: add initial CMU clock nodes in ExynosAuto v920 Sunyeal Hong
@ 2024-07-22 22:33 ` Sunyeal Hong
2024-07-22 22:33 ` [PATCH v4 4/4] clk: samsung: add top clock support for ExynosAuto v920 SoC Sunyeal Hong
3 siblings, 0 replies; 23+ messages in thread
From: Sunyeal Hong @ 2024-07-22 22:33 UTC (permalink / raw)
To: Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
Alim Akhtar, Michael Turquette, Stephen Boyd, Rob Herring,
Conor Dooley
Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
linux-kernel, Sunyeal Hong
pll531x PLL is used in Exynos Auto v920 SoC for shared pll.
pll531x: Integer/fractional PLL with mid frequency FVCO (800 to 3120 MHz)
PLL531x
FOUT = (MDIV x FIN)/(PDIV x 2^SDIV) for integer PLL
FOUT = (MDIV + F/2^32-F[31]) x FIN/(PDIV x 2^SDIV) for fractional PLL
Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
---
drivers/clk/samsung/clk-pll.c | 44 +++++++++++++++++++++++++++++++++++
drivers/clk/samsung/clk-pll.h | 1 +
2 files changed, 45 insertions(+)
diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c
index 4be879ab917e..a6c81075417a 100644
--- a/drivers/clk/samsung/clk-pll.c
+++ b/drivers/clk/samsung/clk-pll.c
@@ -1261,6 +1261,47 @@ static const struct clk_ops samsung_pll2650xx_clk_min_ops = {
.recalc_rate = samsung_pll2650xx_recalc_rate,
};
+/*
+ * PLL531X Clock Type
+ */
+/* Maximum lock time can be 500 * PDIV cycles */
+#define PLL531X_LOCK_FACTOR (500)
+#define PLL531X_MDIV_MASK (0x3FF)
+#define PLL531X_PDIV_MASK (0x3F)
+#define PLL531X_SDIV_MASK (0x7)
+#define PLL531X_FDIV_MASK (0xFFFFFFFF)
+#define PLL531X_MDIV_SHIFT (16)
+#define PLL531X_PDIV_SHIFT (8)
+#define PLL531X_SDIV_SHIFT (0)
+
+static unsigned long samsung_pll531x_recalc_rate(struct clk_hw *hw,
+ unsigned long parent_rate)
+{
+ struct samsung_clk_pll *pll = to_clk_pll(hw);
+ u32 pdiv, sdiv, fdiv, pll_con0, pll_con8;
+ u64 mdiv, fout = parent_rate;
+
+ pll_con0 = readl_relaxed(pll->con_reg);
+ pll_con8 = readl_relaxed(pll->con_reg + 20);
+ mdiv = (pll_con0 >> PLL531X_MDIV_SHIFT) & PLL531X_MDIV_MASK;
+ pdiv = (pll_con0 >> PLL531X_PDIV_SHIFT) & PLL531X_PDIV_MASK;
+ sdiv = (pll_con0 >> PLL531X_SDIV_SHIFT) & PLL531X_SDIV_MASK;
+ fdiv = (pll_con8 & PLL531X_FDIV_MASK);
+
+ if (fdiv >> 31)
+ mdiv--;
+
+ fout *= (mdiv << 24) + (fdiv >> 8);
+ do_div(fout, (pdiv << sdiv));
+ fout >>= 24;
+
+ return (unsigned long)fout;
+}
+
+static const struct clk_ops samsung_pll531x_clk_ops = {
+ .recalc_rate = samsung_pll531x_recalc_rate,
+};
+
static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
const struct samsung_pll_clock *pll_clk)
{
@@ -1394,6 +1435,9 @@ static void __init _samsung_clk_register_pll(struct samsung_clk_provider *ctx,
else
init.ops = &samsung_pll2650xx_clk_ops;
break;
+ case pll_531x:
+ init.ops = &samsung_pll531x_clk_ops;
+ break;
default:
pr_warn("%s: Unknown pll type for pll clk %s\n",
__func__, pll_clk->name);
diff --git a/drivers/clk/samsung/clk-pll.h b/drivers/clk/samsung/clk-pll.h
index ffd3d52c0dec..ce9d6f21f993 100644
--- a/drivers/clk/samsung/clk-pll.h
+++ b/drivers/clk/samsung/clk-pll.h
@@ -41,6 +41,7 @@ enum samsung_pll_type {
pll_0516x,
pll_0517x,
pll_0518x,
+ pll_531x,
};
#define PLL_RATE(_fin, _m, _p, _s, _k, _ks) \
--
2.45.2
^ permalink raw reply related [flat|nested] 23+ messages in thread
* [PATCH v4 4/4] clk: samsung: add top clock support for ExynosAuto v920 SoC
2024-07-22 22:33 ` [PATCH v4 0/4] initial clock support for exynosauto v920 SoC Sunyeal Hong
` (2 preceding siblings ...)
2024-07-22 22:33 ` [PATCH v4 3/4] clk: samsung: clk-pll: Add support for pll_531x Sunyeal Hong
@ 2024-07-22 22:33 ` Sunyeal Hong
3 siblings, 0 replies; 23+ messages in thread
From: Sunyeal Hong @ 2024-07-22 22:33 UTC (permalink / raw)
To: Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
Alim Akhtar, Michael Turquette, Stephen Boyd, Rob Herring,
Conor Dooley
Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
linux-kernel, Sunyeal Hong
This adds support for CMU_TOP which generates clocks for all the
function blocks such as CORE, HSI0/1/2, PERIC0/1 and so on. For
CMU_TOP, PLL_SHARED0,1,2,3,4 and 5 will be the sources of this block
and they will generate bus clocks.
Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
---
drivers/clk/samsung/Makefile | 1 +
drivers/clk/samsung/clk-exynosautov920.c | 1173 ++++++++++++++++++++++
2 files changed, 1174 insertions(+)
create mode 100644 drivers/clk/samsung/clk-exynosautov920.c
diff --git a/drivers/clk/samsung/Makefile b/drivers/clk/samsung/Makefile
index 3056944a5a54..f1ba48758c78 100644
--- a/drivers/clk/samsung/Makefile
+++ b/drivers/clk/samsung/Makefile
@@ -21,6 +21,7 @@ obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos7.o
obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos7885.o
obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynos850.o
obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynosautov9.o
+obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-exynosautov920.o
obj-$(CONFIG_EXYNOS_ARM64_COMMON_CLK) += clk-gs101.o
obj-$(CONFIG_S3C64XX_COMMON_CLK) += clk-s3c64xx.o
obj-$(CONFIG_S5PV210_COMMON_CLK) += clk-s5pv210.o clk-s5pv210-audss.o
diff --git a/drivers/clk/samsung/clk-exynosautov920.c b/drivers/clk/samsung/clk-exynosautov920.c
new file mode 100644
index 000000000000..c17d25e3c9a0
--- /dev/null
+++ b/drivers/clk/samsung/clk-exynosautov920.c
@@ -0,0 +1,1173 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright (c) 2024 Samsung Electronics Co., Ltd.
+ * Author: Sunyeal Hong <sunyeal.hong@samsung.com>
+ *
+ * Common Clock Framework support for ExynosAuto v920 SoC.
+ */
+
+#include <linux/clk.h>
+#include <linux/clk-provider.h>
+#include <linux/of.h>
+#include <linux/platform_device.h>
+
+#include <dt-bindings/clock/samsung,exynosautov920.h>
+
+#include "clk.h"
+#include "clk-exynos-arm64.h"
+
+/* NOTE: Must be equal to the last clock ID increased by one */
+#define CLKS_NR_TOP (DOUT_CLKCMU_TAA_NOC + 1)
+#define CLKS_NR_PERIC0 (CLK_DOUT_PERIC0_I3C + 1)
+
+/* ---- CMU_TOP ------------------------------------------------------------ */
+
+/* Register Offset definitions for CMU_TOP (0x11000000) */
+#define PLL_LOCKTIME_PLL_MMC 0x0004
+#define PLL_LOCKTIME_PLL_SHARED0 0x0008
+#define PLL_LOCKTIME_PLL_SHARED1 0x000c
+#define PLL_LOCKTIME_PLL_SHARED2 0x0010
+#define PLL_LOCKTIME_PLL_SHARED3 0x0014
+#define PLL_LOCKTIME_PLL_SHARED4 0x0018
+#define PLL_LOCKTIME_PLL_SHARED5 0x0018
+#define PLL_CON0_PLL_MMC 0x0140
+#define PLL_CON3_PLL_MMC 0x014c
+#define PLL_CON0_PLL_SHARED0 0x0180
+#define PLL_CON3_PLL_SHARED0 0x018c
+#define PLL_CON0_PLL_SHARED1 0x01c0
+#define PLL_CON3_PLL_SHARED1 0x01cc
+#define PLL_CON0_PLL_SHARED2 0x0200
+#define PLL_CON3_PLL_SHARED2 0x020c
+#define PLL_CON0_PLL_SHARED3 0x0240
+#define PLL_CON3_PLL_SHARED3 0x024c
+#define PLL_CON0_PLL_SHARED4 0x0280
+#define PLL_CON3_PLL_SHARED4 0x028c
+#define PLL_CON0_PLL_SHARED5 0x02c0
+#define PLL_CON3_PLL_SHARED5 0x02cc
+
+/* MUX */
+#define CLK_CON_MUX_MUX_CLKCMU_ACC_NOC 0x1000
+#define CLK_CON_MUX_MUX_CLKCMU_APM_NOC 0x1004
+#define CLK_CON_MUX_MUX_CLKCMU_AUD_CPU 0x1008
+#define CLK_CON_MUX_MUX_CLKCMU_AUD_NOC 0x100c
+#define CLK_CON_MUX_MUX_CLKCMU_CIS_MCLK0 0x1010
+#define CLK_CON_MUX_MUX_CLKCMU_CIS_MCLK1 0x1014
+#define CLK_CON_MUX_MUX_CLKCMU_CIS_MCLK2 0x1018
+#define CLK_CON_MUX_MUX_CLKCMU_CIS_MCLK3 0x101c
+#define CLK_CON_MUX_MUX_CLKCMU_CMU_BOOST 0x1020
+#define CLK_CON_MUX_MUX_CLKCMU_CPUCL0_CLUSTER 0x1024
+#define CLK_CON_MUX_MUX_CLKCMU_CPUCL0_DBG 0x1028
+#define CLK_CON_MUX_MUX_CLKCMU_CPUCL0_SWITCH 0x102c
+#define CLK_CON_MUX_MUX_CLKCMU_CPUCL1_CLUSTER 0x1030
+#define CLK_CON_MUX_MUX_CLKCMU_CPUCL1_SWITCH 0x1034
+#define CLK_CON_MUX_MUX_CLKCMU_CPUCL2_CLUSTER 0x1038
+#define CLK_CON_MUX_MUX_CLKCMU_CPUCL2_SWITCH 0x103c
+#define CLK_CON_MUX_MUX_CLKCMU_DNC_NOC 0x1040
+#define CLK_CON_MUX_MUX_CLKCMU_DPTX_DPGTC 0x1044
+#define CLK_CON_MUX_MUX_CLKCMU_DPTX_DPOSC 0x1048
+#define CLK_CON_MUX_MUX_CLKCMU_DPTX_NOC 0x104c
+#define CLK_CON_MUX_MUX_CLKCMU_DPUB_DSIM 0x1050
+#define CLK_CON_MUX_MUX_CLKCMU_DPUB_NOC 0x1054
+#define CLK_CON_MUX_MUX_CLKCMU_DPUF0_NOC 0x1058
+#define CLK_CON_MUX_MUX_CLKCMU_DPUF1_NOC 0x105c
+#define CLK_CON_MUX_MUX_CLKCMU_DPUF2_NOC 0x1060
+#define CLK_CON_MUX_MUX_CLKCMU_DSP_NOC 0x1064
+#define CLK_CON_MUX_MUX_CLKCMU_G3D_NOCP 0x1068
+#define CLK_CON_MUX_MUX_CLKCMU_G3D_SWITCH 0x106c
+#define CLK_CON_MUX_MUX_CLKCMU_GNPU_NOC 0x1070
+#define CLK_CON_MUX_MUX_CLKCMU_HSI0_NOC 0x1074
+#define CLK_CON_MUX_MUX_CLKCMU_ACC_ORB 0x1078
+#define CLK_CON_MUX_MUX_CLKCMU_GNPU_XMAA 0x107c
+#define CLK_CON_MUX_MUX_CLKCMU_HSI1_MMC_CARD 0x1080
+#define CLK_CON_MUX_MUX_CLKCMU_HSI1_NOC 0x1084
+#define CLK_CON_MUX_MUX_CLKCMU_HSI1_USBDRD 0x1088
+#define CLK_CON_MUX_MUX_CLKCMU_HSI2_ETHERNET 0x108c
+#define CLK_CON_MUX_MUX_CLKCMU_HSI2_NOC 0x1090
+#define CLK_CON_MUX_MUX_CLKCMU_HSI2_NOC_UFS 0x1094
+#define CLK_CON_MUX_MUX_CLKCMU_HSI2_UFS_EMBD 0x1098
+#define CLK_CON_MUX_MUX_CLKCMU_ISP_NOC 0x109c
+#define CLK_CON_MUX_MUX_CLKCMU_M2M_JPEG 0x10a0
+#define CLK_CON_MUX_MUX_CLKCMU_M2M_NOC 0x10a4
+#define CLK_CON_MUX_MUX_CLKCMU_MFC_MFC 0x10a8
+#define CLK_CON_MUX_MUX_CLKCMU_MFC_WFD 0x10ac
+#define CLK_CON_MUX_MUX_CLKCMU_MFD_NOC 0x10b0
+#define CLK_CON_MUX_MUX_CLKCMU_MIF_NOCP 0x10b4
+#define CLK_CON_MUX_MUX_CLKCMU_MIF_SWITCH 0x10b8
+#define CLK_CON_MUX_MUX_CLKCMU_MISC_NOC 0x10bc
+#define CLK_CON_MUX_MUX_CLKCMU_NOCL0_NOC 0x10c0
+#define CLK_CON_MUX_MUX_CLKCMU_NOCL1_NOC 0x10c4
+#define CLK_CON_MUX_MUX_CLKCMU_NOCL2_NOC 0x10c8
+#define CLK_CON_MUX_MUX_CLKCMU_PERIC0_IP 0x10cc
+#define CLK_CON_MUX_MUX_CLKCMU_PERIC0_NOC 0x10d0
+#define CLK_CON_MUX_MUX_CLKCMU_PERIC1_IP 0x10d4
+#define CLK_CON_MUX_MUX_CLKCMU_PERIC1_NOC 0x10d8
+#define CLK_CON_MUX_MUX_CLKCMU_SDMA_NOC 0x10dc
+#define CLK_CON_MUX_MUX_CLKCMU_SNW_NOC 0x10e0
+#define CLK_CON_MUX_MUX_CLKCMU_SSP_NOC 0x10e4
+#define CLK_CON_MUX_MUX_CLKCMU_TAA_NOC 0x10e8
+#define CLK_CON_MUX_MUX_CLK_CMU_NOCP 0x10ec
+#define CLK_CON_MUX_MUX_CLK_CMU_PLLCLKOUT 0x10f0
+#define CLK_CON_MUX_MUX_CMU_CMUREF 0x10f4
+
+/* DIV */
+#define CLK_CON_DIV_CLKCMU_ACC_NOC 0x1800
+#define CLK_CON_DIV_CLKCMU_APM_NOC 0x1804
+#define CLK_CON_DIV_CLKCMU_AUD_CPU 0x1808
+#define CLK_CON_DIV_CLKCMU_AUD_NOC 0x180c
+#define CLK_CON_DIV_CLKCMU_CIS_MCLK0 0x1810
+#define CLK_CON_DIV_CLKCMU_CIS_MCLK1 0x1814
+#define CLK_CON_DIV_CLKCMU_CIS_MCLK2 0x1818
+#define CLK_CON_DIV_CLKCMU_CIS_MCLK3 0x181c
+#define CLK_CON_DIV_CLKCMU_CPUCL0_CLUSTER 0x1820
+#define CLK_CON_DIV_CLKCMU_CPUCL0_DBG 0x1824
+#define CLK_CON_DIV_CLKCMU_CPUCL0_SWITCH 0x1828
+#define CLK_CON_DIV_CLKCMU_CPUCL1_CLUSTER 0x182c
+#define CLK_CON_DIV_CLKCMU_CPUCL1_SWITCH 0x1830
+#define CLK_CON_DIV_CLKCMU_CPUCL2_CLUSTER 0x1834
+#define CLK_CON_DIV_CLKCMU_CPUCL2_SWITCH 0x1838
+#define CLK_CON_DIV_CLKCMU_DNC_NOC 0x183c
+#define CLK_CON_DIV_CLKCMU_DPTX_DPGTC 0x1840
+#define CLK_CON_DIV_CLKCMU_DPTX_DPOSC 0x1844
+#define CLK_CON_DIV_CLKCMU_DPTX_NOC 0x1848
+#define CLK_CON_DIV_CLKCMU_DPUB_DSIM 0x184c
+#define CLK_CON_DIV_CLKCMU_DPUB_NOC 0x1850
+#define CLK_CON_DIV_CLKCMU_DPUF0_NOC 0x1854
+#define CLK_CON_DIV_CLKCMU_DPUF1_NOC 0x1858
+#define CLK_CON_DIV_CLKCMU_DPUF2_NOC 0x185c
+#define CLK_CON_DIV_CLKCMU_DSP_NOC 0x1860
+#define CLK_CON_DIV_CLKCMU_G3D_NOCP 0x1864
+#define CLK_CON_DIV_CLKCMU_G3D_SWITCH 0x1868
+#define CLK_CON_DIV_CLKCMU_GNPU_NOC 0x186c
+#define CLK_CON_DIV_CLKCMU_HSI0_NOC 0x1870
+#define CLK_CON_DIV_CLKCMU_ACC_ORB 0x1874
+#define CLK_CON_DIV_CLKCMU_GNPU_XMAA 0x1878
+#define CLK_CON_DIV_CLKCMU_HSI1_MMC_CARD 0x187c
+#define CLK_CON_DIV_CLKCMU_HSI1_NOC 0x1880
+#define CLK_CON_DIV_CLKCMU_HSI1_USBDRD 0x1884
+#define CLK_CON_DIV_CLKCMU_HSI2_ETHERNET 0x1888
+#define CLK_CON_DIV_CLKCMU_HSI2_NOC 0x188c
+#define CLK_CON_DIV_CLKCMU_HSI2_NOC_UFS 0x1890
+#define CLK_CON_DIV_CLKCMU_HSI2_UFS_EMBD 0x1894
+#define CLK_CON_DIV_CLKCMU_ISP_NOC 0x1898
+#define CLK_CON_DIV_CLKCMU_M2M_JPEG 0x189c
+#define CLK_CON_DIV_CLKCMU_M2M_NOC 0x18a0
+#define CLK_CON_DIV_CLKCMU_MFC_MFC 0x18a4
+#define CLK_CON_DIV_CLKCMU_MFC_WFD 0x18a8
+#define CLK_CON_DIV_CLKCMU_MFD_NOC 0x18ac
+#define CLK_CON_DIV_CLKCMU_MIF_NOCP 0x18b0
+#define CLK_CON_DIV_CLKCMU_MISC_NOC 0x18b4
+#define CLK_CON_DIV_CLKCMU_NOCL0_NOC 0x18b8
+#define CLK_CON_DIV_CLKCMU_NOCL1_NOC 0x18bc
+#define CLK_CON_DIV_CLKCMU_NOCL2_NOC 0x18c0
+#define CLK_CON_DIV_CLKCMU_PERIC0_IP 0x18c4
+#define CLK_CON_DIV_CLKCMU_PERIC0_NOC 0x18c8
+#define CLK_CON_DIV_CLKCMU_PERIC1_IP 0x18cc
+#define CLK_CON_DIV_CLKCMU_PERIC1_NOC 0x18d0
+#define CLK_CON_DIV_CLKCMU_SDMA_NOC 0x18d4
+#define CLK_CON_DIV_CLKCMU_SNW_NOC 0x18d8
+#define CLK_CON_DIV_CLKCMU_SSP_NOC 0x18dc
+#define CLK_CON_DIV_CLKCMU_TAA_NOC 0x18e0
+#define CLK_CON_DIV_CLK_ADD_CH_CLK 0x18e4
+#define CLK_CON_DIV_CLK_CMU_PLLCLKOUT 0x18e8
+#define CLK_CON_DIV_DIV_CLKCMU_CMU_BOOST 0x18ec
+#define CLK_CON_DIV_DIV_CLK_CMU_NOCP 0x18f0
+
+static const unsigned long top_clk_regs[] __initconst = {
+ PLL_LOCKTIME_PLL_MMC,
+ PLL_LOCKTIME_PLL_SHARED0,
+ PLL_LOCKTIME_PLL_SHARED1,
+ PLL_LOCKTIME_PLL_SHARED2,
+ PLL_LOCKTIME_PLL_SHARED3,
+ PLL_LOCKTIME_PLL_SHARED4,
+ PLL_LOCKTIME_PLL_SHARED5,
+ PLL_CON0_PLL_MMC,
+ PLL_CON3_PLL_MMC,
+ PLL_CON0_PLL_SHARED0,
+ PLL_CON3_PLL_SHARED0,
+ PLL_CON0_PLL_SHARED1,
+ PLL_CON3_PLL_SHARED1,
+ PLL_CON0_PLL_SHARED2,
+ PLL_CON3_PLL_SHARED2,
+ PLL_CON0_PLL_SHARED3,
+ PLL_CON3_PLL_SHARED3,
+ PLL_CON0_PLL_SHARED4,
+ PLL_CON3_PLL_SHARED4,
+ PLL_CON0_PLL_SHARED5,
+ PLL_CON3_PLL_SHARED5,
+ CLK_CON_MUX_MUX_CLKCMU_ACC_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_APM_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_AUD_CPU,
+ CLK_CON_MUX_MUX_CLKCMU_AUD_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_CIS_MCLK0,
+ CLK_CON_MUX_MUX_CLKCMU_CIS_MCLK1,
+ CLK_CON_MUX_MUX_CLKCMU_CIS_MCLK2,
+ CLK_CON_MUX_MUX_CLKCMU_CIS_MCLK3,
+ CLK_CON_MUX_MUX_CLKCMU_CMU_BOOST,
+ CLK_CON_MUX_MUX_CLKCMU_CPUCL0_CLUSTER,
+ CLK_CON_MUX_MUX_CLKCMU_CPUCL0_DBG,
+ CLK_CON_MUX_MUX_CLKCMU_CPUCL0_SWITCH,
+ CLK_CON_MUX_MUX_CLKCMU_CPUCL1_CLUSTER,
+ CLK_CON_MUX_MUX_CLKCMU_CPUCL1_SWITCH,
+ CLK_CON_MUX_MUX_CLKCMU_CPUCL2_CLUSTER,
+ CLK_CON_MUX_MUX_CLKCMU_CPUCL2_SWITCH,
+ CLK_CON_MUX_MUX_CLKCMU_DNC_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_DPTX_DPGTC,
+ CLK_CON_MUX_MUX_CLKCMU_DPTX_DPOSC,
+ CLK_CON_MUX_MUX_CLKCMU_DPTX_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_DPUB_DSIM,
+ CLK_CON_MUX_MUX_CLKCMU_DPUB_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_DPUF0_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_DPUF1_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_DPUF2_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_DSP_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_G3D_NOCP,
+ CLK_CON_MUX_MUX_CLKCMU_G3D_SWITCH,
+ CLK_CON_MUX_MUX_CLKCMU_GNPU_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_HSI0_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_ACC_ORB,
+ CLK_CON_MUX_MUX_CLKCMU_GNPU_XMAA,
+ CLK_CON_MUX_MUX_CLKCMU_HSI1_MMC_CARD,
+ CLK_CON_MUX_MUX_CLKCMU_HSI1_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_HSI1_USBDRD,
+ CLK_CON_MUX_MUX_CLKCMU_HSI2_ETHERNET,
+ CLK_CON_MUX_MUX_CLKCMU_HSI2_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_HSI2_NOC_UFS,
+ CLK_CON_MUX_MUX_CLKCMU_HSI2_UFS_EMBD,
+ CLK_CON_MUX_MUX_CLKCMU_ISP_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_M2M_JPEG,
+ CLK_CON_MUX_MUX_CLKCMU_M2M_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_MFC_MFC,
+ CLK_CON_MUX_MUX_CLKCMU_MFC_WFD,
+ CLK_CON_MUX_MUX_CLKCMU_MFD_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_MIF_NOCP,
+ CLK_CON_MUX_MUX_CLKCMU_MIF_SWITCH,
+ CLK_CON_MUX_MUX_CLKCMU_MISC_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_NOCL0_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_NOCL1_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_NOCL2_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_PERIC0_IP,
+ CLK_CON_MUX_MUX_CLKCMU_PERIC0_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_PERIC1_IP,
+ CLK_CON_MUX_MUX_CLKCMU_PERIC1_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_SDMA_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_SNW_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_SSP_NOC,
+ CLK_CON_MUX_MUX_CLKCMU_TAA_NOC,
+ CLK_CON_MUX_MUX_CLK_CMU_NOCP,
+ CLK_CON_MUX_MUX_CLK_CMU_PLLCLKOUT,
+ CLK_CON_MUX_MUX_CMU_CMUREF,
+ CLK_CON_DIV_CLKCMU_ACC_NOC,
+ CLK_CON_DIV_CLKCMU_APM_NOC,
+ CLK_CON_DIV_CLKCMU_AUD_CPU,
+ CLK_CON_DIV_CLKCMU_AUD_NOC,
+ CLK_CON_DIV_CLKCMU_CIS_MCLK0,
+ CLK_CON_DIV_CLKCMU_CIS_MCLK1,
+ CLK_CON_DIV_CLKCMU_CIS_MCLK2,
+ CLK_CON_DIV_CLKCMU_CIS_MCLK3,
+ CLK_CON_DIV_CLKCMU_CPUCL0_CLUSTER,
+ CLK_CON_DIV_CLKCMU_CPUCL0_DBG,
+ CLK_CON_DIV_CLKCMU_CPUCL0_SWITCH,
+ CLK_CON_DIV_CLKCMU_CPUCL1_CLUSTER,
+ CLK_CON_DIV_CLKCMU_CPUCL1_SWITCH,
+ CLK_CON_DIV_CLKCMU_CPUCL2_CLUSTER,
+ CLK_CON_DIV_CLKCMU_CPUCL2_SWITCH,
+ CLK_CON_DIV_CLKCMU_DNC_NOC,
+ CLK_CON_DIV_CLKCMU_DPTX_DPGTC,
+ CLK_CON_DIV_CLKCMU_DPTX_DPOSC,
+ CLK_CON_DIV_CLKCMU_DPTX_NOC,
+ CLK_CON_DIV_CLKCMU_DPUB_DSIM,
+ CLK_CON_DIV_CLKCMU_DPUB_NOC,
+ CLK_CON_DIV_CLKCMU_DPUF0_NOC,
+ CLK_CON_DIV_CLKCMU_DPUF1_NOC,
+ CLK_CON_DIV_CLKCMU_DPUF2_NOC,
+ CLK_CON_DIV_CLKCMU_DSP_NOC,
+ CLK_CON_DIV_CLKCMU_G3D_NOCP,
+ CLK_CON_DIV_CLKCMU_G3D_SWITCH,
+ CLK_CON_DIV_CLKCMU_GNPU_NOC,
+ CLK_CON_DIV_CLKCMU_HSI0_NOC,
+ CLK_CON_DIV_CLKCMU_ACC_ORB,
+ CLK_CON_DIV_CLKCMU_GNPU_XMAA,
+ CLK_CON_DIV_CLKCMU_HSI1_MMC_CARD,
+ CLK_CON_DIV_CLKCMU_HSI1_NOC,
+ CLK_CON_DIV_CLKCMU_HSI1_USBDRD,
+ CLK_CON_DIV_CLKCMU_HSI2_ETHERNET,
+ CLK_CON_DIV_CLKCMU_HSI2_NOC,
+ CLK_CON_DIV_CLKCMU_HSI2_NOC_UFS,
+ CLK_CON_DIV_CLKCMU_HSI2_UFS_EMBD,
+ CLK_CON_DIV_CLKCMU_ISP_NOC,
+ CLK_CON_DIV_CLKCMU_M2M_JPEG,
+ CLK_CON_DIV_CLKCMU_M2M_NOC,
+ CLK_CON_DIV_CLKCMU_MFC_MFC,
+ CLK_CON_DIV_CLKCMU_MFC_WFD,
+ CLK_CON_DIV_CLKCMU_MFD_NOC,
+ CLK_CON_DIV_CLKCMU_MIF_NOCP,
+ CLK_CON_DIV_CLKCMU_MISC_NOC,
+ CLK_CON_DIV_CLKCMU_NOCL0_NOC,
+ CLK_CON_DIV_CLKCMU_NOCL1_NOC,
+ CLK_CON_DIV_CLKCMU_NOCL2_NOC,
+ CLK_CON_DIV_CLKCMU_PERIC0_IP,
+ CLK_CON_DIV_CLKCMU_PERIC0_NOC,
+ CLK_CON_DIV_CLKCMU_PERIC1_IP,
+ CLK_CON_DIV_CLKCMU_PERIC1_NOC,
+ CLK_CON_DIV_CLKCMU_SDMA_NOC,
+ CLK_CON_DIV_CLKCMU_SNW_NOC,
+ CLK_CON_DIV_CLKCMU_SSP_NOC,
+ CLK_CON_DIV_CLKCMU_TAA_NOC,
+ CLK_CON_DIV_CLK_ADD_CH_CLK,
+ CLK_CON_DIV_CLK_CMU_PLLCLKOUT,
+ CLK_CON_DIV_DIV_CLKCMU_CMU_BOOST,
+ CLK_CON_DIV_DIV_CLK_CMU_NOCP,
+};
+
+static const struct samsung_pll_clock top_pll_clks[] __initconst = {
+ /* CMU_TOP_PURECLKCOMP */
+ PLL(pll_531x, FOUT_SHARED0_PLL, "fout_shared0_pll", "oscclk",
+ PLL_LOCKTIME_PLL_SHARED0, PLL_CON3_PLL_SHARED0, NULL),
+ PLL(pll_531x, FOUT_SHARED1_PLL, "fout_shared1_pll", "oscclk",
+ PLL_LOCKTIME_PLL_SHARED1, PLL_CON3_PLL_SHARED1, NULL),
+ PLL(pll_531x, FOUT_SHARED2_PLL, "fout_shared2_pll", "oscclk",
+ PLL_LOCKTIME_PLL_SHARED2, PLL_CON3_PLL_SHARED2, NULL),
+ PLL(pll_531x, FOUT_SHARED3_PLL, "fout_shared3_pll", "oscclk",
+ PLL_LOCKTIME_PLL_SHARED3, PLL_CON3_PLL_SHARED3, NULL),
+ PLL(pll_531x, FOUT_SHARED4_PLL, "fout_shared4_pll", "oscclk",
+ PLL_LOCKTIME_PLL_SHARED4, PLL_CON3_PLL_SHARED4, NULL),
+ PLL(pll_531x, FOUT_SHARED5_PLL, "fout_shared5_pll", "oscclk",
+ PLL_LOCKTIME_PLL_SHARED5, PLL_CON3_PLL_SHARED5, NULL),
+ PLL(pll_531x, FOUT_MMC_PLL, "fout_mmc_pll", "oscclk",
+ PLL_LOCKTIME_PLL_MMC, PLL_CON3_PLL_MMC, NULL),
+};
+
+/* List of parent clocks for Muxes in CMU_TOP */
+PNAME(mout_shared0_pll_p) = { "oscclk", "fout_shared0_pll" };
+PNAME(mout_shared1_pll_p) = { "oscclk", "fout_shared1_pll" };
+PNAME(mout_shared2_pll_p) = { "oscclk", "fout_shared2_pll" };
+PNAME(mout_shared3_pll_p) = { "oscclk", "fout_shared3_pll" };
+PNAME(mout_shared4_pll_p) = { "oscclk", "fout_shared4_pll" };
+PNAME(mout_shared5_pll_p) = { "oscclk", "fout_shared5_pll" };
+PNAME(mout_mmc_pll_p) = { "oscclk", "fout_mmc_pll" };
+
+PNAME(mout_clkcmu_cmu_boost_p) = { "dout_shared2_div3", "dout_shared1_div4",
+ "dout_shared2_div4", "dout_shared4_div4" };
+
+PNAME(mout_clkcmu_cmu_cmuref_p) = { "oscclk", "dout_cmu_boost" };
+
+PNAME(mout_clkcmu_acc_noc_p) = { "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared4_div2", "dout_shared1_div3",
+ "dout_shared2_div3", "dout_shared5_div1",
+ "dout_shared3_div1", "oscclk" };
+
+PNAME(mout_clkcmu_acc_orb_p) = { "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared1_div2", "dout_shared1_div3",
+ "dout_shared2_div3", "fout_shared5_pll",
+ "fout_shared3_pll", "oscclk" };
+
+PNAME(mout_clkcmu_apm_noc_p) = { "dout_shared2_div2", "dout_shared1_div4",
+ "dout_shared2_div4", "dout_shared4_div4" };
+
+PNAME(mout_clkcmu_aud_cpu_p) = { "dout_shared0_div2", "dout_shared1_div2",
+ "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared4_div2", "dout_shared1_div3",
+ "dout_shared2_div3", "dout_shared4_div3" };
+
+PNAME(mout_clkcmu_aud_noc_p) = { "dout_shared2_div2", "dout_shared4_div2",
+ "dout_shared1_div2", "dout_shared2_div3" };
+
+PNAME(mout_clkcmu_cpucl0_switch_p) = { "dout_shared0_div2", "dout_shared1_div2",
+ "dout_shared2_div2", "dout_shared4_div2" };
+
+PNAME(mout_clkcmu_cpucl0_cluster_p) = { "fout_shared2_pll", "fout_shared4_pll",
+ "dout_shared0_div2", "dout_shared1_div2",
+ "dout_shared2_div2", "dout_shared4_div2",
+ "dout_shared2_div3", "fout_shared3_pll" };
+
+PNAME(mout_clkcmu_cpucl0_dbg_p) = { "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared4_div2", "dout_shared0_div4" };
+
+PNAME(mout_clkcmu_cpucl1_switch_p) = { "dout_shared0_div2", "dout_shared1_div2",
+ "dout_shared2_div2", "dout_shared4_div2" };
+
+PNAME(mout_clkcmu_cpucl1_cluster_p) = { "fout_shared2_pll", "fout_shared4_pll",
+ "dout_shared0_div2", "dout_shared1_div2",
+ "dout_shared2_div2", "dout_shared4_div2",
+ "dout_shared2_div3", "fout_shared3_pll" };
+
+PNAME(mout_clkcmu_cpucl2_switch_p) = { "dout_shared0_div2", "dout_shared1_div2",
+ "dout_shared2_div2", "dout_shared4_div2" };
+
+PNAME(mout_clkcmu_cpucl2_cluster_p) = { "fout_shared2_pll", "fout_shared4_pll",
+ "dout_shared0_div2", "dout_shared1_div2",
+ "dout_shared2_div2", "dout_shared4_div2",
+ "dout_shared2_div3", "fout_shared3_pll" };
+
+PNAME(mout_clkcmu_dnc_noc_p) = { "dout_shared1_div2", "dout_shared2_div2",
+ "dout_shared0_div3", "dout_shared4_div2",
+ "dout_shared1_div3", "dout_shared2_div3",
+ "dout_shared1_div4", "fout_shared3_pll" };
+
+PNAME(mout_clkcmu_dptx_noc_p) = { "dout_shared4_div2", "dout_shared2_div3",
+ "dout_shared1_div4", "dout_shared2_div4" };
+
+PNAME(mout_clkcmu_dptx_dpgtc_p) = { "oscclk", "dout_shared2_div3",
+ "dout_shared2_div4", "dout_shared4_div4" };
+
+PNAME(mout_clkcmu_dptx_dposc_p) = { "oscclk", "dout_shared2_div4" };
+
+PNAME(mout_clkcmu_dpub_noc_p) = { "dout_shared4_div2", "dout_shared1_div3",
+ "dout_shared2_div3", "dout_shared1_div4",
+ "dout_shared2_div4", "dout_shared4_div4",
+ "fout_shared3_pll" };
+
+PNAME(mout_clkcmu_dpub_dsim_p) = { "dout_shared2_div3", "dout_shared2_div4" };
+
+PNAME(mout_clkcmu_dpuf_noc_p) = { "dout_shared4_div2", "dout_shared1_div3",
+ "dout_shared2_div3", "dout_shared1_div4",
+ "dout_shared2_div4", "dout_shared4_div4",
+ "fout_shared3_pll" };
+
+PNAME(mout_clkcmu_dsp_noc_p) = { "dout_shared0_div2", "dout_shared1_div2",
+ "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared4_div2", "dout_shared1_div3",
+ "fout_shared5_pll", "fout_shared3_pll" };
+
+PNAME(mout_clkcmu_g3d_switch_p) = { "dout_shared0_div2", "dout_shared1_div2",
+ "dout_shared2_div2", "dout_shared4_div2" };
+
+PNAME(mout_clkcmu_g3d_nocp_p) = { "dout_shared2_div3", "dout_shared1_div4",
+ "dout_shared2_div4", "dout_shared4_div4" };
+
+PNAME(mout_clkcmu_gnpu_noc_p) = { "dout_shared0_div2", "dout_shared1_div2",
+ "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared4_div2", "dout_shared2_div3",
+ "fout_shared5_pll", "fout_shared3_pll" };
+
+PNAME(mout_clkcmu_hsi0_noc_p) = { "dout_shared4_div2", "dout_shared2_div3",
+ "dout_shared1_div4", "dout_shared2_div4" };
+
+PNAME(mout_clkcmu_hsi1_noc_p) = { "dout_shared2_div3", "dout_shared1_div4",
+ "dout_shared2_div4", "dout_shared4_div4" };
+
+PNAME(mout_clkcmu_hsi1_usbdrd_p) = { "oscclk", "dout_shared2_div3",
+ "dout_shared2_div4", "dout_shared4_div4" };
+
+PNAME(mout_clkcmu_hsi1_mmc_card_p) = { "oscclk", "dout_shared2_div2",
+ "dout_shared4_div2", "fout_mmc_pll" };
+
+PNAME(mout_clkcmu_hsi2_noc_p) = { "dout_shared4_div2", "dout_shared2_div3",
+ "dout_shared1_div4", "dout_shared2_div4" };
+
+PNAME(mout_clkcmu_hsi2_noc_ufs_p) = { "dout_shared4_div2", "dout_shared2_div3",
+ "dout_shared1_div4", "dout_shared2_div2" };
+
+PNAME(mout_clkcmu_hsi2_ufs_embd_p) = { "oscclk", "dout_shared2_div3",
+ "dout_shared2_div4", "dout_shared4_div4" };
+
+PNAME(mout_clkcmu_hsi2_ethernet_p) = { "oscclk", "dout_shared2_div2",
+ "dout_shared0_div3", "dout_shared1_div3" };
+
+PNAME(mout_clkcmu_isp_noc_p) = { "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared4_div2", "dout_shared1_div3",
+ "dout_shared2_div3", "fout_shared5_pll",
+ "fout_shared3_pll", "oscclk" };
+
+PNAME(mout_clkcmu_m2m_noc_p) = { "dout_shared0_div3", "dout_shared4_div2",
+ "dout_shared2_div3", "dout_shared1_div4" };
+
+PNAME(mout_clkcmu_m2m_jpeg_p) = { "dout_shared0_div3", "dout_shared4_div2",
+ "dout_shared2_div3", "dout_shared1_div4" };
+
+PNAME(mout_clkcmu_mfc_mfc_p) = { "dout_shared0_div3", "dout_shared4_div2",
+ "dout_shared2_div3", "dout_shared1_div4" };
+
+PNAME(mout_clkcmu_mfc_wfd_p) = { "dout_shared0_div3", "dout_shared4_div2",
+ "dout_shared2_div3", "dout_shared1_div4" };
+
+PNAME(mout_clkcmu_mfd_noc_p) = { "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared4_div2", "dout_shared1_div3",
+ "dout_shared2_div3", "fout_shared5_pll",
+ "fout_shared3_pll", "oscclk" };
+
+PNAME(mout_clkcmu_mif_switch_p) = { "fout_shared0_pll", "fout_shared1_pll",
+ "fout_shared2_pll", "fout_shared4_pll",
+ "dout_shared0_div2", "dout_shared1_div2",
+ "dout_shared2_div2", "fout_shared5_pll" };
+
+PNAME(mout_clkcmu_mif_nocp_p) = { "dout_shared2_div3", "dout_shared1_div4",
+ "dout_shared2_div4", "dout_shared4_div4" };
+
+PNAME(mout_clkcmu_misc_noc_p) = { "dout_shared4_div2", "dout_shared2_div3",
+ "dout_shared1_div4", "dout_shared2_div4" };
+
+PNAME(mout_clkcmu_nocl0_noc_p) = { "dout_shared0_div2", "dout_shared1_div2",
+ "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared4_div2", "dout_shared1_div3",
+ "dout_shared2_div3", "fout_shared3_pll" };
+
+PNAME(mout_clkcmu_nocl1_noc_p) = { "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared4_div2", "dout_shared1_div3",
+ "dout_shared2_div3", "fout_shared5_pll",
+ "fout_shared3_pll", "oscclk" };
+
+PNAME(mout_clkcmu_nocl2_noc_p) = { "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared4_div2", "dout_shared1_div3",
+ "dout_shared2_div3", "fout_shared5_pll",
+ "fout_shared3_pll", "oscclk" };
+
+PNAME(mout_clkcmu_peric0_noc_p) = { "dout_shared2_div3", "dout_shared2_div4" };
+
+PNAME(mout_clkcmu_peric0_ip_p) = { "dout_shared2_div3", "dout_shared2_div4" };
+
+PNAME(mout_clkcmu_peric1_noc_p) = { "dout_shared2_div3", "dout_shared2_div4" };
+
+PNAME(mout_clkcmu_peric1_ip_p) = { "dout_shared2_div3", "dout_shared2_div4" };
+
+PNAME(mout_clkcmu_sdma_noc_p) = { "dout_shared1_div2", "dout_shared2_div2",
+ "dout_shared0_div3", "dout_shared4_div2",
+ "dout_shared1_div3", "dout_shared2_div3",
+ "dout_shared1_div4", "fout_shared3_pll" };
+
+PNAME(mout_clkcmu_snw_noc_p) = { "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared4_div2", "dout_shared1_div3",
+ "dout_shared2_div3", "fout_shared5_pll",
+ "fout_shared3_pll", "oscclk" };
+
+PNAME(mout_clkcmu_ssp_noc_p) = { "dout_shared2_div3", "dout_shared1_div4",
+ "dout_shared2_div2", "dout_shared4_div4" };
+
+PNAME(mout_clkcmu_taa_noc_p) = { "dout_shared2_div2", "dout_shared0_div3",
+ "dout_shared4_div2", "dout_shared1_div3",
+ "dout_shared2_div3", "fout_shared5_pll",
+ "fout_shared3_pll", "oscclk" };
+
+static const struct samsung_mux_clock top_mux_clks[] __initconst = {
+ /* CMU_TOP_PURECLKCOMP */
+ MUX(MOUT_SHARED0_PLL, "mout_shared0_pll", mout_shared0_pll_p,
+ PLL_CON0_PLL_SHARED0, 4, 1),
+ MUX(MOUT_SHARED1_PLL, "mout_shared1_pll", mout_shared1_pll_p,
+ PLL_CON0_PLL_SHARED1, 4, 1),
+ MUX(MOUT_SHARED2_PLL, "mout_shared2_pll", mout_shared2_pll_p,
+ PLL_CON0_PLL_SHARED2, 4, 1),
+ MUX(MOUT_SHARED3_PLL, "mout_shared3_pll", mout_shared3_pll_p,
+ PLL_CON0_PLL_SHARED3, 4, 1),
+ MUX(MOUT_SHARED4_PLL, "mout_shared4_pll", mout_shared4_pll_p,
+ PLL_CON0_PLL_SHARED4, 4, 1),
+ MUX(MOUT_SHARED5_PLL, "mout_shared5_pll", mout_shared5_pll_p,
+ PLL_CON0_PLL_SHARED5, 4, 1),
+ MUX(MOUT_MMC_PLL, "mout_mmc_pll", mout_mmc_pll_p,
+ PLL_CON0_PLL_MMC, 4, 1),
+
+ /* BOOST */
+ MUX(MOUT_CLKCMU_CMU_BOOST, "mout_clkcmu_cmu_boost",
+ mout_clkcmu_cmu_boost_p, CLK_CON_MUX_MUX_CLKCMU_CMU_BOOST, 0, 2),
+ MUX(MOUT_CLKCMU_CMU_CMUREF, "mout_clkcmu_cmu_cmuref",
+ mout_clkcmu_cmu_cmuref_p, CLK_CON_MUX_MUX_CMU_CMUREF, 0, 1),
+
+ /* ACC */
+ MUX(MOUT_CLKCMU_ACC_NOC, "mout_clkcmu_acc_noc",
+ mout_clkcmu_acc_noc_p, CLK_CON_MUX_MUX_CLKCMU_ACC_NOC, 0, 3),
+ MUX(MOUT_CLKCMU_ACC_ORB, "mout_clkcmu_acc_orb",
+ mout_clkcmu_acc_orb_p, CLK_CON_MUX_MUX_CLKCMU_ACC_ORB, 0, 3),
+
+ /* APM */
+ MUX(MOUT_CLKCMU_APM_NOC, "mout_clkcmu_apm_noc",
+ mout_clkcmu_apm_noc_p, CLK_CON_MUX_MUX_CLKCMU_APM_NOC, 0, 2),
+
+ /* AUD */
+ MUX(MOUT_CLKCMU_AUD_CPU, "mout_clkcmu_aud_cpu",
+ mout_clkcmu_aud_cpu_p, CLK_CON_MUX_MUX_CLKCMU_AUD_CPU, 0, 3),
+ MUX(MOUT_CLKCMU_AUD_NOC, "mout_clkcmu_aud_noc",
+ mout_clkcmu_aud_noc_p, CLK_CON_MUX_MUX_CLKCMU_AUD_NOC, 0, 2),
+
+ /* CPUCL0 */
+ MUX(MOUT_CLKCMU_CPUCL0_SWITCH, "mout_clkcmu_cpucl0_switch",
+ mout_clkcmu_cpucl0_switch_p, CLK_CON_MUX_MUX_CLKCMU_CPUCL0_SWITCH,
+ 0, 2),
+ MUX(MOUT_CLKCMU_CPUCL0_CLUSTER, "mout_clkcmu_cpucl0_cluster",
+ mout_clkcmu_cpucl0_cluster_p, CLK_CON_MUX_MUX_CLKCMU_CPUCL0_CLUSTER,
+ 0, 3),
+ MUX(MOUT_CLKCMU_CPUCL0_DBG, "mout_clkcmu_cpucl0_dbg",
+ mout_clkcmu_cpucl0_dbg_p, CLK_CON_MUX_MUX_CLKCMU_CPUCL0_DBG,
+ 0, 2),
+
+ /* CPUCL1 */
+ MUX(MOUT_CLKCMU_CPUCL1_SWITCH, "mout_clkcmu_cpucl1_switch",
+ mout_clkcmu_cpucl1_switch_p, CLK_CON_MUX_MUX_CLKCMU_CPUCL1_SWITCH,
+ 0, 2),
+ MUX(MOUT_CLKCMU_CPUCL1_CLUSTER, "mout_clkcmu_cpucl1_cluster",
+ mout_clkcmu_cpucl1_cluster_p, CLK_CON_MUX_MUX_CLKCMU_CPUCL1_CLUSTER,
+ 0, 3),
+
+ /* CPUCL2 */
+ MUX(MOUT_CLKCMU_CPUCL2_SWITCH, "mout_clkcmu_cpucl2_switch",
+ mout_clkcmu_cpucl2_switch_p, CLK_CON_MUX_MUX_CLKCMU_CPUCL2_SWITCH,
+ 0, 2),
+ MUX(MOUT_CLKCMU_CPUCL2_CLUSTER, "mout_clkcmu_cpucl2_cluster",
+ mout_clkcmu_cpucl2_cluster_p, CLK_CON_MUX_MUX_CLKCMU_CPUCL2_CLUSTER,
+ 0, 3),
+
+ /* DNC */
+ MUX(MOUT_CLKCMU_DNC_NOC, "mout_clkcmu_dnc_noc",
+ mout_clkcmu_dnc_noc_p, CLK_CON_MUX_MUX_CLKCMU_DNC_NOC, 0, 3),
+
+ /* DPTX */
+ MUX(MOUT_CLKCMU_DPTX_NOC, "mout_clkcmu_dptx_noc",
+ mout_clkcmu_dptx_noc_p, CLK_CON_MUX_MUX_CLKCMU_DPTX_NOC, 0, 2),
+ MUX(MOUT_CLKCMU_DPTX_DPGTC, "mout_clkcmu_dptx_dpgtc",
+ mout_clkcmu_dptx_dpgtc_p, CLK_CON_MUX_MUX_CLKCMU_DPTX_DPGTC, 0, 2),
+ MUX(MOUT_CLKCMU_DPTX_DPOSC, "mout_clkcmu_dptx_dposc",
+ mout_clkcmu_dptx_dposc_p, CLK_CON_MUX_MUX_CLKCMU_DPTX_DPOSC, 0, 1),
+
+ /* DPUB */
+ MUX(MOUT_CLKCMU_DPUB_NOC, "mout_clkcmu_dpub_noc",
+ mout_clkcmu_dpub_noc_p, CLK_CON_MUX_MUX_CLKCMU_DPUB_NOC, 0, 3),
+ MUX(MOUT_CLKCMU_DPUB_DSIM, "mout_clkcmu_dpub_dsim",
+ mout_clkcmu_dpub_dsim_p, CLK_CON_MUX_MUX_CLKCMU_DPUB_DSIM, 0, 1),
+
+ /* DPUF */
+ MUX(MOUT_CLKCMU_DPUF0_NOC, "mout_clkcmu_dpuf0_noc",
+ mout_clkcmu_dpuf_noc_p, CLK_CON_MUX_MUX_CLKCMU_DPUF0_NOC, 0, 3),
+ MUX(MOUT_CLKCMU_DPUF1_NOC, "mout_clkcmu_dpuf1_noc",
+ mout_clkcmu_dpuf_noc_p, CLK_CON_MUX_MUX_CLKCMU_DPUF1_NOC, 0, 3),
+ MUX(MOUT_CLKCMU_DPUF2_NOC, "mout_clkcmu_dpuf2_noc",
+ mout_clkcmu_dpuf_noc_p, CLK_CON_MUX_MUX_CLKCMU_DPUF2_NOC, 0, 3),
+
+ /* DSP */
+ MUX(MOUT_CLKCMU_DSP_NOC, "mout_clkcmu_dsp_noc",
+ mout_clkcmu_dsp_noc_p, CLK_CON_MUX_MUX_CLKCMU_DSP_NOC, 0, 3),
+
+ /* G3D */
+ MUX(MOUT_CLKCMU_G3D_SWITCH, "mout_clkcmu_g3d_switch",
+ mout_clkcmu_g3d_switch_p, CLK_CON_MUX_MUX_CLKCMU_G3D_SWITCH, 0, 2),
+ MUX(MOUT_CLKCMU_G3D_NOCP, "mout_clkcmu_g3d_nocp",
+ mout_clkcmu_g3d_nocp_p, CLK_CON_MUX_MUX_CLKCMU_G3D_NOCP, 0, 2),
+
+ /* GNPU */
+ MUX(MOUT_CLKCMU_GNPU_NOC, "mout_clkcmu_gnpu_noc",
+ mout_clkcmu_gnpu_noc_p, CLK_CON_MUX_MUX_CLKCMU_GNPU_NOC, 0, 3),
+
+ /* HSI0 */
+ MUX(MOUT_CLKCMU_HSI0_NOC, "mout_clkcmu_hsi0_noc",
+ mout_clkcmu_hsi0_noc_p, CLK_CON_MUX_MUX_CLKCMU_HSI0_NOC, 0, 2),
+
+ /* HSI1 */
+ MUX(MOUT_CLKCMU_HSI1_NOC, "mout_clkcmu_hsi1_noc",
+ mout_clkcmu_hsi1_noc_p, CLK_CON_MUX_MUX_CLKCMU_HSI1_NOC,
+ 0, 2),
+ MUX(MOUT_CLKCMU_HSI1_USBDRD, "mout_clkcmu_hsi1_usbdrd",
+ mout_clkcmu_hsi1_usbdrd_p, CLK_CON_MUX_MUX_CLKCMU_HSI1_USBDRD,
+ 0, 2),
+ MUX(MOUT_CLKCMU_HSI1_MMC_CARD, "mout_clkcmu_hsi1_mmc_card",
+ mout_clkcmu_hsi1_mmc_card_p, CLK_CON_MUX_MUX_CLKCMU_HSI1_MMC_CARD,
+ 0, 2),
+
+ /* HSI2 */
+ MUX(MOUT_CLKCMU_HSI2_NOC, "mout_clkcmu_hsi2_noc",
+ mout_clkcmu_hsi2_noc_p, CLK_CON_MUX_MUX_CLKCMU_HSI2_NOC,
+ 0, 2),
+ MUX(MOUT_CLKCMU_HSI2_NOC_UFS, "mout_clkcmu_hsi2_noc_ufs",
+ mout_clkcmu_hsi2_noc_ufs_p, CLK_CON_MUX_MUX_CLKCMU_HSI2_NOC_UFS,
+ 0, 2),
+ MUX(MOUT_CLKCMU_HSI2_UFS_EMBD, "mout_clkcmu_hsi2_ufs_embd",
+ mout_clkcmu_hsi2_ufs_embd_p, CLK_CON_MUX_MUX_CLKCMU_HSI2_UFS_EMBD,
+ 0, 2),
+ MUX(MOUT_CLKCMU_HSI2_ETHERNET, "mout_clkcmu_hsi2_ethernet",
+ mout_clkcmu_hsi2_ethernet_p, CLK_CON_MUX_MUX_CLKCMU_HSI2_ETHERNET,
+ 0, 2),
+
+ /* ISP */
+ MUX(MOUT_CLKCMU_ISP_NOC, "mout_clkcmu_isp_noc",
+ mout_clkcmu_isp_noc_p, CLK_CON_MUX_MUX_CLKCMU_ISP_NOC, 0, 3),
+
+ /* M2M */
+ MUX(MOUT_CLKCMU_M2M_NOC, "mout_clkcmu_m2m_noc",
+ mout_clkcmu_m2m_noc_p, CLK_CON_MUX_MUX_CLKCMU_M2M_NOC, 0, 2),
+ MUX(MOUT_CLKCMU_M2M_JPEG, "mout_clkcmu_m2m_jpeg",
+ mout_clkcmu_m2m_jpeg_p, CLK_CON_MUX_MUX_CLKCMU_M2M_JPEG, 0, 2),
+
+ /* MFC */
+ MUX(MOUT_CLKCMU_MFC_MFC, "mout_clkcmu_mfc_mfc",
+ mout_clkcmu_mfc_mfc_p, CLK_CON_MUX_MUX_CLKCMU_MFC_MFC, 0, 2),
+ MUX(MOUT_CLKCMU_MFC_WFD, "mout_clkcmu_mfc_wfd",
+ mout_clkcmu_mfc_wfd_p, CLK_CON_MUX_MUX_CLKCMU_MFC_WFD, 0, 2),
+
+ /* MFD */
+ MUX(MOUT_CLKCMU_MFD_NOC, "mout_clkcmu_mfd_noc",
+ mout_clkcmu_mfd_noc_p, CLK_CON_MUX_MUX_CLKCMU_MFD_NOC, 0, 3),
+
+ /* MIF */
+ MUX(MOUT_CLKCMU_MIF_SWITCH, "mout_clkcmu_mif_switch",
+ mout_clkcmu_mif_switch_p, CLK_CON_MUX_MUX_CLKCMU_MIF_SWITCH, 0, 3),
+ MUX(MOUT_CLKCMU_MIF_NOCP, "mout_clkcmu_mif_nocp",
+ mout_clkcmu_mif_nocp_p, CLK_CON_MUX_MUX_CLKCMU_MIF_NOCP, 0, 2),
+
+ /* MISC */
+ MUX(MOUT_CLKCMU_MISC_NOC, "mout_clkcmu_misc_noc",
+ mout_clkcmu_misc_noc_p, CLK_CON_MUX_MUX_CLKCMU_MISC_NOC, 0, 2),
+
+ /* NOCL0 */
+ MUX(MOUT_CLKCMU_NOCL0_NOC, "mout_clkcmu_nocl0_noc",
+ mout_clkcmu_nocl0_noc_p, CLK_CON_MUX_MUX_CLKCMU_NOCL0_NOC, 0, 3),
+
+ /* NOCL1 */
+ MUX(MOUT_CLKCMU_NOCL1_NOC, "mout_clkcmu_nocl1_noc",
+ mout_clkcmu_nocl1_noc_p, CLK_CON_MUX_MUX_CLKCMU_NOCL1_NOC, 0, 3),
+
+ /* NOCL2 */
+ MUX(MOUT_CLKCMU_NOCL2_NOC, "mout_clkcmu_nocl2_noc",
+ mout_clkcmu_nocl2_noc_p, CLK_CON_MUX_MUX_CLKCMU_NOCL2_NOC, 0, 3),
+
+ /* PERIC0 */
+ MUX(MOUT_CLKCMU_PERIC0_NOC, "mout_clkcmu_peric0_noc",
+ mout_clkcmu_peric0_noc_p, CLK_CON_MUX_MUX_CLKCMU_PERIC0_NOC, 0, 1),
+ MUX(MOUT_CLKCMU_PERIC0_IP, "mout_clkcmu_peric0_ip",
+ mout_clkcmu_peric0_ip_p, CLK_CON_MUX_MUX_CLKCMU_PERIC0_IP, 0, 1),
+
+ /* PERIC1 */
+ MUX(MOUT_CLKCMU_PERIC1_NOC, "mout_clkcmu_peric1_noc",
+ mout_clkcmu_peric1_noc_p, CLK_CON_MUX_MUX_CLKCMU_PERIC1_NOC, 0, 1),
+ MUX(MOUT_CLKCMU_PERIC1_IP, "mout_clkcmu_peric1_ip",
+ mout_clkcmu_peric1_ip_p, CLK_CON_MUX_MUX_CLKCMU_PERIC1_IP, 0, 1),
+
+ /* SDMA */
+ MUX(MOUT_CLKCMU_SDMA_NOC, "mout_clkcmu_sdma_noc",
+ mout_clkcmu_sdma_noc_p, CLK_CON_MUX_MUX_CLKCMU_SDMA_NOC, 0, 3),
+
+ /* SNW */
+ MUX(MOUT_CLKCMU_SNW_NOC, "mout_clkcmu_snw_noc",
+ mout_clkcmu_snw_noc_p, CLK_CON_MUX_MUX_CLKCMU_SNW_NOC, 0, 3),
+
+ /* SSP */
+ MUX(MOUT_CLKCMU_SSP_NOC, "mout_clkcmu_ssp_noc",
+ mout_clkcmu_ssp_noc_p, CLK_CON_MUX_MUX_CLKCMU_SSP_NOC, 0, 2),
+
+ /* TAA */
+ MUX(MOUT_CLKCMU_TAA_NOC, "mout_clkcmu_taa_noc",
+ mout_clkcmu_taa_noc_p, CLK_CON_MUX_MUX_CLKCMU_TAA_NOC, 0, 3),
+};
+
+static const struct samsung_div_clock top_div_clks[] __initconst = {
+ /* CMU_TOP_PURECLKCOMP */
+
+ /* BOOST */
+ DIV(DOUT_CLKCMU_CMU_BOOST, "dout_clkcmu_cmu_boost",
+ "mout_clkcmu_cmu_boost", CLK_CON_DIV_DIV_CLKCMU_CMU_BOOST, 0, 2),
+
+ /* ACC */
+ DIV(DOUT_CLKCMU_ACC_NOC, "dout_clkcmu_acc_noc",
+ "mout_clkcmu_acc_noc", CLK_CON_DIV_CLKCMU_ACC_NOC, 0, 4),
+ DIV(DOUT_CLKCMU_ACC_ORB, "dout_clkcmu_acc_orb",
+ "mout_clkcmu_acc_orb", CLK_CON_DIV_CLKCMU_ACC_ORB, 0, 4),
+
+ /* APM */
+ DIV(DOUT_CLKCMU_APM_NOC, "dout_clkcmu_apm_noc",
+ "mout_clkcmu_apm_noc", CLK_CON_DIV_CLKCMU_APM_NOC, 0, 3),
+
+ /* AUD */
+ DIV(DOUT_CLKCMU_AUD_CPU, "dout_clkcmu_aud_cpu",
+ "mout_clkcmu_aud_cpu", CLK_CON_DIV_CLKCMU_AUD_CPU, 0, 3),
+ DIV(DOUT_CLKCMU_AUD_NOC, "dout_clkcmu_aud_noc",
+ "mout_clkcmu_aud_noc", CLK_CON_DIV_CLKCMU_AUD_NOC, 0, 4),
+
+ /* CPUCL0 */
+ DIV(DOUT_CLKCMU_CPUCL0_SWITCH, "dout_clkcmu_cpucl0_switch",
+ "mout_clkcmu_cpucl0_switch",
+ CLK_CON_DIV_CLKCMU_CPUCL0_SWITCH, 0, 3),
+ DIV(DOUT_CLKCMU_CPUCL0_CLUSTER, "dout_clkcmu_cpucl0_cluster",
+ "mout_clkcmu_cpucl0_cluster",
+ CLK_CON_DIV_CLKCMU_CPUCL0_CLUSTER, 0, 3),
+ DIV(DOUT_CLKCMU_CPUCL0_DBG, "dout_clkcmu_cpucl0_dbg",
+ "mout_clkcmu_cpucl0_dbg",
+ CLK_CON_DIV_CLKCMU_CPUCL0_DBG, 0, 4),
+
+ /* CPUCL1 */
+ DIV(DOUT_CLKCMU_CPUCL1_SWITCH, "dout_clkcmu_cpucl1_switch",
+ "mout_clkcmu_cpucl1_switch",
+ CLK_CON_DIV_CLKCMU_CPUCL1_SWITCH, 0, 3),
+ DIV(DOUT_CLKCMU_CPUCL1_CLUSTER, "dout_clkcmu_cpucl1_cluster",
+ "mout_clkcmu_cpucl1_cluster",
+ CLK_CON_DIV_CLKCMU_CPUCL1_CLUSTER, 0, 3),
+
+ /* CPUCL2 */
+ DIV(DOUT_CLKCMU_CPUCL2_SWITCH, "dout_clkcmu_cpucl2_switch",
+ "mout_clkcmu_cpucl2_switch",
+ CLK_CON_DIV_CLKCMU_CPUCL2_SWITCH, 0, 3),
+ DIV(DOUT_CLKCMU_CPUCL2_CLUSTER, "dout_clkcmu_cpucl2_cluster",
+ "mout_clkcmu_cpucl2_cluster",
+ CLK_CON_DIV_CLKCMU_CPUCL2_CLUSTER, 0, 3),
+
+ /* DNC */
+ DIV(DOUT_CLKCMU_DNC_NOC, "dout_clkcmu_dnc_noc",
+ "mout_clkcmu_dnc_noc", CLK_CON_DIV_CLKCMU_DNC_NOC, 0, 4),
+
+ /* DPTX */
+ DIV(DOUT_CLKCMU_DPTX_NOC, "dout_clkcmu_dptx_noc",
+ "mout_clkcmu_dptx_noc", CLK_CON_DIV_CLKCMU_DPTX_NOC, 0, 4),
+ DIV(DOUT_CLKCMU_DPTX_DPGTC, "dout_clkcmu_dptx_dpgtc",
+ "mout_clkcmu_dptx_dpgtc", CLK_CON_DIV_CLKCMU_DPTX_DPGTC, 0, 3),
+ DIV(DOUT_CLKCMU_DPTX_DPOSC, "dout_clkcmu_dptx_dposc",
+ "mout_clkcmu_dptx_dposc", CLK_CON_DIV_CLKCMU_DPTX_DPOSC, 0, 5),
+
+ /* DPUB */
+ DIV(DOUT_CLKCMU_DPUB_NOC, "dout_clkcmu_dpub_noc",
+ "mout_clkcmu_dpub_noc", CLK_CON_DIV_CLKCMU_DPUB_NOC, 0, 4),
+ DIV(DOUT_CLKCMU_DPUB_DSIM, "dout_clkcmu_dpub_dsim",
+ "mout_clkcmu_dpub_dsim", CLK_CON_DIV_CLKCMU_DPUB_DSIM, 0, 4),
+
+ /* DPUF */
+ DIV(DOUT_CLKCMU_DPUF0_NOC, "dout_clkcmu_dpuf0_noc",
+ "mout_clkcmu_dpuf0_noc", CLK_CON_DIV_CLKCMU_DPUF0_NOC, 0, 4),
+ DIV(DOUT_CLKCMU_DPUF1_NOC, "dout_clkcmu_dpuf1_noc",
+ "mout_clkcmu_dpuf1_noc", CLK_CON_DIV_CLKCMU_DPUF1_NOC, 0, 4),
+ DIV(DOUT_CLKCMU_DPUF2_NOC, "dout_clkcmu_dpuf2_noc",
+ "mout_clkcmu_dpuf2_noc", CLK_CON_DIV_CLKCMU_DPUF2_NOC, 0, 4),
+
+ /* DSP */
+ DIV(DOUT_CLKCMU_DSP_NOC, "dout_clkcmu_dsp_noc",
+ "mout_clkcmu_dsp_noc", CLK_CON_DIV_CLKCMU_DSP_NOC, 0, 4),
+
+ /* G3D */
+ DIV(DOUT_CLKCMU_G3D_SWITCH, "dout_clkcmu_g3d_switch",
+ "mout_clkcmu_g3d_switch", CLK_CON_DIV_CLKCMU_G3D_SWITCH, 0, 3),
+ DIV(DOUT_CLKCMU_G3D_NOCP, "dout_clkcmu_g3d_nocp",
+ "mout_clkcmu_g3d_nocp", CLK_CON_DIV_CLKCMU_G3D_NOCP, 0, 3),
+
+ /* GNPU */
+ DIV(DOUT_CLKCMU_GNPU_NOC, "dout_clkcmu_gnpu_noc",
+ "mout_clkcmu_gnpu_noc", CLK_CON_DIV_CLKCMU_GNPU_NOC, 0, 4),
+
+ /* HSI0 */
+ DIV(DOUT_CLKCMU_HSI0_NOC, "dout_clkcmu_hsi0_noc",
+ "mout_clkcmu_hsi0_noc", CLK_CON_DIV_CLKCMU_HSI0_NOC, 0, 4),
+
+ /* HSI1 */
+ DIV(DOUT_CLKCMU_HSI1_NOC, "dout_clkcmu_hsi1_noc",
+ "mout_clkcmu_hsi1_noc", CLK_CON_DIV_CLKCMU_HSI1_NOC, 0, 4),
+ DIV(DOUT_CLKCMU_HSI1_USBDRD, "dout_clkcmu_hsi1_usbdrd",
+ "mout_clkcmu_hsi1_usbdrd", CLK_CON_DIV_CLKCMU_HSI1_USBDRD, 0, 4),
+ DIV(DOUT_CLKCMU_HSI1_MMC_CARD, "dout_clkcmu_hsi1_mmc_card",
+ "mout_clkcmu_hsi1_mmc_card", CLK_CON_DIV_CLKCMU_HSI1_MMC_CARD, 0, 9),
+
+ /* HSI2 */
+ DIV(DOUT_CLKCMU_HSI2_NOC, "dout_clkcmu_hsi2_noc",
+ "mout_clkcmu_hsi2_noc", CLK_CON_DIV_CLKCMU_HSI2_NOC, 0, 4),
+ DIV(DOUT_CLKCMU_HSI2_NOC_UFS, "dout_clkcmu_hsi2_noc_ufs",
+ "mout_clkcmu_hsi2_noc_ufs", CLK_CON_DIV_CLKCMU_HSI2_NOC_UFS, 0, 4),
+ DIV(DOUT_CLKCMU_HSI2_UFS_EMBD, "dout_clkcmu_hsi2_ufs_embd",
+ "mout_clkcmu_hsi2_ufs_embd", CLK_CON_DIV_CLKCMU_HSI2_UFS_EMBD, 0, 3),
+ DIV(DOUT_CLKCMU_HSI2_ETHERNET, "dout_clkcmu_hsi2_ethernet",
+ "mout_clkcmu_hsi2_ethernet", CLK_CON_DIV_CLKCMU_HSI2_ETHERNET, 0, 3),
+
+ /* ISP */
+ DIV(DOUT_CLKCMU_ISP_NOC, "dout_clkcmu_isp_noc",
+ "mout_clkcmu_isp_noc", CLK_CON_DIV_CLKCMU_ISP_NOC, 0, 4),
+
+ /* M2M */
+ DIV(DOUT_CLKCMU_M2M_NOC, "dout_clkcmu_m2m_noc",
+ "mout_clkcmu_m2m_noc", CLK_CON_DIV_CLKCMU_M2M_NOC, 0, 4),
+ DIV(DOUT_CLKCMU_M2M_JPEG, "dout_clkcmu_m2m_jpeg",
+ "mout_clkcmu_m2m_jpeg", CLK_CON_DIV_CLKCMU_M2M_JPEG, 0, 4),
+
+ /* MFC */
+ DIV(DOUT_CLKCMU_MFC_MFC, "dout_clkcmu_mfc_mfc",
+ "mout_clkcmu_mfc_mfc", CLK_CON_DIV_CLKCMU_MFC_MFC, 0, 4),
+ DIV(DOUT_CLKCMU_MFC_WFD, "dout_clkcmu_mfc_wfd",
+ "mout_clkcmu_mfc_wfd", CLK_CON_DIV_CLKCMU_MFC_WFD, 0, 4),
+
+ /* MFD */
+ DIV(DOUT_CLKCMU_MFD_NOC, "dout_clkcmu_mfd_noc",
+ "mout_clkcmu_mfd_noc", CLK_CON_DIV_CLKCMU_MFD_NOC, 0, 4),
+
+ /* MIF */
+ DIV(DOUT_CLKCMU_MIF_NOCP, "dout_clkcmu_mif_nocp",
+ "mout_clkcmu_mif_nocp", CLK_CON_DIV_CLKCMU_MIF_NOCP, 0, 4),
+
+ /* MISC */
+ DIV(DOUT_CLKCMU_MISC_NOC, "dout_clkcmu_misc_noc",
+ "mout_clkcmu_misc_noc", CLK_CON_DIV_CLKCMU_MISC_NOC, 0, 4),
+
+ /* NOCL0 */
+ DIV(DOUT_CLKCMU_NOCL0_NOC, "dout_clkcmu_nocl0_noc",
+ "mout_clkcmu_nocl0_noc", CLK_CON_DIV_CLKCMU_NOCL0_NOC, 0, 4),
+
+ /* NOCL1 */
+ DIV(DOUT_CLKCMU_NOCL1_NOC, "dout_clkcmu_nocl1_noc",
+ "mout_clkcmu_nocl1_noc", CLK_CON_DIV_CLKCMU_NOCL1_NOC, 0, 4),
+
+ /* NOCL2 */
+ DIV(DOUT_CLKCMU_NOCL2_NOC, "dout_clkcmu_nocl2_noc",
+ "mout_clkcmu_nocl2_noc", CLK_CON_DIV_CLKCMU_NOCL2_NOC, 0, 4),
+
+ /* PERIC0 */
+ DIV(DOUT_CLKCMU_PERIC0_NOC, "dout_clkcmu_peric0_noc",
+ "mout_clkcmu_peric0_noc", CLK_CON_DIV_CLKCMU_PERIC0_NOC, 0, 4),
+ DIV(DOUT_CLKCMU_PERIC0_IP, "dout_clkcmu_peric0_ip",
+ "mout_clkcmu_peric0_ip", CLK_CON_DIV_CLKCMU_PERIC0_IP, 0, 4),
+
+ /* PERIC1 */
+ DIV(DOUT_CLKCMU_PERIC1_NOC, "dout_clkcmu_peric1_noc",
+ "mout_clkcmu_peric1_noc", CLK_CON_DIV_CLKCMU_PERIC1_NOC, 0, 4),
+ DIV(DOUT_CLKCMU_PERIC1_IP, "dout_clkcmu_peric1_ip",
+ "mout_clkcmu_peric1_ip", CLK_CON_DIV_CLKCMU_PERIC1_IP, 0, 4),
+
+ /* SDMA */
+ DIV(DOUT_CLKCMU_SDMA_NOC, "dout_clkcmu_sdma_noc",
+ "mout_clkcmu_sdma_noc", CLK_CON_DIV_CLKCMU_SDMA_NOC, 0, 4),
+
+ /* SNW */
+ DIV(DOUT_CLKCMU_SNW_NOC, "dout_clkcmu_snw_noc",
+ "mout_clkcmu_snw_noc", CLK_CON_DIV_CLKCMU_SNW_NOC, 0, 4),
+
+ /* SSP */
+ DIV(DOUT_CLKCMU_SSP_NOC, "dout_clkcmu_ssp_noc",
+ "mout_clkcmu_ssp_noc", CLK_CON_DIV_CLKCMU_SSP_NOC, 0, 4),
+
+ /* TAA */
+ DIV(DOUT_CLKCMU_TAA_NOC, "dout_clkcmu_taa_noc",
+ "mout_clkcmu_taa_noc", CLK_CON_DIV_CLKCMU_TAA_NOC, 0, 4),
+};
+
+static const struct samsung_fixed_factor_clock top_fixed_factor_clks[] __initconst = {
+ FFACTOR(DOUT_SHARED0_DIV1, "dout_shared0_div1",
+ "mout_shared0_pll", 1, 1, 0),
+ FFACTOR(DOUT_SHARED0_DIV2, "dout_shared0_div2",
+ "mout_shared0_pll", 1, 2, 0),
+ FFACTOR(DOUT_SHARED0_DIV3, "dout_shared0_div3",
+ "mout_shared0_pll", 1, 3, 0),
+ FFACTOR(DOUT_SHARED0_DIV4, "dout_shared0_div4",
+ "mout_shared0_pll", 1, 4, 0),
+ FFACTOR(DOUT_SHARED1_DIV1, "dout_shared1_div1",
+ "mout_shared1_pll", 1, 1, 0),
+ FFACTOR(DOUT_SHARED1_DIV2, "dout_shared1_div2",
+ "mout_shared1_pll", 1, 2, 0),
+ FFACTOR(DOUT_SHARED1_DIV3, "dout_shared1_div3",
+ "mout_shared1_pll", 1, 3, 0),
+ FFACTOR(DOUT_SHARED1_DIV4, "dout_shared1_div4",
+ "mout_shared1_pll", 1, 4, 0),
+ FFACTOR(DOUT_SHARED2_DIV1, "dout_shared2_div1",
+ "mout_shared2_pll", 1, 1, 0),
+ FFACTOR(DOUT_SHARED2_DIV2, "dout_shared2_div2",
+ "mout_shared2_pll", 1, 2, 0),
+ FFACTOR(DOUT_SHARED2_DIV3, "dout_shared2_div3",
+ "mout_shared2_pll", 1, 3, 0),
+ FFACTOR(DOUT_SHARED2_DIV4, "dout_shared2_div4",
+ "mout_shared2_pll", 1, 4, 0),
+ FFACTOR(DOUT_SHARED3_DIV1, "dout_shared3_div1",
+ "mout_shared3_pll", 1, 1, 0),
+ FFACTOR(DOUT_SHARED3_DIV2, "dout_shared3_div2",
+ "mout_shared3_pll", 1, 2, 0),
+ FFACTOR(DOUT_SHARED3_DIV3, "dout_shared3_div3",
+ "mout_shared3_pll", 1, 3, 0),
+ FFACTOR(DOUT_SHARED3_DIV4, "dout_shared3_div4",
+ "mout_shared3_pll", 1, 4, 0),
+ FFACTOR(DOUT_SHARED4_DIV1, "dout_shared4_div1",
+ "mout_shared4_pll", 1, 1, 0),
+ FFACTOR(DOUT_SHARED4_DIV2, "dout_shared4_div2",
+ "mout_shared4_pll", 1, 2, 0),
+ FFACTOR(DOUT_SHARED4_DIV3, "dout_shared4_div3",
+ "mout_shared4_pll", 1, 3, 0),
+ FFACTOR(DOUT_SHARED4_DIV4, "dout_shared4_div4",
+ "mout_shared4_pll", 1, 4, 0),
+ FFACTOR(DOUT_SHARED5_DIV1, "dout_shared5_div1",
+ "mout_shared5_pll", 1, 1, 0),
+ FFACTOR(DOUT_SHARED5_DIV2, "dout_shared5_div2",
+ "mout_shared5_pll", 1, 2, 0),
+ FFACTOR(DOUT_SHARED5_DIV3, "dout_shared5_div3",
+ "mout_shared5_pll", 1, 3, 0),
+ FFACTOR(DOUT_SHARED5_DIV4, "dout_shared5_div4",
+ "mout_shared5_pll", 1, 4, 0),
+};
+
+static const struct samsung_cmu_info top_cmu_info __initconst = {
+ .pll_clks = top_pll_clks,
+ .nr_pll_clks = ARRAY_SIZE(top_pll_clks),
+ .mux_clks = top_mux_clks,
+ .nr_mux_clks = ARRAY_SIZE(top_mux_clks),
+ .div_clks = top_div_clks,
+ .nr_div_clks = ARRAY_SIZE(top_div_clks),
+ .fixed_factor_clks = top_fixed_factor_clks,
+ .nr_fixed_factor_clks = ARRAY_SIZE(top_fixed_factor_clks),
+ .nr_clk_ids = CLKS_NR_TOP,
+ .clk_regs = top_clk_regs,
+ .nr_clk_regs = ARRAY_SIZE(top_clk_regs),
+};
+
+static void __init exynosautov920_cmu_top_init(struct device_node *np)
+{
+ exynos_arm64_register_cmu(NULL, np, &top_cmu_info);
+}
+
+/* Register CMU_TOP early, as it's a dependency for other early domains */
+CLK_OF_DECLARE(exynosautov920_cmu_top, "samsung,exynosautov920-cmu-top",
+ exynosautov920_cmu_top_init);
+
+/* ---- CMU_PERIC0 --------------------------------------------------------- */
+
+/* Register Offset definitions for CMU_PERIC0 (0x10800000) */
+#define PLL_CON0_MUX_CLKCMU_PERIC0_IP_USER 0x0600
+#define PLL_CON0_MUX_CLKCMU_PERIC0_NOC_USER 0x0610
+#define CLK_CON_MUX_MUX_CLK_PERIC0_I3C 0x1000
+#define CLK_CON_MUX_MUX_CLK_PERIC0_USI00_USI 0x1004
+#define CLK_CON_MUX_MUX_CLK_PERIC0_USI01_USI 0x1008
+#define CLK_CON_MUX_MUX_CLK_PERIC0_USI02_USI 0x100c
+#define CLK_CON_MUX_MUX_CLK_PERIC0_USI03_USI 0x1010
+#define CLK_CON_MUX_MUX_CLK_PERIC0_USI04_USI 0x1014
+#define CLK_CON_MUX_MUX_CLK_PERIC0_USI05_USI 0x1018
+#define CLK_CON_MUX_MUX_CLK_PERIC0_USI06_USI 0x101c
+#define CLK_CON_MUX_MUX_CLK_PERIC0_USI07_USI 0x1020
+#define CLK_CON_MUX_MUX_CLK_PERIC0_USI08_USI 0x1024
+#define CLK_CON_MUX_MUX_CLK_PERIC0_USI_I2C 0x1028
+#define CLK_CON_DIV_DIV_CLK_PERIC0_I3C 0x1800
+#define CLK_CON_DIV_DIV_CLK_PERIC0_USI00_USI 0x1804
+#define CLK_CON_DIV_DIV_CLK_PERIC0_USI01_USI 0x1808
+#define CLK_CON_DIV_DIV_CLK_PERIC0_USI02_USI 0x180c
+#define CLK_CON_DIV_DIV_CLK_PERIC0_USI03_USI 0x1810
+#define CLK_CON_DIV_DIV_CLK_PERIC0_USI04_USI 0x1814
+#define CLK_CON_DIV_DIV_CLK_PERIC0_USI05_USI 0x1818
+#define CLK_CON_DIV_DIV_CLK_PERIC0_USI06_USI 0x181c
+#define CLK_CON_DIV_DIV_CLK_PERIC0_USI07_USI 0x1820
+#define CLK_CON_DIV_DIV_CLK_PERIC0_USI08_USI 0x1824
+#define CLK_CON_DIV_DIV_CLK_PERIC0_USI_I2C 0x1828
+
+static const unsigned long peric0_clk_regs[] __initconst = {
+ PLL_CON0_MUX_CLKCMU_PERIC0_IP_USER,
+ PLL_CON0_MUX_CLKCMU_PERIC0_NOC_USER,
+ CLK_CON_MUX_MUX_CLK_PERIC0_I3C,
+ CLK_CON_MUX_MUX_CLK_PERIC0_USI00_USI,
+ CLK_CON_MUX_MUX_CLK_PERIC0_USI01_USI,
+ CLK_CON_MUX_MUX_CLK_PERIC0_USI02_USI,
+ CLK_CON_MUX_MUX_CLK_PERIC0_USI03_USI,
+ CLK_CON_MUX_MUX_CLK_PERIC0_USI04_USI,
+ CLK_CON_MUX_MUX_CLK_PERIC0_USI05_USI,
+ CLK_CON_MUX_MUX_CLK_PERIC0_USI06_USI,
+ CLK_CON_MUX_MUX_CLK_PERIC0_USI07_USI,
+ CLK_CON_MUX_MUX_CLK_PERIC0_USI08_USI,
+ CLK_CON_MUX_MUX_CLK_PERIC0_USI_I2C,
+ CLK_CON_DIV_DIV_CLK_PERIC0_I3C,
+ CLK_CON_DIV_DIV_CLK_PERIC0_USI00_USI,
+ CLK_CON_DIV_DIV_CLK_PERIC0_USI01_USI,
+ CLK_CON_DIV_DIV_CLK_PERIC0_USI02_USI,
+ CLK_CON_DIV_DIV_CLK_PERIC0_USI03_USI,
+ CLK_CON_DIV_DIV_CLK_PERIC0_USI04_USI,
+ CLK_CON_DIV_DIV_CLK_PERIC0_USI05_USI,
+ CLK_CON_DIV_DIV_CLK_PERIC0_USI06_USI,
+ CLK_CON_DIV_DIV_CLK_PERIC0_USI07_USI,
+ CLK_CON_DIV_DIV_CLK_PERIC0_USI08_USI,
+ CLK_CON_DIV_DIV_CLK_PERIC0_USI_I2C,
+};
+
+/* List of parent clocks for Muxes in CMU_PERIC0 */
+PNAME(mout_peric0_ip_user_p) = { "oscclk", "dout_clkcmu_peric0_ip" };
+PNAME(mout_peric0_noc_user_p) = { "oscclk", "dout_clkcmu_peric0_noc" };
+PNAME(mout_peric0_usi_p) = { "oscclk", "mout_peric0_ip_user" };
+
+static const struct samsung_mux_clock peric0_mux_clks[] __initconst = {
+ MUX(CLK_MOUT_PERIC0_IP_USER, "mout_peric0_ip_user",
+ mout_peric0_ip_user_p, PLL_CON0_MUX_CLKCMU_PERIC0_IP_USER, 4, 1),
+ MUX(CLK_MOUT_PERIC0_NOC_USER, "mout_peric0_noc_user",
+ mout_peric0_noc_user_p, PLL_CON0_MUX_CLKCMU_PERIC0_NOC_USER, 4, 1),
+ /* USI00 ~ USI08 */
+ MUX(CLK_MOUT_PERIC0_USI00_USI, "mout_peric0_usi00_usi",
+ mout_peric0_usi_p, CLK_CON_MUX_MUX_CLK_PERIC0_USI00_USI, 0, 1),
+ MUX(CLK_MOUT_PERIC0_USI01_USI, "mout_peric0_usi01_usi",
+ mout_peric0_usi_p, CLK_CON_MUX_MUX_CLK_PERIC0_USI01_USI, 0, 1),
+ MUX(CLK_MOUT_PERIC0_USI02_USI, "mout_peric0_usi02_usi",
+ mout_peric0_usi_p, CLK_CON_MUX_MUX_CLK_PERIC0_USI02_USI, 0, 1),
+ MUX(CLK_MOUT_PERIC0_USI03_USI, "mout_peric0_usi03_usi",
+ mout_peric0_usi_p, CLK_CON_MUX_MUX_CLK_PERIC0_USI03_USI, 0, 1),
+ MUX(CLK_MOUT_PERIC0_USI04_USI, "mout_peric0_usi04_usi",
+ mout_peric0_usi_p, CLK_CON_MUX_MUX_CLK_PERIC0_USI04_USI, 0, 1),
+ MUX(CLK_MOUT_PERIC0_USI05_USI, "mout_peric0_usi05_usi",
+ mout_peric0_usi_p, CLK_CON_MUX_MUX_CLK_PERIC0_USI05_USI, 0, 1),
+ MUX(CLK_MOUT_PERIC0_USI06_USI, "mout_peric0_usi06_usi",
+ mout_peric0_usi_p, CLK_CON_MUX_MUX_CLK_PERIC0_USI06_USI, 0, 1),
+ MUX(CLK_MOUT_PERIC0_USI07_USI, "mout_peric0_usi07_usi",
+ mout_peric0_usi_p, CLK_CON_MUX_MUX_CLK_PERIC0_USI07_USI, 0, 1),
+ MUX(CLK_MOUT_PERIC0_USI08_USI, "mout_peric0_usi08_usi",
+ mout_peric0_usi_p, CLK_CON_MUX_MUX_CLK_PERIC0_USI08_USI, 0, 1),
+ /* USI_I2C */
+ MUX(CLK_MOUT_PERIC0_USI_I2C, "mout_peric0_usi_i2c",
+ mout_peric0_usi_p, CLK_CON_MUX_MUX_CLK_PERIC0_USI_I2C, 0, 1),
+ /* USI_I3C */
+ MUX(CLK_MOUT_PERIC0_I3C, "mout_peric0_i3c",
+ mout_peric0_usi_p, CLK_CON_MUX_MUX_CLK_PERIC0_I3C, 0, 1),
+};
+
+static const struct samsung_div_clock peric0_div_clks[] __initconst = {
+ /* USI00 ~ USI08 */
+ DIV(CLK_DOUT_PERIC0_USI00_USI, "dout_peric0_usi00_usi",
+ "mout_peric0_usi00_usi", CLK_CON_DIV_DIV_CLK_PERIC0_USI00_USI,
+ 0, 4),
+ DIV(CLK_DOUT_PERIC0_USI01_USI, "dout_peric0_usi01_usi",
+ "mout_peric0_usi01_usi", CLK_CON_DIV_DIV_CLK_PERIC0_USI01_USI,
+ 0, 4),
+ DIV(CLK_DOUT_PERIC0_USI02_USI, "dout_peric0_usi02_usi",
+ "mout_peric0_usi02_usi", CLK_CON_DIV_DIV_CLK_PERIC0_USI02_USI,
+ 0, 4),
+ DIV(CLK_DOUT_PERIC0_USI03_USI, "dout_peric0_usi03_usi",
+ "mout_peric0_usi03_usi", CLK_CON_DIV_DIV_CLK_PERIC0_USI03_USI,
+ 0, 4),
+ DIV(CLK_DOUT_PERIC0_USI04_USI, "dout_peric0_usi04_usi",
+ "mout_peric0_usi04_usi", CLK_CON_DIV_DIV_CLK_PERIC0_USI04_USI,
+ 0, 4),
+ DIV(CLK_DOUT_PERIC0_USI05_USI, "dout_peric0_usi05_usi",
+ "mout_peric0_usi05_usi", CLK_CON_DIV_DIV_CLK_PERIC0_USI05_USI,
+ 0, 4),
+ DIV(CLK_DOUT_PERIC0_USI06_USI, "dout_peric0_usi06_usi",
+ "mout_peric0_usi06_usi", CLK_CON_DIV_DIV_CLK_PERIC0_USI06_USI,
+ 0, 4),
+ DIV(CLK_DOUT_PERIC0_USI07_USI, "dout_peric0_usi07_usi",
+ "mout_peric0_usi07_usi", CLK_CON_DIV_DIV_CLK_PERIC0_USI07_USI,
+ 0, 4),
+ DIV(CLK_DOUT_PERIC0_USI08_USI, "dout_peric0_usi08_usi",
+ "mout_peric0_usi08_usi", CLK_CON_DIV_DIV_CLK_PERIC0_USI08_USI,
+ 0, 4),
+ /* USI_I2C */
+ DIV(CLK_DOUT_PERIC0_USI_I2C, "dout_peric0_usi_i2c",
+ "mout_peric0_usi_i2c", CLK_CON_DIV_DIV_CLK_PERIC0_USI_I2C, 0, 4),
+ /* USI_I3C */
+ DIV(CLK_DOUT_PERIC0_I3C, "dout_peric0_i3c",
+ "mout_peric0_i3c", CLK_CON_DIV_DIV_CLK_PERIC0_I3C, 0, 4),
+};
+
+static const struct samsung_cmu_info peric0_cmu_info __initconst = {
+ .mux_clks = peric0_mux_clks,
+ .nr_mux_clks = ARRAY_SIZE(peric0_mux_clks),
+ .div_clks = peric0_div_clks,
+ .nr_div_clks = ARRAY_SIZE(peric0_div_clks),
+ .nr_clk_ids = CLKS_NR_PERIC0,
+ .clk_regs = peric0_clk_regs,
+ .nr_clk_regs = ARRAY_SIZE(peric0_clk_regs),
+ .clk_name = "dout_clkcmu_peric0_noc",
+};
+
+static int __init exynosautov920_cmu_probe(struct platform_device *pdev)
+{
+ const struct samsung_cmu_info *info;
+ struct device *dev = &pdev->dev;
+
+ info = of_device_get_match_data(dev);
+ exynos_arm64_register_cmu(dev, dev->of_node, info);
+
+ return 0;
+}
+
+static const struct of_device_id exynosautov920_cmu_of_match[] = {
+ {
+ .compatible = "samsung,exynosautov920-cmu-peric0",
+ .data = &peric0_cmu_info,
+ },
+};
+
+static struct platform_driver exynosautov920_cmu_driver __refdata = {
+ .driver = {
+ .name = "exynosautov920-cmu",
+ .of_match_table = exynosautov920_cmu_of_match,
+ .suppress_bind_attrs = true,
+ },
+ .probe = exynosautov920_cmu_probe,
+};
+
+static int __init exynosautov920_cmu_init(void)
+{
+ return platform_driver_register(&exynosautov920_cmu_driver);
+}
+core_initcall(exynosautov920_cmu_init);
--
2.45.2
^ permalink raw reply related [flat|nested] 23+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-22 22:33 ` [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings Sunyeal Hong
@ 2024-07-23 20:57 ` Rob Herring
2024-07-25 1:24 ` sunyeal.hong
2024-07-24 10:12 ` Krzysztof Kozlowski
1 sibling, 1 reply; 23+ messages in thread
From: Rob Herring @ 2024-07-23 20:57 UTC (permalink / raw)
To: Sunyeal Hong
Cc: Krzysztof Kozlowski, Sylwester Nawrocki, Chanwoo Choi,
Alim Akhtar, Michael Turquette, Stephen Boyd, Conor Dooley,
linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
linux-kernel
On Tue, Jul 23, 2024 at 07:33:30AM +0900, Sunyeal Hong wrote:
> Add dt-schema for ExynosAuto v920 SoC clock controller.
> Add device tree clock binding definitions for below CMU blocks.
>
> - CMU_TOP
> - CMU_PERIC0
>
> Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
> ---
> .../clock/samsung,exynosautov920-clock.yaml | 115 +++++++++++
> .../clock/samsung,exynosautov920.h | 191 ++++++++++++++++++
> 2 files changed, 306 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
> create mode 100644 include/dt-bindings/clock/samsung,exynosautov920.h
>
> diff --git a/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
> new file mode 100644
> index 000000000000..90f9f17da959
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
> @@ -0,0 +1,115 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/samsung,exynosautov920-clock.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Samsung ExynosAuto v920 SoC clock controller
> +
> +maintainers:
> + - Sunyeal Hong <sunyeal.hong@samsung.com>
> + - Chanwoo Choi <cw00.choi@samsung.com>
> + - Krzysztof Kozlowski <krzk@kernel.org>
> + - Sylwester Nawrocki <s.nawrocki@samsung.com>
> +
> +description: |
> + ExynosAuto v920 clock controller is comprised of several CMU units, generating
> + clocks for different domains. Those CMU units are modeled as separate device
> + tree nodes, and might depend on each other. Root clocks in that clock tree are
> + two external clocks:: OSCCLK/XTCXO (38.4 MHz) and RTCCLK/XrtcXTI (32768 Hz).
> + The external OSCCLK must be defined as fixed-rate clock in dts.
> +
> + CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
> + dividers; all other clocks of function blocks (other CMUs) are usually
> + derived from CMU_TOP.
> +
> + Each clock is assigned an identifier and client nodes can use this identifier
> + to specify the clock which they consume. All clocks available for usage
> + in clock consumer nodes are defined as preprocessor macros in
> + 'include/dt-bindings/clock/samsung,exynosautov920.h' header.
> +
> +properties:
> + compatible:
> + enum:
> + - samsung,exynosautov920-cmu-top
> + - samsung,exynosautov920-cmu-peric0
> +
> + clocks:
> + minItems: 1
> + maxItems: 3
> +
> + clock-names:
> + minItems: 1
> + maxItems: 3
Move the descriptions and names here. Then in the if/then schemas just
set the number of items to 1 or 3 as appropriate.
Rob
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-22 22:33 ` [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings Sunyeal Hong
2024-07-23 20:57 ` Rob Herring
@ 2024-07-24 10:12 ` Krzysztof Kozlowski
2024-07-25 1:25 ` sunyeal.hong
1 sibling, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-24 10:12 UTC (permalink / raw)
To: Sunyeal Hong, Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar,
Michael Turquette, Stephen Boyd, Rob Herring, Conor Dooley
Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
linux-kernel
On 23/07/2024 00:33, Sunyeal Hong wrote:
> Add dt-schema for ExynosAuto v920 SoC clock controller.
> Add device tree clock binding definitions for below CMU blocks.
>
> - CMU_TOP
> - CMU_PERIC0
>
> Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
> ---
> .../clock/samsung,exynosautov920-clock.yaml | 115 +++++++++++
> .../clock/samsung,exynosautov920.h | 191 ++++++++++++++++++
> 2 files changed, 306 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
> create mode 100644 include/dt-bindings/clock/samsung,exynosautov920.h
>
> diff --git a/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
> new file mode 100644
> index 000000000000..90f9f17da959
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.yaml
> @@ -0,0 +1,115 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/samsung,exynosautov920-clock.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Samsung ExynosAuto v920 SoC clock controller
> +
> +maintainers:
> + - Sunyeal Hong <sunyeal.hong@samsung.com>
> + - Chanwoo Choi <cw00.choi@samsung.com>
> + - Krzysztof Kozlowski <krzk@kernel.org>
> + - Sylwester Nawrocki <s.nawrocki@samsung.com>
> +
> +description: |
> + ExynosAuto v920 clock controller is comprised of several CMU units, generating
> + clocks for different domains. Those CMU units are modeled as separate device
> + tree nodes, and might depend on each other. Root clocks in that clock tree are
> + two external clocks:: OSCCLK/XTCXO (38.4 MHz) and RTCCLK/XrtcXTI (32768 Hz).
> + The external OSCCLK must be defined as fixed-rate clock in dts.
> +
> + CMU_TOP is a top-level CMU, where all base clocks are prepared using PLLs and
> + dividers; all other clocks of function blocks (other CMUs) are usually
> + derived from CMU_TOP.
> +
> + Each clock is assigned an identifier and client nodes can use this identifier
> + to specify the clock which they consume. All clocks available for usage
> + in clock consumer nodes are defined as preprocessor macros in
> + 'include/dt-bindings/clock/samsung,exynosautov920.h' header.
> +
> +properties:
> + compatible:
> + enum:
> + - samsung,exynosautov920-cmu-top
> + - samsung,exynosautov920-cmu-peric0
> +
> + clocks:
> + minItems: 1
> + maxItems: 3
> +
> + clock-names:
> + minItems: 1
> + maxItems: 3
> +
> + "#clock-cells":
> + const: 1
> +
> + reg:
> + maxItems: 1
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: samsung,exynosautov920-cmu-top
> +
> + then:
> + properties:
> + clocks:
> + items:
> + - description: External reference clock (38.4 MHz)
> +
> + clock-names:
> + items:
> + - const: oscclk
> +
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: samsung,exynosautov920-cmu-peric0
> +
> + then:
> + properties:
> + clocks:
> + items:
> + - description: External reference clock (38.4 MHz)
> + - description: CMU_PERIC0 NOC clock (from CMU_TOP)
> + - description: CMU_PERIC0 IP clock (from CMU_TOP)
> +
> + clock-names:
> + items:
> + - const: oscclk
> + - const: noc
> + - const: ip
> +
> +required:
> + - compatible
> + - "#clock-cells"
> + - clocks
> + - clock-names
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + # Clock controller node for CMU_PERIC0
> + - |
> + #include <dt-bindings/clock/samsung,exynosautov920.h>
> +
> + cmu_peric0: clock-controller@10800000 {
> + compatible = "samsung,exynosautov920-cmu-peric0";
> + reg = <0x10800000 0x8000>;
> + #clock-cells = <1>;
> +
> + clocks = <&xtcxo>,
> + <&cmu_top DOUT_CLKCMU_PERIC0_NOC>,
> + <&cmu_top DOUT_CLKCMU_PERIC0_IP>;
> + clock-names = "oscclk",
> + "noc",
> + "ip";
> + };
> +
> +...
> diff --git a/include/dt-bindings/clock/samsung,exynosautov920.h b/include/dt-bindings/clock/samsung,exynosautov920.h
> new file mode 100644
> index 000000000000..ad89728a4396
> --- /dev/null
> +++ b/include/dt-bindings/clock/samsung,exynosautov920.h
> @@ -0,0 +1,191 @@
> +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> +/*
> + * Copyright (c) 2024 Samsung Electronics Co., Ltd.
> + * Author: Sunyeal Hong <sunyeal.hong@samsung.com>
> + *
> + * Device Tree binding constants for ExynosAuto v920 clock controller.
> + */
> +
> +#ifndef _DT_BINDINGS_CLOCK_EXYNOSAUTOV920_H
> +#define _DT_BINDINGS_CLOCK_EXYNOSAUTOV920_H
> +
> +/* CMU_TOP */
> +#define FOUT_SHARED0_PLL 1
> +#define FOUT_SHARED1_PLL 2
> +#define FOUT_SHARED2_PLL 3
> +#define FOUT_SHARED3_PLL 4
> +#define FOUT_SHARED4_PLL 5
> +#define FOUT_SHARED5_PLL 6
> +#define FOUT_MMC_PLL 7
> +
> +/* MUX in CMU_TOP */
> +#define MOUT_SHARED0_PLL 101
This is some odd numbering. Numbers start from 0 or 1 and are continuous.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v4 2/4] arm64: dts: exynos: add initial CMU clock nodes in ExynosAuto v920
2024-07-22 22:33 ` [PATCH v4 2/4] arm64: dts: exynos: add initial CMU clock nodes in ExynosAuto v920 Sunyeal Hong
@ 2024-07-24 10:13 ` Krzysztof Kozlowski
2024-07-25 1:28 ` sunyeal.hong
2024-07-24 11:17 ` Tudor Ambarus
1 sibling, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-24 10:13 UTC (permalink / raw)
To: Sunyeal Hong, Sylwester Nawrocki, Chanwoo Choi, Alim Akhtar,
Michael Turquette, Stephen Boyd, Rob Herring, Conor Dooley
Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
linux-kernel
On 23/07/2024 00:33, Sunyeal Hong wrote:
> Add cmu_top, cmu_peric0 clock nodes and
> switch USI clocks instead of dummy fixed-rate-clock.
>
> Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
Thank you for your patch. There is something to discuss/improve.
> cpus: cpus {
> #address-cells = <2>;
> #size-cells = <0>;
> @@ -182,6 +172,28 @@ chipid@10000000 {
> reg = <0x10000000 0x24>;
> };
>
> + cmu_peric0: clock-controller@10800000 {
> + compatible = "samsung,exynosautov920-cmu-peric0";
> + reg = <0x10800000 0x8000>;
> + #clock-cells = <1>;
> +
> + clocks = <&xtcxo>,
> + <&cmu_top DOUT_CLKCMU_PERIC0_NOC>,
> + <&cmu_top DOUT_CLKCMU_PERIC0_IP>;
> + clock-names = "oscclk",
> + "noc",
> + "ip";
> + };
> +
> + cmu_top: clock-controller@11000000 {
This does not look ordered. Please read DTS coding style.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v4 2/4] arm64: dts: exynos: add initial CMU clock nodes in ExynosAuto v920
2024-07-22 22:33 ` [PATCH v4 2/4] arm64: dts: exynos: add initial CMU clock nodes in ExynosAuto v920 Sunyeal Hong
2024-07-24 10:13 ` Krzysztof Kozlowski
@ 2024-07-24 11:17 ` Tudor Ambarus
2024-07-25 3:09 ` sunyeal.hong
1 sibling, 1 reply; 23+ messages in thread
From: Tudor Ambarus @ 2024-07-24 11:17 UTC (permalink / raw)
To: Sunyeal Hong, Krzysztof Kozlowski, Sylwester Nawrocki,
Chanwoo Choi, Alim Akhtar, Michael Turquette, Stephen Boyd,
Rob Herring, Conor Dooley
Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
linux-kernel
Hi, Sunyeal,
I quickly skimmed over the series and I fail to see where/how the HW
auto clock gating is enabled/configured. Would you please add more
details on how this works?
On 7/22/24 11:33 PM, Sunyeal Hong wrote:
> Add cmu_top, cmu_peric0 clock nodes and
> switch USI clocks instead of dummy fixed-rate-clock.
>
> Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
> ---
> .../arm64/boot/dts/exynos/exynosautov920.dtsi | 40 +++++++++++++------
> 1 file changed, 27 insertions(+), 13 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
> index c1c8566d74f5..54fc32074379 100644
> --- a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
> +++ b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
cut
> @@ -224,7 +237,8 @@ serial_0: serial@10880000 {
> interrupts = <GIC_SPI 764 IRQ_TYPE_LEVEL_HIGH>;
> pinctrl-names = "default";
> pinctrl-0 = <&uart0_bus>;
> - clocks = <&clock_usi>, <&clock_usi>;
> + clocks = <&cmu_peric0 CLK_MOUT_PERIC0_NOC_USER>,
isn't this MUX common to multiple GATEs? Wouldn't turning it off affect
other users than the serial?
Thanks,
ta
> + <&cmu_peric0 CLK_DOUT_PERIC0_USI00_USI>;
> clock-names = "uart", "clk_uart_baud0";
> samsung,uart-fifosize = <256>;
> status = "disabled";
^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-23 20:57 ` Rob Herring
@ 2024-07-25 1:24 ` sunyeal.hong
2024-07-25 3:03 ` sunyeal.hong
0 siblings, 1 reply; 23+ messages in thread
From: sunyeal.hong @ 2024-07-25 1:24 UTC (permalink / raw)
To: 'Rob Herring'
Cc: 'Krzysztof Kozlowski', 'Sylwester Nawrocki',
'Chanwoo Choi', 'Alim Akhtar',
'Michael Turquette', 'Stephen Boyd',
'Conor Dooley', linux-samsung-soc, linux-clk, devicetree,
linux-arm-kernel, linux-kernel
Hello Rob,
> -----Original Message-----
> From: Rob Herring <robh@kernel.org>
> Sent: Wednesday, July 24, 2024 5:57 AM
> To: Sunyeal Hong <sunyeal.hong@samsung.com>
> Cc: Krzysztof Kozlowski <krzk@kernel.org>; Sylwester Nawrocki
> <s.nawrocki@samsung.com>; Chanwoo Choi <cw00.choi@samsung.com>; Alim
> Akhtar <alim.akhtar@samsung.com>; Michael Turquette
> <mturquette@baylibre.com>; Stephen Boyd <sboyd@kernel.org>; Conor Dooley
> <conor+dt@kernel.org>; linux-samsung-soc@vger.kernel.org; linux-
> clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC
> CMU bindings
>
> On Tue, Jul 23, 2024 at 07:33:30AM +0900, Sunyeal Hong wrote:
> > Add dt-schema for ExynosAuto v920 SoC clock controller.
> > Add device tree clock binding definitions for below CMU blocks.
> >
> > - CMU_TOP
> > - CMU_PERIC0
> >
> > Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
> > ---
> > .../clock/samsung,exynosautov920-clock.yaml | 115 +++++++++++
> > .../clock/samsung,exynosautov920.h | 191 ++++++++++++++++++
> > 2 files changed, 306 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.y
> > aml create mode 100644
> > include/dt-bindings/clock/samsung,exynosautov920.h
> >
> > diff --git
> > a/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock
> > .yaml
> > b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock
> > .yaml
> > new file mode 100644
> > index 000000000000..90f9f17da959
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-c
> > +++ lock.yaml
> > @@ -0,0 +1,115 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> > +---
> > +$id:
> > +https://protect2.fireeye.com/v1/url?k=9932a88e-c6ae81a4-993323c1-000b
> > +abe598f7-779f1e959ac8eab9&q=1&e=539edfa4-b4e4-460a-93f4-1e6f17030945&
> > +u=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fclock%2Fsamsung%2Cexynosaut
> > +ov920-clock.yaml%23
> > +$schema:
> > +https://protect2.fireeye.com/v1/url?k=4dbf6fb9-12234693-4dbee4f6-000b
> > +abe598f7-363a2f64c69b9542&q=1&e=539edfa4-b4e4-460a-93f4-1e6f17030945&
> > +u=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23
> > +
> > +title: Samsung ExynosAuto v920 SoC clock controller
> > +
> > +maintainers:
> > + - Sunyeal Hong <sunyeal.hong@samsung.com>
> > + - Chanwoo Choi <cw00.choi@samsung.com>
> > + - Krzysztof Kozlowski <krzk@kernel.org>
> > + - Sylwester Nawrocki <s.nawrocki@samsung.com>
> > +
> > +description: |
> > + ExynosAuto v920 clock controller is comprised of several CMU units,
> > +generating
> > + clocks for different domains. Those CMU units are modeled as
> > +separate device
> > + tree nodes, and might depend on each other. Root clocks in that
> > +clock tree are
> > + two external clocks:: OSCCLK/XTCXO (38.4 MHz) and RTCCLK/XrtcXTI
> (32768 Hz).
> > + The external OSCCLK must be defined as fixed-rate clock in dts.
> > +
> > + CMU_TOP is a top-level CMU, where all base clocks are prepared
> > + using PLLs and dividers; all other clocks of function blocks (other
> > + CMUs) are usually derived from CMU_TOP.
> > +
> > + Each clock is assigned an identifier and client nodes can use this
> > + identifier to specify the clock which they consume. All clocks
> > + available for usage in clock consumer nodes are defined as
> > + preprocessor macros in 'include/dt-
> bindings/clock/samsung,exynosautov920.h' header.
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - samsung,exynosautov920-cmu-top
> > + - samsung,exynosautov920-cmu-peric0
> > +
> > + clocks:
> > + minItems: 1
> > + maxItems: 3
> > +
> > + clock-names:
> > + minItems: 1
> > + maxItems: 3
>
> Move the descriptions and names here. Then in the if/then schemas just set
> the number of items to 1 or 3 as appropriate.
>
> Rob
Thank you for your review. I will update by reflecting the fixes.
Thanks,
Sunyeal Hong
^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-24 10:12 ` Krzysztof Kozlowski
@ 2024-07-25 1:25 ` sunyeal.hong
0 siblings, 0 replies; 23+ messages in thread
From: sunyeal.hong @ 2024-07-25 1:25 UTC (permalink / raw)
To: 'Krzysztof Kozlowski', 'Sylwester Nawrocki',
'Chanwoo Choi', 'Alim Akhtar',
'Michael Turquette', 'Stephen Boyd',
'Rob Herring', 'Conor Dooley'
Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
linux-kernel
Hello Krzysztof,
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Wednesday, July 24, 2024 7:12 PM
> To: Sunyeal Hong <sunyeal.hong@samsung.com>; Sylwester Nawrocki
> <s.nawrocki@samsung.com>; Chanwoo Choi <cw00.choi@samsung.com>; Alim
> Akhtar <alim.akhtar@samsung.com>; Michael Turquette
> <mturquette@baylibre.com>; Stephen Boyd <sboyd@kernel.org>; Rob Herring
> <robh@kernel.org>; Conor Dooley <conor+dt@kernel.org>
> Cc: linux-samsung-soc@vger.kernel.org; linux-clk@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC
> CMU bindings
>
> On 23/07/2024 00:33, Sunyeal Hong wrote:
> > Add dt-schema for ExynosAuto v920 SoC clock controller.
> > Add device tree clock binding definitions for below CMU blocks.
> >
> > - CMU_TOP
> > - CMU_PERIC0
> >
> > Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
> > ---
> > .../clock/samsung,exynosautov920-clock.yaml | 115 +++++++++++
> > .../clock/samsung,exynosautov920.h | 191 ++++++++++++++++++
> > 2 files changed, 306 insertions(+)
> > create mode 100644
> > Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock.y
> > aml create mode 100644
> > include/dt-bindings/clock/samsung,exynosautov920.h
> >
> > diff --git
> > a/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock
> > .yaml
> > b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock
> > .yaml
> > new file mode 100644
> > index 000000000000..90f9f17da959
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-c
> > +++ lock.yaml
> > @@ -0,0 +1,115 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> > +---
> > +$id:
> > +https://protect2.fireeye.com/v1/url?k=79ef652b-1864700b-79eeee64-74fe
> > +485fb347-9d0b27f7b9bcf4cc&q=1&e=af4d44eb-4030-4020-8a28-394e2a873516&
> > +u=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fclock%2Fsamsung%2Cexynosaut
> > +ov920-clock.yaml%23
> > +$schema:
> > +https://protect2.fireeye.com/v1/url?k=4f1f645c-2e94717c-4f1eef13-74fe
> > +485fb347-e7ad6ce5885cf0ba&q=1&e=af4d44eb-4030-4020-8a28-394e2a873516&
> > +u=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23
> > +
> > +title: Samsung ExynosAuto v920 SoC clock controller
> > +
> > +maintainers:
> > + - Sunyeal Hong <sunyeal.hong@samsung.com>
> > + - Chanwoo Choi <cw00.choi@samsung.com>
> > + - Krzysztof Kozlowski <krzk@kernel.org>
> > + - Sylwester Nawrocki <s.nawrocki@samsung.com>
> > +
> > +description: |
> > + ExynosAuto v920 clock controller is comprised of several CMU units,
> > +generating
> > + clocks for different domains. Those CMU units are modeled as
> > +separate device
> > + tree nodes, and might depend on each other. Root clocks in that
> > +clock tree are
> > + two external clocks:: OSCCLK/XTCXO (38.4 MHz) and RTCCLK/XrtcXTI
> (32768 Hz).
> > + The external OSCCLK must be defined as fixed-rate clock in dts.
> > +
> > + CMU_TOP is a top-level CMU, where all base clocks are prepared
> > + using PLLs and dividers; all other clocks of function blocks (other
> > + CMUs) are usually derived from CMU_TOP.
> > +
> > + Each clock is assigned an identifier and client nodes can use this
> > + identifier to specify the clock which they consume. All clocks
> > + available for usage in clock consumer nodes are defined as
> > + preprocessor macros in 'include/dt-
> bindings/clock/samsung,exynosautov920.h' header.
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - samsung,exynosautov920-cmu-top
> > + - samsung,exynosautov920-cmu-peric0
> > +
> > + clocks:
> > + minItems: 1
> > + maxItems: 3
> > +
> > + clock-names:
> > + minItems: 1
> > + maxItems: 3
> > +
> > + "#clock-cells":
> > + const: 1
> > +
> > + reg:
> > + maxItems: 1
> > +
> > +allOf:
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: samsung,exynosautov920-cmu-top
> > +
> > + then:
> > + properties:
> > + clocks:
> > + items:
> > + - description: External reference clock (38.4 MHz)
> > +
> > + clock-names:
> > + items:
> > + - const: oscclk
> > +
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: samsung,exynosautov920-cmu-peric0
> > +
> > + then:
> > + properties:
> > + clocks:
> > + items:
> > + - description: External reference clock (38.4 MHz)
> > + - description: CMU_PERIC0 NOC clock (from CMU_TOP)
> > + - description: CMU_PERIC0 IP clock (from CMU_TOP)
> > +
> > + clock-names:
> > + items:
> > + - const: oscclk
> > + - const: noc
> > + - const: ip
> > +
> > +required:
> > + - compatible
> > + - "#clock-cells"
> > + - clocks
> > + - clock-names
> > + - reg
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + # Clock controller node for CMU_PERIC0
> > + - |
> > + #include <dt-bindings/clock/samsung,exynosautov920.h>
> > +
> > + cmu_peric0: clock-controller@10800000 {
> > + compatible = "samsung,exynosautov920-cmu-peric0";
> > + reg = <0x10800000 0x8000>;
> > + #clock-cells = <1>;
> > +
> > + clocks = <&xtcxo>,
> > + <&cmu_top DOUT_CLKCMU_PERIC0_NOC>,
> > + <&cmu_top DOUT_CLKCMU_PERIC0_IP>;
> > + clock-names = "oscclk",
> > + "noc",
> > + "ip";
> > + };
> > +
> > +...
> > diff --git a/include/dt-bindings/clock/samsung,exynosautov920.h
> > b/include/dt-bindings/clock/samsung,exynosautov920.h
> > new file mode 100644
> > index 000000000000..ad89728a4396
> > --- /dev/null
> > +++ b/include/dt-bindings/clock/samsung,exynosautov920.h
> > @@ -0,0 +1,191 @@
> > +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
> > +/*
> > + * Copyright (c) 2024 Samsung Electronics Co., Ltd.
> > + * Author: Sunyeal Hong <sunyeal.hong@samsung.com>
> > + *
> > + * Device Tree binding constants for ExynosAuto v920 clock controller.
> > + */
> > +
> > +#ifndef _DT_BINDINGS_CLOCK_EXYNOSAUTOV920_H
> > +#define _DT_BINDINGS_CLOCK_EXYNOSAUTOV920_H
> > +
> > +/* CMU_TOP */
> > +#define FOUT_SHARED0_PLL 1
> > +#define FOUT_SHARED1_PLL 2
> > +#define FOUT_SHARED2_PLL 3
> > +#define FOUT_SHARED3_PLL 4
> > +#define FOUT_SHARED4_PLL 5
> > +#define FOUT_SHARED5_PLL 6
> > +#define FOUT_MMC_PLL 7
> > +
> > +/* MUX in CMU_TOP */
> > +#define MOUT_SHARED0_PLL 101
>
> This is some odd numbering. Numbers start from 0 or 1 and are continuous.
>
Okay, I will update.
>
> Best regards,
> Krzysztof
Thanks,
Sunyeal Hong.
^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: [PATCH v4 2/4] arm64: dts: exynos: add initial CMU clock nodes in ExynosAuto v920
2024-07-24 10:13 ` Krzysztof Kozlowski
@ 2024-07-25 1:28 ` sunyeal.hong
0 siblings, 0 replies; 23+ messages in thread
From: sunyeal.hong @ 2024-07-25 1:28 UTC (permalink / raw)
To: 'Krzysztof Kozlowski', 'Sylwester Nawrocki',
'Chanwoo Choi', 'Alim Akhtar',
'Michael Turquette', 'Stephen Boyd',
'Rob Herring', 'Conor Dooley'
Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
linux-kernel
Hello Krzysztof,
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Wednesday, July 24, 2024 7:14 PM
> To: Sunyeal Hong <sunyeal.hong@samsung.com>; Sylwester Nawrocki
> <s.nawrocki@samsung.com>; Chanwoo Choi <cw00.choi@samsung.com>; Alim
> Akhtar <alim.akhtar@samsung.com>; Michael Turquette
> <mturquette@baylibre.com>; Stephen Boyd <sboyd@kernel.org>; Rob Herring
> <robh@kernel.org>; Conor Dooley <conor+dt@kernel.org>
> Cc: linux-samsung-soc@vger.kernel.org; linux-clk@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH v4 2/4] arm64: dts: exynos: add initial CMU clock
> nodes in ExynosAuto v920
>
> On 23/07/2024 00:33, Sunyeal Hong wrote:
> > Add cmu_top, cmu_peric0 clock nodes and switch USI clocks instead of
> > dummy fixed-rate-clock.
> >
> > Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
>
> Thank you for your patch. There is something to discuss/improve.
>
> > cpus: cpus {
> > #address-cells = <2>;
> > #size-cells = <0>;
> > @@ -182,6 +172,28 @@ chipid@10000000 {
> > reg = <0x10000000 0x24>;
> > };
> >
> > + cmu_peric0: clock-controller@10800000 {
> > + compatible = "samsung,exynosautov920-cmu-peric0";
> > + reg = <0x10800000 0x8000>;
> > + #clock-cells = <1>;
> > +
> > + clocks = <&xtcxo>,
> > + <&cmu_top DOUT_CLKCMU_PERIC0_NOC>,
> > + <&cmu_top DOUT_CLKCMU_PERIC0_IP>;
> > + clock-names = "oscclk",
> > + "noc",
> > + "ip";
> > + };
> > +
> > + cmu_top: clock-controller@11000000 {
>
> This does not look ordered. Please read DTS coding style.
>
I will modify it by referring to the Order of Nodes item in the dts coding style guide document.
> Best regards,
> Krzysztof
Thanks,
Sunyeal Hong.
^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-25 1:24 ` sunyeal.hong
@ 2024-07-25 3:03 ` sunyeal.hong
2024-07-25 6:21 ` Krzysztof Kozlowski
0 siblings, 1 reply; 23+ messages in thread
From: sunyeal.hong @ 2024-07-25 3:03 UTC (permalink / raw)
To: 'Rob Herring'
Cc: 'Krzysztof Kozlowski', 'Sylwester Nawrocki',
'Chanwoo Choi', 'Alim Akhtar',
'Michael Turquette', 'Stephen Boyd',
'Conor Dooley', linux-samsung-soc, linux-clk, devicetree,
linux-arm-kernel, linux-kernel
Hello Rob,
> -----Original Message-----
> From: sunyeal.hong <sunyeal.hong@samsung.com>
> Sent: Thursday, July 25, 2024 10:24 AM
> To: 'Rob Herring' <robh@kernel.org>
> Cc: 'Krzysztof Kozlowski' <krzk@kernel.org>; 'Sylwester Nawrocki'
> <s.nawrocki@samsung.com>; 'Chanwoo Choi' <cw00.choi@samsung.com>; 'Alim
> Akhtar' <alim.akhtar@samsung.com>; 'Michael Turquette'
> <mturquette@baylibre.com>; 'Stephen Boyd' <sboyd@kernel.org>; 'Conor
> Dooley' <conor+dt@kernel.org>; linux-samsung-soc@vger.kernel.org; linux-
> clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: RE: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC
> CMU bindings
>
> Hello Rob,
>
> > -----Original Message-----
> > From: Rob Herring <robh@kernel.org>
> > Sent: Wednesday, July 24, 2024 5:57 AM
> > To: Sunyeal Hong <sunyeal.hong@samsung.com>
> > Cc: Krzysztof Kozlowski <krzk@kernel.org>; Sylwester Nawrocki
> > <s.nawrocki@samsung.com>; Chanwoo Choi <cw00.choi@samsung.com>; Alim
> > Akhtar <alim.akhtar@samsung.com>; Michael Turquette
> > <mturquette@baylibre.com>; Stephen Boyd <sboyd@kernel.org>; Conor
> > Dooley <conor+dt@kernel.org>; linux-samsung-soc@vger.kernel.org;
> > linux- clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> > kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> > Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920
> > SoC CMU bindings
> >
> > On Tue, Jul 23, 2024 at 07:33:30AM +0900, Sunyeal Hong wrote:
> > > Add dt-schema for ExynosAuto v920 SoC clock controller.
> > > Add device tree clock binding definitions for below CMU blocks.
> > >
> > > - CMU_TOP
> > > - CMU_PERIC0
> > >
> > > Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
> > > ---
> > > .../clock/samsung,exynosautov920-clock.yaml | 115 +++++++++++
> > > .../clock/samsung,exynosautov920.h | 191 ++++++++++++++++++
> > > 2 files changed, 306 insertions(+)
> > > create mode 100644
> > > Documentation/devicetree/bindings/clock/samsung,exynosautov920-clock
> > > .y
> > > aml create mode 100644
> > > include/dt-bindings/clock/samsung,exynosautov920.h
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clo
> > > ck
> > > .yaml
> > > b/Documentation/devicetree/bindings/clock/samsung,exynosautov920-clo
> > > ck
> > > .yaml
> > > new file mode 100644
> > > index 000000000000..90f9f17da959
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/clock/samsung,exynosautov920
> > > +++ -c
> > > +++ lock.yaml
> > > @@ -0,0 +1,115 @@
> > > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) %YAML 1.2
> > > +---
> > > +$id:
> > > +https://protect2.fireeye.com/v1/url?k=9932a88e-c6ae81a4-993323c1-00
> > > +0b
> > > +abe598f7-779f1e959ac8eab9&q=1&e=539edfa4-b4e4-460a-93f4-1e6f1703094
> > > +5&
> > > +u=http%3A%2F%2Fdevicetree.org%2Fschemas%2Fclock%2Fsamsung%2Cexynosa
> > > +ut
> > > +ov920-clock.yaml%23
> > > +$schema:
> > > +https://protect2.fireeye.com/v1/url?k=4dbf6fb9-12234693-4dbee4f6-00
> > > +0b
> > > +abe598f7-363a2f64c69b9542&q=1&e=539edfa4-b4e4-460a-93f4-1e6f1703094
> > > +5&
> > > +u=http%3A%2F%2Fdevicetree.org%2Fmeta-schemas%2Fcore.yaml%23
> > > +
> > > +title: Samsung ExynosAuto v920 SoC clock controller
> > > +
> > > +maintainers:
> > > + - Sunyeal Hong <sunyeal.hong@samsung.com>
> > > + - Chanwoo Choi <cw00.choi@samsung.com>
> > > + - Krzysztof Kozlowski <krzk@kernel.org>
> > > + - Sylwester Nawrocki <s.nawrocki@samsung.com>
> > > +
> > > +description: |
> > > + ExynosAuto v920 clock controller is comprised of several CMU
> > > +units, generating
> > > + clocks for different domains. Those CMU units are modeled as
> > > +separate device
> > > + tree nodes, and might depend on each other. Root clocks in that
> > > +clock tree are
> > > + two external clocks:: OSCCLK/XTCXO (38.4 MHz) and RTCCLK/XrtcXTI
> > (32768 Hz).
> > > + The external OSCCLK must be defined as fixed-rate clock in dts.
> > > +
> > > + CMU_TOP is a top-level CMU, where all base clocks are prepared
> > > + using PLLs and dividers; all other clocks of function blocks
> > > + (other
> > > + CMUs) are usually derived from CMU_TOP.
> > > +
> > > + Each clock is assigned an identifier and client nodes can use
> > > + this identifier to specify the clock which they consume. All
> > > + clocks available for usage in clock consumer nodes are defined as
> > > + preprocessor macros in 'include/dt-
> > bindings/clock/samsung,exynosautov920.h' header.
> > > +
> > > +properties:
> > > + compatible:
> > > + enum:
> > > + - samsung,exynosautov920-cmu-top
> > > + - samsung,exynosautov920-cmu-peric0
> > > +
> > > + clocks:
> > > + minItems: 1
> > > + maxItems: 3
> > > +
> > > + clock-names:
> > > + minItems: 1
> > > + maxItems: 3
> >
> > Move the descriptions and names here. Then in the if/then schemas just
> > set the number of items to 1 or 3 as appropriate.
> >
> > Rob
>
> Thank you for your review. I will update by reflecting the fixes.
>
> Thanks,
> Sunyeal Hong
>
>
I faced a new problem after modifying it as you reviewed.
For example, if I declare a new cmu block that uses only osclk and noc to dt, it seems that a problem occurs in check dtb.
- yaml
properties:
compatible:
enum:
- samsung,exynosautov920-cmu-top
- samsung,exynosautov920-cmu-peric0
- samsung,exynosautov920-cmu-misc
clocks:
minItems: 1
items:
- description: External reference clock (38.4 MHz)
- description: Block IP clock (from CMU_TOP)
- description: Block NOC clock (from CMU_TOP)
clock-names:
minItems: 1
items:
- const: oscclk
- const: ip
- const: noc
- dts
cmu_misc: clock-controller@10020000 {
compatible = "samsung,exynosautov920-cmu-misc";
reg = <0x10020000 0x8000>;
#clock-cells = <1>;
clocks = <&xtcxo>,
<&cmu_top DOUT_CLKCMU_MISC_NOC>;
clock-names = "oscclk",
"noc";
};
In this case, can you tell me how to handle it?
And if a new clock item is added and a new cmu block uses only the clock item added and oscclk, a problem may occur.
Thanks,
Sunyeal Hong.
^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: [PATCH v4 2/4] arm64: dts: exynos: add initial CMU clock nodes in ExynosAuto v920
2024-07-24 11:17 ` Tudor Ambarus
@ 2024-07-25 3:09 ` sunyeal.hong
0 siblings, 0 replies; 23+ messages in thread
From: sunyeal.hong @ 2024-07-25 3:09 UTC (permalink / raw)
To: 'Tudor Ambarus', 'Krzysztof Kozlowski',
'Sylwester Nawrocki', 'Chanwoo Choi',
'Alim Akhtar', 'Michael Turquette',
'Stephen Boyd', 'Rob Herring',
'Conor Dooley'
Cc: linux-samsung-soc, linux-clk, devicetree, linux-arm-kernel,
linux-kernel
Hello Tudor,
> -----Original Message-----
> From: Tudor Ambarus <tudor.ambarus@linaro.org>
> Sent: Wednesday, July 24, 2024 8:18 PM
> To: Sunyeal Hong <sunyeal.hong@samsung.com>; Krzysztof Kozlowski
> <krzk@kernel.org>; Sylwester Nawrocki <s.nawrocki@samsung.com>; Chanwoo
> Choi <cw00.choi@samsung.com>; Alim Akhtar <alim.akhtar@samsung.com>;
> Michael Turquette <mturquette@baylibre.com>; Stephen Boyd
> <sboyd@kernel.org>; Rob Herring <robh@kernel.org>; Conor Dooley
> <conor+dt@kernel.org>
> Cc: linux-samsung-soc@vger.kernel.org; linux-clk@vger.kernel.org;
> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
> kernel@vger.kernel.org
> Subject: Re: [PATCH v4 2/4] arm64: dts: exynos: add initial CMU clock
> nodes in ExynosAuto v920
>
> Hi, Sunyeal,
>
> I quickly skimmed over the series and I fail to see where/how the HW auto
> clock gating is enabled/configured. Would you please add more details on
> how this works?
>
The HW auto clock gating function is activated in the bootloader stage. So we don't have to control it in the kernel.
> On 7/22/24 11:33 PM, Sunyeal Hong wrote:
> > Add cmu_top, cmu_peric0 clock nodes and switch USI clocks instead of
> > dummy fixed-rate-clock.
> >
> > Signed-off-by: Sunyeal Hong <sunyeal.hong@samsung.com>
> > ---
> > .../arm64/boot/dts/exynos/exynosautov920.dtsi | 40
> > +++++++++++++------
> > 1 file changed, 27 insertions(+), 13 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
> > b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
> > index c1c8566d74f5..54fc32074379 100644
> > --- a/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
> > +++ b/arch/arm64/boot/dts/exynos/exynosautov920.dtsi
>
>
> cut
>
> > @@ -224,7 +237,8 @@ serial_0: serial@10880000 {
> > interrupts = <GIC_SPI 764 IRQ_TYPE_LEVEL_HIGH>;
> > pinctrl-names = "default";
> > pinctrl-0 = <&uart0_bus>;
> > - clocks = <&clock_usi>, <&clock_usi>;
> > + clocks = <&cmu_peric0 CLK_MOUT_PERIC0_NOC_USER>,
>
> isn't this MUX common to multiple GATEs? Wouldn't turning it off affect
> other users than the serial?
>
> Thanks,
> ta
>
I don’t think there will be any problems you are worried about through the enable count of CCF.
Thanks,
Sunyeal Hong.
> > + <&cmu_peric0 CLK_DOUT_PERIC0_USI00_USI>;
> > clock-names = "uart", "clk_uart_baud0";
> > samsung,uart-fifosize = <256>;
> > status = "disabled";
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-25 3:03 ` sunyeal.hong
@ 2024-07-25 6:21 ` Krzysztof Kozlowski
2024-07-25 6:35 ` sunyeal.hong
0 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-25 6:21 UTC (permalink / raw)
To: sunyeal.hong, 'Rob Herring'
Cc: 'Sylwester Nawrocki', 'Chanwoo Choi',
'Alim Akhtar', 'Michael Turquette',
'Stephen Boyd', 'Conor Dooley', linux-samsung-soc,
linux-clk, devicetree, linux-arm-kernel, linux-kernel
On 25/07/2024 05:03, sunyeal.hong wrote:
> - dts
> cmu_misc: clock-controller@10020000 {
> compatible = "samsung,exynosautov920-cmu-misc";
> reg = <0x10020000 0x8000>;
> #clock-cells = <1>;
>
> clocks = <&xtcxo>,
> <&cmu_top DOUT_CLKCMU_MISC_NOC>;
> clock-names = "oscclk",
> "noc";
> };
>
> In this case, can you tell me how to handle it?
> And if a new clock item is added and a new cmu block uses only the clock item added and oscclk, a problem may occur.
The same problem was in your original version, so why suddenly it appeared?
Anyway, why clock would be missing? You just wrote in the bindings that
there is such input clock.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-25 6:21 ` Krzysztof Kozlowski
@ 2024-07-25 6:35 ` sunyeal.hong
2024-07-25 6:37 ` Krzysztof Kozlowski
0 siblings, 1 reply; 23+ messages in thread
From: sunyeal.hong @ 2024-07-25 6:35 UTC (permalink / raw)
To: 'Krzysztof Kozlowski', 'Rob Herring'
Cc: 'Sylwester Nawrocki', 'Chanwoo Choi',
'Alim Akhtar', 'Michael Turquette',
'Stephen Boyd', 'Conor Dooley', linux-samsung-soc,
linux-clk, devicetree, linux-arm-kernel, linux-kernel
Hello Krzysztof,
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Thursday, July 25, 2024 3:21 PM
> To: sunyeal.hong <sunyeal.hong@samsung.com>; 'Rob Herring'
> <robh@kernel.org>
> Cc: 'Sylwester Nawrocki' <s.nawrocki@samsung.com>; 'Chanwoo Choi'
> <cw00.choi@samsung.com>; 'Alim Akhtar' <alim.akhtar@samsung.com>; 'Michael
> Turquette' <mturquette@baylibre.com>; 'Stephen Boyd' <sboyd@kernel.org>;
> 'Conor Dooley' <conor+dt@kernel.org>; linux-samsung-soc@vger.kernel.org;
> linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC
> CMU bindings
>
> On 25/07/2024 05:03, sunyeal.hong wrote:
>
> > - dts
> > cmu_misc: clock-controller@10020000 {
> > compatible = "samsung,exynosautov920-cmu-misc";
> > reg = <0x10020000 0x8000>;
> > #clock-cells = <1>;
> >
> > clocks = <&xtcxo>,
> > <&cmu_top DOUT_CLKCMU_MISC_NOC>;
> > clock-names = "oscclk",
> > "noc";
> > };
> >
> > In this case, can you tell me how to handle it?
> > And if a new clock item is added and a new cmu block uses only the clock
> item added and oscclk, a problem may occur.
>
> The same problem was in your original version, so why suddenly it appeared?
>
> Anyway, why clock would be missing? You just wrote in the bindings that
> there is such input clock.
>
> Best regards,
> Krzysztof
>
If I reflect Rob's review, it will be changed as below.
- yaml
properties:
compatible:
enum:
- samsung,exynosautov920-cmu-top
- samsung,exynosautov920-cmu-peric0
clocks:
minItems: 1
items:
- description: External reference clock (38.4 MHz)
- description: Block IP clock (from CMU_TOP)
- description: Block NOC clock (from CMU_TOP)
clock-names:
minItems: 1
items:
- const: oscclk
- const: ip
- const: noc
"#clock-cells":
const: 1
reg:
maxItems: 1
if:
properties:
compatible:
enum:
- samsung,exynosautov920-cmu-misc
then:
properties:
clocks:
minItems: 2
maxItems: 2
clock-names:
minItems: 2
maxItems: 2
- device tree
cmu_misc: clock-controller@10020000 {
compatible = "samsung,exynosautov920-cmu-misc";
reg = <0x10020000 0x8000>;
#clock-cells = <1>;
clocks = <&xtcxo>,
<&cmu_top DOUT_CLKCMU_MISC_NOC>;
clock-names = "oscclk",
"noc";
};
In this case, ip should be used after oscclk, but misc does not use ip, so there is a problem in dt check.
The code of v4 version has clock items for each block, so there was no problem like this.
- yaml(v4)
if:
properties:
compatible:
contains:
const: samsung,exynosautov920-cmu-misc
then:
properties:
clocks:
items:
- description: External reference clock (38.4 MHz)
- description: CMU_MISC NOC clock (from CMU_MISC)
clock-names:
items:
- const: oscclk
- const: noc
If there is anything I misunderstand, please guide me.
Thanks,
Sunyeal Hong.
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-25 6:35 ` sunyeal.hong
@ 2024-07-25 6:37 ` Krzysztof Kozlowski
2024-07-25 6:40 ` Krzysztof Kozlowski
0 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-25 6:37 UTC (permalink / raw)
To: sunyeal.hong, 'Rob Herring'
Cc: 'Sylwester Nawrocki', 'Chanwoo Choi',
'Alim Akhtar', 'Michael Turquette',
'Stephen Boyd', 'Conor Dooley', linux-samsung-soc,
linux-clk, devicetree, linux-arm-kernel, linux-kernel
On 25/07/2024 08:35, sunyeal.hong wrote:
> Hello Krzysztof,
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzk@kernel.org>
>> Sent: Thursday, July 25, 2024 3:21 PM
>> To: sunyeal.hong <sunyeal.hong@samsung.com>; 'Rob Herring'
>> <robh@kernel.org>
>> Cc: 'Sylwester Nawrocki' <s.nawrocki@samsung.com>; 'Chanwoo Choi'
>> <cw00.choi@samsung.com>; 'Alim Akhtar' <alim.akhtar@samsung.com>; 'Michael
>> Turquette' <mturquette@baylibre.com>; 'Stephen Boyd' <sboyd@kernel.org>;
>> 'Conor Dooley' <conor+dt@kernel.org>; linux-samsung-soc@vger.kernel.org;
>> linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
>> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC
>> CMU bindings
>>
>> On 25/07/2024 05:03, sunyeal.hong wrote:
>>
>>> - dts
>>> cmu_misc: clock-controller@10020000 {
>>> compatible = "samsung,exynosautov920-cmu-misc";
>>> reg = <0x10020000 0x8000>;
>>> #clock-cells = <1>;
>>>
>>> clocks = <&xtcxo>,
>>> <&cmu_top DOUT_CLKCMU_MISC_NOC>;
>>> clock-names = "oscclk",
>>> "noc";
>>> };
>>>
>>> In this case, can you tell me how to handle it?
>>> And if a new clock item is added and a new cmu block uses only the clock
>> item added and oscclk, a problem may occur.
>>
>> The same problem was in your original version, so why suddenly it appeared?
>>
>> Anyway, why clock would be missing? You just wrote in the bindings that
>> there is such input clock.
>>
>> Best regards,
>> Krzysztof
>>
>
> If I reflect Rob's review, it will be changed as below.
>
> - yaml
> properties:
> compatible:
> enum:
> - samsung,exynosautov920-cmu-top
> - samsung,exynosautov920-cmu-peric0
>
> clocks:
> minItems: 1
> items:
> - description: External reference clock (38.4 MHz)
> - description: Block IP clock (from CMU_TOP)
> - description: Block NOC clock (from CMU_TOP)
>
> clock-names:
> minItems: 1
> items:
> - const: oscclk
> - const: ip
> - const: noc
>
> "#clock-cells":
> const: 1
>
> reg:
> maxItems: 1
>
> if:
> properties:
> compatible:
> enum:
> - samsung,exynosautov920-cmu-misc
>
> then:
> properties:
> clocks:
> minItems: 2
> maxItems: 2
>
> clock-names:
> minItems: 2
> maxItems: 2
>
> - device tree
> cmu_misc: clock-controller@10020000 {
> compatible = "samsung,exynosautov920-cmu-misc";
> reg = <0x10020000 0x8000>;
> #clock-cells = <1>;
>
> clocks = <&xtcxo>,
> <&cmu_top DOUT_CLKCMU_MISC_NOC>;
> clock-names = "oscclk",
> "noc";
> };
>
> In this case, ip should be used after oscclk, but misc does not use ip, so there is a problem in dt check.
>
> The code of v4 version has clock items for each block, so there was no problem like this.
> - yaml(v4)
>
> if:
> properties:
> compatible:
> contains:
> const: samsung,exynosautov920-cmu-misc
>
> then:
> properties:
> clocks:
> items:
> - description: External reference clock (38.4 MHz)
> - description: CMU_MISC NOC clock (from CMU_MISC)
>
> clock-names:
> items:
> - const: oscclk
> - const: noc
>
> If there is anything I misunderstand, please guide me.
>
You did not address my questions at all instead just copied again the
same. It is not how it works.
I am not going to discuss like this.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-25 6:37 ` Krzysztof Kozlowski
@ 2024-07-25 6:40 ` Krzysztof Kozlowski
2024-07-25 7:14 ` sunyeal.hong
0 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-25 6:40 UTC (permalink / raw)
To: sunyeal.hong, 'Rob Herring'
Cc: 'Sylwester Nawrocki', 'Chanwoo Choi',
'Alim Akhtar', 'Michael Turquette',
'Stephen Boyd', 'Conor Dooley', linux-samsung-soc,
linux-clk, devicetree, linux-arm-kernel, linux-kernel
On 25/07/2024 08:37, Krzysztof Kozlowski wrote:
>> then:
>> properties:
>> clocks:
>> items:
>> - description: External reference clock (38.4 MHz)
>> - description: CMU_MISC NOC clock (from CMU_MISC)
>>
>> clock-names:
>> items:
>> - const: oscclk
>> - const: noc
>>
>> If there is anything I misunderstand, please guide me.
>>
>
> You did not address my questions at all instead just copied again the
> same. It is not how it works.
>
> I am not going to discuss like this.
And in case it is still unclear - just look at your bindings and DTS.
They say you have three clocks!
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-25 6:40 ` Krzysztof Kozlowski
@ 2024-07-25 7:14 ` sunyeal.hong
2024-07-25 7:31 ` Krzysztof Kozlowski
0 siblings, 1 reply; 23+ messages in thread
From: sunyeal.hong @ 2024-07-25 7:14 UTC (permalink / raw)
To: 'Krzysztof Kozlowski', 'Rob Herring'
Cc: 'Sylwester Nawrocki', 'Chanwoo Choi',
'Alim Akhtar', 'Michael Turquette',
'Stephen Boyd', 'Conor Dooley', linux-samsung-soc,
linux-clk, devicetree, linux-arm-kernel, linux-kernel
Hello Krzysztof,
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Thursday, July 25, 2024 3:41 PM
> To: sunyeal.hong <sunyeal.hong@samsung.com>; 'Rob Herring'
> <robh@kernel.org>
> Cc: 'Sylwester Nawrocki' <s.nawrocki@samsung.com>; 'Chanwoo Choi'
> <cw00.choi@samsung.com>; 'Alim Akhtar' <alim.akhtar@samsung.com>; 'Michael
> Turquette' <mturquette@baylibre.com>; 'Stephen Boyd' <sboyd@kernel.org>;
> 'Conor Dooley' <conor+dt@kernel.org>; linux-samsung-soc@vger.kernel.org;
> linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC
> CMU bindings
>
> On 25/07/2024 08:37, Krzysztof Kozlowski wrote:
> >> then:
> >> properties:
> >> clocks:
> >> items:
> >> - description: External reference clock (38.4 MHz)
> >> - description: CMU_MISC NOC clock (from CMU_MISC)
> >>
> >> clock-names:
> >> items:
> >> - const: oscclk
> >> - const: noc
> >>
> >> If there is anything I misunderstand, please guide me.
> >>
> >
> > You did not address my questions at all instead just copied again the
> > same. It is not how it works.
> >
> > I am not going to discuss like this.
>
> And in case it is still unclear - just look at your bindings and DTS.
> They say you have three clocks!
>
> Best regards,
> Krzysztof
>
Let me answer your questions first.
In the existing V4 patch, clock items were declared in if then for each block, so there was no problem.
If modified according to Rob's comment, problems may occur as the input clock is configured differently for each block.
I think it would be better to keep the bindings in v4 patch form like the existing exynos models.
Thanks for your comment.
Best regards,
Sunyeal
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-25 7:14 ` sunyeal.hong
@ 2024-07-25 7:31 ` Krzysztof Kozlowski
2024-07-25 7:50 ` sunyeal.hong
0 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-25 7:31 UTC (permalink / raw)
To: sunyeal.hong, 'Rob Herring'
Cc: 'Sylwester Nawrocki', 'Chanwoo Choi',
'Alim Akhtar', 'Michael Turquette',
'Stephen Boyd', 'Conor Dooley', linux-samsung-soc,
linux-clk, devicetree, linux-arm-kernel, linux-kernel
On 25/07/2024 09:14, sunyeal.hong wrote:
> Hello Krzysztof,
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzk@kernel.org>
>> Sent: Thursday, July 25, 2024 3:41 PM
>> To: sunyeal.hong <sunyeal.hong@samsung.com>; 'Rob Herring'
>> <robh@kernel.org>
>> Cc: 'Sylwester Nawrocki' <s.nawrocki@samsung.com>; 'Chanwoo Choi'
>> <cw00.choi@samsung.com>; 'Alim Akhtar' <alim.akhtar@samsung.com>; 'Michael
>> Turquette' <mturquette@baylibre.com>; 'Stephen Boyd' <sboyd@kernel.org>;
>> 'Conor Dooley' <conor+dt@kernel.org>; linux-samsung-soc@vger.kernel.org;
>> linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
>> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC
>> CMU bindings
>>
>> On 25/07/2024 08:37, Krzysztof Kozlowski wrote:
>>>> then:
>>>> properties:
>>>> clocks:
>>>> items:
>>>> - description: External reference clock (38.4 MHz)
>>>> - description: CMU_MISC NOC clock (from CMU_MISC)
>>>>
>>>> clock-names:
>>>> items:
>>>> - const: oscclk
>>>> - const: noc
>>>>
>>>> If there is anything I misunderstand, please guide me.
>>>>
>>>
>>> You did not address my questions at all instead just copied again the
>>> same. It is not how it works.
>>>
>>> I am not going to discuss like this.
>>
>> And in case it is still unclear - just look at your bindings and DTS.
>> They say you have three clocks!
>>
>> Best regards,
>> Krzysztof
>>
>
> Let me answer your questions first.
> In the existing V4 patch, clock items were declared in if then for each block, so there was no problem.
No. Again, look at your binding and DTS.
1. What clocks did you define for cmu-top?
2. What clocks did you define for cmu-peric0?
Rob's advice is reasonable and you must follow it, unless you are not
telling us something. There is no other choice, no other compatibles, no
other devices.
> If modified according to Rob's comment, problems may occur as the input clock is configured differently for each block.
But it is not! Look at your binding.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-25 7:31 ` Krzysztof Kozlowski
@ 2024-07-25 7:50 ` sunyeal.hong
2024-07-25 7:56 ` Krzysztof Kozlowski
0 siblings, 1 reply; 23+ messages in thread
From: sunyeal.hong @ 2024-07-25 7:50 UTC (permalink / raw)
To: 'Krzysztof Kozlowski', 'Rob Herring'
Cc: 'Sylwester Nawrocki', 'Chanwoo Choi',
'Alim Akhtar', 'Michael Turquette',
'Stephen Boyd', 'Conor Dooley', linux-samsung-soc,
linux-clk, devicetree, linux-arm-kernel, linux-kernel
Hello Krzysztof,
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Thursday, July 25, 2024 4:32 PM
> To: sunyeal.hong <sunyeal.hong@samsung.com>; 'Rob Herring'
> <robh@kernel.org>
> Cc: 'Sylwester Nawrocki' <s.nawrocki@samsung.com>; 'Chanwoo Choi'
> <cw00.choi@samsung.com>; 'Alim Akhtar' <alim.akhtar@samsung.com>; 'Michael
> Turquette' <mturquette@baylibre.com>; 'Stephen Boyd' <sboyd@kernel.org>;
> 'Conor Dooley' <conor+dt@kernel.org>; linux-samsung-soc@vger.kernel.org;
> linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC
> CMU bindings
>
> On 25/07/2024 09:14, sunyeal.hong wrote:
> > Hello Krzysztof,
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <krzk@kernel.org>
> >> Sent: Thursday, July 25, 2024 3:41 PM
> >> To: sunyeal.hong <sunyeal.hong@samsung.com>; 'Rob Herring'
> >> <robh@kernel.org>
> >> Cc: 'Sylwester Nawrocki' <s.nawrocki@samsung.com>; 'Chanwoo Choi'
> >> <cw00.choi@samsung.com>; 'Alim Akhtar' <alim.akhtar@samsung.com>;
> >> 'Michael Turquette' <mturquette@baylibre.com>; 'Stephen Boyd'
> >> <sboyd@kernel.org>; 'Conor Dooley' <conor+dt@kernel.org>;
> >> linux-samsung-soc@vger.kernel.org;
> >> linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> >> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> >> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920
> >> SoC CMU bindings
> >>
> >> On 25/07/2024 08:37, Krzysztof Kozlowski wrote:
> >>>> then:
> >>>> properties:
> >>>> clocks:
> >>>> items:
> >>>> - description: External reference clock (38.4 MHz)
> >>>> - description: CMU_MISC NOC clock (from CMU_MISC)
> >>>>
> >>>> clock-names:
> >>>> items:
> >>>> - const: oscclk
> >>>> - const: noc
> >>>>
> >>>> If there is anything I misunderstand, please guide me.
> >>>>
> >>>
> >>> You did not address my questions at all instead just copied again
> >>> the same. It is not how it works.
> >>>
> >>> I am not going to discuss like this.
> >>
> >> And in case it is still unclear - just look at your bindings and DTS.
> >> They say you have three clocks!
> >>
> >> Best regards,
> >> Krzysztof
> >>
> >
> > Let me answer your questions first.
> > In the existing V4 patch, clock items were declared in if then for each
> block, so there was no problem.
>
> No. Again, look at your binding and DTS.
>
> 1. What clocks did you define for cmu-top?
Cmu-top has one clock(oscclk).
> 2. What clocks did you define for cmu-peric0?
Cmu-peric0 has three clocks(oscclk, noc and ip)
>
> Rob's advice is reasonable and you must follow it, unless you are not
> telling us something. There is no other choice, no other compatibles, no
> other devices.
>
Yes, that's right. In this patch, modifications are possible according to Rob's review.
> > If modified according to Rob's comment, problems may occur as the input
> clock is configured differently for each block.
>
> But it is not! Look at your binding.
The reason I mentioned this was to ask how to handle problems that may occur when adding cmu for a new block in a new patch.
As you mentioned, this issue does not exist in this patch.
>
>
> Best regards,
> Krzysztof
Best regard,
sunyeal
^ permalink raw reply [flat|nested] 23+ messages in thread
* Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-25 7:50 ` sunyeal.hong
@ 2024-07-25 7:56 ` Krzysztof Kozlowski
2024-07-29 2:48 ` sunyeal.hong
0 siblings, 1 reply; 23+ messages in thread
From: Krzysztof Kozlowski @ 2024-07-25 7:56 UTC (permalink / raw)
To: sunyeal.hong, 'Rob Herring'
Cc: 'Sylwester Nawrocki', 'Chanwoo Choi',
'Alim Akhtar', 'Michael Turquette',
'Stephen Boyd', 'Conor Dooley', linux-samsung-soc,
linux-clk, devicetree, linux-arm-kernel, linux-kernel
On 25/07/2024 09:50, sunyeal.hong wrote:
> Hello Krzysztof,
>
>> -----Original Message-----
>> From: Krzysztof Kozlowski <krzk@kernel.org>
>> Sent: Thursday, July 25, 2024 4:32 PM
>> To: sunyeal.hong <sunyeal.hong@samsung.com>; 'Rob Herring'
>> <robh@kernel.org>
>> Cc: 'Sylwester Nawrocki' <s.nawrocki@samsung.com>; 'Chanwoo Choi'
>> <cw00.choi@samsung.com>; 'Alim Akhtar' <alim.akhtar@samsung.com>; 'Michael
>> Turquette' <mturquette@baylibre.com>; 'Stephen Boyd' <sboyd@kernel.org>;
>> 'Conor Dooley' <conor+dt@kernel.org>; linux-samsung-soc@vger.kernel.org;
>> linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
>> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
>> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC
>> CMU bindings
>>
>> On 25/07/2024 09:14, sunyeal.hong wrote:
>>> Hello Krzysztof,
>>>
>>>> -----Original Message-----
>>>> From: Krzysztof Kozlowski <krzk@kernel.org>
>>>> Sent: Thursday, July 25, 2024 3:41 PM
>>>> To: sunyeal.hong <sunyeal.hong@samsung.com>; 'Rob Herring'
>>>> <robh@kernel.org>
>>>> Cc: 'Sylwester Nawrocki' <s.nawrocki@samsung.com>; 'Chanwoo Choi'
>>>> <cw00.choi@samsung.com>; 'Alim Akhtar' <alim.akhtar@samsung.com>;
>>>> 'Michael Turquette' <mturquette@baylibre.com>; 'Stephen Boyd'
>>>> <sboyd@kernel.org>; 'Conor Dooley' <conor+dt@kernel.org>;
>>>> linux-samsung-soc@vger.kernel.org;
>>>> linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
>>>> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
>>>> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920
>>>> SoC CMU bindings
>>>>
>>>> On 25/07/2024 08:37, Krzysztof Kozlowski wrote:
>>>>>> then:
>>>>>> properties:
>>>>>> clocks:
>>>>>> items:
>>>>>> - description: External reference clock (38.4 MHz)
>>>>>> - description: CMU_MISC NOC clock (from CMU_MISC)
>>>>>>
>>>>>> clock-names:
>>>>>> items:
>>>>>> - const: oscclk
>>>>>> - const: noc
>>>>>>
>>>>>> If there is anything I misunderstand, please guide me.
>>>>>>
>>>>>
>>>>> You did not address my questions at all instead just copied again
>>>>> the same. It is not how it works.
>>>>>
>>>>> I am not going to discuss like this.
>>>>
>>>> And in case it is still unclear - just look at your bindings and DTS.
>>>> They say you have three clocks!
>>>>
>>>> Best regards,
>>>> Krzysztof
>>>>
>>>
>>> Let me answer your questions first.
>>> In the existing V4 patch, clock items were declared in if then for each
>> block, so there was no problem.
>>
>> No. Again, look at your binding and DTS.
>>
>> 1. What clocks did you define for cmu-top?
> Cmu-top has one clock(oscclk).
>> 2. What clocks did you define for cmu-peric0?
> Cmu-peric0 has three clocks(oscclk, noc and ip)
>>
>> Rob's advice is reasonable and you must follow it, unless you are not
>> telling us something. There is no other choice, no other compatibles, no
>> other devices.
>>
> Yes, that's right. In this patch, modifications are possible according to Rob's review.
>>> If modified according to Rob's comment, problems may occur as the input
>> clock is configured differently for each block.
>>
>> But it is not! Look at your binding.
> The reason I mentioned this was to ask how to handle problems that may occur when adding cmu for a new block in a new patch.
> As you mentioned, this issue does not exist in this patch.
A new block? And how do we know about it? Bindings are supposed to be
complete. We see bindings and you receive review.
Post complete bindings.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 23+ messages in thread
* RE: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings
2024-07-25 7:56 ` Krzysztof Kozlowski
@ 2024-07-29 2:48 ` sunyeal.hong
0 siblings, 0 replies; 23+ messages in thread
From: sunyeal.hong @ 2024-07-29 2:48 UTC (permalink / raw)
To: 'Krzysztof Kozlowski', 'Rob Herring'
Cc: 'Sylwester Nawrocki', 'Chanwoo Choi',
'Alim Akhtar', 'Michael Turquette',
'Stephen Boyd', 'Conor Dooley', linux-samsung-soc,
linux-clk, devicetree, linux-arm-kernel, linux-kernel
Hello Krzysztof,
> -----Original Message-----
> From: Krzysztof Kozlowski <krzk@kernel.org>
> Sent: Thursday, July 25, 2024 4:56 PM
> To: sunyeal.hong <sunyeal.hong@samsung.com>; 'Rob Herring'
> <robh@kernel.org>
> Cc: 'Sylwester Nawrocki' <s.nawrocki@samsung.com>; 'Chanwoo Choi'
> <cw00.choi@samsung.com>; 'Alim Akhtar' <alim.akhtar@samsung.com>; 'Michael
> Turquette' <mturquette@baylibre.com>; 'Stephen Boyd' <sboyd@kernel.org>;
> 'Conor Dooley' <conor+dt@kernel.org>; linux-samsung-soc@vger.kernel.org;
> linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC
> CMU bindings
>
> On 25/07/2024 09:50, sunyeal.hong wrote:
> > Hello Krzysztof,
> >
> >> -----Original Message-----
> >> From: Krzysztof Kozlowski <krzk@kernel.org>
> >> Sent: Thursday, July 25, 2024 4:32 PM
> >> To: sunyeal.hong <sunyeal.hong@samsung.com>; 'Rob Herring'
> >> <robh@kernel.org>
> >> Cc: 'Sylwester Nawrocki' <s.nawrocki@samsung.com>; 'Chanwoo Choi'
> >> <cw00.choi@samsung.com>; 'Alim Akhtar' <alim.akhtar@samsung.com>;
> >> 'Michael Turquette' <mturquette@baylibre.com>; 'Stephen Boyd'
> >> <sboyd@kernel.org>; 'Conor Dooley' <conor+dt@kernel.org>;
> >> linux-samsung-soc@vger.kernel.org;
> >> linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> >> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> >> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920
> >> SoC CMU bindings
> >>
> >> On 25/07/2024 09:14, sunyeal.hong wrote:
> >>> Hello Krzysztof,
> >>>
> >>>> -----Original Message-----
> >>>> From: Krzysztof Kozlowski <krzk@kernel.org>
> >>>> Sent: Thursday, July 25, 2024 3:41 PM
> >>>> To: sunyeal.hong <sunyeal.hong@samsung.com>; 'Rob Herring'
> >>>> <robh@kernel.org>
> >>>> Cc: 'Sylwester Nawrocki' <s.nawrocki@samsung.com>; 'Chanwoo Choi'
> >>>> <cw00.choi@samsung.com>; 'Alim Akhtar' <alim.akhtar@samsung.com>;
> >>>> 'Michael Turquette' <mturquette@baylibre.com>; 'Stephen Boyd'
> >>>> <sboyd@kernel.org>; 'Conor Dooley' <conor+dt@kernel.org>;
> >>>> linux-samsung-soc@vger.kernel.org;
> >>>> linux-clk@vger.kernel.org; devicetree@vger.kernel.org; linux-arm-
> >>>> kernel@lists.infradead.org; linux-kernel@vger.kernel.org
> >>>> Subject: Re: [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920
> >>>> SoC CMU bindings
> >>>>
> >>>> On 25/07/2024 08:37, Krzysztof Kozlowski wrote:
> >>>>>> then:
> >>>>>> properties:
> >>>>>> clocks:
> >>>>>> items:
> >>>>>> - description: External reference clock (38.4 MHz)
> >>>>>> - description: CMU_MISC NOC clock (from CMU_MISC)
> >>>>>>
> >>>>>> clock-names:
> >>>>>> items:
> >>>>>> - const: oscclk
> >>>>>> - const: noc
> >>>>>>
> >>>>>> If there is anything I misunderstand, please guide me.
> >>>>>>
> >>>>>
> >>>>> You did not address my questions at all instead just copied again
> >>>>> the same. It is not how it works.
> >>>>>
> >>>>> I am not going to discuss like this.
> >>>>
> >>>> And in case it is still unclear - just look at your bindings and DTS.
> >>>> They say you have three clocks!
> >>>>
> >>>> Best regards,
> >>>> Krzysztof
> >>>>
> >>>
> >>> Let me answer your questions first.
> >>> In the existing V4 patch, clock items were declared in if then for
> >>> each
> >> block, so there was no problem.
> >>
> >> No. Again, look at your binding and DTS.
> >>
> >> 1. What clocks did you define for cmu-top?
> > Cmu-top has one clock(oscclk).
> >> 2. What clocks did you define for cmu-peric0?
> > Cmu-peric0 has three clocks(oscclk, noc and ip)
> >>
> >> Rob's advice is reasonable and you must follow it, unless you are not
> >> telling us something. There is no other choice, no other compatibles,
> >> no other devices.
> >>
> > Yes, that's right. In this patch, modifications are possible according
> to Rob's review.
> >>> If modified according to Rob's comment, problems may occur as the
> >>> input
> >> clock is configured differently for each block.
> >>
> >> But it is not! Look at your binding.
> > The reason I mentioned this was to ask how to handle problems that may
> occur when adding cmu for a new block in a new patch.
> > As you mentioned, this issue does not exist in this patch.
>
> A new block? And how do we know about it? Bindings are supposed to be
> complete. We see bindings and you receive review.
>
> Post complete bindings.
>
> Best regards,
> Krzysztof
>
I understand your intention. I will re-upload the patch based on Rob's review based on the current patch.
Best regards,
sunyeal
^ permalink raw reply [flat|nested] 23+ messages in thread
end of thread, other threads:[~2024-07-29 2:49 UTC | newest]
Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CGME20240722223340epcas2p380657369f0b57c9e21f05f250066a711@epcas2p3.samsung.com>
2024-07-22 22:33 ` [PATCH v4 0/4] initial clock support for exynosauto v920 SoC Sunyeal Hong
2024-07-22 22:33 ` [PATCH v4 1/4] dt-bindings: clock: add ExynosAuto v920 SoC CMU bindings Sunyeal Hong
2024-07-23 20:57 ` Rob Herring
2024-07-25 1:24 ` sunyeal.hong
2024-07-25 3:03 ` sunyeal.hong
2024-07-25 6:21 ` Krzysztof Kozlowski
2024-07-25 6:35 ` sunyeal.hong
2024-07-25 6:37 ` Krzysztof Kozlowski
2024-07-25 6:40 ` Krzysztof Kozlowski
2024-07-25 7:14 ` sunyeal.hong
2024-07-25 7:31 ` Krzysztof Kozlowski
2024-07-25 7:50 ` sunyeal.hong
2024-07-25 7:56 ` Krzysztof Kozlowski
2024-07-29 2:48 ` sunyeal.hong
2024-07-24 10:12 ` Krzysztof Kozlowski
2024-07-25 1:25 ` sunyeal.hong
2024-07-22 22:33 ` [PATCH v4 2/4] arm64: dts: exynos: add initial CMU clock nodes in ExynosAuto v920 Sunyeal Hong
2024-07-24 10:13 ` Krzysztof Kozlowski
2024-07-25 1:28 ` sunyeal.hong
2024-07-24 11:17 ` Tudor Ambarus
2024-07-25 3:09 ` sunyeal.hong
2024-07-22 22:33 ` [PATCH v4 3/4] clk: samsung: clk-pll: Add support for pll_531x Sunyeal Hong
2024-07-22 22:33 ` [PATCH v4 4/4] clk: samsung: add top clock support for ExynosAuto v920 SoC Sunyeal Hong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).