Skip to contentSkip to conversation

dt-bindings: gpu: add Exynos Mali vendor specifics

PATCH In review Joseph Kogut 3 participants 16 messages Jun 14, 2019 – Jun 18, 2019

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

PATCH 1/2 dt-bindings: gpu: add Exynos Mali vendor specifics

Document vendor specific compatible string for Mali gpus on Exynos SoCs.

---
 Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +1 -0
index 1b1a74129141..a9704c736d07 100644
@@ -18,6 +18,7 @@ Required properties:
     + "amlogic,meson-gxm-mali"
     + "rockchip,rk3288-mali"
     + "rockchip,rk3399-mali"
+    + "samsung,exynos-mali"
 
 - reg : Physical base address of the device and length of the register area.
 
Signature · 1 line
2.22.0
#1 lore raw

PATCH 2/2 arm: dts: add ARM Mali GPU node for Odroid XU3

Add device tree node for mali gpu on Odroid XU3 SoCs.

---
 .../boot/dts/exynos5422-odroidxu3-common.dtsi  | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +18 -0
index 93a48f2dda49..1f2ae19d01af 100644
@@ -48,6 +48,24 @@
 		cooling-levels = <0 130 170 230>;
 	};
 
+	gpu: gpu@11800000 {
+		compatible = "samsung,exynos-mali", "arm,mali-t628";
+		reg = <0x11800000 0x5000>;
+		interrupts = <0 117 0>,
+			     <0 219 0>,
+			     <0 74  0>;
+		interrupt-names = "gpu", "job", "mmu";
+		clocks = <&clock CLK_G3D>,
+			 <&clock CLK_DOUT_ACLK_G3D>,
+			 <&clock CLK_FOUT_VPLL>;
+		mali-supply = <&buck4_reg>;
+		operating-points = <
+			/* KHz  uV   */
+			600000  1150000
+			177000  812500
+		>;
+	};
+
 	thermal-zones {
 		cpu0_thermal: cpu0-thermal {
 			thermal-sensors = <&tmu_cpu0 0>;
Signature · 1 line
2.22.0
#2 lore raw

Re: [PATCH 2/2] arm: dts: add ARM Mali GPU node for Odroid XU3

Quoted 13 lines · Joseph Kogut

Add device tree node for mali gpu on Odroid XU3 SoCs.

---
 .../boot/dts/exynos5422-odroidxu3-common.dtsi  | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +0 -0
index 93a48f2dda49..1f2ae19d01af 100644

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 57

Quoted 10 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +7 -0
@@ -48,6 +48,24 @@
                cooling-levels = <0 130 170 230>;
        };
 
+       gpu: gpu@11800000 {
+               compatible = "samsung,exynos-mali", "arm,mali-t628";
+               reg = <0x11800000 0x5000>;
+               interrupts = <0 117 0>,
+                            <0 219 0>,
+                            <0 74  0>;
+               interrupt-names = "gpu", "job", "mmu";

Please use the order defined in the binding doc.

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 60

Quoted 3 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +3 -0
+               clocks = <&clock CLK_G3D>,
+                        <&clock CLK_DOUT_ACLK_G3D>,
+                        <&clock CLK_FOUT_VPLL>;

The binding doc says a single clock.

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 62

Quoted 2 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +2 -0
+               mali-supply = <&buck4_reg>;
+               operating-points = <

The binding doc says operating-points-v2.

Quoted 10 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +6 -1
+                       /* KHz  uV   */
+                       600000  1150000
+                       177000  812500
+               >;
+       };
+
        thermal-zones {
                cpu0_thermal: cpu0-thermal {
                        thermal-sensors = <&tmu_cpu0 0>;
--
Quoted 2 lines

2.22.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

PATCH v2 2/2 arm: dts: add ARM Mali GPU node for Odroid XU3

In reply to Joseph Kogut

Add device tree node for mali gpu on Odroid XU3 SoCs.

---

Changes v1 -> v2:
- Use interrupt name ordering from binding doc
- Specify a single clock for GPU node
- Add gpu opp table
- Fix warnings from IRQ_TYPE_NONE

 .../boot/dts/exynos5422-odroidxu3-common.dtsi | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +26 -0
index 93a48f2dda49..b8a4246e3b37 100644
@@ -48,6 +48,32 @@
 		cooling-levels = <0 130 170 230>;
 	};
 
+	gpu: gpu@11800000 {
+		compatible = "samsung,exynos-mali", "arm,mali-t628";
+		reg = <0x11800000 0x5000>;
+		interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 74  IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "job", "mmu", "gpu";
+		clocks = <&clock CLK_G3D>;
+		mali-supply = <&buck4_reg>;
+		operating-points-v2 = <&gpu_opp_table>;
+	};
+
+	gpu_opp_table: gpu-opp-table {
+		compatible = "operating-points-v2";
+
+		opp-177000000 {
+			opp-hz = /bits/ 64 <117000000>;
+			opp-microvolt = <812500>;
+		};
+
+		opp-600000000 {
+			opp-hz = /bits/ 64 <600000000>;
+			opp-microvolt = <1150000>;
+		};
+	};
+
 	thermal-zones {
 		cpu0_thermal: cpu0-thermal {
 			thermal-sensors = <&tmu_cpu0 0>;

--
2.22.0

#4 lore raw

Re: [PATCH v2 2/2] arm: dts: add ARM Mali GPU node for Odroid XU3

Quoted 5 lines · Joseph Kogut

Add device tree node for mali gpu on Odroid XU3 SoCs.

---

Quoted 7 lines

Changes v1 -> v2:
- Use interrupt name ordering from binding doc
- Specify a single clock for GPU node
- Add gpu opp table
- Fix warnings from IRQ_TYPE_NONE

 .../boot/dts/exynos5422-odroidxu3-common.dtsi | 26 +++++++++++++++++++

This should go to exynos5422-odroid-core.dtsi instead, because it is common to entire Odroid Exynos5422 family (not only XU3 family).

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 52

Quoted 12 lines
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +2 -0
index 93a48f2dda49..b8a4246e3b37 100644
@@ -48,6 +48,32 @@
 		cooling-levels = <0 130 170 230>;
 	};
 
+	gpu: gpu@11800000 {
+		compatible = "samsung,exynos-mali", "arm,mali-t628";

This is common to all Exynos542x chips so it should go to exynos5420.dtsi. Here you would need to only enable it and provide regulator.

Probably this should be also associated with tmu_gpu as a cooling device (if Mali registers a cooling device...). Otherwise the tmu_gpu is not really used for it.

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 59

Quoted 7 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +7 -0
+		reg = <0x11800000 0x5000>;
+		interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 74  IRQ_TYPE_LEVEL_HIGH>,
+			     <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+		interrupt-names = "job", "mmu", "gpu";
+		clocks = <&clock CLK_G3D>;
+		mali-supply = <&buck4_reg>;

Please check if always-on property could be removed from buck4. Also, what about LDO27? It should be used as well (maybe through vendor-specific properties which would justify the need of new vendor compatible).

Best regards,
Krzysztof

Quoted 21 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +17 -1
+		operating-points-v2 = <&gpu_opp_table>;
+	};
+
+	gpu_opp_table: gpu-opp-table {
+		compatible = "operating-points-v2";
+
+		opp-177000000 {
+			opp-hz = /bits/ 64 <117000000>;
+			opp-microvolt = <812500>;
+		};
+
+		opp-600000000 {
+			opp-hz = /bits/ 64 <600000000>;
+			opp-microvolt = <1150000>;
+		};
+	};
+
 	thermal-zones {
 		cpu0_thermal: cpu0-thermal {
 			thermal-sensors = <&tmu_cpu0 0>;
--
Quoted 2 lines

2.22.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

Re: [PATCH v2 2/2] arm: dts: add ARM Mali GPU node for Odroid XU3

Hi Krzysztof,

Thanks for the review.

Quoted 28 lines · Krzysztof Kozlowski
Quoted 5 lines · Joseph Kogut

Add device tree node for mali gpu on Odroid XU3 SoCs.

---

Quoted 7 lines

Changes v1 -> v2:
- Use interrupt name ordering from binding doc
- Specify a single clock for GPU node
- Add gpu opp table
- Fix warnings from IRQ_TYPE_NONE

 .../boot/dts/exynos5422-odroidxu3-common.dtsi | 26 +++++++++++++++++++

This should go to exynos5422-odroid-core.dtsi instead, because it is common to entire Odroid Exynos5422 family (not only XU3 family).

Quoted 10 lines
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +0 -0
index 93a48f2dda49..b8a4246e3b37 100644
@@ -48,6 +48,32 @@
              cooling-levels = <0 130 170 230>;
      };
 
Quoted 7 lines

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 52

Quoted 2 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +2 -0
+     gpu: gpu@11800000 {
+             compatible = "samsung,exynos-mali", "arm,mali-t628";

This is common to all Exynos542x chips so it should go to exynos5420.dtsi. Here you would need to only enable it and provide regulator.

To clarify, which pieces are specific to the Odroid Exynos 5422 family, and which are common to the entire Exynos 542x family? I'm thinking the gpu node is common to the 542x family, including the interrupts and clock, and the regulator and opp table are specific to the Odroid 5422?

Quoted 4 lines

Probably this should be also associated with tmu_gpu as a cooling device (if Mali registers a cooling device...). Otherwise the tmu_gpu is not really used for it.

We have two operating performance points for the GPU, but I'm not sure at what temperature we should trip the lower opp. Looking at the trip temperatures for the CPU, we have four alerts, and one critical trip. The highest alert is 85 C, would it be reasonable to trigger the lower GPU opp at this temperature? Should it trigger sooner?

Quoted 9 lines

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 59

Quoted 7 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +7 -0
+             reg = <0x11800000 0x5000>;
+             interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                          <GIC_SPI 74  IRQ_TYPE_LEVEL_HIGH>,
+                          <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+             interrupt-names = "job", "mmu", "gpu";
+             clocks = <&clock CLK_G3D>;
+             mali-supply = <&buck4_reg>;

Please check if always-on property could be removed from buck4.

I've checked, and this property can be removed safely.

Quoted 4 lines

Also, what about LDO27? It should be used as well (maybe through vendor-specific properties which would justify the need of new vendor compatible).

I'm unsure how LDO27 is used, can you elaborate?

Best,
Joseph

#6 lore raw

Re: [PATCH v2 2/2] arm: dts: add ARM Mali GPU node for Odroid XU3

Quoted 41 lines · Joseph Kogut

Hi Krzysztof,

Thanks for the review.

Quoted 28 lines · Krzysztof Kozlowski
Quoted 5 lines · Joseph Kogut

Add device tree node for mali gpu on Odroid XU3 SoCs.

---

Quoted 7 lines

Changes v1 -> v2:
- Use interrupt name ordering from binding doc
- Specify a single clock for GPU node
- Add gpu opp table
- Fix warnings from IRQ_TYPE_NONE

 .../boot/dts/exynos5422-odroidxu3-common.dtsi | 26 +++++++++++++++++++

This should go to exynos5422-odroid-core.dtsi instead, because it is common to entire Odroid Exynos5422 family (not only XU3 family).

Quoted 10 lines
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +0 -0
index 93a48f2dda49..b8a4246e3b37 100644
@@ -48,6 +48,32 @@
              cooling-levels = <0 130 170 230>;
      };
 
Quoted 7 lines

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 52

Quoted 2 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +2 -0
+     gpu: gpu@11800000 {
+             compatible = "samsung,exynos-mali", "arm,mali-t628";

This is common to all Exynos542x chips so it should go to exynos5420.dtsi. Here you would need to only enable it and provide regulator.

Quoted 5 lines

To clarify, which pieces are specific to the Odroid Exynos 5422 family, and which are common to the entire Exynos 542x family? I'm thinking the gpu node is common to the 542x family, including the interrupts and clock, and the regulator and opp table are specific to the Odroid 5422?

Opp table depends - it might common to Exynos542x (as all use the same Mali) or specific to boards (because there is Odroid XU3 Lite with Exynos5422 working on lower frequencies).

So far the CPU and all bus OPP tables were put in exynos5420.dtsi so I guess this can go there as well.

For the rest of properties you were correct.

Quoted 11 lines
Quoted 5 lines

Probably this should be also associated with tmu_gpu as a cooling device (if Mali registers a cooling device...). Otherwise the tmu_gpu is not really used for it.

We have two operating performance points for the GPU, but I'm not sure at what temperature we should trip the lower opp. Looking at the trip temperatures for the CPU, we have four alerts, and one critical trip. The highest alert is 85 C, would it be reasonable to trigger the lower GPU opp at this temperature? Should it trigger sooner?

The highest trip point is 120 C and it is critical. In general I would follow the CPU trip points (so fan should start working at 50 degrees). Unless you have some other data about recommended trip points. Useful is vendor kernel (from Samsung, from Hard Kernel).

Quoted 11 lines
Quoted 10 lines

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 59

Quoted 8 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +7 -0
+             reg = <0x11800000 0x5000>;
+             interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                          <GIC_SPI 74  IRQ_TYPE_LEVEL_HIGH>,
+                          <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+             interrupt-names = "job", "mmu", "gpu";
+             clocks = <&clock CLK_G3D>;
+             mali-supply = <&buck4_reg>;

Please check if always-on property could be removed from buck4.

Quoted 8 lines

I've checked, and this property can be removed safely.

Quoted 4 lines

Also, what about LDO27? It should be used as well (maybe through vendor-specific properties which would justify the need of new vendor compatible).

I'm unsure how LDO27 is used, can you elaborate?

It is supplying the VDD_G3DS (with a note "SRAM power"). I do not have any more data on it. However I did not check in vendor kernel for it.

Best regards,
Krzysztof

Quoted 3 lines

Best,
Joseph

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#7 lore raw

Re: [PATCH v2 2/2] arm: dts: add ARM Mali GPU node for Odroid XU3

Quoted 93 lines · Krzysztof Kozlowski
Quoted 41 lines · Joseph Kogut

Hi Krzysztof,

Thanks for the review.

Quoted 28 lines · Krzysztof Kozlowski
Quoted 5 lines · Joseph Kogut

Add device tree node for mali gpu on Odroid XU3 SoCs.

---

Quoted 7 lines

Changes v1 -> v2:
- Use interrupt name ordering from binding doc
- Specify a single clock for GPU node
- Add gpu opp table
- Fix warnings from IRQ_TYPE_NONE

 .../boot/dts/exynos5422-odroidxu3-common.dtsi | 26 +++++++++++++++++++

This should go to exynos5422-odroid-core.dtsi instead, because it is common to entire Odroid Exynos5422 family (not only XU3 family).

Quoted 10 lines
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +0 -0
index 93a48f2dda49..b8a4246e3b37 100644
@@ -48,6 +48,32 @@
              cooling-levels = <0 130 170 230>;
      };
 
Quoted 7 lines

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 52

Quoted 2 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +2 -0
+     gpu: gpu@11800000 {
+             compatible = "samsung,exynos-mali", "arm,mali-t628";

This is common to all Exynos542x chips so it should go to exynos5420.dtsi. Here you would need to only enable it and provide regulator.

Quoted 5 lines

To clarify, which pieces are specific to the Odroid Exynos 5422 family, and which are common to the entire Exynos 542x family? I'm thinking the gpu node is common to the 542x family, including the interrupts and clock, and the regulator and opp table are specific to the Odroid 5422?

Opp table depends - it might common to Exynos542x (as all use the same Mali) or specific to boards (because there is Odroid XU3 Lite with Exynos5422 working on lower frequencies).

So far the CPU and all bus OPP tables were put in exynos5420.dtsi so I guess this can go there as well.

For the rest of properties you were correct.

Quoted 11 lines
Quoted 5 lines

Probably this should be also associated with tmu_gpu as a cooling device (if Mali registers a cooling device...). Otherwise the tmu_gpu is not really used for it.

We have two operating performance points for the GPU, but I'm not sure at what temperature we should trip the lower opp. Looking at the trip temperatures for the CPU, we have four alerts, and one critical trip. The highest alert is 85 C, would it be reasonable to trigger the lower GPU opp at this temperature? Should it trigger sooner?

The highest trip point is 120 C and it is critical. In general I would follow the CPU trip points (so fan should start working at 50 degrees). Unless you have some other data about recommended trip points. Useful is vendor kernel (from Samsung, from Hard Kernel).

Quoted 18 lines
Quoted 10 lines

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 59

Quoted 8 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +7 -0
+             reg = <0x11800000 0x5000>;
+             interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                          <GIC_SPI 74  IRQ_TYPE_LEVEL_HIGH>,
+                          <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+             interrupt-names = "job", "mmu", "gpu";
+             clocks = <&clock CLK_G3D>;
+             mali-supply = <&buck4_reg>;

Please check if always-on property could be removed from buck4.

I've checked, and this property can be removed safely.

Quoted 4 lines

Also, what about LDO27? It should be used as well (maybe through vendor-specific properties which would justify the need of new vendor compatible).

Quoted 5 lines
Quoted 1 line

I'm unsure how LDO27 is used, can you elaborate?

It is supplying the VDD_G3DS (with a note "SRAM power"). I do not have any more data on it. However I did not check in vendor kernel for it.

After checking (a fork of) the vendor sources [1], it seems to me that this regulator is used for memory voltage related to Samsung's Adaptive Supply Voltage, for which there is a pending patchset [2].

This seems to me to be out of the scope of this patchset, could you confirm?

[1] https://github.com/kumajaya/android_kernel_samsung_universal5422/blob/ad41104d43e6470f8d4880d65b259dc7b903cc0d/arch/arm/mach-exynos/asv-exynos5422.c#L1052
[2] https://lwn.net/Articles/784958/

#8 lore raw

Re: [PATCH v2 2/2] arm: dts: add ARM Mali GPU node for Odroid XU3

Quoted 24 lines · Joseph Kogut
Quoted 18 lines
Quoted 18 lines
Quoted 10 lines

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 59

Quoted 8 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +7 -0
+             reg = <0x11800000 0x5000>;
+             interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                          <GIC_SPI 74  IRQ_TYPE_LEVEL_HIGH>,
+                          <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+             interrupt-names = "job", "mmu", "gpu";
+             clocks = <&clock CLK_G3D>;
+             mali-supply = <&buck4_reg>;

Please check if always-on property could be removed from buck4.

I've checked, and this property can be removed safely.

Quoted 4 lines

Also, what about LDO27? It should be used as well (maybe through vendor-specific properties which would justify the need of new vendor compatible).

Quoted 5 lines
Quoted 1 line

I'm unsure how LDO27 is used, can you elaborate?

It is supplying the VDD_G3DS (with a note "SRAM power"). I do not have any more data on it. However I did not check in vendor kernel for it.

Quoted 8 lines

After checking (a fork of) the vendor sources [1], it seems to me that this regulator is used for memory voltage related to Samsung's Adaptive Supply Voltage, for which there is a pending patchset [2].

This seems to me to be out of the scope of this patchset, could you confirm?

[1] https://github.com/kumajaya/android_kernel_samsung_universal5422/blob/ad41104d43e6470f8d4880d65b259dc7b903cc0d/arch/arm/mach-exynos/asv-exynos5422.c#L1052
[2] https://lwn.net/Articles/784958/

Hi,

Indeed the vendor sources suggest that voltage scaling of this regulator depends on ASV, not on frequency. However still the regulator is there in the hardware so it should be in the bindings as well (specific to Exynos). I guess the driver should also enable it but this is separate topic (adding per-platform quirks to Panfrost driver). Putting it to bindings also follows advice from line 12:
https://elixir.bootlin.com/linux/v5.2-rc5/source/Documentation/devicetree/bindings/writing-bindings.txt#L12

Best regards,
Krzysztof

#9 lore raw

Re: [PATCH v2 2/2] arm: dts: add ARM Mali GPU node for Odroid XU3

In reply to Joseph Kogut
Quoted 26 lines · Joseph Kogut

Add device tree node for mali gpu on Odroid XU3 SoCs.

---

Changes v1 -> v2:
- Use interrupt name ordering from binding doc
- Specify a single clock for GPU node
- Add gpu opp table
- Fix warnings from IRQ_TYPE_NONE

 .../boot/dts/exynos5422-odroidxu3-common.dtsi | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +3 -0
index 93a48f2dda49..b8a4246e3b37 100644
@@ -48,6 +48,32 @@
                cooling-levels = <0 130 170 230>;
        };
 
+       gpu: gpu@11800000 {
+               compatible = "samsung,exynos-mali", "arm,mali-t628";
+               reg = <0x11800000 0x5000>;

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 63

Quoted 10 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +10 -0
+               interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 74  IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "job", "mmu", "gpu";
+               clocks = <&clock CLK_G3D>;
+               mali-supply = <&buck4_reg>;
+               operating-points-v2 = <&gpu_opp_table>;
+       };
+
+       gpu_opp_table: gpu-opp-table {

Not really a new problem in this file, but you are mixing nodes with and without an address and really the gpu node should be under a simple-bus node.

If the OPP is only for the GPU, I'd make it a child of the gpu node instead.

Quoted 17 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +13 -1
+               compatible = "operating-points-v2";
+
+               opp-177000000 {
+                       opp-hz = /bits/ 64 <117000000>;
+                       opp-microvolt = <812500>;
+               };
+
+               opp-600000000 {
+                       opp-hz = /bits/ 64 <600000000>;
+                       opp-microvolt = <1150000>;
+               };
+       };
+
        thermal-zones {
                cpu0_thermal: cpu0-thermal {
                        thermal-sensors = <&tmu_cpu0 0>;
--
Quoted 2 lines

2.22.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw

Re: [PATCH v2 2/2] arm: dts: add ARM Mali GPU node for Odroid XU3

In reply to Joseph Kogut
Quoted 26 lines · Joseph Kogut

Add device tree node for mali gpu on Odroid XU3 SoCs.

---

Changes v1 -> v2:
- Use interrupt name ordering from binding doc
- Specify a single clock for GPU node
- Add gpu opp table
- Fix warnings from IRQ_TYPE_NONE

 .../boot/dts/exynos5422-odroidxu3-common.dtsi | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +3 -0
index 93a48f2dda49..b8a4246e3b37 100644
@@ -48,6 +48,32 @@
                cooling-levels = <0 130 170 230>;
        };
 
+       gpu: gpu@11800000 {
+               compatible = "samsung,exynos-mali", "arm,mali-t628";
+               reg = <0x11800000 0x5000>;

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 63

Quoted 10 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +10 -0
+               interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 74  IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "job", "mmu", "gpu";
+               clocks = <&clock CLK_G3D>;
+               mali-supply = <&buck4_reg>;
+               operating-points-v2 = <&gpu_opp_table>;
+       };
+
+       gpu_opp_table: gpu-opp-table {

One more thing - use "opp_table" as node name (generic class of node, matches style with other tables).

Best regards,
Krzysztof

Quoted 17 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +13 -1
+               compatible = "operating-points-v2";
+
+               opp-177000000 {
+                       opp-hz = /bits/ 64 <117000000>;
+                       opp-microvolt = <812500>;
+               };
+
+               opp-600000000 {
+                       opp-hz = /bits/ 64 <600000000>;
+                       opp-microvolt = <1150000>;
+               };
+       };
+
        thermal-zones {
                cpu0_thermal: cpu0-thermal {
                        thermal-sensors = <&tmu_cpu0 0>;
--
Quoted 2 lines

2.22.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw

Re: [PATCH v2 2/2] arm: dts: add ARM Mali GPU node for Odroid XU3

Quoted 25 lines · Krzysztof Kozlowski
Quoted 23 lines · Joseph Kogut

Add device tree node for mali gpu on Odroid XU3 SoCs.

---

Changes v1 -> v2:
- Use interrupt name ordering from binding doc
- Specify a single clock for GPU node
- Add gpu opp table
- Fix warnings from IRQ_TYPE_NONE

 .../boot/dts/exynos5422-odroidxu3-common.dtsi | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +0 -0
index 93a48f2dda49..b8a4246e3b37 100644
@@ -48,6 +48,32 @@
                cooling-levels = <0 130 170 230>;
        };
 
Quoted 16 lines

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 63

Quoted 13 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +13 -0
+       gpu: gpu@11800000 {
+               compatible = "samsung,exynos-mali", "arm,mali-t628";
+               reg = <0x11800000 0x5000>;
+               interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 74  IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "job", "mmu", "gpu";
+               clocks = <&clock CLK_G3D>;
+               mali-supply = <&buck4_reg>;
+               operating-points-v2 = <&gpu_opp_table>;
+       };
+
+       gpu_opp_table: gpu-opp-table {

One more thing - use "opp_table" as node name (generic class of node, matches style with other tables).

'opp-table' as convention is using '-' rather than '_'.

Rob
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#12 lore raw

Re: [PATCH v2 2/2] arm: dts: add ARM Mali GPU node for Odroid XU3

Quoted 44 lines · Rob Herring
Quoted 25 lines · Krzysztof Kozlowski
Quoted 23 lines · Joseph Kogut

Add device tree node for mali gpu on Odroid XU3 SoCs.

---

Changes v1 -> v2:
- Use interrupt name ordering from binding doc
- Specify a single clock for GPU node
- Add gpu opp table
- Fix warnings from IRQ_TYPE_NONE

 .../boot/dts/exynos5422-odroidxu3-common.dtsi | 26 +++++++++++++++++++
 1 file changed, 26 insertions(+)
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +0 -0
index 93a48f2dda49..b8a4246e3b37 100644
@@ -48,6 +48,32 @@
                cooling-levels = <0 130 170 230>;
        };
 
Quoted 16 lines

arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi line 63

Quoted 13 lines
arch/arm/boot/dts/exynos5422-odroidxu3-common.dtsi +13 -0
+       gpu: gpu@11800000 {
+               compatible = "samsung,exynos-mali", "arm,mali-t628";
+               reg = <0x11800000 0x5000>;
+               interrupts = <GIC_SPI 219 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 74  IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "job", "mmu", "gpu";
+               clocks = <&clock CLK_G3D>;
+               mali-supply = <&buck4_reg>;
+               operating-points-v2 = <&gpu_opp_table>;
+       };
+
+       gpu_opp_table: gpu-opp-table {

One more thing - use "opp_table" as node name (generic class of node, matches style with other tables).

Quoted 1 line

'opp-table' as convention is using '-' rather than '_'.

OK, so rather consistency because most of opp-tables have '_', including existing DTSes and examples in Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt and Documentation/devicetree/bindings/opp/opp.txt.

Best regards,
Krzysztof
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#13 lore raw
In reply to Joseph Kogut
Quoted 12 lines · Joseph Kogut

Document vendor specific compatible string for Mali gpus on Exynos SoCs.

---
 Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +0 -0
index 1b1a74129141..a9704c736d07 100644

Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt Required properties: · line 21

Quoted 4 lines
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +1 -0
@@ -18,6 +18,7 @@ Required properties:
     + "amlogic,meson-gxm-mali"
     + "rockchip,rk3288-mali"
     + "rockchip,rk3399-mali"
+    + "samsung,exynos-mali"

Are there any driver differences for Exynos? If not then why adding another compatible?

Best regards,
Krzysztof

Quoted 6 lines
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +0 -0
 - reg : Physical base address of the device and length of the register area.
 
Signature · 1 line
2.22.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#14 lore raw
Quoted 9 lines · Krzysztof Kozlowski
Quoted 7 lines · Joseph Kogut

Document vendor specific compatible string for Mali gpus on Exynos SoCs.

---
 Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 1 +
 1 file changed, 1 insertion(+)
Quoted 12 lines

Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt Required properties: · line 21

Quoted 9 lines
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +1 -0
index 1b1a74129141..a9704c736d07 100644
@@ -18,6 +18,7 @@ Required properties:
     + "amlogic,meson-gxm-mali"
     + "rockchip,rk3288-mali"
     + "rockchip,rk3399-mali"
+    + "samsung,exynos-mali"

Are there any driver differences for Exynos? If not then why adding another compatible?

Wrong question. Are there any hardware differences? (Trick question because difference compared to what?)

Really, this shouldn't be 'exynos', but per SoC. But I'll leave it to the Samsung folks to decide how specific it should be.

Rob
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#15 lore raw
Quoted 24 lines · Rob Herring
Quoted 9 lines · Krzysztof Kozlowski
Quoted 7 lines · Joseph Kogut

Document vendor specific compatible string for Mali gpus on Exynos SoCs.

---
 Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt | 1 +
 1 file changed, 1 insertion(+)
Quoted 12 lines

Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt Required properties: · line 21

Quoted 9 lines
Documentation/devicetree/bindings/gpu/arm,mali-midgard.txt +1 -0
index 1b1a74129141..a9704c736d07 100644
@@ -18,6 +18,7 @@ Required properties:
     + "amlogic,meson-gxm-mali"
     + "rockchip,rk3288-mali"
     + "rockchip,rk3399-mali"
+    + "samsung,exynos-mali"

Are there any driver differences for Exynos? If not then why adding another compatible?

Quoted 5 lines

Wrong question. Are there any hardware differences? (Trick question because difference compared to what?)

Really, this shouldn't be 'exynos', but per SoC. But I'll leave it to the Samsung folks to decide how specific it should be.

If vendor compatible is expected, then let's go with per-soc (Exynos5420) because other SoCs use different Midgard chipsets so they might come with own differences.

Best regards,
Krzysztof
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel