Skip to contentSkip to conversation

MediaTek MT8188 clock support

PATCH Superseded Garmin.Chang 3 participants 32 messages Oct 24, 2022 – Dec 23, 2022

Subsystems (3)

v2 of 8 Superseded Latest is v8 →

lore
Share & tools
lore
#0 lore raw

v2 cover MediaTek MT8188 clock support

Base on tag: next-20221024, linux-next/master

changes since v1:
- add CLK_OPS_PARENT_ENABLE flag in clk-mt8188-imp_iic_wrap.c
- add adsp driver "clk-mt8188-adsp_audio26m"
- align as the same indention in mediatek,mt8188-clk.h
- modify yaml file

Garmin.Chang (19):
dt-bindings: ARM: MediaTek: Add new document bindings of MT8188 clock
clk: mediatek: Add MT8188 apmixedsys clock support
clk: mediatek: Add MT8188 topckgen clock support
clk: mediatek: Add MT8188 peripheral clock support
clk: mediatek: Add MT8188 infrastructure clock support
clk: mediatek: Add MT8188 camsys clock support
clk: mediatek: Add MT8188 ccusys clock support
clk: mediatek: Add MT8188 imgsys clock support
clk: mediatek: Add MT8188 ipesys clock support
clk: mediatek: Add MT8188 mfgcfg clock support
clk: mediatek: Add MT8188 vdecsys clock support
clk: mediatek: Add MT8188 vdosys0 clock support
clk: mediatek: Add MT8188 vdosys1 clock support
clk: mediatek: Add MT8188 vencsys clock support
clk: mediatek: Add MT8188 vppsys0 clock support
clk: mediatek: Add MT8188 vppsys1 clock support
clk: mediatek: Add MT8188 wpesys clock support
clk: mediatek: Add MT8188 imp i2c wrapper clock support
clk: mediatek: Add MT8188 adsp clock support

 .../arm/mediatek/mediatek,mt8188-clock.yaml   |   70 +
 .../mediatek/mediatek,mt8188-sys-clock.yaml   |   55 +
 drivers/clk/mediatek/Kconfig                  |   11 +
 drivers/clk/mediatek/Makefile                 |    7 +
 .../clk/mediatek/clk-mt8188-adsp_audio26m.c   |   49 +
 drivers/clk/mediatek/clk-mt8188-apmixedsys.c  |  153 ++
 drivers/clk/mediatek/clk-mt8188-cam.c         |  130 ++
 drivers/clk/mediatek/clk-mt8188-ccu.c         |   52 +
 drivers/clk/mediatek/clk-mt8188-img.c         |  124 ++
 .../clk/mediatek/clk-mt8188-imp_iic_wrap.c    |   86 ++
 drivers/clk/mediatek/clk-mt8188-infra_ao.c    |  194 +++
 drivers/clk/mediatek/clk-mt8188-ipe.c         |   54 +
 drivers/clk/mediatek/clk-mt8188-mfg.c         |   50 +
 drivers/clk/mediatek/clk-mt8188-peri_ao.c     |   60 +
 drivers/clk/mediatek/clk-mt8188-topckgen.c    | 1337 +++++++++++++++++
 drivers/clk/mediatek/clk-mt8188-vdec.c        |   96 ++
 drivers/clk/mediatek/clk-mt8188-vdo0.c        |  129 ++
 drivers/clk/mediatek/clk-mt8188-vdo1.c        |  177 +++
 drivers/clk/mediatek/clk-mt8188-venc.c        |   56 +
 drivers/clk/mediatek/clk-mt8188-vpp0.c        |  143 ++
 drivers/clk/mediatek/clk-mt8188-vpp1.c        |  138 ++
 drivers/clk/mediatek/clk-mt8188-wpe.c         |  107 ++
 .../dt-bindings/clock/mediatek,mt8188-clk.h   |  733 +++++++++
 23 files changed, 4011 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml
 create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml
 create mode 100644 drivers/clk/mediatek/clk-mt8188-adsp_audio26m.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-apmixedsys.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-cam.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-ccu.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-img.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-imp_iic_wrap.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-infra_ao.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-ipe.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-mfg.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-peri_ao.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-topckgen.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-vdec.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-vdo0.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-vdo1.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-venc.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-vpp0.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-vpp1.c
 create mode 100644 drivers/clk/mediatek/clk-mt8188-wpe.c
 create mode 100644 include/dt-bindings/clock/mediatek,mt8188-clk.h
Signature · 1 line
2.18.0
#1 lore raw

PATCH v2 1/19 dt-bindings: ARM: MediaTek: Add new document bindings of MT8188 clock

Add the new binding documentation for system clock and functional clock on MediaTek MT8188.

---
 .../arm/mediatek/mediatek,mt8188-clock.yaml   |  70 ++
 .../mediatek/mediatek,mt8188-sys-clock.yaml   |  55 ++
 .../dt-bindings/clock/mediatek,mt8188-clk.h   | 733 ++++++++++++++++++
 3 files changed, 858 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml
 create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml
 create mode 100644 include/dt-bindings/clock/mediatek,mt8188-clk.h
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +70 -0
new file mode 100644
index 000000000000..49dc681e6601
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mediatek/mediatek,mt8188-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek Functional Clock Controller for MT8188
+
+maintainers:
+  - Garmin Chang <[email protected]>
+
+description: |
+  The clock architecture in MediaTek like below
+  PLLs -->
+          dividers -->
+                      muxes
+                           -->
+                              clock gate
+
+  The devices provide clock gate control in different IP blocks.
+
+properties:
+  compatible:
+    enum:
+      - mediatek,mt8188-adsp_audio26m
+      - mediatek,mt8188-imp_iic_wrap_c
+      - mediatek,mt8188-imp_iic_wrap_en
+      - mediatek,mt8188-imp_iic_wrap_w
+      - mediatek,mt8188-mfgcfg
+      - mediatek,mt8188-vppsys0
+      - mediatek,mt8188-wpesys
+      - mediatek,mt8188-wpesys_vpp0
+      - mediatek,mt8188-vppsys1
+      - mediatek,mt8188-imgsys
+      - mediatek,mt8188-imgsys_wpe1
+      - mediatek,mt8188-imgsys_wpe2
+      - mediatek,mt8188-imgsys_wpe3
+      - mediatek,mt8188-imgsys1_dip_top
+      - mediatek,mt8188-imgsys1_dip_nr
+      - mediatek,mt8188-ipesys
+      - mediatek,mt8188-camsys
+      - mediatek,mt8188-camsys_rawa
+      - mediatek,mt8188-camsys_yuva
+      - mediatek,mt8188-camsys_rawb
+      - mediatek,mt8188-camsys_yuvb
+      - mediatek,mt8188-ccusys
+      - mediatek,mt8188-vdecsys_soc
+      - mediatek,mt8188-vdecsys
+      - mediatek,mt8188-vencsys
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 1
+
+required:
+  - compatible
+  - reg
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    imp_iic_wrap_c: clock-controller@11283000 {
+        compatible = "mediatek,mt8188-imp_iic_wrap_c";
+        reg = <0x11283000 0x1000>;
+        #clock-cells = <1>;
+    };
+
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml new file +55 -0

55 lines not on this page · raw message

include/dt-bindings/clock/mediatek,mt8188-clk.h new file +733 -0

733 lines not on this page · raw message

Signature · 1 line
2.18.0
#2 lore raw

Re: [PATCH v2 01/19] dt-bindings: ARM: MediaTek: Add new document bindings of MT8188 clock

Quoted 34 lines · Garmin.Chang

Add the new binding documentation for system clock and functional clock on MediaTek MT8188.

---
 .../arm/mediatek/mediatek,mt8188-clock.yaml   |  70 ++
 .../mediatek/mediatek,mt8188-sys-clock.yaml   |  55 ++
 .../dt-bindings/clock/mediatek,mt8188-clk.h   | 733 ++++++++++++++++++
 3 files changed, 858 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml
 create mode 100644 Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml
 create mode 100644 include/dt-bindings/clock/mediatek,mt8188-clk.h
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +15 -0
new file mode 100644
index 000000000000..49dc681e6601
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mediatek/mediatek,mt8188-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek Functional Clock Controller for MT8188
+
+maintainers:
+  - Garmin Chang <[email protected]>
+
+description: |
+  The clock architecture in MediaTek like below
+  PLLs -->
+          dividers -->

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml line 25

Quoted 10 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +10 -0
+                      muxes
+                           -->
+                              clock gate
+
+  The devices provide clock gate control in different IP blocks.
+
+properties:
+  compatible:
+    enum:
+      - mediatek,mt8188-adsp_audio26m

No underscores in compatibles.

Quoted 14 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +14 -0
+      - mediatek,mt8188-imp_iic_wrap_c
+      - mediatek,mt8188-imp_iic_wrap_en
+      - mediatek,mt8188-imp_iic_wrap_w
+      - mediatek,mt8188-mfgcfg
+      - mediatek,mt8188-vppsys0
+      - mediatek,mt8188-wpesys
+      - mediatek,mt8188-wpesys_vpp0
+      - mediatek,mt8188-vppsys1
+      - mediatek,mt8188-imgsys
+      - mediatek,mt8188-imgsys_wpe1
+      - mediatek,mt8188-imgsys_wpe2
+      - mediatek,mt8188-imgsys_wpe3
+      - mediatek,mt8188-imgsys1_dip_top
+      - mediatek,mt8188-imgsys1_dip_nr

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml line 49

Quoted 10 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +10 -0
+      - mediatek,mt8188-ipesys
+      - mediatek,mt8188-camsys
+      - mediatek,mt8188-camsys_rawa
+      - mediatek,mt8188-camsys_yuva
+      - mediatek,mt8188-camsys_rawb
+      - mediatek,mt8188-camsys_yuvb
+      - mediatek,mt8188-ccusys
+      - mediatek,mt8188-vdecsys_soc
+      - mediatek,mt8188-vdecsys
+      - mediatek,mt8188-vencsys

Blank line here

Quoted 6 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +6 -0
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 1
+

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml line 65

Quoted 10 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +10 -0
+required:
+  - compatible
+  - reg
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    imp_iic_wrap_c: clock-controller@11283000 {

Drop the label, not used,

Quoted 32 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +5 -0
+        compatible = "mediatek,mt8188-imp_iic_wrap_c";
+        reg = <0x11283000 0x1000>;
+        #clock-cells = <1>;
+    };
+
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml new file +21 -0
new file mode 100644
index 000000000000..35962b3746e1
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/mediatek/mediatek,mt8188-sys-clock.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek System Clock Controller for MT8188
+
+maintainers:
+  - Garmin Chang <[email protected]>
+
+description: |
+  The clock architecture in MediaTek like below
+  PLLs -->
+          dividers -->
+                      muxes
+                           -->
+                              clock gate
+
+  The apmixedsys provides most of PLLs which generated from SoC 26m.
+  The topckgen provides dividers and muxes which provide the clock source to other IP blocks.

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml line 31

Quoted 10 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml new file +10 -0
+  The infracfg_ao provides clock gate in peripheral and infrastructure IP blocks.
+  The mcusys provides mux control to select the clock source in AP MCU.
+  The device nodes also provide the system control capacity for configuration.
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - mediatek,mt8188-topckgen
+          - mediatek,mt8188-infracfg_ao

Same comment.

Quoted 10 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml new file +10 -0
+          - mediatek,mt8188-apmixedsys
+          - mediatek,mt8188-pericfg_ao
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 1
+

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml line 51

Quoted 10 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml new file +10 -0
+required:
+  - compatible
+  - reg
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    topckgen: syscon@10000000 {

Drop label.

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml line 54

Quoted 3 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml new file +3 -0
+        compatible = "mediatek,mt8188-topckgen", "syscon";
+        reg = <0x10000000 0x1000>;
+        #clock-cells = <1>;

Best regards,
Krzysztof

#3 lore raw

Re: [PATCH v2 01/19] dt-bindings: ARM: MediaTek: Add new document bindings of MT8188 clock

Quoted 192 lines · Krzysztof Kozlowski
Quoted 49 lines · Garmin.Chang

Add the new binding documentation for system clock and functional clock on MediaTek MT8188.

---
 .../arm/mediatek/mediatek,mt8188-clock.yaml   |  70 ++
 .../mediatek/mediatek,mt8188-sys-clock.yaml   |  55 ++
 .../dt-bindings/clock/mediatek,mt8188-clk.h   | 733
++++++++++++++++++
 3 files changed, 858 insertions(+)
 create mode 100644
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-
clock.yaml
 create mode 100644
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-
clock.yaml
 create mode 100644 include/dt-bindings/clock/mediatek,mt8188-clk.h

diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188- clock.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188- clock.yaml
new file mode 100644
index 000000000000..49dc681e6601
--- /dev/null
+++
b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188- clock.yaml

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +4 -0
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: 

https://urldefense.com/v3/__http://devicetree.org/schemas/arm/mediatek/mediatek,mt8188-clock.yaml*__;Iw!!CTRNKA9wMg0ARbw!wZzNWz-zx7aQt1mTYTK-EfPEClJbCe_W0mEIFXwO3yquqcZp6T7_NpqtvnDuCceTAZs$

+$schema:
https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!wZzNWz-zx7aQt1mTYTK-EfPEClJbCe_W0mEIFXwO3yquqcZp6T7_NpqtvnDuHuGTk0U$

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +10 -0
+
+title: MediaTek Functional Clock Controller for MT8188
+
+maintainers:
+  - Garmin Chang <[email protected]>
+
+description: |
+  The clock architecture in MediaTek like below
+  PLLs -->
+          dividers -->

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml line 25

Quoted 10 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +10 -0
+                      muxes
+                           -->
+                              clock gate
+
+  The devices provide clock gate control in different IP blocks.
+
+properties:
+  compatible:
+    enum:
+      - mediatek,mt8188-adsp_audio26m

No underscores in compatibles.

Quoted 14 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +14 -0
+      - mediatek,mt8188-imp_iic_wrap_c
+      - mediatek,mt8188-imp_iic_wrap_en
+      - mediatek,mt8188-imp_iic_wrap_w
+      - mediatek,mt8188-mfgcfg
+      - mediatek,mt8188-vppsys0
+      - mediatek,mt8188-wpesys
+      - mediatek,mt8188-wpesys_vpp0
+      - mediatek,mt8188-vppsys1
+      - mediatek,mt8188-imgsys
+      - mediatek,mt8188-imgsys_wpe1
+      - mediatek,mt8188-imgsys_wpe2
+      - mediatek,mt8188-imgsys_wpe3
+      - mediatek,mt8188-imgsys1_dip_top
+      - mediatek,mt8188-imgsys1_dip_nr

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml line 49

Quoted 10 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +10 -0
+      - mediatek,mt8188-ipesys
+      - mediatek,mt8188-camsys
+      - mediatek,mt8188-camsys_rawa
+      - mediatek,mt8188-camsys_yuva
+      - mediatek,mt8188-camsys_rawb
+      - mediatek,mt8188-camsys_yuvb
+      - mediatek,mt8188-ccusys
+      - mediatek,mt8188-vdecsys_soc
+      - mediatek,mt8188-vdecsys
+      - mediatek,mt8188-vencsys

Blank line here

Quoted 6 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +6 -0
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 1
+

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml line 65

Quoted 10 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +10 -0
+required:
+  - compatible
+  - reg
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    imp_iic_wrap_c: clock-controller@11283000 {

Drop the label, not used,

Quoted 50 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +5 -0
+        compatible = "mediatek,mt8188-imp_iic_wrap_c";
+        reg = <0x11283000 0x1000>;
+        #clock-cells = <1>;
+    };
+

diff --git a/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188- sys-clock.yaml b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188- sys-clock.yaml
new file mode 100644
index 000000000000..35962b3746e1
--- /dev/null
+++
b/Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188- sys-clock.yaml

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-clock.yaml new file +4 -0
@@ -0,0 +1,55 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: 

https://urldefense.com/v3/__http://devicetree.org/schemas/arm/mediatek/mediatek,mt8188-sys-clock.yaml*__;Iw!!CTRNKA9wMg0ARbw!wZzNWz-zx7aQt1mTYTK-EfPEClJbCe_W0mEIFXwO3yquqcZp6T7_NpqtvnDu6W88Oqk$

+$schema:
https://urldefense.com/v3/__http://devicetree.org/meta-schemas/core.yaml*__;Iw!!CTRNKA9wMg0ARbw!wZzNWz-zx7aQt1mTYTK-EfPEClJbCe_W0mEIFXwO3yquqcZp6T7_NpqtvnDuHuGTk0U$

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml new file +15 -0
+
+title: MediaTek System Clock Controller for MT8188
+
+maintainers:
+  - Garmin Chang <[email protected]>
+
+description: |
+  The clock architecture in MediaTek like below
+  PLLs -->
+          dividers -->
+                      muxes
+                           -->
+                              clock gate
+
+  The apmixedsys provides most of PLLs which generated from SoC

26m.
+ The topckgen provides dividers and muxes which provide the clock source to other IP blocks.
+ The infracfg_ao provides clock gate in peripheral and infrastructure IP blocks.
+ The mcusys provides mux control to select the clock source in AP MCU.
+ The device nodes also provide the system control capacity for configuration.

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml line 31

Quoted 7 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml new file +7 -0
+
+properties:
+  compatible:
+    items:
+      - enum:
+          - mediatek,mt8188-topckgen
+          - mediatek,mt8188-infracfg_ao

Same comment.

Quoted 10 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml new file +10 -0
+          - mediatek,mt8188-apmixedsys
+          - mediatek,mt8188-pericfg_ao
+      - const: syscon
+
+  reg:
+    maxItems: 1
+
+  '#clock-cells':
+    const: 1
+

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml line 51

Quoted 10 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml new file +10 -0
+required:
+  - compatible
+  - reg
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    topckgen: syscon@10000000 {

Drop label.

Quoted 7 lines

Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml line 54

Quoted 3 lines
Documentation/devicetree/bindings/arm/mediatek/mediatek,mt8188-sys-clock.yaml new file +3 -0
+        compatible = "mediatek,mt8188-topckgen", "syscon";
+        reg = <0x10000000 0x1000>;
+        #clock-cells = <1>;

Best regards,
Krzysztof

Thank you for your suggestions.

I will modify underscores in compatibles, add blank line and drop label.

Quoted 3 lines

Thanks,
Best Regards,
Garmin

#4 lore raw

PATCH v2 2/19 clk: mediatek: Add MT8188 apmixedsys clock support

In reply to Garmin.Chang

Add MT8188 apmixedsys clock controller which provides Plls generated from SoC 26m and ssusb clock gate control.

Change-Id I3b1b44155cc5bfe5ba6e860de857e7e9f48b66a7
---
 drivers/clk/mediatek/Kconfig                 |  11 ++
 drivers/clk/mediatek/Makefile                |   1 +
 drivers/clk/mediatek/clk-mt8188-apmixedsys.c | 153 +++++++++++++++++++
 3 files changed, 165 insertions(+)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-apmixedsys.c
drivers/clk/mediatek/Kconfig +11 -0
index 843cea0c7a44..e24e0a14fbd8 100644
@@ -557,6 +557,17 @@ config COMMON_CLK_MT8186
 	help
 	  This driver supports MediaTek MT8186 clocks.
 
+config COMMON_CLK_MT8188
+	bool "Clock driver for MediaTek MT8188"
+	depends on ARM64 || COMPILE_TEST
+	select COMMON_CLK_MEDIATEK
+	default ARCH_MEDIATEK
+	help
+	  This driver supports MediaTek MT8188 basic clocks and clocks
+	  required for various peripheral found on MediaTek. Choose
+	  M or Y here if you want to use clocks such as peri_ao,
+	  infra_ao, etc.
+
 config COMMON_CLK_MT8192
 	bool "Clock driver for MediaTek MT8192"
 	depends on ARM64 || COMPILE_TEST
drivers/clk/mediatek/Makefile +1 -0
index ea3b73240303..957530b4303f 100644
@@ -82,6 +82,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
 				   clk-mt8186-mfg.o clk-mt8186-mm.o clk-mt8186-wpe.o \
 				   clk-mt8186-img.o clk-mt8186-vdec.o clk-mt8186-venc.o \
 				   clk-mt8186-cam.o clk-mt8186-mdp.o clk-mt8186-ipe.o
+obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-apmixedsys.c new file +153 -0

153 lines not on this page · raw message

Signature · 1 line
2.18.0
#5 lore raw

Re: [PATCH v2 02/19] clk: mediatek: Add MT8188 apmixedsys clock support

Il 24/10/22 11:42, Garmin.Chang ha scritto:

Quoted 12 lines

Add MT8188 apmixedsys clock controller which provides Plls generated from SoC 26m and ssusb clock gate control.

Change-Id I3b1b44155cc5bfe5ba6e860de857e7e9f48b66a7
---
  drivers/clk/mediatek/Kconfig                 |  11 ++
  drivers/clk/mediatek/Makefile                |   1 +
  drivers/clk/mediatek/clk-mt8188-apmixedsys.c | 153 +++++++++++++++++++
  3 files changed, 165 insertions(+)

create mode 100644 drivers/clk/mediatek/clk-mt8188-apmixedsys.c

..snip..

Quoted 5 lines
drivers/clk/mediatek/clk-mt8188-apmixedsys.c new file +0 -0
new file mode 100644
index 000000000000..f09e11d0261e

..snip..

Quoted 6 lines
drivers/clk/mediatek/clk-mt8188-apmixedsys.c new file +6 -0
+
+static int clk_mt8188_apmixed_probe(struct platform_device *pdev)
+{
+	struct clk_hw_onecell_data *clk_data;
+	struct device_node *node = pdev->dev.of_node;
+	int r;

drivers/clk/mediatek/clk-mt8188-apmixedsys.c line 111

Quoted 10 lines
drivers/clk/mediatek/clk-mt8188-apmixedsys.c new file +10 -0
+
+	clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK);
+	if (!clk_data)
+		return -ENOMEM;
+
+	r = mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls), clk_data);
+	if (r)
+		goto free_apmixed_data;
+
+	r = mtk_clk_register_gates(node, apmixed_clks, ARRAY_SIZE(apmixed_clks), clk_data);

