Skip to content

Commit 9adf758

Browse files
ehristevAngeloGioacchino Del Regno
authored andcommitted
arm64: dts: mediatek: mt8186: fix clock names for power domains
Clocks for each power domain are split into big categories: pd clocks and subsys clocks. According to the binding, all clocks which have a dash '-' in their name are treated as subsys clocks, and must be placed at the end of the list. The other clocks which are pd clocks must come first. Fixed the naming and the placing of all clocks in the power domains. For the avoidance of doubt, prefixed all subsys clocks with the 'subsys' prefix. The binding does not enforce strict clock names, the driver uses them in bulk, only making a difference for pd clocks vs subsys clocks. The above problem appears to be trivial, however, it leads to incorrect power up and power down sequence of the power domains, because some clocks will be mistakenly taken for subsys clocks and viceversa. One consequence is the fact that if the DIS power domain goes power down and power back up during the boot process, when it comes back up, there are still transactions left on the bus which makes the display inoperable. Some of the clocks for the DIS power domain were wrongly using '_' instead of '-', which again made these clocks being treated as pd clocks instead of subsys clocks. Cc: stable@vger.kernel.org Fixes: d9e43c1 ("arm64: dts: mt8186: Add power domains controller") Signed-off-by: Eugen Hristev <eugen.hristev@collabora.com> Tested-by: Chen-Yu Tsai <wenst@chromium.org> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Tested-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.com> Link: https://lore.kernel.org/r/20231005103041.352478-1-eugen.hristev@collabora.com Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
1 parent 59fa1e5 commit 9adf758

1 file changed

Lines changed: 27 additions & 15 deletions

File tree

arch/arm64/boot/dts/mediatek/mt8186.dtsi

Lines changed: 27 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,8 @@
924924
reg = <MT8186_POWER_DOMAIN_CSIRX_TOP>;
925925
clocks = <&topckgen CLK_TOP_SENINF>,
926926
<&topckgen CLK_TOP_SENINF1>;
927-
clock-names = "csirx_top0", "csirx_top1";
927+
clock-names = "subsys-csirx-top0",
928+
"subsys-csirx-top1";
928929
#power-domain-cells = <0>;
929930
};
930931

@@ -942,7 +943,8 @@
942943
reg = <MT8186_POWER_DOMAIN_ADSP_AO>;
943944
clocks = <&topckgen CLK_TOP_AUDIODSP>,
944945
<&topckgen CLK_TOP_ADSP_BUS>;
945-
clock-names = "audioadsp", "adsp_bus";
946+
clock-names = "audioadsp",
947+
"subsys-adsp-bus";
946948
#address-cells = <1>;
947949
#size-cells = <0>;
948950
#power-domain-cells = <1>;
@@ -975,8 +977,11 @@
975977
<&mmsys CLK_MM_SMI_COMMON>,
976978
<&mmsys CLK_MM_SMI_GALS>,
977979
<&mmsys CLK_MM_SMI_IOMMU>;
978-
clock-names = "disp", "mdp", "smi_infra", "smi_common",
979-
"smi_gals", "smi_iommu";
980+
clock-names = "disp", "mdp",
981+
"subsys-smi-infra",
982+
"subsys-smi-common",
983+
"subsys-smi-gals",
984+
"subsys-smi-iommu";
980985
mediatek,infracfg = <&infracfg_ao>;
981986
#address-cells = <1>;
982987
#size-cells = <0>;
@@ -993,15 +998,17 @@
993998

994999
power-domain@MT8186_POWER_DOMAIN_CAM {
9951000
reg = <MT8186_POWER_DOMAIN_CAM>;
996-
clocks = <&topckgen CLK_TOP_CAM>,
997-
<&topckgen CLK_TOP_SENINF>,
1001+
clocks = <&topckgen CLK_TOP_SENINF>,
9981002
<&topckgen CLK_TOP_SENINF1>,
9991003
<&topckgen CLK_TOP_SENINF2>,
10001004
<&topckgen CLK_TOP_SENINF3>,
1005+
<&camsys CLK_CAM2MM_GALS>,
10011006
<&topckgen CLK_TOP_CAMTM>,
1002-
<&camsys CLK_CAM2MM_GALS>;
1003-
clock-names = "cam-top", "cam0", "cam1", "cam2",
1004-
"cam3", "cam-tm", "gals";
1007+
<&topckgen CLK_TOP_CAM>;
1008+
clock-names = "cam0", "cam1", "cam2",
1009+
"cam3", "gals",
1010+
"subsys-cam-tm",
1011+
"subsys-cam-top";
10051012
mediatek,infracfg = <&infracfg_ao>;
10061013
#address-cells = <1>;
10071014
#size-cells = <0>;
@@ -1020,9 +1027,9 @@
10201027

10211028
power-domain@MT8186_POWER_DOMAIN_IMG {
10221029
reg = <MT8186_POWER_DOMAIN_IMG>;
1023-
clocks = <&topckgen CLK_TOP_IMG1>,
1024-
<&imgsys1 CLK_IMG1_GALS_IMG1>;
1025-
clock-names = "img-top", "gals";
1030+
clocks = <&imgsys1 CLK_IMG1_GALS_IMG1>,
1031+
<&topckgen CLK_TOP_IMG1>;
1032+
clock-names = "gals", "subsys-img-top";
10261033
mediatek,infracfg = <&infracfg_ao>;
10271034
#address-cells = <1>;
10281035
#size-cells = <0>;
@@ -1041,8 +1048,11 @@
10411048
<&ipesys CLK_IPE_LARB20>,
10421049
<&ipesys CLK_IPE_SMI_SUBCOM>,
10431050
<&ipesys CLK_IPE_GALS_IPE>;
1044-
clock-names = "ipe-top", "ipe-larb0", "ipe-larb1",
1045-
"ipe-smi", "ipe-gals";
1051+
clock-names = "subsys-ipe-top",
1052+
"subsys-ipe-larb0",
1053+
"subsys-ipe-larb1",
1054+
"subsys-ipe-smi",
1055+
"subsys-ipe-gals";
10461056
mediatek,infracfg = <&infracfg_ao>;
10471057
#power-domain-cells = <0>;
10481058
};
@@ -1061,7 +1071,9 @@
10611071
clocks = <&topckgen CLK_TOP_WPE>,
10621072
<&wpesys CLK_WPE_SMI_LARB8_CK_EN>,
10631073
<&wpesys CLK_WPE_SMI_LARB8_PCLK_EN>;
1064-
clock-names = "wpe0", "larb-ck", "larb-pclk";
1074+
clock-names = "wpe0",
1075+
"subsys-larb-ck",
1076+
"subsys-larb-pclk";
10651077
mediatek,infracfg = <&infracfg_ao>;
10661078
#power-domain-cells = <0>;
10671079
};

0 commit comments

Comments
 (0)