Skip to contentSkip to conversation

Mediatek MT8195 HDMI Tx support

PATCH In review Guillaume Ranquet 4 participants 9 messages Sep 29, 2021 – Oct 12, 2021

Subsystems (7)
lore
Share & tools
lore
#0 lore raw

cover Mediatek MT8195 HDMI Tx support

Hi everyone.

This is an attempt at porting the HDMI Tx feature from the mediatek vendor tree found here:
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2912413

Note: This patch series is currently tested on v5.10 and I am currently working on testing it on v5.15.

This series depends functionally on:
https://lore.kernel.org/linux-mediatek/[email protected]/
https://lore.kernel.org/linux-mediatek/[email protected]/

Guillaume Ranquet (4):
dt-bindings: phy: Add binding for Mediatek MT8195 HDMI PHY
dt-bindings: display: mediatek: add MT8195 hdmi bindings
phy: mediatek: add support for phy-mtk-hdmi-mt8195 drm/mediatek: add mt8195 hdmi TX support

 .../mediatek/mediatek,mt8195-hdmi-ddc.yaml    |   45 +
 .../mediatek/mediatek,mt8195-hdmi.yaml        |   98 +
 .../phy/mediatek,mtk8195-hdmi-phy.yaml        |   70 +
 drivers/gpu/drm/mediatek/Kconfig              |   10 +
 drivers/gpu/drm/mediatek/Makefile             |    4 +-
 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c    | 2293 +++++++++++++++++
 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.h    |  128 +
 .../gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.c    |  530 ++++
 .../gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.h    |   20 +
 .../gpu/drm/mediatek/mtk_mt8195_hdmi_regs.h   |  329 +++
 drivers/phy/mediatek/Makefile                 |    1 +
 drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c    |  793 ++++++
 drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h    |  204 ++
 13 files changed, 4524 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml
 create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi.yaml
 create mode 100644 Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi-phy.yaml
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.h
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.c
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.h
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_regs.h
 create mode 100644 drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
 create mode 100644 drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h
Signature · 7 lines
2.32.0


_______________________________________________
Linux-mediatek mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-mediatek
#1 lore raw

PATCH 1/4 dt-bindings: phy: Add binding for Mediatek MT8195 HDMI PHY

Add bindings to describe Mediatek MT8195 HDMI PHY

---
 .../phy/mediatek,mtk8195-hdmi-phy.yaml        | 70 +++++++++++++++++++
 1 file changed, 70 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi-phy.yaml
Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi-phy.yaml new file +70 -0
new file mode 100644
index 0000000000000..6b39bb8c9dfe7
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2020 MediaTek
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/mediatek,hdmi-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek High Definition Multimedia Interface (HDMI) PHY binding for mt8195
+
+maintainers:
+  - Chun-Kuang Hu <[email protected]>
+  - Philipp Zabel <[email protected]>
+  - Chunfeng Yun <[email protected]>
+
+description: |
+  The HDMI PHY serializes the HDMI encoder's three channel 10-bit parallel
+  output and drives the HDMI pads.
+
+properties:
+  $nodename:
+    pattern: "^hdmi-phy@[0-9a-f]+$"
+
+  compatible:
+    - const: mediatek,mt8195-hdmi-phy
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: PLL reference clock
+
+  clock-names:
+    items:
+      - const: hdmi_xtal_sel
+
+  clock-output-names:
+    items:
+      - const: hdmi_txpll
+
+  "#phy-cells":
+    const: 0
+
+  "#clock-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - clock-output-names
+  - "#phy-cells"
+  - "#clock-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    hdmi_phy: hdmi-phy@11d5f000 {
+        compatible = "mediatek,mt8195-hdmi-phy";
+        reg = <0 0x11d5f000 0 0x100>;
+        clocks = <&topckgen 77>;
+        clock-names = "hdmi_xtal_sel";
+        clock-output-names = "hdmi_txpll";
+        #clock-cells = <0>;
+        #phy-cells = <0>;
+    };
+
+...
Signature · 1 line
2.32.0
maintainer
#2 lore raw

Re: [PATCH v1 1/4] dt-bindings: phy: Add binding for Mediatek MT8195 HDMI PHY

Quoted 8 lines · Guillaume Ranquet

Add bindings to describe Mediatek MT8195 HDMI PHY