Please use mtk_clk_register_gates_with_dev().

Regards,
Angelo

#6 lore raw

Re: [PATCH v2 02/19] clk: mediatek: Add MT8188 apmixedsys clock support

Quoted 47 lines · AngeloGioacchino Del Regno

Il 24/10/22 11:42, Garmin.Chang ha scritto:

Quoted 13 lines

Add MT8188 apmixedsys clock controller which provides Plls generated from SoC 26m and ssusb clock gate control.

Change-Id I3b1b44155cc5bfe5ba6e860de857e7e9f48b66a7
---
  drivers/clk/mediatek/Kconfig                 |  11 ++
  drivers/clk/mediatek/Makefile                |   1 +
  drivers/clk/mediatek/clk-mt8188-apmixedsys.c | 153
+++++++++++++++++++
  3 files changed, 165 insertions(+)

create mode 100644 drivers/clk/mediatek/clk-mt8188-apmixedsys.c

..snip..

Quoted 6 lines
drivers/clk/mediatek/clk-mt8188-apmixedsys.c new file +0 -0
new file mode 100644
index 000000000000..f09e11d0261e

..snip..

Quoted 17 lines
drivers/clk/mediatek/clk-mt8188-apmixedsys.c new file +12 -0
+
+static int clk_mt8188_apmixed_probe(struct platform_device *pdev)
+{
+	struct clk_hw_onecell_data *clk_data;
+	struct device_node *node = pdev->dev.of_node;
+	int r;
+
+	clk_data = mtk_alloc_clk_data(CLK_APMIXED_NR_CLK);
+	if (!clk_data)
+		return -ENOMEM;
+
+	r = mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls),

clk_data);

drivers/clk/mediatek/clk-mt8188-apmixedsys.c new file +4 -0
+	if (r)
+		goto free_apmixed_data;
+
+	r = mtk_clk_register_gates(node, apmixed_clks,
Quoted 1 line

ARRAY_SIZE(apmixed_clks), clk_data);

Please use mtk_clk_register_gates_with_dev().

Quoted 2 lines

Regards,
Angelo

Ok, I will use mtk_clk_register_gates_with_dev() in the next version.

Quoted 3 lines

Thanks,
Best Regards,
Garmin

#7 lore raw

PATCH v2 3/19 clk: mediatek: Add MT8188 topckgen clock support

In reply to Garmin.Chang

Add MT8188 topckgen clock controller which provides muxes, dividers to handle variety clock selection in other IP blocks.

---
 drivers/clk/mediatek/Makefile              |    2 +-
 drivers/clk/mediatek/clk-mt8188-topckgen.c | 1337 ++++++++++++++++++++
 2 files changed, 1338 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-topckgen.c
drivers/clk/mediatek/Makefile +1 -1
index 957530b4303f..4fc7de25f036 100644
@@ -82,7 +82,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
 				   clk-mt8186-mfg.o clk-mt8186-mm.o clk-mt8186-wpe.o \
 				   clk-mt8186-img.o clk-mt8186-vdec.o clk-mt8186-venc.o \
 				   clk-mt8186-cam.o clk-mt8186-mdp.o clk-mt8186-ipe.o
-obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o
+obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-topckgen.c new file +1337 -0

1,337 lines not on this page · raw message

Signature · 1 line
2.18.0
#8 lore raw

Re: [PATCH v2 03/19] clk: mediatek: Add MT8188 topckgen clock support

Il 24/10/22 11:42, Garmin.Chang ha scritto:

Quoted 46 lines

Add MT8188 topckgen clock controller which provides muxes, dividers to handle variety clock selection in other IP blocks.

---
  drivers/clk/mediatek/Makefile              |    2 +-
  drivers/clk/mediatek/clk-mt8188-topckgen.c | 1337 ++++++++++++++++++++
  2 files changed, 1338 insertions(+), 1 deletion(-)

create mode 100644 drivers/clk/mediatek/clk-mt8188-topckgen.c

drivers/clk/mediatek/Makefile +1 -1
index 957530b4303f..4fc7de25f036 100644
@@ -82,7 +82,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
  				   clk-mt8186-mfg.o clk-mt8186-mm.o clk-mt8186-wpe.o \
  				   clk-mt8186-img.o clk-mt8186-vdec.o clk-mt8186-venc.o \
  				   clk-mt8186-cam.o clk-mt8186-mdp.o clk-mt8186-ipe.o
-obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o
+obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o
  obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
  obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
  obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-topckgen.c new file +17 -0
