Skip to contentSkip to conversation

SM8350 Display/GPU clock enablement

PATCH Superseded Robert Foss 2 participants 10 messages Jun 1, 2022 – Jun 3, 2022

Subsystems (5)

v4 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v4 cover SM8350 Display/GPU clock enablement

Changes since v2
- Dropped "clk: Introduce CLK_ASSUME_ENABLED_WHEN_UNUSED"
- Dropped "clk: qcom: sm8250-dispcc: Flag shared RCGs as assumed enable"
- Dropped "clk: qcom: rcg2: Cache rate changes for parked RCGs"

Changes sinsce v3:
- Dropped RBs & SoBs for bigger changes
- Changed author to me for patches with big changes

Robert Foss (6):
arm64: dts: qcom: sm8350: Replace integers with rpmpd defines
clk: qcom: add support for SM8350 GPUCC
dt-bindings: clock: Add Qcom SM8350 GPUCC bindings
clk: qcom: add support for SM8350 DISPCC
dt-bindings: clock: Add Qcom SM8350 DISPCC bindings
arm64: dts: qcom: sm8350: Add DISPCC node

 .../bindings/clock/qcom,dispcc-sm8350.yaml    |  104 ++
 .../bindings/clock/qcom,dispcc-sm8x50.yaml    |    4 +-
 .../bindings/clock/qcom,gpucc-sm8350.yaml     |   72 +
 arch/arm64/boot/dts/qcom/sm8350.dtsi          |   41 +-
 drivers/clk/qcom/Kconfig                      |   17 +
 drivers/clk/qcom/Makefile                     |    2 +
 drivers/clk/qcom/dispcc-sm8350.c              | 1330 +++++++++++++++++
 drivers/clk/qcom/gpucc-sm8350.c               |  637 ++++++++
 .../dt-bindings/clock/qcom,dispcc-sm8350.h    |    1 +
 include/dt-bindings/clock/qcom,gpucc-sm8350.h |   52 +
 10 files changed, 2250 insertions(+), 10 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,dispcc-sm8350.yaml
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gpucc-sm8350.yaml
 create mode 100644 drivers/clk/qcom/dispcc-sm8350.c
 create mode 100644 drivers/clk/qcom/gpucc-sm8350.c
 create mode 120000 include/dt-bindings/clock/qcom,dispcc-sm8350.h
 create mode 100644 include/dt-bindings/clock/qcom,gpucc-sm8350.h
Signature · 1 line
2.34.1
#1 lore raw

PATCH v4 1/6 arm64: dts: qcom: sm8350: Replace integers with rpmpd defines

Replace &rpmhpd power domain integers with their respective defines in order to improve legibility.