---
 .../phy/mediatek,mtk8195-hdmi-phy.yaml        | 70 +++++++++++++++++++
 1 file changed, 70 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi-phy.yaml

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi-phy.yaml: properties:compatible: [{'const': 'mediatek,mt8195-hdmi-phy'}] is not of type 'object', 'boolean'
from schema $id: http://json-schema.org/draft-07/schema#
./Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi-phy.yaml: $id: relative path/filename doesn't match actual path or filename
expected: http://devicetree.org/schemas/phy/mediatek,mtk8195-hdmi-phy.yaml#
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi-phy.yaml: ignoring, error in schema: properties: compatible
warning: no schema found in file: ./Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi-phy.yaml /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi-phy.example.dt.yaml: example-0: hdmi-phy@11d5f000:reg:0: [0, 299233280, 0, 256] is too long
From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml
Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi-phy.example.dt.yaml:0:0: /example-0/hdmi-phy@11d5f000: failed to match any schema with compatible: ['mediatek,mt8195-hdmi-phy']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1534286

This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit.

maintainer
#3 lore raw

Re: [PATCH v1 1/4] dt-bindings: phy: Add binding for Mediatek MT8195 HDMI PHY

In reply to Guillaume Ranquet
Quoted 47 lines · Guillaume Ranquet

Add bindings to describe Mediatek MT8195 HDMI PHY

---
 .../phy/mediatek,mtk8195-hdmi-phy.yaml        | 70
+++++++++++++++++++
 1 file changed, 70 insertions(+)
 create mode 100644

Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi-phy.yaml

(quoted diff) +0 -0

hdmi-phy.yaml b/Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi- phy.yaml
new file mode 100644
index 0000000000000..6b39bb8c9dfe7

Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi- new file +0 -0

phy.yaml

Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi- new file +8 -0
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright (c) 2020 MediaTek
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/phy/mediatek,hdmi-phy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek High Definition Multimedia Interface (HDMI) PHY

binding for mt8195

Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi- new file +8 -0
+
+maintainers:
+  - Chun-Kuang Hu <[email protected]>
+  - Philipp Zabel <[email protected]>
+  - Chunfeng Yun <[email protected]>
+
+description: |
+  The HDMI PHY serializes the HDMI encoder's three channel 10-bit

parallel

Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi- new file +9 -0
+  output and drives the HDMI pads.
+
+properties:
+  $nodename:
+    pattern: "^hdmi-phy@[0-9a-f]+$"
+
+  compatible:
+    - const: mediatek,mt8195-hdmi-phy
+

Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi-

Quoted 10 lines
Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi- new file +10 -0
+  reg:
+    maxItems: 1
+
+  clocks:
+    items:
+      - description: PLL reference clock
+
+  clock-names:
+    items:
+      - const: hdmi_xtal_sel

No need prefix "hdmi_",
After you merge mt8195-hdmi-phy driver into phy-mtk-hdmi.c, this binding will also be merged into mediatek,hdmi-phy.yaml as suggested by Chun-Kuang.

Thanks a lot

Quoted 35 lines
Documentation/devicetree/bindings/phy/mediatek,mtk8195-hdmi- new file +35 -0
+
+  clock-output-names:
+    items:
+      - const: hdmi_txpll
+
+  "#phy-cells":
+    const: 0
+
+  "#clock-cells":
+    const: 0
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - clock-output-names
+  - "#phy-cells"
+  - "#clock-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    hdmi_phy: hdmi-phy@11d5f000 {
+        compatible = "mediatek,mt8195-hdmi-phy";
+        reg = <0 0x11d5f000 0 0x100>;
+        clocks = <&topckgen 77>;
+        clock-names = "hdmi_xtal_sel";
+        clock-output-names = "hdmi_txpll";
+        #clock-cells = <0>;
+        #phy-cells = <0>;
+    };
+
+...
#4 lore raw

PATCH 2/4 dt-bindings: display: mediatek: add MT8195 hdmi bindings

In reply to Guillaume Ranquet

Add Mediatek HDMI and HDMI-DDC bindings for MT8195 SoC.

---
 .../mediatek/mediatek,mt8195-hdmi-ddc.yaml    | 45 +++++++++
 .../mediatek/mediatek,mt8195-hdmi.yaml        | 98 +++++++++++++++++++
 2 files changed, 143 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml
 create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi.yaml
Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml new file +45 -0
new file mode 100644
index 0000000000000..3c80bcebe6d30
@@ -0,0 +1,45 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Mediatek HDMI DDC Device Tree Bindings for mt8195
+
+maintainers:
+  - CK Hu <[email protected]>
+  - Jitao shi <[email protected]>
+
+description: |
+  The HDMI DDC i2c controller is used to interface with the HDMI DDC pins.
+
+properties:
+  compatible:
+    enum:
+      - mediatek,mt8195-hdmi-ddc
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: ddc-i2c
+
+required:
+  - compatible
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/interrupt-controller/irq.h>
+    hdmiddc0: ddc_i2c {
+      compatible = "mediatek,mt8195-hdmi-ddc";
+      clocks = <&clk26m>;
+      clock-names = "ddc-i2c";
+    };
+
+...
Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi.yaml new file +98 -0

98 lines not on this page · raw message