new file mode 100644
index 000000000000..c6ac6c2558ae
@@ -0,0 +1,1337 @@
+// SPDX-License-Identifier: GPL-2.0-only
+//
+// Copyright (c) 2022 MediaTek Inc.
+// Author: Garmin Chang <[email protected]>
+
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
+#include <dt-bindings/clock/mediatek,mt8188-clk.h>
+
+#include "clk-gate.h"
+#include "clk-mtk.h"
+#include "clk-mux.h"
+
+static DEFINE_SPINLOCK(mt8188_clk_lock);
+
+static const struct mtk_fixed_clk top_fixed_clks[] = {
+	FIXED_CLK(CLK_TOP_ULPOSC1, "ulposc_ck1", NULL, 260000000),

drivers/clk/mediatek/clk-mt8188-topckgen.c line 27

Quoted 10 lines
drivers/clk/mediatek/clk-mt8188-topckgen.c new file +10 -0
+	FIXED_CLK(CLK_TOP_MPHONE_SLAVE_BCK, "mphone_slave_bck", NULL, 49152000),
+	FIXED_CLK(CLK_TOP_PAD_FPC, "pad_fpc_ck", NULL, 50000000),
+	FIXED_CLK(CLK_TOP_466M_FMEM, "hd_466m_fmem_ck", NULL, 533000000),
+	FIXED_CLK(CLK_TOP_PEXTP_PIPE, "pextp_pipe", NULL, 250000000),
+	FIXED_CLK(CLK_TOP_DSI_PHY, "dsi_phy", NULL, 500000000),
+};
+
+static const struct mtk_fixed_factor top_divs[] = {
+	FACTOR(CLK_TOP_MFGPLL, "mfgpll_ck", "mfgpll", 1, 1),
+	FACTOR(CLK_TOP_MAINPLL, "mainpll_ck", "mainpll", 1, 1),

Are you sure that mainpll and univpll should have CLK_SET_RATE_PARENT? This will give issues in GPU DVFS, as this is the case with all MediaTek SoCs.

Please check this series and add it as a dependency of yours:
https://patchwork.kernel.org/project/linux-mediatek/list/?series=688135

Quoted 2 lines
drivers/clk/mediatek/clk-mt8188-topckgen.c new file +2 -0
+	FACTOR(CLK_TOP_MAINPLL_D3, "mainpll_d3", "mainpll_ck", 1, 3),
+	FACTOR(CLK_TOP_MAINPLL_D4, "mainpll_d4", "mainpll_ck", 1, 4),

..snip..

drivers/clk/mediatek/clk-mt8188-topckgen.c line 1184

Quoted 5 lines
drivers/clk/mediatek/clk-mt8188-topckgen.c new file +5 -0
+
+static struct mtk_composite top_muxes[] = {
+	/* CLK_MISC_CFG_3 */
+	MUX(CLK_TOP_MFG_CK_FAST_REF, "mfg_ck_fast_ref", mfg_fast_ref_parents, 0x0250, 8, 1),
+};

CLK_TOP_MFG_CK_FAST_REF is not a composite clock: you can register it with a call to devm_clk_hw_register_mux() in the probe function.

Check clk-mt8195-topckgen.c upstream for an example.

Regards,
Angelo

#9 lore raw

Re: [PATCH v2 03/19] clk: mediatek: Add MT8188 topckgen clock support

Quoted 73 lines · AngeloGioacchino Del Regno

Il 24/10/22 11:42, Garmin.Chang ha scritto:

Quoted 59 lines

Add MT8188 topckgen clock controller which provides muxes, dividers to handle variety clock selection in other IP blocks.

---
  drivers/clk/mediatek/Makefile              |    2 +-
  drivers/clk/mediatek/clk-mt8188-topckgen.c | 1337
++++++++++++++++++++
  2 files changed, 1338 insertions(+), 1 deletion(-)

create mode 100644 drivers/clk/mediatek/clk-mt8188-topckgen.c

drivers/clk/mediatek/Makefile +0 -0
index 957530b4303f..4fc7de25f036 100644
@@ -82,7 +82,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-

mcu.o clk-mt8186-topckgen.o clk-mt
clk-mt8186-mfg.o clk-mt8186-mm.o
clk-mt8186-wpe.o \
clk-mt8186-img.o clk-mt8186-vdec.o
clk-mt8186-venc.o \
clk-mt8186-cam.o clk-mt8186-mdp.o
clk-mt8186-ipe.o

drivers/clk/mediatek/Makefile +1 -1
-obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o
+obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-

mt8188-topckgen.o
obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o

drivers/clk/mediatek/clk-mt8188-topckgen.c new file +18 -0
new file mode 100644
index 000000000000..c6ac6c2558ae
@@ -0,0 +1,1337 @@
+// SPDX-License-Identifier: GPL-2.0-only
+//
+// Copyright (c) 2022 MediaTek Inc.
+// Author: Garmin Chang <[email protected]>
+
+#include <linux/of_device.h>
+#include <linux/platform_device.h>
+#include <dt-bindings/clock/mediatek,mt8188-clk.h>
+
+#include "clk-gate.h"
+#include "clk-mtk.h"
+#include "clk-mux.h"
+
+static DEFINE_SPINLOCK(mt8188_clk_lock);
+
+static const struct mtk_fixed_clk top_fixed_clks[] = {
+	FIXED_CLK(CLK_TOP_ULPOSC1, "ulposc_ck1", NULL, 260000000),
+	FIXED_CLK(CLK_TOP_MPHONE_SLAVE_BCK, "mphone_slave_bck", NULL,

49152000),

drivers/clk/mediatek/clk-mt8188-topckgen.c new file +2 -0
+	FIXED_CLK(CLK_TOP_PAD_FPC, "pad_fpc_ck", NULL, 50000000),
+	FIXED_CLK(CLK_TOP_466M_FMEM, "hd_466m_fmem_ck", NULL,

533000000),

drivers/clk/mediatek/clk-mt8188-topckgen.c line 27

Quoted 7 lines
drivers/clk/mediatek/clk-mt8188-topckgen.c new file +7 -0
+	FIXED_CLK(CLK_TOP_PEXTP_PIPE, "pextp_pipe", NULL, 250000000),
+	FIXED_CLK(CLK_TOP_DSI_PHY, "dsi_phy", NULL, 500000000),
+};
+
+static const struct mtk_fixed_factor top_divs[] = {
+	FACTOR(CLK_TOP_MFGPLL, "mfgpll_ck", "mfgpll", 1, 1),
+	FACTOR(CLK_TOP_MAINPLL, "mainpll_ck", "mainpll", 1, 1),

Are you sure that mainpll and univpll should have CLK_SET_RATE_PARENT?
This will give issues in GPU DVFS, as this is the case with all MediaTek SoCs.

Quoted 2 lines

Please check this series and add it as a dependency of yours:

https://urldefense.com/v3/__https://patchwork.kernel.org/project/linux-mediatek/list/?series=688135__;!!CTRNKA9wMg0ARbw!0ko8NpKA8KW1vp4lw-WRRe2pw_N0Z-2gbeAkzhfmwf9yK25-Bw7TZFfqTTWM_FQFF6A$

Quoted 18 lines
Quoted 4 lines
drivers/clk/mediatek/clk-mt8188-topckgen.c new file +2 -0
+	FACTOR(CLK_TOP_MAINPLL_D3, "mainpll_d3", "mainpll_ck", 1, 3),
+	FACTOR(CLK_TOP_MAINPLL_D4, "mainpll_d4", "mainpll_ck", 1, 4),

..snip..

Quoted 6 lines
drivers/clk/mediatek/clk-mt8188-topckgen.c new file +4 -0
+
+static struct mtk_composite top_muxes[] = {
+	/* CLK_MISC_CFG_3 */
+	MUX(CLK_TOP_MFG_CK_FAST_REF, "mfg_ck_fast_ref",

mfg_fast_ref_parents, 0x0250, 8, 1),
+};

CLK_TOP_MFG_CK_FAST_REF is not a composite clock: you can register it with a call
to devm_clk_hw_register_mux() in the probe function.

Quoted 5 lines

Check clk-mt8195-topckgen.c upstream for an example.

Regards,
Angelo

Ok, I will use devm_clk_hw_register_mux() in the next version.

Quoted 3 lines

Thanks,
Best Regards,
Garmin

#10 lore raw

PATCH v2 4/19 clk: mediatek: Add MT8188 peripheral clock support

In reply to Garmin.Chang

Add MT8188 peripheral clock controller which provides clock gate control for ethernet/flashif/pcie/ssusb.

---
 drivers/clk/mediatek/Makefile             |  3 +-
 drivers/clk/mediatek/clk-mt8188-peri_ao.c | 60 +++++++++++++++++++++++
 2 files changed, 62 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-peri_ao.c
drivers/clk/mediatek/Makefile +2 -1
index 4fc7de25f036..87000d148125 100644
@@ -82,7 +82,8 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
 				   clk-mt8186-mfg.o clk-mt8186-mm.o clk-mt8186-wpe.o \
 				   clk-mt8186-img.o clk-mt8186-vdec.o clk-mt8186-venc.o \
 				   clk-mt8186-cam.o clk-mt8186-mdp.o clk-mt8186-ipe.o
-obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o
+obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o \
+				   clk-mt8188-peri_ao.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-peri_ao.c new file +60 -0

60 lines not on this page · raw message

Signature · 1 line
2.18.0
#11 lore raw

Re: [PATCH v2 04/19] clk: mediatek: Add MT8188 peripheral clock support

Il 24/10/22 11:42, Garmin.Chang ha scritto:

Quoted 4 lines

Add MT8188 peripheral clock controller which provides clock gate control for ethernet/flashif/pcie/ssusb.

..snip..

drivers/clk/mediatek/clk-mt8188-peri_ao.c line 51

Quoted 10 lines
drivers/clk/mediatek/clk-mt8188-peri_ao.c new file +10 -0
+
+static const struct of_device_id of_match_clk_mt8188_peri_ao[] = {
+	{
+		.compatible = "mediatek,mt8188-pericfg_ao",
+		.data = &peri_ao_desc,
+	}, {
+		/* sentinel */
+	}
+};
+

Here and for all of the other drivers that you're introducing with this series...

please compress this array to one line per entry, like so:

static const struct of_device_id of_match_clk_mt8188_peri_ao[] = {
	{ .compatible = "mediatek,mt8188-pericfg_ao", .data = &peri_ao_desc },
	{ /* sentinel */ }
};

Regards,
Angelo

#12 lore raw

Re: [PATCH v2 04/19] clk: mediatek: Add MT8188 peripheral clock support

Quoted 24 lines · AngeloGioacchino Del Regno

Il 24/10/22 11:42, Garmin.Chang ha scritto:

Quoted 4 lines

Add MT8188 peripheral clock controller which provides clock gate control for ethernet/flashif/pcie/ssusb.

..snip..

drivers/clk/mediatek/clk-mt8188-peri_ao.c line 51

Quoted 10 lines
drivers/clk/mediatek/clk-mt8188-peri_ao.c new file +10 -0
+
+static const struct of_device_id of_match_clk_mt8188_peri_ao[] = {
+	{
+		.compatible = "mediatek,mt8188-pericfg_ao",
+		.data = &peri_ao_desc,
+	}, {
+		/* sentinel */
+	}
+};
+

Here and for all of the other drivers that you're introducing with this series...

please compress this array to one line per entry, like so:

Quoted 9 lines
static const struct of_device_id of_match_clk_mt8188_peri_ao[] = {
	{ .compatible = "mediatek,mt8188-pericfg_ao", .data =
&peri_ao_desc },
	{ /* sentinel */ }
};

Regards,
Angelo

Ok, I will modify all drivers in the next version.

Quoted 3 lines

Thanks,
Best Regards,
Garmin

#13 lore raw

PATCH v2 5/19 clk: mediatek: Add MT8188 infrastructure clock support

In reply to Garmin.Chang

Add MT8188 infrastructure clock controller which provides clock gate control for basic IP like pwm, uart, spi and so on.

---
 drivers/clk/mediatek/Makefile              |   2 +-
 drivers/clk/mediatek/clk-mt8188-infra_ao.c | 194 +++++++++++++++++++++
 2 files changed, 195 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-infra_ao.c
drivers/clk/mediatek/Makefile +1 -1
index 87000d148125..3048de0131ef 100644
@@ -83,7 +83,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
 				   clk-mt8186-img.o clk-mt8186-vdec.o clk-mt8186-venc.o \
 				   clk-mt8186-cam.o clk-mt8186-mdp.o clk-mt8186-ipe.o
 obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o \
-				   clk-mt8188-peri_ao.o
+				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-infra_ao.c new file +194 -0

194 lines not on this page · raw message

Signature · 1 line
2.18.0
#14 lore raw

PATCH v2 6/19 clk: mediatek: Add MT8188 camsys clock support

In reply to Garmin.Chang

Add MT8188 camsys clock controllers which provide clock gate control for camera IP blocks.

---
 drivers/clk/mediatek/Makefile         |   3 +-
 drivers/clk/mediatek/clk-mt8188-cam.c | 130 ++++++++++++++++++++++++++
 2 files changed, 132 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-cam.c
drivers/clk/mediatek/Makefile +2 -1
index 3048de0131ef..7b5af3075670 100644
@@ -83,7 +83,8 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
 				   clk-mt8186-img.o clk-mt8186-vdec.o clk-mt8186-venc.o \
 				   clk-mt8186-cam.o clk-mt8186-mdp.o clk-mt8186-ipe.o
 obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o \
-				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o
+				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o \
+				   clk-mt8188-cam.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-cam.c new file +130 -0

130 lines not on this page · raw message

Signature · 1 line
2.18.0
#15 lore raw

PATCH v2 7/19 clk: mediatek: Add MT8188 ccusys clock support

In reply to Garmin.Chang

Add MT8188 ccusys clock controller which provides clock gate control in Camera Computing Unit.

---
 drivers/clk/mediatek/Makefile         |  2 +-
 drivers/clk/mediatek/clk-mt8188-ccu.c | 52 +++++++++++++++++++++++++++
 2 files changed, 53 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-ccu.c
drivers/clk/mediatek/Makefile +1 -1
index 7b5af3075670..bd0a2aa5b6fa 100644
@@ -84,7 +84,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
 				   clk-mt8186-cam.o clk-mt8186-mdp.o clk-mt8186-ipe.o
 obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o \
 				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o \
-				   clk-mt8188-cam.o
+				   clk-mt8188-cam.o clk-mt8188-ccu.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-ccu.c new file +52 -0

52 lines not on this page · raw message

Signature · 1 line
2.18.0
#16 lore raw

PATCH v2 8/19 clk: mediatek: Add MT8188 imgsys clock support

In reply to Garmin.Chang

Add MT8188 imgsys clock controllers which provide clock gate control for image IP blocks.

---
 drivers/clk/mediatek/Makefile         |   2 +-
 drivers/clk/mediatek/clk-mt8188-img.c | 124 ++++++++++++++++++++++++++
 2 files changed, 125 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-img.c
drivers/clk/mediatek/Makefile +1 -1
index bd0a2aa5b6fa..242b49bafa9e 100644
@@ -84,7 +84,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
 				   clk-mt8186-cam.o clk-mt8186-mdp.o clk-mt8186-ipe.o
 obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o \
 				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o \
-				   clk-mt8188-cam.o clk-mt8188-ccu.o
+				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-img.c new file +124 -0

124 lines not on this page · raw message

Signature · 1 line
2.18.0
#17 lore raw

Re: [PATCH v2 08/19] clk: mediatek: Add MT8188 imgsys clock support

Il 24/10/22 11:42, Garmin.Chang ha scritto:

Quoted 114 lines

Add MT8188 imgsys clock controllers which provide clock gate control for image IP blocks.

---
  drivers/clk/mediatek/Makefile         |   2 +-
  drivers/clk/mediatek/clk-mt8188-img.c | 124 ++++++++++++++++++++++++++
  2 files changed, 125 insertions(+), 1 deletion(-)

create mode 100644 drivers/clk/mediatek/clk-mt8188-img.c

drivers/clk/mediatek/Makefile +1 -1
index bd0a2aa5b6fa..242b49bafa9e 100644
@@ -84,7 +84,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
  				   clk-mt8186-cam.o clk-mt8186-mdp.o clk-mt8186-ipe.o
  obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o \
  				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o \
-				   clk-mt8188-cam.o clk-mt8188-ccu.o
+				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o
  obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
  obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
  obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-img.c new file +85 -0
new file mode 100644
index 000000000000..00f3bbf4d502
@@ -0,0 +1,124 @@
+// SPDX-License-Identifier: GPL-2.0-only
+//
+// Copyright (c) 2022 MediaTek Inc.
+// Author: Garmin Chang <[email protected]>
+
+#include <linux/clk-provider.h>
+#include <linux/platform_device.h>
+#include <dt-bindings/clock/mediatek,mt8188-clk.h>
+
+#include "clk-gate.h"
+#include "clk-mtk.h"
+
+static const struct mtk_gate_regs imgsys_cg_regs = {
+	.set_ofs = 0x4,
+	.clr_ofs = 0x8,
+	.sta_ofs = 0x0,
+};
+
+#define GATE_IMGSYS(_id, _name, _parent, _shift)			\
+	GATE_MTK(_id, _name, _parent, &imgsys_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
+
+static const struct mtk_gate imgsys_main_clks[] = {
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_LARB9, "imgsys_main_larb9", "top_img", 0),
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_TRAW0, "imgsys_main_traw0", "top_img", 1),
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_TRAW1, "imgsys_main_traw1", "top_img", 2),
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_VCORE_GALS, "imgsys_main_vcore_gals", "top_img", 3),
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_DIP0, "imgsys_main_dip0", "top_img", 8),
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_WPE0, "imgsys_main_wpe0", "top_img", 9),
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_IPE, "imgsys_main_ipe", "top_img", 10),
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_WPE1, "imgsys_main_wpe1", "top_img", 12),
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_WPE2, "imgsys_main_wpe2", "top_img", 13),
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_GALS, "imgsys_main_gals", "top_img", 31),
+};
+
+static const struct mtk_gate imgsys_wpe1_clks[] = {
+	GATE_IMGSYS(CLK_IMGSYS_WPE1_LARB11, "imgsys_wpe1_larb11", "top_img", 0),
+	GATE_IMGSYS(CLK_IMGSYS_WPE1, "imgsys_wpe1", "top_img", 1),
+};
+
+static const struct mtk_gate imgsys_wpe2_clks[] = {
+	GATE_IMGSYS(CLK_IMGSYS_WPE2_LARB11, "imgsys_wpe2_larb11", "top_img", 0),
+	GATE_IMGSYS(CLK_IMGSYS_WPE2, "imgsys_wpe2", "top_img", 1),
+};
+
+static const struct mtk_gate imgsys_wpe3_clks[] = {
+	GATE_IMGSYS(CLK_IMGSYS_WPE3_LARB11, "imgsys_wpe3_larb11", "top_img", 0),
+	GATE_IMGSYS(CLK_IMGSYS_WPE3, "imgsys_wpe3", "top_img", 1),
+};
+
+static const struct mtk_gate imgsys1_dip_top_clks[] = {
+	GATE_IMGSYS(CLK_IMGSYS1_DIP_TOP_LARB10, "imgsys1_dip_larb10", "top_img", 0),
+	GATE_IMGSYS(CLK_IMGSYS1_DIP_TOP_DIP_TOP, "imgsys1_dip_dip_top", "top_img", 1),
+};
+
+static const struct mtk_gate imgsys1_dip_nr_clks[] = {
+	GATE_IMGSYS(CLK_IMGSYS1_DIP_NR_LARB15, "imgsys1_dip_nr_larb15", "top_img", 0),
+	GATE_IMGSYS(CLK_IMGSYS1_DIP_NR_DIP_NR, "imgsys1_dip_nr_dip_nr", "top_img", 1),
+};
+
+static const struct mtk_clk_desc imgsys_main_desc = {
+	.clks = imgsys_main_clks,
+	.num_clks = ARRAY_SIZE(imgsys_main_clks),
+};
+
+static const struct mtk_clk_desc imgsys_wpe1_desc = {
+	.clks = imgsys_wpe1_clks,
+	.num_clks = ARRAY_SIZE(imgsys_wpe1_clks),
+};
+
+static const struct mtk_clk_desc imgsys_wpe2_desc = {
+	.clks = imgsys_wpe2_clks,
+	.num_clks = ARRAY_SIZE(imgsys_wpe2_clks),
+};
+
+static const struct mtk_clk_desc imgsys_wpe3_desc = {
+	.clks = imgsys_wpe3_clks,
+	.num_clks = ARRAY_SIZE(imgsys_wpe3_clks),
+};
+
+static const struct mtk_clk_desc imgsys1_dip_top_desc = {
+	.clks = imgsys1_dip_top_clks,
+	.num_clks = ARRAY_SIZE(imgsys1_dip_top_clks),
+};
+
+static const struct mtk_clk_desc imgsys1_dip_nr_desc = {

drivers/clk/mediatek/clk-mt8188-img.c line 95

Quoted 10 lines
drivers/clk/mediatek/clk-mt8188-img.c new file +10 -0
+	.clks = imgsys1_dip_nr_clks,
+	.num_clks = ARRAY_SIZE(imgsys1_dip_nr_clks),
+};
+
+static const struct of_device_id of_match_clk_mt8188_imgsys_main[] = {
+	{
+		.compatible = "mediatek,mt8188-imgsys",
+		.data = &imgsys_main_desc,
+	}, {
+		.compatible = "mediatek,mt8188-imgsys_wpe1",

I know that this was done in other clock drivers as well, but can we please stop using underscores in devicetree compatibles?
That makes them look more consistent with the rest of the DT.

"mediatek,mt8188-imgsys-wpe1", as an example, would look a bit better.

P.S.: Please do the same on all of the other drivers that you are introducing
with this series.

Thanks,
Angelo

#18 lore raw

Re: [PATCH v2 08/19] clk: mediatek: Add MT8188 imgsys clock support

Quoted 162 lines · AngeloGioacchino Del Regno

Il 24/10/22 11:42, Garmin.Chang ha scritto:

Quoted 147 lines

Add MT8188 imgsys clock controllers which provide clock gate control for image IP blocks.

---
  drivers/clk/mediatek/Makefile         |   2 +-
  drivers/clk/mediatek/clk-mt8188-img.c | 124
++++++++++++++++++++++++++
  2 files changed, 125 insertions(+), 1 deletion(-)

create mode 100644 drivers/clk/mediatek/clk-mt8188-img.c

drivers/clk/mediatek/Makefile +0 -0
index bd0a2aa5b6fa..242b49bafa9e 100644
@@ -84,7 +84,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-

mcu.o clk-mt8186-topckgen.o clk-mt
clk-mt8186-cam.o clk-mt8186-mdp.o
clk-mt8186-ipe.o
obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-
mt8188-topckgen.o \
clk-mt8188-peri_ao.o clk-mt8188-
infra_ao.o \

drivers/clk/mediatek/Makefile +1 -1
-				   clk-mt8188-cam.o clk-mt8188-ccu.o
+				   clk-mt8188-cam.o clk-mt8188-ccu.o

clk-mt8188-img.o
obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o

drivers/clk/mediatek/clk-mt8188-img.c new file +19 -0
new file mode 100644
index 000000000000..00f3bbf4d502
@@ -0,0 +1,124 @@
+// SPDX-License-Identifier: GPL-2.0-only
+//
+// Copyright (c) 2022 MediaTek Inc.
+// Author: Garmin Chang <[email protected]>
+
+#include <linux/clk-provider.h>
+#include <linux/platform_device.h>
+#include <dt-bindings/clock/mediatek,mt8188-clk.h>
+
+#include "clk-gate.h"
+#include "clk-mtk.h"
+
+static const struct mtk_gate_regs imgsys_cg_regs = {
+	.set_ofs = 0x4,
+	.clr_ofs = 0x8,
+	.sta_ofs = 0x0,
+};
+
+#define GATE_IMGSYS(_id, _name, _parent, _shift)			

\

drivers/clk/mediatek/clk-mt8188-img.c new file +1 -0
+	GATE_MTK(_id, _name, _parent, &imgsys_cg_regs, _shift,

&mtk_clk_gate_ops_setclr)

drivers/clk/mediatek/clk-mt8188-img.c new file +3 -0
+
+static const struct mtk_gate imgsys_main_clks[] = {
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_LARB9, "imgsys_main_larb9",

"top_img", 0),

drivers/clk/mediatek/clk-mt8188-img.c new file +1 -0
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_TRAW0, "imgsys_main_traw0",

"top_img", 1),

drivers/clk/mediatek/clk-mt8188-img.c new file +1 -0
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_TRAW1, "imgsys_main_traw1",

"top_img", 2),