---
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
arch/arm64/boot/dts/qcom/sm8350.dtsi +8 -8
index c0137bdcf94b..52428b6df64e 100644
@@ -1656,8 +1656,8 @@ mpss: remoteproc@4080000 {
 			clocks = <&rpmhcc RPMH_CXO_CLK>;
 			clock-names = "xo";
 
-			power-domains = <&rpmhpd 0>,
-					<&rpmhpd 12>;
+			power-domains = <&rpmhpd SM8350_CX>,
+					<&rpmhpd SM8350_MSS>;
 			power-domain-names = "cx", "mss";
 
 			interconnects = <&mc_virt MASTER_LLCC &mc_virt SLAVE_EBI1>;
@@ -2167,8 +2167,8 @@ slpi: remoteproc@5c00000 {
 			clocks = <&rpmhcc RPMH_CXO_CLK>;
 			clock-names = "xo";
 
-			power-domains = <&rpmhpd 4>,
-					<&rpmhpd 5>;
+			power-domains = <&rpmhpd SM8350_LCX>,
+					<&rpmhpd SM8350_LMX>;
 			power-domain-names = "lcx", "lmx";
 
 			memory-region = <&pil_slpi_mem>;
@@ -2235,8 +2235,8 @@ cdsp: remoteproc@98900000 {
 			clocks = <&rpmhcc RPMH_CXO_CLK>;
 			clock-names = "xo";
 
-			power-domains = <&rpmhpd 0>,
-					<&rpmhpd 10>;
+			power-domains = <&rpmhpd SM8350_CX>,
+					<&rpmhpd SM8350_MXC>;
 			power-domain-names = "cx", "mxc";
 
 			interconnects = <&compute_noc MASTER_CDSP_PROC &mc_virt SLAVE_EBI1>;
@@ -2540,8 +2540,8 @@ adsp: remoteproc@17300000 {
 			clocks = <&rpmhcc RPMH_CXO_CLK>;
 			clock-names = "xo";
 
-			power-domains = <&rpmhpd 4>,
-					<&rpmhpd 5>;
+			power-domains = <&rpmhpd SM8350_LCX>,
+					<&rpmhpd SM8350_LMX>;
 			power-domain-names = "lcx", "lmx";
 
 			memory-region = <&pil_adsp_mem>;
Signature · 1 line
2.34.1
#3 lore raw

PATCH v4 3/6 dt-bindings: clock: Add Qcom SM8350 GPUCC bindings

In reply to Robert Foss

Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM8350 SoCs.

---

Changes since v3
- Separate from qcom,gpucc
- Remove clock-names
- Make example sm8350 based
- Changed author to me due to size of changes

 .../bindings/clock/qcom,gpucc-sm8350.yaml     | 72 +++++++++++++++++++
 include/dt-bindings/clock/qcom,gpucc-sm8350.h | 52 ++++++++++++++
 2 files changed, 124 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gpucc-sm8350.yaml
 create mode 100644 include/dt-bindings/clock/qcom,gpucc-sm8350.h
Documentation/devicetree/bindings/clock/qcom,gpucc-sm8350.yaml new file +72 -0
new file mode 100644
index 000000000000..0a0546c079a9
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,gpucc-sm8350.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Graphics Clock & Reset Controller Binding
+
+maintainers:
+  - Robert Foss <[email protected]>
+
+description: |
+  Qualcomm graphics clock control module which supports the clocks, resets and
+  power domains on Qualcomm SoCs.
+
+  See also:
+    dt-bindings/clock/qcom,gpucc-sm8350.h
+
+properties:
+  compatible:
+    enum:
+      - qcom,sm8350-gpucc
+
+  clocks:
+    items:
+      - description: Board XO source
+      - description: GPLL0 main branch source
+      - description: GPLL0 div branch source
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+  '#power-domain-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+  - '#reset-cells'
+  - '#power-domain-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-sm8350.h>
+    #include <dt-bindings/clock/qcom,rpmh.h>
+
+    soc {
+        #address-cells = <2>;
+        #size-cells = <2>;
+
+        clock-controller@3d90000 {
+            compatible = "qcom,sm8350-gpucc";
+            reg = <0 0x03d90000 0 0x9000>;
+            clocks = <&rpmhcc RPMH_CXO_CLK>,
+                     <&gcc GCC_GPU_GPLL0_CLK_SRC>,
+                     <&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>;
+            #clock-cells = <1>;
+            #reset-cells = <1>;
+            #power-domain-cells = <1>;
+        };
+    };
+...
include/dt-bindings/clock/qcom,gpucc-sm8350.h new file +52 -0

52 lines not on this page · raw message

Signature · 1 line
2.34.1
#6 lore raw

PATCH v4 4/6 clk: qcom: add support for SM8350 DISPCC

In reply to Robert Foss

Add support to the SM8350 display clock controller.

While this controller is similar to the sm8250 controller, the differences are incompatible due to the .fw_name / .index change.

---

Changes since v1
- Remove comment - Dmitry

Changes since v2
- Add my SoB - Bjorn
- Remove CLK_ASSUME_ENABLED_WHEN_UNUSED flag

Changes since v3
- Add kconfig dependency on SM_GCC_8350 - Konrad
- Change hex to lowercase - Konrad
- Split from dispcc-sm8250.c implementation
- Switch from .fw_name to .index

 drivers/clk/qcom/Kconfig         |    9 +
 drivers/clk/qcom/Makefile        |    1 +
 drivers/clk/qcom/dispcc-sm8350.c | 1330 ++++++++++++++++++++++++++++++
 3 files changed, 1340 insertions(+)
 create mode 100644 drivers/clk/qcom/dispcc-sm8350.c
drivers/clk/qcom/Kconfig +9 -0
index b11235c21952..319812a1d614 100644
@@ -626,6 +626,15 @@ config SM_DISPCC_8250
 	  Say Y if you want to support display devices and functionality such as
 	  splash screen.
 
+config SM_DISPCC_8350
+	tristate "SM8350 Display Clock Controller"
+	depends on SM_GCC_8350
+	help
+	  Support for the display clock controller on Qualcomm Technologies, Inc
+	  SM8350 devices.
+	  Say Y if you want to support display devices and functionality such as
+	  splash screen.
+
 config SM_DISPCC_6350
 	tristate "SM6350 Display Clock Controller"
 	depends on SM_GCC_6350
drivers/clk/qcom/Makefile +1 -0
index ef9c64824424..70f98320eb1d 100644
@@ -91,6 +91,7 @@ obj-$(CONFIG_SM_CAMCC_8250) += camcc-sm8250.o
 obj-$(CONFIG_SM_DISPCC_6125) += dispcc-sm6125.o
 obj-$(CONFIG_SM_DISPCC_6350) += dispcc-sm6350.o
 obj-$(CONFIG_SM_DISPCC_8250) += dispcc-sm8250.o
+obj-$(CONFIG_SM_DISPCC_8350) += dispcc-sm8350.o
 obj-$(CONFIG_SM_GCC_6115) += gcc-sm6115.o
 obj-$(CONFIG_SM_GCC_6125) += gcc-sm6125.o
 obj-$(CONFIG_SM_GCC_6350) += gcc-sm6350.o
drivers/clk/qcom/dispcc-sm8350.c new file +1330 -0

1,330 lines not on this page · raw message

Signature · 1 line
2.34.1
#7 lore raw

PATCH v4 5/6 dt-bindings: clock: Add Qcom SM8350 DISPCC bindings

In reply to Robert Foss

Add sm8350 DISPCC bindings, while these bindings are similar to the sm8x50 bindings, the way clocks are represented has changed in ABI incompatible ways.

---

hanges since v2
- Add my SoB - Bjorn

Changes since v3
- Separate from qcom,dispcc-sm8x50
- Remove clock-names
- Make example sm8350 based
- Changed author to me due to size of changes

 .../bindings/clock/qcom,dispcc-sm8350.yaml    | 104 ++++++++++++++++++
 .../bindings/clock/qcom,dispcc-sm8x50.yaml    |   4 +-
 .../dt-bindings/clock/qcom,dispcc-sm8350.h    |   1 +
 3 files changed, 107 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,dispcc-sm8350.yaml
 create mode 120000 include/dt-bindings/clock/qcom,dispcc-sm8350.h
Documentation/devicetree/bindings/clock/qcom,dispcc-sm8350.yaml new file +104 -0
new file mode 100644
index 000000000000..d7e8739cab32
@@ -0,0 +1,104 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,dispcc-sm8350.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Display Clock & Reset Controller Binding for SM8350
+
+maintainers:
+  - Robert Foss <[email protected]>
+
+description: |
+  Qualcomm display clock control module which supports the clocks, resets and
+  power domains on SM8350.
+
+  See also:
+    dt-bindings/clock/qcom,dispcc-sm8350.h
+
+properties:
+  compatible:
+    enum:
+      - qcom,sm8350-dispcc
+
+  clocks:
+    items:
+      - description: Board XO source
+      - description: Link clock from DP PHY
+      - description: VCO DIV clock from DP PHY
+      - description: Link clock from DPTX1 PHY
+      - description: VCO DIV clock from DPTX1 PHY
+      - description: Link clock from DPTX2 PHY
+      - description: VCO DIV clock from DPTX2 PHY
+      - description: Byte clock from DSI PHY0
+      - description: Pixel clock from DSI PHY0
+      - description: Byte clock from DSI PHY1
+      - description: Pixel clock from DSI PHY1
+      - description: Link clock from EDP PHY
+      - description: VCO DIV clock from EDP PHY
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+  '#power-domain-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+  power-domains:
+    description:
+      A phandle and PM domain specifier for the MMCX power domain.
+    maxItems: 1
+
+  required-opps:
+    description:
+      A phandle to an OPP node describing required MMCX performance point.
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+  - '#reset-cells'
+  - '#power-domain-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,rpmh.h>
+    #include <dt-bindings/power/qcom-rpmpd.h>
+    soc {
+      #address-cells = <2>;
+      #size-cells = <2>;
+
+      clock-controller@af00000 {
+          compatible = "qcom,sm8350-dispcc";
+          reg = <0 0x0af00000 0 0x10000>;
+          clocks = <&rpmhcc RPMH_CXO_CLK>,
+                   <&dp_phy 0>,
+                   <&dp_phy 1>,
+                   <&dptx1_phy 0>,
+                   <&dptx1_phy 1>,
+                   <&dptx2_phy 0>,
+                   <&dptx2_phy 1>,
+                   <&dsi0_phy 0>,
+                   <&dsi0_phy 1>,
+                   <&dsi1_phy 0>,
+                   <&dsi1_phy 1>,
+                   <&edp_phy 0>,
+                   <&edp_phy 1>;
+
+          #clock-cells = <1>;
+          #reset-cells = <1>;
+          #power-domain-cells = <1>;
+          power-domains = <&rpmhpd SM8350_MMCX>;
+          required-opps = <&rpmhpd_opp_low_svs>;
+        };
+    };
+...
Documentation/devicetree/bindings/clock/qcom,dispcc-sm8x50.yaml +2 -2
index 31497677e8de..951fe2ecb7a6 100644
@@ -4,14 +4,14 @@
 $id: http://devicetree.org/schemas/clock/qcom,dispcc-sm8x50.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: Qualcomm Display Clock & Reset Controller Binding for SM8150/SM8250
+title: Qualcomm Display Clock & Reset Controller Binding for SM8150/SM8250/SM8350
 
 maintainers:
   - Jonathan Marek <[email protected]>
 
 description: |
   Qualcomm display clock control module which supports the clocks, resets and
-  power domains on SM8150 and SM8250.
+  power domains on SM8150/SM8250.
 
   See also:
     dt-bindings/clock/qcom,dispcc-sm8150.h
include/dt-bindings/clock/qcom,dispcc-sm8350.h new file +1 -0
new file mode 120000
index 000000000000..0312b4544acb
@@ -0,0 +1 @@
+qcom,dispcc-sm8250.h
\ No newline at end of file
Signature · 1 line
2.34.1
#9 lore raw

PATCH v4 6/6 arm64: dts: qcom: sm8350: Add DISPCC node

In reply to Robert Foss

Add the dispcc clock-controller DT node for sm8350.

---

Changes since v2
- Remove interconnect include - Bjorn

Changes since v3
- Switch from .fw_name to .index

 arch/arm64/boot/dts/qcom/sm8350.dtsi | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)
arch/arm64/boot/dts/qcom/sm8350.dtsi +25 -0
index 52428b6df64e..df0f3dd38f0f 100644
@@ -4,6 +4,7 @@
  */
 
 #include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/clock/qcom,dispcc-sm8350.h>
 #include <dt-bindings/clock/qcom,gcc-sm8350.h>
 #include <dt-bindings/clock/qcom,rpmh.h>
 #include <dt-bindings/dma/qcom-gpi.h>
@@ -2525,6 +2526,30 @@ usb_2_dwc3: usb@a800000 {
 			};
 		};
 
+		dispcc: clock-controller@af00000 {
+			compatible = "qcom,sm8350-dispcc";
+			reg = <0 0x0af00000 0 0x10000>;
+			clocks = <&rpmhcc RPMH_CXO_CLK>,
+				 <0>,
+				 <0>,
+				 <0>,
+				 <0>,
+				 <0>,
+				 <0>,
+				 <0>,
+				 <0>,
+				 <0>,
+				 <0>,
+				 <0>,
+				 <0>;
+			#clock-cells = <1>;
+			#reset-cells = <1>;
+			#power-domain-cells = <1>;
+
+			power-domains = <&rpmhpd SM8350_MMCX>;
+			power-domain-names = "mmcx";
+		};
+
 		adsp: remoteproc@17300000 {
 			compatible = "qcom,sm8350-adsp-pas";
 			reg = <0 0x17300000 0 0x100>;
Signature · 1 line
2.34.1
#2 lore raw

PATCH v4 2/6 clk: qcom: add support for SM8350 GPUCC

In reply to Robert Foss

The GPUCC manages the clocks for the Adreno GPU found on the sm8350 SoCs.

---

Changes since v1
- Remove .name assignments for clk_parent_data - Dmitry
- Use ARRAY_SIZE where possible - Dmitry
- Remove commented out code - Dmitry
- Set CLAMP_IO flag for gpu_gx_gdsc - Dmitry
- Assign .parent_hws instead of .hw - Dmitry

Changes since v2
- Switch license to dual BSD/GPL - Bjorn
- Add Jonathans SoB - Jonathan
- Add Linaro to copyright statement - Bjorn
- Make .hw.init assignment const - Bjorn
- Extract & deduplicate bi_tcxo parent_data - Bjorn
- Removed further .name assignment - Bjorn
- Move of_device_id declaration - Bjorn

Changes since v3
- Change license to BSD/GPL - Rob/Bjorn
- Switch from .fw_name to .index

 drivers/clk/qcom/Kconfig        |   8 +
 drivers/clk/qcom/Makefile       |   1 +
 drivers/clk/qcom/gpucc-sm8350.c | 637 ++++++++++++++++++++++++++++++++
 3 files changed, 646 insertions(+)
 create mode 100644 drivers/clk/qcom/gpucc-sm8350.c
drivers/clk/qcom/Kconfig +8 -0
index bc4dcf356d82..b11235c21952 100644
@@ -712,6 +712,14 @@ config SM_GPUCC_8250
 	  Say Y if you want to support graphics controller devices and
 	  functionality such as 3D graphics.
 
+config SM_GPUCC_8350
+	tristate "SM8350 Graphics Clock Controller"
+	select SM_GCC_8350
+	help
+	  Support for the graphics clock controller on SM8350 devices.
+	  Say Y if you want to support graphics controller devices and
+	  functionality such as 3D graphics.
+
 config SM_VIDEOCC_8150
 	tristate "SM8150 Video Clock Controller"
 	select SM_GCC_8150
drivers/clk/qcom/Makefile +1 -0
index 36789f5233ef..ef9c64824424 100644
@@ -101,6 +101,7 @@ obj-$(CONFIG_SM_GCC_8450) += gcc-sm8450.o
 obj-$(CONFIG_SM_GPUCC_6350) += gpucc-sm6350.o
 obj-$(CONFIG_SM_GPUCC_8150) += gpucc-sm8150.o
 obj-$(CONFIG_SM_GPUCC_8250) += gpucc-sm8250.o
+obj-$(CONFIG_SM_GPUCC_8350) += gpucc-sm8350.o
 obj-$(CONFIG_SM_VIDEOCC_8150) += videocc-sm8150.o
 obj-$(CONFIG_SM_VIDEOCC_8250) += videocc-sm8250.o
 obj-$(CONFIG_SPMI_PMIC_CLKDIV) += clk-spmi-pmic-div.o
drivers/clk/qcom/gpucc-sm8350.c new file +637 -0

637 lines not on this page · raw message

Signature · 1 line
2.34.1
maintainer Reviewed-by on v4 5/6
#8 lore raw

Re: [PATCH v4 5/6] dt-bindings: clock: Add Qcom SM8350 DISPCC bindings

In reply to Robert Foss
Quoted 17 lines · Robert Foss

Add sm8350 DISPCC bindings, while these bindings are similar to the sm8x50 bindings, the way clocks are represented has changed in ABI incompatible ways.

---

hanges since v2
- Add my SoB - Bjorn

Changes since v3
- Separate from qcom,dispcc-sm8x50
- Remove clock-names
- Make example sm8350 based
- Changed author to me due to size of changes

Quoted 7 lines
 .../bindings/clock/qcom,dispcc-sm8350.yaml    | 104 ++++++++++++++++++
 .../bindings/clock/qcom,dispcc-sm8x50.yaml    |   4 +-
 .../dt-bindings/clock/qcom,dispcc-sm8350.h    |   1 +
 3 files changed, 107 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,dispcc-sm8350.yaml
 create mode 120000 include/dt-bindings/clock/qcom,dispcc-sm8350.h
maintainer
#4 lore raw

Re: [PATCH v4 3/6] dt-bindings: clock: Add Qcom SM8350 GPUCC bindings

In reply to Robert Foss
Quoted 104 lines · Robert Foss

Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM8350 SoCs.

---

Changes since v3
- Separate from qcom,gpucc
- Remove clock-names
- Make example sm8350 based
- Changed author to me due to size of changes

 .../bindings/clock/qcom,gpucc-sm8350.yaml     | 72 +++++++++++++++++++
 include/dt-bindings/clock/qcom,gpucc-sm8350.h | 52 ++++++++++++++
 2 files changed, 124 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gpucc-sm8350.yaml
 create mode 100644 include/dt-bindings/clock/qcom,gpucc-sm8350.h
Documentation/devicetree/bindings/clock/qcom,gpucc-sm8350.yaml new file +72 -0
new file mode 100644
index 000000000000..0a0546c079a9
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,gpucc-sm8350.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Graphics Clock & Reset Controller Binding
+
+maintainers:
+  - Robert Foss <[email protected]>
+
+description: |
+  Qualcomm graphics clock control module which supports the clocks, resets and
+  power domains on Qualcomm SoCs.
+
+  See also:
+    dt-bindings/clock/qcom,gpucc-sm8350.h
+
+properties:
+  compatible:
+    enum:
+      - qcom,sm8350-gpucc
+
+  clocks:
+    items:
+      - description: Board XO source
+      - description: GPLL0 main branch source
+      - description: GPLL0 div branch source
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+  '#power-domain-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+  - '#reset-cells'
+  - '#power-domain-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-sm8350.h>
+    #include <dt-bindings/clock/qcom,rpmh.h>
+
+    soc {
+        #address-cells = <2>;
+        #size-cells = <2>;
+
+        clock-controller@3d90000 {
+            compatible = "qcom,sm8350-gpucc";
+            reg = <0 0x03d90000 0 0x9000>;
+            clocks = <&rpmhcc RPMH_CXO_CLK>,
+                     <&gcc GCC_GPU_GPLL0_CLK_SRC>,
+                     <&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>;
+            #clock-cells = <1>;
+            #reset-cells = <1>;
+            #power-domain-cells = <1>;
+        };
+    };
+...
include/dt-bindings/clock/qcom,gpucc-sm8350.h new file +0 -0
new file mode 100644
index 000000000000..d2294e0d527e

include/dt-bindings/clock/qcom,gpucc-sm8350.h line 1

Quoted 1 line
include/dt-bindings/clock/qcom,gpucc-sm8350.h new file +1 -0
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: GPL-2.0-only */

Dual license.

Quoted 55 lines
include/dt-bindings/clock/qcom,gpucc-sm8350.h new file +51 -0
+/*
+ * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_GPU_CC_SM8350_H
+#define _DT_BINDINGS_CLK_QCOM_GPU_CC_SM8350_H
+
+/* GPU_CC clocks */
+#define GPU_CC_AHB_CLK			0
+#define GPU_CC_CB_CLK			1
+#define GPU_CC_CRC_AHB_CLK		2
+#define GPU_CC_CX_APB_CLK		3
+#define GPU_CC_CX_GMU_CLK		4
+#define GPU_CC_CX_QDSS_AT_CLK		5
+#define GPU_CC_CX_QDSS_TRIG_CLK		6
+#define GPU_CC_CX_QDSS_TSCTR_CLK	7
+#define GPU_CC_CX_SNOC_DVM_CLK		8
+#define GPU_CC_CXO_AON_CLK		9
+#define GPU_CC_CXO_CLK			10
+#define GPU_CC_FREQ_MEASURE_CLK		11
+#define GPU_CC_GMU_CLK_SRC		12
+#define GPU_CC_GX_GMU_CLK		13
+#define GPU_CC_GX_QDSS_TSCTR_CLK	14
+#define GPU_CC_GX_VSENSE_CLK		15
+#define GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK	16
+#define GPU_CC_HUB_AHB_DIV_CLK_SRC	17
+#define GPU_CC_HUB_AON_CLK		18
+#define GPU_CC_HUB_CLK_SRC		19
+#define GPU_CC_HUB_CX_INT_CLK		20
+#define GPU_CC_HUB_CX_INT_DIV_CLK_SRC	21
+#define GPU_CC_MND1X_0_GFX3D_CLK	22
+#define GPU_CC_MND1X_1_GFX3D_CLK	23
+#define GPU_CC_PLL0			24
+#define GPU_CC_PLL1			25
+#define GPU_CC_SLEEP_CLK		26
+
+/* GPU_CC resets */
+#define GPUCC_GPU_CC_ACD_BCR		0
+#define GPUCC_GPU_CC_CB_BCR		1
+#define GPUCC_GPU_CC_CX_BCR		2
+#define GPUCC_GPU_CC_FAST_HUB_BCR	3
+#define GPUCC_GPU_CC_GFX3D_AON_BCR	4
+#define GPUCC_GPU_CC_GMU_BCR		5
+#define GPUCC_GPU_CC_GX_BCR		6
+#define GPUCC_GPU_CC_XO_BCR		7
+
+/* GPU_CC GDSCRs */
+#define GPU_CX_GDSC			0
+#define GPU_GX_GDSC			1
+
+#endif
Signature · 1 line
2.34.1
#5 lore raw

Re: [PATCH v4 3/6] dt-bindings: clock: Add Qcom SM8350 GPUCC bindings

Quoted 101 lines · Rob Herring
Quoted 99 lines · Robert Foss

Add device tree bindings for graphics clock controller for Qualcomm Technology Inc's SM8350 SoCs.

---

Changes since v3
- Separate from qcom,gpucc
- Remove clock-names
- Make example sm8350 based
- Changed author to me due to size of changes

 .../bindings/clock/qcom,gpucc-sm8350.yaml     | 72 +++++++++++++++++++
 include/dt-bindings/clock/qcom,gpucc-sm8350.h | 52 ++++++++++++++
 2 files changed, 124 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/qcom,gpucc-sm8350.yaml
 create mode 100644 include/dt-bindings/clock/qcom,gpucc-sm8350.h
Documentation/devicetree/bindings/clock/qcom,gpucc-sm8350.yaml new file +72 -0
new file mode 100644
index 000000000000..0a0546c079a9
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,gpucc-sm8350.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Graphics Clock & Reset Controller Binding
+
+maintainers:
+  - Robert Foss <[email protected]>
+
+description: |
+  Qualcomm graphics clock control module which supports the clocks, resets and
+  power domains on Qualcomm SoCs.
+
+  See also:
+    dt-bindings/clock/qcom,gpucc-sm8350.h
+
+properties:
+  compatible:
+    enum:
+      - qcom,sm8350-gpucc
+
+  clocks:
+    items:
+      - description: Board XO source
+      - description: GPLL0 main branch source
+      - description: GPLL0 div branch source
+
+  '#clock-cells':
+    const: 1
+
+  '#reset-cells':
+    const: 1
+
+  '#power-domain-cells':
+    const: 1
+
+  reg:
+    maxItems: 1
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - '#clock-cells'
+  - '#reset-cells'
+  - '#power-domain-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/clock/qcom,gcc-sm8350.h>
+    #include <dt-bindings/clock/qcom,rpmh.h>
+
+    soc {
+        #address-cells = <2>;
+        #size-cells = <2>;
+
+        clock-controller@3d90000 {
+            compatible = "qcom,sm8350-gpucc";
+            reg = <0 0x03d90000 0 0x9000>;
+            clocks = <&rpmhcc RPMH_CXO_CLK>,
+                     <&gcc GCC_GPU_GPLL0_CLK_SRC>,
+                     <&gcc GCC_GPU_GPLL0_DIV_CLK_SRC>;
+            #clock-cells = <1>;
+            #reset-cells = <1>;
+            #power-domain-cells = <1>;
+        };
+    };
+...
include/dt-bindings/clock/qcom,gpucc-sm8350.h +0 -0
Quoted 8 lines

include/dt-bindings/clock/qcom,gpucc-sm8350.h line 1

Quoted 6 lines

new file mode 100644
index 000000000000..d2294e0d527e

include/dt-bindings/clock/qcom,gpucc-sm8350.h new file +1 -0
@@ -0,0 +1,52 @@
+/* SPDX-License-Identifier: GPL-2.0-only */

Dual license.

Ack.

Quoted 56 lines
Quoted 56 lines
include/dt-bindings/clock/qcom,gpucc-sm8350.h new file +51 -1
+/*
+ * Copyright (c) 2019-2020, The Linux Foundation. All rights reserved.
+ */
+
+#ifndef _DT_BINDINGS_CLK_QCOM_GPU_CC_SM8350_H
+#define _DT_BINDINGS_CLK_QCOM_GPU_CC_SM8350_H
+
+/* GPU_CC clocks */
+#define GPU_CC_AHB_CLK                       0
+#define GPU_CC_CB_CLK                        1
+#define GPU_CC_CRC_AHB_CLK           2
+#define GPU_CC_CX_APB_CLK            3
+#define GPU_CC_CX_GMU_CLK            4
+#define GPU_CC_CX_QDSS_AT_CLK                5
+#define GPU_CC_CX_QDSS_TRIG_CLK              6
+#define GPU_CC_CX_QDSS_TSCTR_CLK     7
+#define GPU_CC_CX_SNOC_DVM_CLK               8
+#define GPU_CC_CXO_AON_CLK           9
+#define GPU_CC_CXO_CLK                       10
+#define GPU_CC_FREQ_MEASURE_CLK              11
+#define GPU_CC_GMU_CLK_SRC           12
+#define GPU_CC_GX_GMU_CLK            13
+#define GPU_CC_GX_QDSS_TSCTR_CLK     14
+#define GPU_CC_GX_VSENSE_CLK         15
+#define GPU_CC_HLOS1_VOTE_GPU_SMMU_CLK       16
+#define GPU_CC_HUB_AHB_DIV_CLK_SRC   17
+#define GPU_CC_HUB_AON_CLK           18
+#define GPU_CC_HUB_CLK_SRC           19
+#define GPU_CC_HUB_CX_INT_CLK                20
+#define GPU_CC_HUB_CX_INT_DIV_CLK_SRC        21
+#define GPU_CC_MND1X_0_GFX3D_CLK     22
+#define GPU_CC_MND1X_1_GFX3D_CLK     23
+#define GPU_CC_PLL0                  24
+#define GPU_CC_PLL1                  25
+#define GPU_CC_SLEEP_CLK             26
+
+/* GPU_CC resets */
+#define GPUCC_GPU_CC_ACD_BCR         0
+#define GPUCC_GPU_CC_CB_BCR          1
+#define GPUCC_GPU_CC_CX_BCR          2
+#define GPUCC_GPU_CC_FAST_HUB_BCR    3
+#define GPUCC_GPU_CC_GFX3D_AON_BCR   4
+#define GPUCC_GPU_CC_GMU_BCR         5
+#define GPUCC_GPU_CC_GX_BCR          6
+#define GPUCC_GPU_CC_XO_BCR          7
+
+/* GPU_CC GDSCRs */
+#define GPU_CX_GDSC                  0
+#define GPU_GX_GDSC                  1
+
+#endif
--

2.34.1