Signature · 1 line
2.32.0
maintainer
#5 lore raw

Re: [PATCH v1 2/4] dt-bindings: display: mediatek: add MT8195 hdmi bindings

Quoted 10 lines · Guillaume Ranquet

Add Mediatek HDMI and HDMI-DDC bindings for MT8195 SoC.

---
 .../mediatek/mediatek,mt8195-hdmi-ddc.yaml    | 45 +++++++++
 .../mediatek/mediatek,mt8195-hdmi.yaml        | 98 +++++++++++++++++++
 2 files changed, 143 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi-ddc.yaml
 create mode 100644 Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi.yaml

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi.example.dt.yaml: example-0: hdmi@1c300000:reg:0: [0, 472907776, 0, 4096] is too long
From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi.example.dt.yaml: hdmi@1c300000: 'ddc-i2c-bus', 'power-domains' do not match any of the regexes: 'pinctrl-[0-9]+'
From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/display/mediatek/mediatek,mt8195-hdmi.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1534287

This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit.

#6 lore raw

PATCH 3/4 phy: mediatek: add support for phy-mtk-hdmi-mt8195

In reply to Guillaume Ranquet

Add basic support for the mediatek hdmi phy on MT8195 SoC

---
 drivers/phy/mediatek/Makefile              |   1 +
 drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c | 793 +++++++++++++++++++++
 drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h | 204 ++++++
 3 files changed, 998 insertions(+)
 create mode 100644 drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c
 create mode 100644 drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h
drivers/phy/mediatek/Makefile +1 -0
index ace660fbed3a1..8024961160ad9 100644
@@ -10,6 +10,7 @@ obj-$(CONFIG_PHY_MTK_XSPHY)		+= phy-mtk-xsphy.o
 phy-mtk-hdmi-drv-y			:= phy-mtk-hdmi.o
 phy-mtk-hdmi-drv-y			+= phy-mtk-hdmi-mt2701.o
 phy-mtk-hdmi-drv-y			+= phy-mtk-hdmi-mt8173.o
+phy-mtk-hdmi-drv-y			+= phy-mtk-hdmi-mt8195.o
 obj-$(CONFIG_PHY_MTK_HDMI)		+= phy-mtk-hdmi-drv.o
 
 phy-mtk-mipi-dsi-drv-y			:= phy-mtk-mipi-dsi.o
drivers/phy/mediatek/phy-mtk-hdmi-mt8195.c new file +793 -0

793 lines not on this page · raw message

drivers/phy/mediatek/phy-mtk-hdmi-mt8195.h new file +204 -0

204 lines not on this page · raw message

Signature · 1 line
2.32.0
#7 lore raw

PATCH 4/4 drm/mediatek: add mt8195 hdmi TX support

In reply to Guillaume Ranquet

Add basic hdmi TX support for the mediatek mt8195 SoCs

---
 drivers/gpu/drm/mediatek/Kconfig              |   10 +
 drivers/gpu/drm/mediatek/Makefile             |    4 +-
 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c    | 2293 +++++++++++++++++
 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.h    |  128 +
 .../gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.c    |  530 ++++
 .../gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.h    |   20 +
 .../gpu/drm/mediatek/mtk_mt8195_hdmi_regs.h   |  329 +++
 7 files changed, 3313 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.h
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.c
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.h
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_regs.h
drivers/gpu/drm/mediatek/Kconfig +10 -0
index 2976d21e9a34a..517d065f0511b 100644
@@ -28,3 +28,13 @@ config DRM_MEDIATEK_HDMI
 	select PHY_MTK_HDMI
 	help
 	  DRM/KMS HDMI driver for Mediatek SoCs
+
+config DRM_MEDIATEK_HDMI_MT8195_SUSPEND_LOW_POWER
+	tristate "DRM HDMI SUSPEND LOW POWER Support for Mediatek mt8195 SoCs"
+	depends on DRM_MEDIATEK_HDMI
+	help
+	  DRM/KMS HDMI SUSPEND_LOW_POWER for Mediatek SoCs.
+	  Choose this option if you want to disable/enable
+	  clock and power domain when platform enter suspend,
+	  and this config depends on DRM_MEDIATEK_HDMI.
+
drivers/gpu/drm/mediatek/Makefile +3 -1
index 29098d7c8307c..736f0816083d0 100644
@@ -18,6 +18,8 @@ obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o
 
 mediatek-drm-hdmi-objs := mtk_cec.o \
 			  mtk_hdmi.o \
-			  mtk_hdmi_ddc.o
+			  mtk_hdmi_ddc.o \
+			  mtk_mt8195_hdmi.o \
+			  mtk_mt8195_hdmi_ddc.o \
 
 obj-$(CONFIG_DRM_MEDIATEK_HDMI) += mediatek-drm-hdmi.o
drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c new file +2293 -0

2,293 lines not on this page · raw message

drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.h new file +128 -0

128 lines not on this page · raw message

drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.c new file +530 -0

530 lines not on this page · raw message

drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.h new file +20 -0
new file mode 100644
index 0000000000000..966fc5a4ca177
@@ -0,0 +1,20 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (c) 2021 MediaTek Inc.
+ */
+
+#ifndef _MTK_DDC_H
+#define _MTK_DDC_H
+
+#include <linux/clk.h>
+#include <linux/i2c.h>
+#include <linux/mutex.h>
+
+struct mtk_hdmi_ddc {
+	struct mutex mtx;
+	struct i2c_adapter adap;
+	struct clk *clk;
+	void __iomem *regs;
+};
+
+#endif /* _MTK_DDC_H */
drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_regs.h new file +329 -0

7 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Signature · 1 line
2.32.0

Part of the diff is not shown here. View the raw message.

maintainer
#8 lore raw

Re: [PATCH v1 4/4] drm/mediatek: add mt8195 hdmi TX support

Hi, Guillaume:

This is a big patch, and I'm not familiar with this driver, so the review process would be long. So I tell you about how I review this patch, and if you could process according to my way, the process would be more short.

1. Find the common part of all hdmi driver.
Even though mt8195 hdmi has many difference with other mediatek soc hdmi driver, I would like to find the common part and have just one copy of the common part. I expect there would three file finally:

mtk_hdmi.c (the common part)
mtk_hdmi_mt8173.c (each soc special part)
mtk_hdmi_mt8195.c (each soc special part)

But this would be difficult in this stage, so you could temporarily have these three file:

mtk_hdmi_common.c (the common part)
mtk_hdmi.c (each soc special part)
mtk_hdmi_mt8195.c (each soc special part)

When review is almost done, then change the file name as I wish.

2. The first patch has only basic function, separate advance function to another patch.
When comparing mt8195 hdmi driver with other hdmi driver, if mt8195 hdmi driver has some function that other hdmi does not have, I would think that function is advance function and should be separate to another patch.

If you follow this way, I think the review process would be short. Because this patch is big, I would just review partial part each time.

Regards,
Chun-Kuang.

Guillaume Ranquet <[email protected]> 於 2021年9月29日 週三 下午5:47寫道:

Quoted 56 lines

Add basic hdmi TX support for the mediatek mt8195 SoCs

---
 drivers/gpu/drm/mediatek/Kconfig              |   10 +
 drivers/gpu/drm/mediatek/Makefile             |    4 +-
 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c    | 2293 +++++++++++++++++
 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.h    |  128 +
 .../gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.c    |  530 ++++
 .../gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.h    |   20 +
 .../gpu/drm/mediatek/mtk_mt8195_hdmi_regs.h   |  329 +++
 7 files changed, 3313 insertions(+), 1 deletion(-)
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.h
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.c
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_ddc.h
 create mode 100644 drivers/gpu/drm/mediatek/mtk_mt8195_hdmi_regs.h
drivers/gpu/drm/mediatek/Kconfig +10 -0
index 2976d21e9a34a..517d065f0511b 100644
@@ -28,3 +28,13 @@ config DRM_MEDIATEK_HDMI
        select PHY_MTK_HDMI
        help
          DRM/KMS HDMI driver for Mediatek SoCs
+
+config DRM_MEDIATEK_HDMI_MT8195_SUSPEND_LOW_POWER
+       tristate "DRM HDMI SUSPEND LOW POWER Support for Mediatek mt8195 SoCs"
+       depends on DRM_MEDIATEK_HDMI
+       help
+         DRM/KMS HDMI SUSPEND_LOW_POWER for Mediatek SoCs.
+         Choose this option if you want to disable/enable
+         clock and power domain when platform enter suspend,
+         and this config depends on DRM_MEDIATEK_HDMI.
+
drivers/gpu/drm/mediatek/Makefile +3 -1
index 29098d7c8307c..736f0816083d0 100644
@@ -18,6 +18,8 @@ obj-$(CONFIG_DRM_MEDIATEK) += mediatek-drm.o
 
 mediatek-drm-hdmi-objs := mtk_cec.o \
                          mtk_hdmi.o \
-                         mtk_hdmi_ddc.o
+                         mtk_hdmi_ddc.o \
+                         mtk_mt8195_hdmi.o \
+                         mtk_mt8195_hdmi_ddc.o \
 
 obj-$(CONFIG_DRM_MEDIATEK_HDMI) += mediatek-drm-hdmi.o
drivers/gpu/drm/mediatek/mtk_mt8195_hdmi.c new file +0 -1
new file mode 100644
index 0000000000000..46c7c8af524ac
--- /dev/null