Skip to contentSkip to conversation

arm64: dts: mt8195: Update vdosys compatible

PATCH In review [email protected] 4 participants 15 messages Feb 9, 2023 – Mar 2, 2023

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

PATCH 1/4 arm64: dts: mt8195: Update vdosys compatible

From: Matthias Brugger <[email protected]>

In an effort to fix the vdosys implementation, the compatible has changes. Fix the device tree to adhere the binding definition.

---

 arch/arm64/boot/dts/mediatek/mt8195.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8195.dtsi +2 -2
index 00891bfa564e9..8f1264d5290bf 100644
@@ -2369,7 +2369,7 @@ vencsys_core1: clock-controller@1b000000 {
 		};
 
 		vdosys0: syscon@1c01a000 {
-			compatible = "mediatek,mt8195-mmsys", "syscon";
+			compatible = "mediatek,mt8195-vdosys0", "mediatek,mt8195-mmsys", "syscon";
 			reg = <0 0x1c01a000 0 0x1000>;
 			mboxes = <&gce0 0 CMDQ_THR_PRIO_4>;
 			#clock-cells = <1>;
@@ -2555,7 +2555,7 @@ larb1: larb@1c019000 {
 		};
 
 		vdosys1: syscon@1c100000 {
-			compatible = "mediatek,mt8195-mmsys", "syscon";
+			compatible = "mediatek,mt8195-vdosys1", "syscon";
 			reg = <0 0x1c100000 0 0x1000>;
 			#clock-cells = <1>;
 		};
Signature · 1 line
2.39.0
#1 lore raw

PATCH 2/4 arm64: dts: mt8167: Align mmsys node name with dtschema

From: Matthias Brugger <[email protected]>

The node name should be generic and mmsys expcets 'syscon'

---

 arch/arm64/boot/dts/mediatek/mt8167.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8167.dtsi +1 -1
index 6a54315cf6502..2374c09530575 100644
@@ -124,7 +124,7 @@ pio: pinctrl@1000b000 {
 			interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
-		mmsys: mmsys@14000000 {
+		mmsys: syscon@14000000 {
 			compatible = "mediatek,mt8167-mmsys", "syscon";
 			reg = <0 0x14000000 0 0x1000>;
 			#clock-cells = <1>;
Signature · 1 line
2.39.0
#4 lore raw

PATCH 3/4 arm64: dts: mt8195: Align vppsys node to dtschema

In reply to [email protected]

From: Matthias Brugger <[email protected]>

As the node is a syscon, this has to be reflected in the compatible and the node name.

---

 arch/arm64/boot/dts/mediatek/mt8195.dtsi | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/mediatek/mt8195.dtsi +4 -4
index 8f1264d5290bf..5261367031426 100644
@@ -1795,8 +1795,8 @@ mfgcfg: clock-controller@13fbf000 {
 			#clock-cells = <1>;
 		};
 
-		vppsys0: clock-controller@14000000 {
-			compatible = "mediatek,mt8195-vppsys0";
+		vppsys0: syscon@14000000 {
+			compatible = "mediatek,mt8195-vppsys0", "syscon";
 			reg = <0 0x14000000 0 0x1000>;
 			#clock-cells = <1>;
 		};
@@ -1900,8 +1900,8 @@ larb8: larb@14e05000 {
 			power-domains = <&spm MT8195_POWER_DOMAIN_WPESYS>;
 		};
 
-		vppsys1: clock-controller@14f00000 {
-			compatible = "mediatek,mt8195-vppsys1";
+		vppsys1: syscon@14f00000 {
+			compatible = "mediatek,mt8195-vppsys1", "syscon";
 			reg = <0 0x14f00000 0 0x1000>;
 			#clock-cells = <1>;
 		};
Signature · 1 line
2.39.0
maintainer
#7 lore raw

Re: [PATCH v1 3/4] arm64: dts: mt8195: Align vppsys node to dtschema

In reply to [email protected]
Quoted 6 lines · On 09/02/2023 17:03, [email protected] wrote:

From: Matthias Brugger <[email protected]>

As the node is a syscon, this has to be reflected in the compatible and the node name.

A similar patch is already in v6.3-tmp/dts64:
168136cbef9c ("arm64: dts: mediatek: mt8195: add MMSYS configuration for VPPSYS")

I'll drop this one as well.
My bad, I should have noticed that earlier.

Regards,
Matthias

Quoted 31 lines

---

  arch/arm64/boot/dts/mediatek/mt8195.dtsi | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/mediatek/mt8195.dtsi +4 -4
index 8f1264d5290bf..5261367031426 100644
@@ -1795,8 +1795,8 @@ mfgcfg: clock-controller@13fbf000 {
  			#clock-cells = <1>;
  		};
 
-		vppsys0: clock-controller@14000000 {
-			compatible = "mediatek,mt8195-vppsys0";
+		vppsys0: syscon@14000000 {
+			compatible = "mediatek,mt8195-vppsys0", "syscon";
  			reg = <0 0x14000000 0 0x1000>;
  			#clock-cells = <1>;
  		};
@@ -1900,8 +1900,8 @@ larb8: larb@14e05000 {
  			power-domains = <&spm MT8195_POWER_DOMAIN_WPESYS>;
  		};
 
-		vppsys1: clock-controller@14f00000 {
-			compatible = "mediatek,mt8195-vppsys1";
+		vppsys1: syscon@14f00000 {
+			compatible = "mediatek,mt8195-vppsys1", "syscon";
  			reg = <0 0x14f00000 0 0x1000>;
  			#clock-cells = <1>;
  		};
#8 lore raw

PATCH 4/4 Revert "arm64: dts: mt8173: add mmsel clocks for 4K support"

In reply to [email protected]

From: Matthias Brugger <[email protected]>

This reverts commit fc6634ac0e5380aeb1063275a2e9a583d41b2306.

The mmsys is a clock provider but does not have any clocks connected to it. Therefore assigned-clock properties should be applied to the users of mmsys.

This fixes the DT schema check:
mediatek/mt8173-elm.dtb: syscon@14000000: 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+'

---

 arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8173.dtsi +0 -2
index c47d7d900f283..b753547e250fe 100644
@@ -988,8 +988,6 @@ mmsys: syscon@14000000 {
 			compatible = "mediatek,mt8173-mmsys", "syscon";
 			reg = <0 0x14000000 0 0x1000>;
 			power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
-			assigned-clocks = <&topckgen CLK_TOP_MM_SEL>;
-			assigned-clock-rates = <400000000>;
 			#clock-cells = <1>;
 			#reset-cells = <1>;
 			mboxes = <&gce 0 CMDQ_THR_PRIO_HIGHEST>,
Signature · 1 line
2.39.0
#9 lore raw

Re: [PATCH v1 4/4] Revert "arm64: dts: mt8173: add mmsel clocks for 4K support"

Quoted 7 lines · On Fri, Feb 10, 2023 at 12:05 AM <[email protected]> wrote:

From: Matthias Brugger <[email protected]>

This reverts commit fc6634ac0e5380aeb1063275a2e9a583d41b2306.

The mmsys is a clock provider but does not have any clocks connected to it. Therefore assigned-clock properties should be applied to the users of mmsys.

If there are multiple users that need this, then it should be moved to the clock provider node topckgen.

Quoted 26 lines

This fixes the DT schema check:
mediatek/mt8173-elm.dtb: syscon@14000000: 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+'

---

 arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8173.dtsi +0 -3
index c47d7d900f283..b753547e250fe 100644
@@ -988,8 +988,6 @@ mmsys: syscon@14000000 {
                        compatible = "mediatek,mt8173-mmsys", "syscon";
                        reg = <0 0x14000000 0 0x1000>;
                        power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
-                       assigned-clocks = <&topckgen CLK_TOP_MM_SEL>;
-                       assigned-clock-rates = <400000000>;
                        #clock-cells = <1>;
                        #reset-cells = <1>;
                        mboxes = <&gce 0 CMDQ_THR_PRIO_HIGHEST>,
--

2.39.0

#10 lore raw

Re: [PATCH v1 4/4] Revert "arm64: dts: mt8173: add mmsel clocks for 4K support"

In reply to [email protected]

Il 09/02/23 17:03, [email protected] ha scritto:

Quoted 11 lines

From: Matthias Brugger <[email protected]>

This reverts commit fc6634ac0e5380aeb1063275a2e9a583d41b2306.

The mmsys is a clock provider but does not have any clocks connected to it. Therefore assigned-clock properties should be applied to the users of mmsys.

This fixes the DT schema check:
mediatek/mt8173-elm.dtb: syscon@14000000: 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+'

About solving schema checks: agreed.

Since this is impacting on multiple subsystems (display, vdec, venc), can we instead move this to the topckgen node?
I didn't check if that would trigger another schema check, but I remember doing that on Qualcomm DTs a bit of time ago.

The alternative would be to copy that over more than 10 nodes, which would be a bit ... ugly.

Cheers,
Angelo

Quoted 18 lines

---

  arch/arm64/boot/dts/mediatek/mt8173.dtsi | 2 --
  1 file changed, 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8173.dtsi +0 -2
index c47d7d900f283..b753547e250fe 100644
@@ -988,8 +988,6 @@ mmsys: syscon@14000000 {
  			compatible = "mediatek,mt8173-mmsys", "syscon";
  			reg = <0 0x14000000 0 0x1000>;
  			power-domains = <&spm MT8173_POWER_DOMAIN_MM>;
-			assigned-clocks = <&topckgen CLK_TOP_MM_SEL>;
-			assigned-clock-rates = <400000000>;
  			#clock-cells = <1>;
  			#reset-cells = <1>;
  			mboxes = <&gce 0 CMDQ_THR_PRIO_HIGHEST>,
maintainer
#11 lore raw

Re: [PATCH v1 4/4] Revert "arm64: dts: mt8173: add mmsel clocks for 4K support"

Quoted 15 lines · AngeloGioacchino Del Regno

Il 09/02/23 17:03, [email protected] ha scritto:

Quoted 11 lines

From: Matthias Brugger <[email protected]>

This reverts commit fc6634ac0e5380aeb1063275a2e9a583d41b2306.

The mmsys is a clock provider but does not have any clocks connected to it. Therefore assigned-clock properties should be applied to the users of mmsys.

This fixes the DT schema check:
mediatek/mt8173-elm.dtb: syscon@14000000: 'assigned-clock-rates', 'assigned-clocks' do not match any of the regexes: 'pinctrl-[0-9]+'

About solving schema checks: agreed.

Quoted 8 lines

Since this is impacting on multiple subsystems (display, vdec, venc), can we instead move this to the topckgen node?
I didn't check if that would trigger another schema check, but I remember doing that on Qualcomm DTs a bit of time ago.

The alternative would be to copy that over more than 10 nodes, which would be a bit ... ugly.

Thanks Angelo and Chen-Yu for your feedback. I'm not able to reproduce that problem right now, so I'll drop this patch from the series.

Regards,
Matthias

maintainer
#14 lore raw
In reply to [email protected]

Patch 1 and 2 applied.

Matthias

Quoted 33 lines · On 09/02/2023 17:03, [email protected] wrote:

From: Matthias Brugger <[email protected]>

In an effort to fix the vdosys implementation, the compatible has changes. Fix the device tree to adhere the binding definition.

---

  arch/arm64/boot/dts/mediatek/mt8195.dtsi | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8195.dtsi +2 -2
index 00891bfa564e9..8f1264d5290bf 100644
@@ -2369,7 +2369,7 @@ vencsys_core1: clock-controller@1b000000 {
  		};
 
  		vdosys0: syscon@1c01a000 {
-			compatible = "mediatek,mt8195-mmsys", "syscon";
+			compatible = "mediatek,mt8195-vdosys0", "mediatek,mt8195-mmsys", "syscon";
  			reg = <0 0x1c01a000 0 0x1000>;
  			mboxes = <&gce0 0 CMDQ_THR_PRIO_4>;
  			#clock-cells = <1>;
@@ -2555,7 +2555,7 @@ larb1: larb@1c019000 {
  		};
 
  		vdosys1: syscon@1c100000 {
-			compatible = "mediatek,mt8195-mmsys", "syscon";
+			compatible = "mediatek,mt8195-vdosys1", "syscon";
  			reg = <0 0x1c100000 0 0x1000>;
  			#clock-cells = <1>;
  		};