drivers/clk/mediatek/clk-mt8188-img.c new file +1 -0
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_VCORE_GALS,

"imgsys_main_vcore_gals", "top_img", 3),

drivers/clk/mediatek/clk-mt8188-img.c new file +1 -0
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_DIP0, "imgsys_main_dip0",

"top_img", 8),

drivers/clk/mediatek/clk-mt8188-img.c new file +1 -0
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_WPE0, "imgsys_main_wpe0",

"top_img", 9),

drivers/clk/mediatek/clk-mt8188-img.c new file +1 -0
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_IPE, "imgsys_main_ipe", "top_img",

10),

drivers/clk/mediatek/clk-mt8188-img.c new file +1 -0
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_WPE1, "imgsys_main_wpe1",

"top_img", 12),

drivers/clk/mediatek/clk-mt8188-img.c new file +1 -0
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_WPE2, "imgsys_main_wpe2",

"top_img", 13),

drivers/clk/mediatek/clk-mt8188-img.c new file +1 -0
+	GATE_IMGSYS(CLK_IMGSYS_MAIN_GALS, "imgsys_main_gals",

"top_img", 31),

drivers/clk/mediatek/clk-mt8188-img.c new file +4 -0
+};
+
+static const struct mtk_gate imgsys_wpe1_clks[] = {
+	GATE_IMGSYS(CLK_IMGSYS_WPE1_LARB11, "imgsys_wpe1_larb11",

"top_img", 0),

drivers/clk/mediatek/clk-mt8188-img.c new file +5 -0
+	GATE_IMGSYS(CLK_IMGSYS_WPE1, "imgsys_wpe1", "top_img", 1),
+};
+
+static const struct mtk_gate imgsys_wpe2_clks[] = {
+	GATE_IMGSYS(CLK_IMGSYS_WPE2_LARB11, "imgsys_wpe2_larb11",

"top_img", 0),

drivers/clk/mediatek/clk-mt8188-img.c new file +5 -0
+	GATE_IMGSYS(CLK_IMGSYS_WPE2, "imgsys_wpe2", "top_img", 1),
+};
+
+static const struct mtk_gate imgsys_wpe3_clks[] = {
+	GATE_IMGSYS(CLK_IMGSYS_WPE3_LARB11, "imgsys_wpe3_larb11",

"top_img", 0),

drivers/clk/mediatek/clk-mt8188-img.c new file +5 -0
+	GATE_IMGSYS(CLK_IMGSYS_WPE3, "imgsys_wpe3", "top_img", 1),
+};
+
+static const struct mtk_gate imgsys1_dip_top_clks[] = {
+	GATE_IMGSYS(CLK_IMGSYS1_DIP_TOP_LARB10, "imgsys1_dip_larb10",

"top_img", 0),

drivers/clk/mediatek/clk-mt8188-img.c new file +1 -0
+	GATE_IMGSYS(CLK_IMGSYS1_DIP_TOP_DIP_TOP, "imgsys1_dip_dip_top",

"top_img", 1),

drivers/clk/mediatek/clk-mt8188-img.c new file +4 -0
+};
+
+static const struct mtk_gate imgsys1_dip_nr_clks[] = {
+	GATE_IMGSYS(CLK_IMGSYS1_DIP_NR_LARB15, "imgsys1_dip_nr_larb15",

"top_img", 0),

drivers/clk/mediatek/clk-mt8188-img.c new file +1 -0
+	GATE_IMGSYS(CLK_IMGSYS1_DIP_NR_DIP_NR, "imgsys1_dip_nr_dip_nr",

"top_img", 1),

drivers/clk/mediatek/clk-mt8188-img.c new file +33 -0
+};
+
+static const struct mtk_clk_desc imgsys_main_desc = {
+	.clks = imgsys_main_clks,
+	.num_clks = ARRAY_SIZE(imgsys_main_clks),
+};
+
+static const struct mtk_clk_desc imgsys_wpe1_desc = {
+	.clks = imgsys_wpe1_clks,
+	.num_clks = ARRAY_SIZE(imgsys_wpe1_clks),
+};
+
+static const struct mtk_clk_desc imgsys_wpe2_desc = {
+	.clks = imgsys_wpe2_clks,
+	.num_clks = ARRAY_SIZE(imgsys_wpe2_clks),
+};
+
+static const struct mtk_clk_desc imgsys_wpe3_desc = {
+	.clks = imgsys_wpe3_clks,
+	.num_clks = ARRAY_SIZE(imgsys_wpe3_clks),
+};
+
+static const struct mtk_clk_desc imgsys1_dip_top_desc = {
+	.clks = imgsys1_dip_top_clks,
+	.num_clks = ARRAY_SIZE(imgsys1_dip_top_clks),
+};
+
+static const struct mtk_clk_desc imgsys1_dip_nr_desc = {
+	.clks = imgsys1_dip_nr_clks,
+	.num_clks = ARRAY_SIZE(imgsys1_dip_nr_clks),
+};
+
+static const struct of_device_id of_match_clk_mt8188_imgsys_main[]

