Add mt8186 dpi compatiable
Subsystems (5)
v2 cover Add mt8186 dpi compatiable
From: Xinlei Lee <[email protected]>
Base on Linux-next
change since v1:
1. Put switch dpi Topckgen MUX action in mt8186.dtsi.
Xinlei Lee (2):
dt-bindings: display: mediatek: dpi: Add compatible for MediaTek
MT8186
drm/mediatek: Add mt8186 dpi compatible to mtk_dpi.c
.../bindings/display/mediatek/mediatek,dpi.yaml | 1 + drivers/gpu/drm/mediatek/mtk_dpi.c | 11 +++++++++++ 2 files changed, 12 insertions(+)
Signature · 1 line
2.18.0
PATCH v2 1/2 dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8186
From: Xinlei Lee <[email protected]>
Add dt-binding documentation of dpi for MediaTek MT8186 SoC.
--- .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 + 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml +1 -0
@@ -22,6 +22,7 @@ properties: - mediatek,mt7623-dpi - mediatek,mt8173-dpi - mediatek,mt8183-dpi + - mediatek,mt8186-dpi - mediatek,mt8192-dpi reg:
Signature · 1 line
2.18.0
Re: [PATCH v2,1/2] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8186
Quoted 23 lines · On Thu, 2022-03-31 at 19:58 +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Add dt-binding documentation of dpi for MediaTek MT8186 SoC.
Signed-off-by Xinlei Lee <[email protected]>--- .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 + 1 file changed, 1 insertion(+)diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yam l b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yam l
indexdd2896a40ff0..a73044c50b5f100644
---
a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yam l
+++
b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yam l
Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml properties: · line 28
Quoted 7 lines
Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml +1
-0@@ -22,6 +22,7 @@ properties: - mediatek,mt7623-dpi - mediatek,mt8173-dpi - mediatek,mt8183-dpi + - mediatek,mt8186-dpi - mediatek,mt8192-dpi reg:
Hello Xinlei,
From the dts we use, the dpi node needs other properties for MT8186. Please send another patch and add these properties to binding.
assigned-clocks = <&topckgen CLK_TOP_DPI>; assigned-clock-parents = <&topckgen CLK_TOP_TVDPLL_D2>;
Thanks
BRs,
Rex
Re: [PATCH v2,1/2] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8186
Hi,
Quoted 39 lines · Rex-BC Chen
Quoted 28 lines · On Thu, 2022-03-31 at 19:58 +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Add dt-binding documentation of dpi for MediaTek MT8186 SoC.
Signed-off-by Xinlei Lee <[email protected]>---
.../devicetree/bindings/display/mediatek/mediatek,dpi.yaml|
1
+1 file changed, 1 insertion(+)diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.y am
l b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.y am
l
indexdd2896a40ff0..a73044c50b5f100644
---
a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.y am
l
+++
b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.y am
lDocumentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml properties: · line 28
Quoted 7 lines
Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml +1
-0@@ -22,6 +22,7 @@ properties: - mediatek,mt7623-dpi - mediatek,mt8173-dpi - mediatek,mt8183-dpi + - mediatek,mt8186-dpi - mediatek,mt8192-dpi reg:Hello Xinlei,
Quoted 5 lines
From the dts we use, the dpi node needs other properties for MT8186. Please send another patch and add these properties to binding.
assigned-clocks = <&topckgen
CLK_TOP_DPI>; assigned-clock-parents = <&topckgenCLK_TOP_TVDPLL_D2>;
According to [1], the assigned-clocks is initial value. Without this initial value, I think driver would set this clock again, wouldn't it?
[1]
https://www.kernel.org/doc/Documentation/devicetree/bindings/clock/clock-bindings.txt
Regards,
CK
Quoted 11 lines
Thanks
BRs,
Rex_______________________________________________
Linux-mediatek mailing list
[email protected]
Quoted 1 line
Rex-BC Chen
Reviewed-byRe: [PATCH v2,1/2] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8186
Quoted 51 lines · CK Hu
Hi,
Quoted 48 lines · Rex-BC Chen
Quoted 33 lines · On Thu, 2022-03-31 at 19:58 +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Add dt-binding documentation of dpi for MediaTek MT8186 SoC.
Signed-off-by Xinlei Lee <[email protected]>---
.../devicetree/bindings/display/mediatek/mediatek,dpi.yaml|
1
+1 file changed, 1 insertion(+)diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi .y
am
l b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi .y
am
l
indexdd2896a40ff0..a73044c50b5f100644
---
a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi .y
am
l
+++
b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi .y
am
lDocumentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml properties: · line 28
Quoted 7 lines
Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml +1
-0@@ -22,6 +22,7 @@ properties: - mediatek,mt7623-dpi - mediatek,mt8173-dpi - mediatek,mt8183-dpi + - mediatek,mt8186-dpi - mediatek,mt8192-dpi reg:Hello Xinlei,
From the dts we use, the dpi node needs other properties for MT8186.
Please send another patch and add these properties to binding.
Quoted 9 lines
Quoted 2 lines
assigned-clocks = <&topckgen
CLK_TOP_DPI>; assigned-clock-parents = <&topckgenCLK_TOP_TVDPLL_D2>;According to [1], the assigned-clocks is initial value. Without this initial value, I think driver would set this clock again, wouldn't it?
[1]
https://www.kernel.org/doc/Documentation/devicetree/bindings/clock/clock-bindings.txt
Quoted 4 lines
Regards,
CK
Hello CK,
OK, Thanks for your explanation.
BRs,
Rex
Quoted 13 lines
Quoted 11 lines
Thanks
BRs,
Rex_______________________________________________
Linux-mediatek mailing list
[email protected]
Quoted 3 lines
Quoted 1 line
Rob Herring
maintainerRe: [PATCH v2,1/2] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8186
In reply to Rex-BC ChenQuoted 34 lines · Rex-BC Chen
Quoted 23 lines · On Thu, 2022-03-31 at 19:58 +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Add dt-binding documentation of dpi for MediaTek MT8186 SoC.
Signed-off-by Xinlei Lee <[email protected]>--- .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 + 1 file changed, 1 insertion(+)diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yam l b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yam l
indexdd2896a40ff0..a73044c50b5f100644
---
a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yam l
+++
b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yam lDocumentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml properties: · line 28
Quoted 7 lines
Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml +1
-0@@ -22,6 +22,7 @@ properties: - mediatek,mt7623-dpi - mediatek,mt8173-dpi - mediatek,mt8183-dpi + - mediatek,mt8186-dpi - mediatek,mt8192-dpi reg:Hello Xinlei,
Quoted 5 lines
From the dts we use, the dpi node needs other properties for MT8186. Please send another patch and add these properties to binding.
assigned-clocks = <&topckgen
CLK_TOP_DPI>; assigned-clock-parents = <&topckgenCLK_TOP_TVDPLL_D2>;
Those are always allowed on any node with 'clocks', so no need to add them here.
Rob
Re: [PATCH v2,1/2] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8186
Quoted 44 lines · Rob Herring
Quoted 43 lines · Rex-BC Chen
Quoted 28 lines · On Thu, 2022-03-31 at 19:58 +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Add dt-binding documentation of dpi for MediaTek MT8186 SoC.
Signed-off-by Xinlei Lee <[email protected]>---
.../devicetree/bindings/display/mediatek/mediatek,dpi.yaml| 1
+1 file changed, 1 insertion(+)diff --git a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi .yam
l b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi .yam
l
indexdd2896a40ff0..a73044c50b5f100644
---
a/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi .yam
l
+++
b/Documentation/devicetree/bindings/display/mediatek/mediatek,dpi .yam
lDocumentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml properties: · line 28
Quoted 7 lines
Documentation/devicetree/bindings/display/mediatek/mediatek,dpi.yaml +1
-0@@ -22,6 +22,7 @@ properties: - mediatek,mt7623-dpi - mediatek,mt8173-dpi - mediatek,mt8183-dpi + - mediatek,mt8186-dpi - mediatek,mt8192-dpi reg:Hello Xinlei,
From the dts we use, the dpi node needs other properties for MT8186.
Please send another patch and add these properties to binding.
Quoted 8 lines
Quoted 2 lines
assigned-clocks = <&topckgen
CLK_TOP_DPI>; assigned-clock-parents = <&topckgenCLK_TOP_TVDPLL_D2>;Those are always allowed on any node with 'clocks', so no need to add
them here.Rob
Hi Rob:
Thank you for your review.
I understand your suggestion, and the next version will be sent soon.
Best Regards!
xinlei
Re: [PATCH v2,1/2] dt-bindings: display: mediatek: dpi: Add compatible for MediaTek MT8186
In reply to [email protected]Quoted 9 lines · On Thu, 31 Mar 2022 19:58:36 +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Add dt-binding documentation of dpi for MediaTek MT8186 SoC.
Signed-off-by Xinlei Lee <[email protected]>--- .../devicetree/bindings/display/mediatek/mediatek,dpi.yaml | 1 + 1 file changed, 1 insertion(+)
PATCH v2 2/2 drm/mediatek: Add mt8186 dpi compatible to mtk_dpi.c
In reply to [email protected]From: Xinlei Lee <[email protected]>
Add the compatible because use different .data in mt8186.
--- drivers/gpu/drm/mediatek/mtk_dpi.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/mediatek/mtk_dpi.c +11 -0
@@ -823,6 +823,14 @@ static const struct mtk_dpi_conf mt8192_conf = { .num_output_fmts = ARRAY_SIZE(mt8173_output_fmts), }; +static const struct mtk_dpi_conf mt8186_conf = { + .cal_factor = mt8183_calculate_factor, + .reg_h_fre_con =0xe0 , + .max_clock_khz =150000 , + .output_fmts = mt8183_output_fmts, + .num_output_fmts =ARRAY_SIZE (mt8183_output_fmts), +}; +static int mtk_dpi_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;
@@ -945,6 +953,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = { { .compatible = "mediatek,mt8192-dpi", .data = &mt8192_conf, }, + { .compatible = "mediatek,mt8186-dpi", + .data = &mt8186_conf, + }, { }, };MODULE_DEVICE_TABLE (of, mtk_dpi_of_ids);
Signature · 1 line
2.18.0
Re: [PATCH v2,2/2] drm/mediatek: Add mt8186 dpi compatible to mtk_dpi.c
Quoted 16 lines · On Thu, 2022-03-31 at 19:58 +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Add the compatible because use different .data in mt8186.
Signed-off-by Xinlei Lee <[email protected]>--- drivers/gpu/drm/mediatek/mtk_dpi.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/mediatek/mtk_dpi.c +0
-0@@ -823,6 +823,14 @@ static const struct mtk_dpi_conf mt8192_conf = { .num_output_fmts = ARRAY_SIZE(mt8173_output_fmts),
drivers/gpu/drm/mediatek/mtk_dpi.c static const struct mtk_dpi_conf mt8192_conf = { · line 833
Quoted 10 lines
drivers/gpu/drm/mediatek/mtk_dpi.c +8
-0}; +static const struct mtk_dpi_conf mt8186_conf = { + .cal_factor = mt8183_calculate_factor, + .reg_h_fre_con =0xe0 , + .max_clock_khz =150000 , + .output_fmts = mt8183_output_fmts, + .num_output_fmts =ARRAY_SIZE (mt8183_output_fmts), +}; +
Hello Xinlei,
Could you move 8186 between 8183 and 8192?
drivers/gpu/drm/mediatek/mtk_dpi.c static const struct of_device_id mtk_dpi_of_ids[] · line 959
Quoted 11 lines
drivers/gpu/drm/mediatek/mtk_dpi.c +3
-0static int mtk_dpi_probe (struct platform_device *pdev) {struct device *dev = &pdev->dev;@@ -945,6 +953,9 @@ static const struct of_device_id mtk_dpi_of_ids[] = { { .compatible = "mediatek,mt8192-dpi", .data = &mt8192_conf, }, + { .compatible = "mediatek,mt8186-dpi", + .data = &mt8186_conf, + },
ditto
BRs,
Rex
Quoted 3 lines
drivers/gpu/drm/mediatek/mtk_dpi.c +0
-0{ }, };
MODULE_DEVICE_TABLE(of, mtk_dpi_of_ids);
Re: [PATCH v2,2/2] drm/mediatek: Add mt8186 dpi compatible to mtk_dpi.c
Quoted 48 lines · Rex-BC Chen
Quoted 17 lines · On Thu, 2022-03-31 at 19:58 +0800, [email protected] wrote:
From: Xinlei Lee <[email protected]>
Add the compatible because use different .data in mt8186.
Signed-off-by Xinlei Lee <[email protected]>--- drivers/gpu/drm/mediatek/mtk_dpi.c | 11 +++++++++++ 1 file changed, 11 insertions(+)drivers/gpu/drm/mediatek/mtk_dpi.c +0
-0@@ -823,6 +823,14 @@ static const struct mtk_dpi_conf mt8192_conf = { .num_output_fmts = ARRAY_SIZE(mt8173_output_fmts),drivers/gpu/drm/mediatek/mtk_dpi.c static const struct mtk_dpi_conf mt8192_conf = · line 834
Quoted 10 lines
drivers/gpu/drm/mediatek/mtk_dpi.c +8
-0}; +static const struct mtk_dpi_conf mt8186_conf = { + .cal_factor = mt8183_calculate_factor, + .reg_h_fre_con =0xe0 , + .max_clock_khz =150000 , + .output_fmts = mt8183_output_fmts, + .num_output_fmts =ARRAY_SIZE (mt8183_output_fmts), +}; +Hello Xinlei,
Could you move 8186 between 8183 and 8192?
drivers/gpu/drm/mediatek/mtk_dpi.c static const struct of_device_id mtk_dpi_of_ids[] = { · line 958
Quoted 12 lines
drivers/gpu/drm/mediatek/mtk_dpi.c +0
-0static int mtk_dpi_probe (struct platform_device *pdev) {drivers/gpu/drm/mediatek/mtk_dpi.c +0
-0struct device *dev = &pdev->dev;@@ -945,6 +953,9 @@ static const struct of_device_idmtk_dpi_of_ids[]
= {drivers/gpu/drm/mediatek/mtk_dpi.c +3
-0{ .compatible = "mediatek,mt8192-dpi", .data = &mt8192_conf, }, + { .compatible = "mediatek,mt8186-dpi", + .data = &mt8186_conf, + },ditto
Quoted 7 lines
BRs,
RexQuoted 3 lines
{ },
};
MODULE_DEVICE_TABLE(of, mtk_dpi_of_ids);
Hi Rex:
Thanks for your review.
I will put it between 8183 & 8192 in the next version. In addition, I will add two properties assigned-clocks & assigned- clock-parents to dtbing.
Best Regards!
xinlei