= {

drivers/clk/mediatek/clk-mt8188-img.c line 95

Quoted 5 lines
drivers/clk/mediatek/clk-mt8188-img.c new file +5 -0
+	{
+		.compatible = "mediatek,mt8188-imgsys",
+		.data = &imgsys_main_desc,
+	}, {
+		.compatible = "mediatek,mt8188-imgsys_wpe1",

I know that this was done in other clock drivers as well, but can we please
stop using underscores in devicetree compatibles?
That makes them look more consistent with the rest of the DT.

"mediatek,mt8188-imgsys-wpe1", as an example, would look a bit better.

Quoted 6 lines

P.S.: Please do the same on all of the other drivers that you are introducing
with this series.

Thanks,
Angelo

Thank you for your suggestion.
Ok, I'll check all drivers for this underscores problem and fix them in V3.

Thanks,
Best Regards,
Garmin

#19 lore raw

PATCH v2 9/19 clk: mediatek: Add MT8188 ipesys clock support

In reply to Garmin.Chang

Add MT8188 ipesys clock controller which provides clock gate control for Image Process Engine.

---
 drivers/clk/mediatek/Makefile         |  3 +-
 drivers/clk/mediatek/clk-mt8188-ipe.c | 54 +++++++++++++++++++++++++++
 2 files changed, 56 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-ipe.c
drivers/clk/mediatek/Makefile +2 -1
index 242b49bafa9e..21b05e880a3a 100644
@@ -84,7 +84,8 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
 				   clk-mt8186-cam.o clk-mt8186-mdp.o clk-mt8186-ipe.o
 obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o \
 				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o \
-				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o
+				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o \
+				   clk-mt8188-ipe.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-ipe.c new file +54 -0

54 lines not on this page · raw message

Signature · 1 line
2.18.0
#20 lore raw

PATCH v2 10/19 clk: mediatek: Add MT8188 mfgcfg clock support

In reply to Garmin.Chang

Add MT8188 mfg clock controller which provides clock gate control for GPU.

---
 drivers/clk/mediatek/Makefile         |  2 +-
 drivers/clk/mediatek/clk-mt8188-mfg.c | 50 +++++++++++++++++++++++++++
 2 files changed, 51 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-mfg.c
drivers/clk/mediatek/Makefile +1 -1
index 21b05e880a3a..cd8870c28146 100644
@@ -85,7 +85,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
 obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o \
 				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o \
 				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o \
-				   clk-mt8188-ipe.o
+				   clk-mt8188-ipe.o clk-mt8188-mfg.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-mfg.c new file +50 -0

50 lines not on this page · raw message

Signature · 1 line
2.18.0
#21 lore raw

Re: [PATCH v2 10/19] clk: mediatek: Add MT8188 mfgcfg clock support

Il 24/10/22 11:42, Garmin.Chang ha scritto:

Quoted 43 lines

Add MT8188 mfg clock controller which provides clock gate control for GPU.

---
  drivers/clk/mediatek/Makefile         |  2 +-
  drivers/clk/mediatek/clk-mt8188-mfg.c | 50 +++++++++++++++++++++++++++
  2 files changed, 51 insertions(+), 1 deletion(-)

create mode 100644 drivers/clk/mediatek/clk-mt8188-mfg.c

drivers/clk/mediatek/Makefile +1 -1
index 21b05e880a3a..cd8870c28146 100644
@@ -85,7 +85,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
  obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o \
  				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o \
  				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o \
-				   clk-mt8188-ipe.o
+				   clk-mt8188-ipe.o clk-mt8188-mfg.o
  obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
  obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
  obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-mfg.c new file +14 -0
new file mode 100644
index 000000000000..3a75cd7443fd
@@ -0,0 +1,50 @@
+// SPDX-License-Identifier: GPL-2.0-only
+//
+// Copyright (c) 2022 MediaTek Inc.
+// Author: Garmin Chang <[email protected]>
+
+#include <linux/clk-provider.h>
+#include <linux/platform_device.h>
+#include <dt-bindings/clock/mediatek,mt8188-clk.h>
+
+#include "clk-gate.h"
+#include "clk-mtk.h"
+
+static const struct mtk_gate_regs mfgcfg_cg_regs = {
+	.set_ofs = 0x4,

drivers/clk/mediatek/clk-mt8188-mfg.c line 24

Quoted 10 lines
drivers/clk/mediatek/clk-mt8188-mfg.c new file +10 -0
+	.clr_ofs = 0x8,
+	.sta_ofs = 0x0,
+};
+
+#define GATE_MFGCFG(_id, _name, _parent, _shift)			\
+	GATE_MTK(_id, _name, _parent, &mfgcfg_cg_regs, _shift, &mtk_clk_gate_ops_setclr)
+
+static const struct mtk_gate mfgcfg_clks[] = {
+	GATE_MFGCFG(CLK_MFGCFG_BG3D, "mfgcfg_bg3d", "top_mfg_core_tmp", 0),
+};

This will make it impossible to properly perform GPU DVFS.

Hint:

#define GATE_MFG(_id, _name, _parent, _shift)			\
	GATE_MTK_FLAGS(_id, _name, _parent, &mfg_cg_regs,	\
		       _shift, &mtk_clk_gate_ops_setclr,	\
		       CLK_SET_RATE_PARENT)

Regards,
Angelo

#22 lore raw

Re: [PATCH v2 10/19] clk: mediatek: Add MT8188 mfgcfg clock support

Quoted 69 lines · AngeloGioacchino Del Regno

Il 24/10/22 11:42, Garmin.Chang ha scritto:

Quoted 61 lines

Add MT8188 mfg clock controller which provides clock gate control for GPU.

---
  drivers/clk/mediatek/Makefile         |  2 +-
  drivers/clk/mediatek/clk-mt8188-mfg.c | 50
+++++++++++++++++++++++++++
  2 files changed, 51 insertions(+), 1 deletion(-)

create mode 100644 drivers/clk/mediatek/clk-mt8188-mfg.c

drivers/clk/mediatek/Makefile +0 -0
index 21b05e880a3a..cd8870c28146 100644
@@ -85,7 +85,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-

mcu.o clk-mt8186-topckgen.o clk-mt
obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-
mt8188-topckgen.o \
clk-mt8188-peri_ao.o clk-mt8188-
infra_ao.o \
clk-mt8188-cam.o clk-mt8188-ccu.o
clk-mt8188-img.o \

drivers/clk/mediatek/Makefile +1 -1
-				   clk-mt8188-ipe.o
+				   clk-mt8188-ipe.o clk-mt8188-mfg.o
  obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
  obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
  obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-mfg.c new file +19 -0
new file mode 100644
index 000000000000..3a75cd7443fd
@@ -0,0 +1,50 @@
+// SPDX-License-Identifier: GPL-2.0-only
+//
+// Copyright (c) 2022 MediaTek Inc.
+// Author: Garmin Chang <[email protected]>
+
+#include <linux/clk-provider.h>
+#include <linux/platform_device.h>
+#include <dt-bindings/clock/mediatek,mt8188-clk.h>
+
+#include "clk-gate.h"
+#include "clk-mtk.h"
+
+static const struct mtk_gate_regs mfgcfg_cg_regs = {
+	.set_ofs = 0x4,
+	.clr_ofs = 0x8,
+	.sta_ofs = 0x0,
+};
+
+#define GATE_MFGCFG(_id, _name, _parent, _shift)			

\

drivers/clk/mediatek/clk-mt8188-mfg.c new file +1 -0
+	GATE_MTK(_id, _name, _parent, &mfgcfg_cg_regs, _shift,

&mtk_clk_gate_ops_setclr)

drivers/clk/mediatek/clk-mt8188-mfg.c new file +3 -0
+
+static const struct mtk_gate mfgcfg_clks[] = {
+	GATE_MFGCFG(CLK_MFGCFG_BG3D, "mfgcfg_bg3d", "top_mfg_core_tmp",
Quoted 2 lines

0),
+};

This will make it impossible to properly perform GPU DVFS.

Hint:

Quoted 8 lines
#define GATE_MFG(_id, _name, _parent, _shift)			\
	GATE_MTK_FLAGS(_id, _name, _parent, &mfg_cg_regs,	\
		       _shift, &mtk_clk_gate_ops_setclr,	\
		       CLK_SET_RATE_PARENT)

Regards,
Angelo

Ok, I will modify them in the next version.

Quoted 4 lines

Thanks,
Best Regards,
Garmin

#23 lore raw

PATCH v2 11/19 clk: mediatek: Add MT8188 vdecsys clock support

In reply to Garmin.Chang

Add MT8188 vdec clock controllers which provide clock gate control for video decoder.

---
 drivers/clk/mediatek/Makefile          |  2 +-
 drivers/clk/mediatek/clk-mt8188-vdec.c | 96 ++++++++++++++++++++++++++
 2 files changed, 97 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-vdec.c
drivers/clk/mediatek/Makefile +1 -1
index cd8870c28146..663e4bf209b7 100644
@@ -85,7 +85,7 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
 obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o \
 				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o \
 				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o \
-				   clk-mt8188-ipe.o clk-mt8188-mfg.o
+				   clk-mt8188-ipe.o clk-mt8188-mfg.o clk-mt8188-vdec.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-vdec.c new file +96 -0

96 lines not on this page · raw message

Signature · 1 line
2.18.0
#24 lore raw

PATCH v2 12/19 clk: mediatek: Add MT8188 vdosys0 clock support

In reply to Garmin.Chang

Add MT8188 vdosys0 clock controller which provides clock gate control in video system. This is integrated with mtk-mmsys driver which will populate device by platform_device_register_data to start vdosys clock driver.

---
 drivers/clk/mediatek/Makefile          |   3 +-
 drivers/clk/mediatek/clk-mt8188-vdo0.c | 129 +++++++++++++++++++++++++
 2 files changed, 131 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-vdo0.c
drivers/clk/mediatek/Makefile +2 -1
index 663e4bf209b7..c8fcf105e92c 100644
@@ -85,7 +85,8 @@ obj-$(CONFIG_COMMON_CLK_MT8186) += clk-mt8186-mcu.o clk-mt8186-topckgen.o clk-mt
 obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o \
 				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o \
 				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o \
-				   clk-mt8188-ipe.o clk-mt8188-mfg.o clk-mt8188-vdec.o
+				   clk-mt8188-ipe.o clk-mt8188-mfg.o clk-mt8188-vdec.o \
+				   clk-mt8188-vdo0.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-vdo0.c new file +129 -0

129 lines not on this page · raw message

Signature · 1 line
2.18.0
#25 lore raw

PATCH v2 13/19 clk: mediatek: Add MT8188 vdosys1 clock support

In reply to Garmin.Chang

Add MT8188 vdosys1 clock controller which provides clock gate control in video system. This is integrated with mtk-mmsys driver which will populate device by platform_device_register_data to start vdosys clock driver.

---
 drivers/clk/mediatek/Makefile          |   2 +-
 drivers/clk/mediatek/clk-mt8188-vdo1.c | 177 +++++++++++++++++++++++++
 2 files changed, 178 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-vdo1.c
drivers/clk/mediatek/Makefile +1 -1
index c8fcf105e92c..6ce00011cc60 100644
@@ -86,7 +86,7 @@ obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o
 				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o \
 				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o \
 				   clk-mt8188-ipe.o clk-mt8188-mfg.o clk-mt8188-vdec.o \
-				   clk-mt8188-vdo0.o
+				   clk-mt8188-vdo0.o clk-mt8188-vdo1.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-vdo1.c new file +177 -0

177 lines not on this page · raw message

Signature · 1 line
2.18.0
#26 lore raw

PATCH v2 14/19 clk: mediatek: Add MT8188 vencsys clock support

In reply to Garmin.Chang

Add MT8188 vencsys clock controllers which provide clock gate control for video encoder.

---
 drivers/clk/mediatek/Makefile          |  2 +-
 drivers/clk/mediatek/clk-mt8188-venc.c | 56 ++++++++++++++++++++++++++
 2 files changed, 57 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-venc.c
drivers/clk/mediatek/Makefile +1 -1
index 6ce00011cc60..69d89353a585 100644
@@ -86,7 +86,7 @@ obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o
 				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o \
 				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o \
 				   clk-mt8188-ipe.o clk-mt8188-mfg.o clk-mt8188-vdec.o \
-				   clk-mt8188-vdo0.o clk-mt8188-vdo1.o
+				   clk-mt8188-vdo0.o clk-mt8188-vdo1.o clk-mt8188-venc.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-venc.c new file +56 -0

56 lines not on this page · raw message

Signature · 1 line
2.18.0
#27 lore raw

PATCH v2 15/19 clk: mediatek: Add MT8188 vppsys0 clock support

In reply to Garmin.Chang

Add MT8188 vppsys0 clock controller which provides clock gate controller for Video Processor Pipe.

---
 drivers/clk/mediatek/Makefile          |   3 +-
 drivers/clk/mediatek/clk-mt8188-vpp0.c | 143 +++++++++++++++++++++++++
 2 files changed, 145 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-vpp0.c
drivers/clk/mediatek/Makefile +2 -1
index 69d89353a585..6a9807cdb80f 100644
@@ -86,7 +86,8 @@ obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o
 				   clk-mt8188-peri_ao.o clk-mt8188-infra_ao.o \
 				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o \
 				   clk-mt8188-ipe.o clk-mt8188-mfg.o clk-mt8188-vdec.o \
-				   clk-mt8188-vdo0.o clk-mt8188-vdo1.o clk-mt8188-venc.o
+				   clk-mt8188-vdo0.o clk-mt8188-vdo1.o clk-mt8188-venc.o \
+				   clk-mt8188-vpp0.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-vpp0.c new file +143 -0

143 lines not on this page · raw message

Signature · 1 line
2.18.0
#28 lore raw

PATCH v2 16/19 clk: mediatek: Add MT8188 vppsys1 clock support

In reply to Garmin.Chang

Add MT8188 vppsys1 clock controller which provides clock gate controller for Video Processor Pipe.

---
 drivers/clk/mediatek/Makefile          |   2 +-
 drivers/clk/mediatek/clk-mt8188-vpp1.c | 138 +++++++++++++++++++++++++
 2 files changed, 139 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-vpp1.c
drivers/clk/mediatek/Makefile +1 -1
index 6a9807cdb80f..8a22d23ac210 100644
@@ -87,7 +87,7 @@ obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o
 				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o \
 				   clk-mt8188-ipe.o clk-mt8188-mfg.o clk-mt8188-vdec.o \
 				   clk-mt8188-vdo0.o clk-mt8188-vdo1.o clk-mt8188-venc.o \
-				   clk-mt8188-vpp0.o
+				   clk-mt8188-vpp0.o clk-mt8188-vpp1.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-vpp1.c new file +138 -0

138 lines not on this page · raw message

Signature · 1 line
2.18.0
#29 lore raw

PATCH v2 17/19 clk: mediatek: Add MT8188 wpesys clock support

In reply to Garmin.Chang

Add MT8188 wpesys clock controllers which provide clock gate control in Wrapping Engine.

---
 drivers/clk/mediatek/Makefile         |   2 +-
 drivers/clk/mediatek/clk-mt8188-wpe.c | 107 ++++++++++++++++++++++++++
 2 files changed, 108 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-wpe.c
drivers/clk/mediatek/Makefile +1 -1
index 8a22d23ac210..d495b230c981 100644
@@ -87,7 +87,7 @@ obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o
 				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o \
 				   clk-mt8188-ipe.o clk-mt8188-mfg.o clk-mt8188-vdec.o \
 				   clk-mt8188-vdo0.o clk-mt8188-vdo1.o clk-mt8188-venc.o \
-				   clk-mt8188-vpp0.o clk-mt8188-vpp1.o
+				   clk-mt8188-vpp0.o clk-mt8188-vpp1.o clk-mt8188-wpe.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-wpe.c new file +107 -0

107 lines not on this page · raw message

Signature · 1 line
2.18.0
#30 lore raw

PATCH v2 18/19 clk: mediatek: Add MT8188 imp i2c wrapper clock support

In reply to Garmin.Chang

Add MT8188 imp i2c wrapper clock controllers which provide clock gate control in I2C IP blocks.

---
 drivers/clk/mediatek/Makefile                 |  3 +-
 .../clk/mediatek/clk-mt8188-imp_iic_wrap.c    | 86 +++++++++++++++++++
 2 files changed, 88 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-imp_iic_wrap.c
drivers/clk/mediatek/Makefile +2 -1
index d495b230c981..ff6e7271bc6c 100644
@@ -87,7 +87,8 @@ obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o
 				   clk-mt8188-cam.o clk-mt8188-ccu.o clk-mt8188-img.o \
 				   clk-mt8188-ipe.o clk-mt8188-mfg.o clk-mt8188-vdec.o \
 				   clk-mt8188-vdo0.o clk-mt8188-vdo1.o clk-mt8188-venc.o \
-				   clk-mt8188-vpp0.o clk-mt8188-vpp1.o clk-mt8188-wpe.o
+				   clk-mt8188-vpp0.o clk-mt8188-vpp1.o clk-mt8188-wpe.o \
+				   clk-mt8188-imp_iic_wrap.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-imp_iic_wrap.c new file +86 -0

86 lines not on this page · raw message

Signature · 1 line
2.18.0
#31 lore raw

PATCH v2 19/19 clk: mediatek: Add MT8188 adsp clock support

In reply to Garmin.Chang

Add MT8188 adsp clock controller which provides clock gate control for Audio DSP.

---
 drivers/clk/mediatek/Makefile                 |  2 +-
 .../clk/mediatek/clk-mt8188-adsp_audio26m.c   | 49 +++++++++++++++++++
 2 files changed, 50 insertions(+), 1 deletion(-)
 create mode 100644 drivers/clk/mediatek/clk-mt8188-adsp_audio26m.c
drivers/clk/mediatek/Makefile +1 -1
index ff6e7271bc6c..13958c1ab536 100644
@@ -88,7 +88,7 @@ obj-$(CONFIG_COMMON_CLK_MT8188) += clk-mt8188-apmixedsys.o clk-mt8188-topckgen.o
 				   clk-mt8188-ipe.o clk-mt8188-mfg.o clk-mt8188-vdec.o \
 				   clk-mt8188-vdo0.o clk-mt8188-vdo1.o clk-mt8188-venc.o \
 				   clk-mt8188-vpp0.o clk-mt8188-vpp1.o clk-mt8188-wpe.o \
-				   clk-mt8188-imp_iic_wrap.o
+				   clk-mt8188-imp_iic_wrap.o clk-mt8188-adsp_audio26m.o
 obj-$(CONFIG_COMMON_CLK_MT8192) += clk-mt8192.o
 obj-$(CONFIG_COMMON_CLK_MT8192_AUDSYS) += clk-mt8192-aud.o
 obj-$(CONFIG_COMMON_CLK_MT8192_CAMSYS) += clk-mt8192-cam.o
drivers/clk/mediatek/clk-mt8188-adsp_audio26m.c new file +49 -0

49 lines not on this page · raw message

Signature · 1 line
2.18.0