* [PATCH v2 0/4] arm64: dts: mediatek: mt8186: More DVFS nodes
@ 2023-06-09 7:29 Chen-Yu Tsai
2023-06-09 7:29 ` [PATCH v2 1/4] arm64: dts: mediatek: mt8186: Add CCI node and CCI OPP table Chen-Yu Tsai
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Chen-Yu Tsai @ 2023-06-09 7:29 UTC (permalink / raw)
To: Matthias Brugger, AngeloGioacchino Del Regno
Cc: Chen-Yu Tsai, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Hi,
This adds more of the DVFS stuff at the SoC .dtsi level. This includes
the CCI and GPU.
Changes since v1:
- Dropped opp-level property from CPU and CCI OPP tables
- Used "opp-supported-hw = <0xff>" for GPU base OPPs to denote "all
variations"
Please have a look and merge for this cycle if possible.
On another note, I'm still cleaning up the MT6366 regulator's binding.
We shouldn't upstream the boards until the PMIC is ready.
ChenYu
Chen-Yu Tsai (4):
arm64: dts: mediatek: mt8186: Add CCI node and CCI OPP table
arm64: dts: mediatek: mt8186: Wire up CPU frequency/voltage scaling
arm64: dts: mediatek: mt8186: Add GPU speed bin NVMEM cells
arm64: dts: mediatek: mt8186: Wire up GPU voltage/frequency scaling
arch/arm64/boot/dts/mediatek/mt8186.dtsi | 490 ++++++++++++++++++++++-
1 file changed, 489 insertions(+), 1 deletion(-)
--
2.41.0.162.gfafddb0af9-goog
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v2 1/4] arm64: dts: mediatek: mt8186: Add CCI node and CCI OPP table
2023-06-09 7:29 [PATCH v2 0/4] arm64: dts: mediatek: mt8186: More DVFS nodes Chen-Yu Tsai
@ 2023-06-09 7:29 ` Chen-Yu Tsai
2023-06-09 7:54 ` AngeloGioacchino Del Regno
2023-06-09 7:29 ` [PATCH v2 2/4] arm64: dts: mediatek: mt8186: Wire up CPU frequency/voltage scaling Chen-Yu Tsai
` (3 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Chen-Yu Tsai @ 2023-06-09 7:29 UTC (permalink / raw)
To: Matthias Brugger, AngeloGioacchino Del Regno
Cc: Chen-Yu Tsai, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Add a device node for the CCI (cache coherent interconnect) and an OPP
table for it. The OPP table was taken from the downstream ChromeOS
kernel.
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
Angelo, I didn't pick up your Reviewed-by since I dropped the
"opp-level" properties.
arch/arm64/boot/dts/mediatek/mt8186.dtsi | 101 +++++++++++++++++++++++
1 file changed, 101 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
index 8c02232cac38..93f3c45ba372 100644
--- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
@@ -27,6 +27,99 @@ aliases {
rdma1 = &rdma1;
};
+ cci: cci {
+ compatible = "mediatek,mt8186-cci";
+ clocks = <&mcusys CLK_MCU_ARMPLL_BUS_SEL>,
+ <&apmixedsys CLK_APMIXED_MAINPLL>;
+ clock-names = "cci", "intermediate";
+ operating-points-v2 = <&cci_opp>;
+ };
+
+ cci_opp: opp-table-cci {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ cci_opp_0: opp-500000000 {
+ opp-hz = /bits/ 64 <500000000>;
+ opp-microvolt = <600000>;
+ };
+
+ cci_opp_1: opp-560000000 {
+ opp-hz = /bits/ 64 <560000000>;
+ opp-microvolt = <675000>;
+ };
+
+ cci_opp_2: opp-612000000 {
+ opp-hz = /bits/ 64 <612000000>;
+ opp-microvolt = <693750>;
+ };
+
+ cci_opp_3: opp-682000000 {
+ opp-hz = /bits/ 64 <682000000>;
+ opp-microvolt = <718750>;
+ };
+
+ cci_opp_4: opp-752000000 {
+ opp-hz = /bits/ 64 <752000000>;
+ opp-microvolt = <743750>;
+ };
+
+ cci_opp_5: opp-822000000 {
+ opp-hz = /bits/ 64 <822000000>;
+ opp-microvolt = <768750>;
+ };
+
+ cci_opp_6: opp-875000000 {
+ opp-hz = /bits/ 64 <875000000>;
+ opp-microvolt = <781250>;
+ };
+
+ cci_opp_7: opp-927000000 {
+ opp-hz = /bits/ 64 <927000000>;
+ opp-microvolt = <800000>;
+ };
+
+ cci_opp_8: opp-980000000 {
+ opp-hz = /bits/ 64 <980000000>;
+ opp-microvolt = <818750>;
+ };
+
+ cci_opp_9: opp-1050000000 {
+ opp-hz = /bits/ 64 <1050000000>;
+ opp-microvolt = <843750>;
+ };
+
+ cci_opp_10: opp-1120000000 {
+ opp-hz = /bits/ 64 <1120000000>;
+ opp-microvolt = <862500>;
+ };
+
+ cci_opp_11: opp-1155000000 {
+ opp-hz = /bits/ 64 <1155000000>;
+ opp-microvolt = <887500>;
+ };
+
+ cci_opp_12: opp-1190000000 {
+ opp-hz = /bits/ 64 <1190000000>;
+ opp-microvolt = <906250>;
+ };
+
+ cci_opp_13: opp-1260000000 {
+ opp-hz = /bits/ 64 <1260000000>;
+ opp-microvolt = <950000>;
+ };
+
+ cci_opp_14: opp-1330000000 {
+ opp-hz = /bits/ 64 <1330000000>;
+ opp-microvolt = <993750>;
+ };
+
+ cci_opp_15: opp-1400000000 {
+ opp-hz = /bits/ 64 <1400000000>;
+ opp-microvolt = <1031250>;
+ };
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -83,6 +176,7 @@ cpu0: cpu@0 {
d-cache-sets = <128>;
next-level-cache = <&l2_0>;
#cooling-cells = <2>;
+ mediatek,cci = <&cci>;
};
cpu1: cpu@100 {
@@ -101,6 +195,7 @@ cpu1: cpu@100 {
d-cache-sets = <128>;
next-level-cache = <&l2_0>;
#cooling-cells = <2>;
+ mediatek,cci = <&cci>;
};
cpu2: cpu@200 {
@@ -119,6 +214,7 @@ cpu2: cpu@200 {
d-cache-sets = <128>;
next-level-cache = <&l2_0>;
#cooling-cells = <2>;
+ mediatek,cci = <&cci>;
};
cpu3: cpu@300 {
@@ -137,6 +233,7 @@ cpu3: cpu@300 {
d-cache-sets = <128>;
next-level-cache = <&l2_0>;
#cooling-cells = <2>;
+ mediatek,cci = <&cci>;
};
cpu4: cpu@400 {
@@ -155,6 +252,7 @@ cpu4: cpu@400 {
d-cache-sets = <128>;
next-level-cache = <&l2_0>;
#cooling-cells = <2>;
+ mediatek,cci = <&cci>;
};
cpu5: cpu@500 {
@@ -173,6 +271,7 @@ cpu5: cpu@500 {
d-cache-sets = <128>;
next-level-cache = <&l2_0>;
#cooling-cells = <2>;
+ mediatek,cci = <&cci>;
};
cpu6: cpu@600 {
@@ -191,6 +290,7 @@ cpu6: cpu@600 {
d-cache-sets = <256>;
next-level-cache = <&l2_1>;
#cooling-cells = <2>;
+ mediatek,cci = <&cci>;
};
cpu7: cpu@700 {
@@ -209,6 +309,7 @@ cpu7: cpu@700 {
d-cache-sets = <256>;
next-level-cache = <&l2_1>;
#cooling-cells = <2>;
+ mediatek,cci = <&cci>;
};
idle-states {
--
2.41.0.162.gfafddb0af9-goog
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/4] arm64: dts: mediatek: mt8186: Wire up CPU frequency/voltage scaling
2023-06-09 7:29 [PATCH v2 0/4] arm64: dts: mediatek: mt8186: More DVFS nodes Chen-Yu Tsai
2023-06-09 7:29 ` [PATCH v2 1/4] arm64: dts: mediatek: mt8186: Add CCI node and CCI OPP table Chen-Yu Tsai
@ 2023-06-09 7:29 ` Chen-Yu Tsai
2023-06-09 7:54 ` AngeloGioacchino Del Regno
2023-06-09 7:29 ` [PATCH v2 3/4] arm64: dts: mediatek: mt8186: Add GPU speed bin NVMEM cells Chen-Yu Tsai
` (2 subsequent siblings)
4 siblings, 1 reply; 9+ messages in thread
From: Chen-Yu Tsai @ 2023-06-09 7:29 UTC (permalink / raw)
To: Matthias Brugger, AngeloGioacchino Del Regno
Cc: Chen-Yu Tsai, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Rob Herring, Krzysztof Kozlowski, Conor Dooley
This adds clocks, dynamic power coefficients, and OPP tables for the CPU
cores, so that everything required at the SoC level for CPU freqency and
voltage scaling is available.
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
arch/arm64/boot/dts/mediatek/mt8186.dtsi | 242 +++++++++++++++++++++++
1 file changed, 242 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
index 93f3c45ba372..e2becf2fe79f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
@@ -120,6 +120,208 @@ cci_opp_15: opp-1400000000 {
};
};
+ cluster0_opp: opp-table-cluster0 {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ opp-500000000 {
+ opp-hz = /bits/ 64 <500000000>;
+ opp-microvolt = <600000>;
+ required-opps = <&cci_opp_0>;
+ };
+
+ opp-774000000 {
+ opp-hz = /bits/ 64 <774000000>;
+ opp-microvolt = <675000>;
+ required-opps = <&cci_opp_1>;
+ };
+
+ opp-875000000 {
+ opp-hz = /bits/ 64 <875000000>;
+ opp-microvolt = <700000>;
+ required-opps = <&cci_opp_2>;
+ };
+
+ opp-975000000 {
+ opp-hz = /bits/ 64 <975000000>;
+ opp-microvolt = <725000>;
+ required-opps = <&cci_opp_3>;
+ };
+
+ opp-1075000000 {
+ opp-hz = /bits/ 64 <1075000000>;
+ opp-microvolt = <750000>;
+ required-opps = <&cci_opp_4>;
+ };
+
+ opp-1175000000 {
+ opp-hz = /bits/ 64 <1175000000>;
+ opp-microvolt = <775000>;
+ required-opps = <&cci_opp_5>;
+ };
+
+ opp-1275000000 {
+ opp-hz = /bits/ 64 <1275000000>;
+ opp-microvolt = <800000>;
+ required-opps = <&cci_opp_6>;
+ };
+
+ opp-1375000000 {
+ opp-hz = /bits/ 64 <1375000000>;
+ opp-microvolt = <825000>;
+ required-opps = <&cci_opp_7>;
+ };
+
+ opp-1500000000 {
+ opp-hz = /bits/ 64 <1500000000>;
+ opp-microvolt = <856250>;
+ required-opps = <&cci_opp_8>;
+ };
+
+ opp-1618000000 {
+ opp-hz = /bits/ 64 <1618000000>;
+ opp-microvolt = <875000>;
+ required-opps = <&cci_opp_9>;
+ };
+
+ opp-1666000000 {
+ opp-hz = /bits/ 64 <1666000000>;
+ opp-microvolt = <900000>;
+ required-opps = <&cci_opp_10>;
+ };
+
+ opp-1733000000 {
+ opp-hz = /bits/ 64 <1733000000>;
+ opp-microvolt = <925000>;
+ required-opps = <&cci_opp_11>;
+ };
+
+ opp-1800000000 {
+ opp-hz = /bits/ 64 <1800000000>;
+ opp-microvolt = <950000>;
+ required-opps = <&cci_opp_12>;
+ };
+
+ opp-1866000000 {
+ opp-hz = /bits/ 64 <1866000000>;
+ opp-microvolt = <981250>;
+ required-opps = <&cci_opp_13>;
+ };
+
+ opp-1933000000 {
+ opp-hz = /bits/ 64 <1933000000>;
+ opp-microvolt = <1006250>;
+ required-opps = <&cci_opp_14>;
+ };
+
+ opp-2000000000 {
+ opp-hz = /bits/ 64 <2000000000>;
+ opp-microvolt = <1031250>;
+ required-opps = <&cci_opp_15>;
+ };
+ };
+
+ cluster1_opp: opp-table-cluster1 {
+ compatible = "operating-points-v2";
+ opp-shared;
+
+ opp-774000000 {
+ opp-hz = /bits/ 64 <774000000>;
+ opp-microvolt = <675000>;
+ required-opps = <&cci_opp_0>;
+ };
+
+ opp-835000000 {
+ opp-hz = /bits/ 64 <835000000>;
+ opp-microvolt = <693750>;
+ required-opps = <&cci_opp_1>;
+ };
+
+ opp-919000000 {
+ opp-hz = /bits/ 64 <919000000>;
+ opp-microvolt = <718750>;
+ required-opps = <&cci_opp_2>;
+ };
+
+ opp-1002000000 {
+ opp-hz = /bits/ 64 <1002000000>;
+ opp-microvolt = <743750>;
+ required-opps = <&cci_opp_3>;
+ };
+
+ opp-1085000000 {
+ opp-hz = /bits/ 64 <1085000000>;
+ opp-microvolt = <775000>;
+ required-opps = <&cci_opp_4>;
+ };
+
+ opp-1169000000 {
+ opp-hz = /bits/ 64 <1169000000>;
+ opp-microvolt = <800000>;
+ required-opps = <&cci_opp_5>;
+ };
+
+ opp-1308000000 {
+ opp-hz = /bits/ 64 <1308000000>;
+ opp-microvolt = <843750>;
+ required-opps = <&cci_opp_6>;
+ };
+
+ opp-1419000000 {
+ opp-hz = /bits/ 64 <1419000000>;
+ opp-microvolt = <875000>;
+ required-opps = <&cci_opp_7>;
+ };
+
+ opp-1530000000 {
+ opp-hz = /bits/ 64 <1530000000>;
+ opp-microvolt = <912500>;
+ required-opps = <&cci_opp_8>;
+ };
+
+ opp-1670000000 {
+ opp-hz = /bits/ 64 <1670000000>;
+ opp-microvolt = <956250>;
+ required-opps = <&cci_opp_9>;
+ };
+
+ opp-1733000000 {
+ opp-hz = /bits/ 64 <1733000000>;
+ opp-microvolt = <981250>;
+ required-opps = <&cci_opp_10>;
+ };
+
+ opp-1796000000 {
+ opp-hz = /bits/ 64 <1796000000>;
+ opp-microvolt = <1012500>;
+ required-opps = <&cci_opp_11>;
+ };
+
+ opp-1860000000 {
+ opp-hz = /bits/ 64 <1860000000>;
+ opp-microvolt = <1037500>;
+ required-opps = <&cci_opp_12>;
+ };
+
+ opp-1923000000 {
+ opp-hz = /bits/ 64 <1923000000>;
+ opp-microvolt = <1062500>;
+ required-opps = <&cci_opp_13>;
+ };
+
+ cluster1_opp_14: opp-1986000000 {
+ opp-hz = /bits/ 64 <1986000000>;
+ opp-microvolt = <1093750>;
+ required-opps = <&cci_opp_14>;
+ };
+
+ cluster1_opp_15: opp-2050000000 {
+ opp-hz = /bits/ 64 <2050000000>;
+ opp-microvolt = <1118750>;
+ required-opps = <&cci_opp_15>;
+ };
+ };
+
cpus {
#address-cells = <1>;
#size-cells = <0>;
@@ -166,6 +368,11 @@ cpu0: cpu@0 {
reg = <0x000>;
enable-method = "psci";
clock-frequency = <2000000000>;
+ clocks = <&mcusys CLK_MCU_ARMPLL_LL_SEL>,
+ <&apmixedsys CLK_APMIXED_MAINPLL>;
+ clock-names = "cpu", "intermediate";
+ operating-points-v2 = <&cluster0_opp>;
+ dynamic-power-coefficient = <84>;
capacity-dmips-mhz = <382>;
cpu-idle-states = <&cpu_ret_l &cpu_off_l>;
i-cache-size = <32768>;
@@ -185,6 +392,11 @@ cpu1: cpu@100 {
reg = <0x100>;
enable-method = "psci";
clock-frequency = <2000000000>;
+ clocks = <&mcusys CLK_MCU_ARMPLL_LL_SEL>,
+ <&apmixedsys CLK_APMIXED_MAINPLL>;
+ clock-names = "cpu", "intermediate";
+ operating-points-v2 = <&cluster0_opp>;
+ dynamic-power-coefficient = <84>;
capacity-dmips-mhz = <382>;
cpu-idle-states = <&cpu_ret_l &cpu_off_l>;
i-cache-size = <32768>;
@@ -204,6 +416,11 @@ cpu2: cpu@200 {
reg = <0x200>;
enable-method = "psci";
clock-frequency = <2000000000>;
+ clocks = <&mcusys CLK_MCU_ARMPLL_LL_SEL>,
+ <&apmixedsys CLK_APMIXED_MAINPLL>;
+ clock-names = "cpu", "intermediate";
+ operating-points-v2 = <&cluster0_opp>;
+ dynamic-power-coefficient = <84>;
capacity-dmips-mhz = <382>;
cpu-idle-states = <&cpu_ret_l &cpu_off_l>;
i-cache-size = <32768>;
@@ -223,6 +440,11 @@ cpu3: cpu@300 {
reg = <0x300>;
enable-method = "psci";
clock-frequency = <2000000000>;
+ clocks = <&mcusys CLK_MCU_ARMPLL_LL_SEL>,
+ <&apmixedsys CLK_APMIXED_MAINPLL>;
+ clock-names = "cpu", "intermediate";
+ operating-points-v2 = <&cluster0_opp>;
+ dynamic-power-coefficient = <84>;
capacity-dmips-mhz = <382>;
cpu-idle-states = <&cpu_ret_l &cpu_off_l>;
i-cache-size = <32768>;
@@ -242,6 +464,11 @@ cpu4: cpu@400 {
reg = <0x400>;
enable-method = "psci";
clock-frequency = <2000000000>;
+ clocks = <&mcusys CLK_MCU_ARMPLL_LL_SEL>,
+ <&apmixedsys CLK_APMIXED_MAINPLL>;
+ clock-names = "cpu", "intermediate";
+ operating-points-v2 = <&cluster0_opp>;
+ dynamic-power-coefficient = <84>;
capacity-dmips-mhz = <382>;
cpu-idle-states = <&cpu_ret_l &cpu_off_l>;
i-cache-size = <32768>;
@@ -261,6 +488,11 @@ cpu5: cpu@500 {
reg = <0x500>;
enable-method = "psci";
clock-frequency = <2000000000>;
+ clocks = <&mcusys CLK_MCU_ARMPLL_LL_SEL>,
+ <&apmixedsys CLK_APMIXED_MAINPLL>;
+ clock-names = "cpu", "intermediate";
+ operating-points-v2 = <&cluster0_opp>;
+ dynamic-power-coefficient = <84>;
capacity-dmips-mhz = <382>;
cpu-idle-states = <&cpu_ret_l &cpu_off_l>;
i-cache-size = <32768>;
@@ -280,6 +512,11 @@ cpu6: cpu@600 {
reg = <0x600>;
enable-method = "psci";
clock-frequency = <2050000000>;
+ clocks = <&mcusys CLK_MCU_ARMPLL_BL_SEL>,
+ <&apmixedsys CLK_APMIXED_MAINPLL>;
+ clock-names = "cpu", "intermediate";
+ operating-points-v2 = <&cluster1_opp>;
+ dynamic-power-coefficient = <335>;
capacity-dmips-mhz = <1024>;
cpu-idle-states = <&cpu_ret_b &cpu_off_b>;
i-cache-size = <65536>;
@@ -299,6 +536,11 @@ cpu7: cpu@700 {
reg = <0x700>;
enable-method = "psci";
clock-frequency = <2050000000>;
+ clocks = <&mcusys CLK_MCU_ARMPLL_BL_SEL>,
+ <&apmixedsys CLK_APMIXED_MAINPLL>;
+ clock-names = "cpu", "intermediate";
+ operating-points-v2 = <&cluster1_opp>;
+ dynamic-power-coefficient = <335>;
capacity-dmips-mhz = <1024>;
cpu-idle-states = <&cpu_ret_b &cpu_off_b>;
i-cache-size = <65536>;
--
2.41.0.162.gfafddb0af9-goog
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 3/4] arm64: dts: mediatek: mt8186: Add GPU speed bin NVMEM cells
2023-06-09 7:29 [PATCH v2 0/4] arm64: dts: mediatek: mt8186: More DVFS nodes Chen-Yu Tsai
2023-06-09 7:29 ` [PATCH v2 1/4] arm64: dts: mediatek: mt8186: Add CCI node and CCI OPP table Chen-Yu Tsai
2023-06-09 7:29 ` [PATCH v2 2/4] arm64: dts: mediatek: mt8186: Wire up CPU frequency/voltage scaling Chen-Yu Tsai
@ 2023-06-09 7:29 ` Chen-Yu Tsai
2023-06-09 7:29 ` [PATCH v2 4/4] arm64: dts: mediatek: mt8186: Wire up GPU voltage/frequency scaling Chen-Yu Tsai
2023-06-09 15:55 ` [PATCH v2 0/4] arm64: dts: mediatek: mt8186: More DVFS nodes Matthias Brugger
4 siblings, 0 replies; 9+ messages in thread
From: Chen-Yu Tsai @ 2023-06-09 7:29 UTC (permalink / raw)
To: Matthias Brugger, AngeloGioacchino Del Regno
Cc: Chen-Yu Tsai, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Rob Herring, Krzysztof Kozlowski, Conor Dooley
On the MT8186, the chip is binned for different GPU voltages at the
highest OPPs. The binning value is stored in the efuse.
Add the NVMEM cell, and tie it to the GPU.
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
---
arch/arm64/boot/dts/mediatek/mt8186.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
index e2becf2fe79f..3762a70ccafb 100644
--- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
@@ -1519,6 +1519,11 @@ efuse: efuse@11cb0000 {
reg = <0 0x11cb0000 0 0x1000>;
#address-cells = <1>;
#size-cells = <1>;
+
+ gpu_speedbin: gpu-speed-bin@59c {
+ reg = <0x59c 0x4>;
+ bits = <0 3>;
+ };
};
mipi_tx0: dsi-phy@11cc0000 {
@@ -1551,6 +1556,8 @@ gpu: gpu@13040000 {
<&spm MT8186_POWER_DOMAIN_MFG3>;
power-domain-names = "core0", "core1";
#cooling-cells = <2>;
+ nvmem-cells = <&gpu_speedbin>;
+ nvmem-cell-names = "speed-bin";
status = "disabled";
};
--
2.41.0.162.gfafddb0af9-goog
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 4/4] arm64: dts: mediatek: mt8186: Wire up GPU voltage/frequency scaling
2023-06-09 7:29 [PATCH v2 0/4] arm64: dts: mediatek: mt8186: More DVFS nodes Chen-Yu Tsai
` (2 preceding siblings ...)
2023-06-09 7:29 ` [PATCH v2 3/4] arm64: dts: mediatek: mt8186: Add GPU speed bin NVMEM cells Chen-Yu Tsai
@ 2023-06-09 7:29 ` Chen-Yu Tsai
2023-06-09 7:54 ` AngeloGioacchino Del Regno
2023-06-09 15:55 ` [PATCH v2 0/4] arm64: dts: mediatek: mt8186: More DVFS nodes Matthias Brugger
4 siblings, 1 reply; 9+ messages in thread
From: Chen-Yu Tsai @ 2023-06-09 7:29 UTC (permalink / raw)
To: Matthias Brugger, AngeloGioacchino Del Regno
Cc: Chen-Yu Tsai, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, Rob Herring, Krzysztof Kozlowski, Conor Dooley
Add the GPU's OPP table. This is from the downstream ChromeOS kernel,
adapted to the new upstream opp-supported-hw binning format. Also add
dynamic-power-coefficient for the GPU.
Also add label for mfg1 power domain. This is to be used at the board
level to add a regulator supply for the power domain.
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
arch/arm64/boot/dts/mediatek/mt8186.dtsi | 140 ++++++++++++++++++++++-
1 file changed, 139 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8186.dtsi b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
index 3762a70ccafb..f04ae70c470a 100644
--- a/arch/arm64/boot/dts/mediatek/mt8186.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8186.dtsi
@@ -647,6 +647,142 @@ clk32k: oscillator-32k {
clock-output-names = "clk32k";
};
+ gpu_opp_table: opp-table-gpu {
+ compatible = "operating-points-v2";
+
+ opp-299000000 {
+ opp-hz = /bits/ 64 <299000000>;
+ opp-microvolt = <612500>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-332000000 {
+ opp-hz = /bits/ 64 <332000000>;
+ opp-microvolt = <625000>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-366000000 {
+ opp-hz = /bits/ 64 <366000000>;
+ opp-microvolt = <637500>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-400000000 {
+ opp-hz = /bits/ 64 <400000000>;
+ opp-microvolt = <643750>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-434000000 {
+ opp-hz = /bits/ 64 <434000000>;
+ opp-microvolt = <656250>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-484000000 {
+ opp-hz = /bits/ 64 <484000000>;
+ opp-microvolt = <668750>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-535000000 {
+ opp-hz = /bits/ 64 <535000000>;
+ opp-microvolt = <687500>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-586000000 {
+ opp-hz = /bits/ 64 <586000000>;
+ opp-microvolt = <700000>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-637000000 {
+ opp-hz = /bits/ 64 <637000000>;
+ opp-microvolt = <712500>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-690000000 {
+ opp-hz = /bits/ 64 <690000000>;
+ opp-microvolt = <737500>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-743000000 {
+ opp-hz = /bits/ 64 <743000000>;
+ opp-microvolt = <756250>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-796000000 {
+ opp-hz = /bits/ 64 <796000000>;
+ opp-microvolt = <781250>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-850000000 {
+ opp-hz = /bits/ 64 <850000000>;
+ opp-microvolt = <800000>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-900000000-3 {
+ opp-hz = /bits/ 64 <900000000>;
+ opp-microvolt = <850000>;
+ opp-supported-hw = <0x8>;
+ };
+
+ opp-900000000-4 {
+ opp-hz = /bits/ 64 <900000000>;
+ opp-microvolt = <837500>;
+ opp-supported-hw = <0x10>;
+ };
+
+ opp-900000000-5 {
+ opp-hz = /bits/ 64 <900000000>;
+ opp-microvolt = <825000>;
+ opp-supported-hw = <0x30>;
+ };
+
+ opp-950000000-3 {
+ opp-hz = /bits/ 64 <950000000>;
+ opp-microvolt = <900000>;
+ opp-supported-hw = <0x8>;
+ };
+
+ opp-950000000-4 {
+ opp-hz = /bits/ 64 <950000000>;
+ opp-microvolt = <875000>;
+ opp-supported-hw = <0x10>;
+ };
+
+ opp-950000000-5 {
+ opp-hz = /bits/ 64 <950000000>;
+ opp-microvolt = <850000>;
+ opp-supported-hw = <0x30>;
+ };
+
+ opp-1000000000-3 {
+ opp-hz = /bits/ 64 <1000000000>;
+ opp-microvolt = <950000>;
+ opp-supported-hw = <0x8>;
+ };
+
+ opp-1000000000-4 {
+ opp-hz = /bits/ 64 <1000000000>;
+ opp-microvolt = <912500>;
+ opp-supported-hw = <0x10>;
+ };
+
+ opp-1000000000-5 {
+ opp-hz = /bits/ 64 <1000000000>;
+ opp-microvolt = <875000>;
+ opp-supported-hw = <0x30>;
+ };
+ };
+
pmu-a55 {
compatible = "arm,cortex-a55-pmu";
interrupt-parent = <&gic>;
@@ -765,7 +901,7 @@ mfg0: power-domain@MT8186_POWER_DOMAIN_MFG0 {
#size-cells = <0>;
#power-domain-cells = <1>;
- power-domain@MT8186_POWER_DOMAIN_MFG1 {
+ mfg1: power-domain@MT8186_POWER_DOMAIN_MFG1 {
reg = <MT8186_POWER_DOMAIN_MFG1>;
mediatek,infracfg = <&infracfg_ao>;
#address-cells = <1>;
@@ -1558,6 +1694,8 @@ gpu: gpu@13040000 {
#cooling-cells = <2>;
nvmem-cells = <&gpu_speedbin>;
nvmem-cell-names = "speed-bin";
+ operating-points-v2 = <&gpu_opp_table>;
+ dynamic-power-coefficient = <4687>;
status = "disabled";
};
--
2.41.0.162.gfafddb0af9-goog
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/4] arm64: dts: mediatek: mt8186: Add CCI node and CCI OPP table
2023-06-09 7:29 ` [PATCH v2 1/4] arm64: dts: mediatek: mt8186: Add CCI node and CCI OPP table Chen-Yu Tsai
@ 2023-06-09 7:54 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-06-09 7:54 UTC (permalink / raw)
To: Chen-Yu Tsai, Matthias Brugger
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Il 09/06/23 09:29, Chen-Yu Tsai ha scritto:
> Add a device node for the CCI (cache coherent interconnect) and an OPP
> table for it. The OPP table was taken from the downstream ChromeOS
> kernel.
>
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> ---
> Angelo, I didn't pick up your Reviewed-by since I dropped the
> "opp-level" properties.
No worries, I asked you to do that so in that case it would've been safe to
keep the R-b tag ;-)
Anyway...................
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/4] arm64: dts: mediatek: mt8186: Wire up CPU frequency/voltage scaling
2023-06-09 7:29 ` [PATCH v2 2/4] arm64: dts: mediatek: mt8186: Wire up CPU frequency/voltage scaling Chen-Yu Tsai
@ 2023-06-09 7:54 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-06-09 7:54 UTC (permalink / raw)
To: Chen-Yu Tsai, Matthias Brugger
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Il 09/06/23 09:29, Chen-Yu Tsai ha scritto:
> This adds clocks, dynamic power coefficients, and OPP tables for the CPU
> cores, so that everything required at the SoC level for CPU freqency and
> voltage scaling is available.
>
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 4/4] arm64: dts: mediatek: mt8186: Wire up GPU voltage/frequency scaling
2023-06-09 7:29 ` [PATCH v2 4/4] arm64: dts: mediatek: mt8186: Wire up GPU voltage/frequency scaling Chen-Yu Tsai
@ 2023-06-09 7:54 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 9+ messages in thread
From: AngeloGioacchino Del Regno @ 2023-06-09 7:54 UTC (permalink / raw)
To: Chen-Yu Tsai, Matthias Brugger
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Il 09/06/23 09:29, Chen-Yu Tsai ha scritto:
> Add the GPU's OPP table. This is from the downstream ChromeOS kernel,
> adapted to the new upstream opp-supported-hw binning format. Also add
> dynamic-power-coefficient for the GPU.
>
> Also add label for mfg1 power domain. This is to be used at the board
> level to add a regulator supply for the power domain.
>
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 0/4] arm64: dts: mediatek: mt8186: More DVFS nodes
2023-06-09 7:29 [PATCH v2 0/4] arm64: dts: mediatek: mt8186: More DVFS nodes Chen-Yu Tsai
` (3 preceding siblings ...)
2023-06-09 7:29 ` [PATCH v2 4/4] arm64: dts: mediatek: mt8186: Wire up GPU voltage/frequency scaling Chen-Yu Tsai
@ 2023-06-09 15:55 ` Matthias Brugger
4 siblings, 0 replies; 9+ messages in thread
From: Matthias Brugger @ 2023-06-09 15:55 UTC (permalink / raw)
To: Chen-Yu Tsai, AngeloGioacchino Del Regno
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-mediatek,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
On 09/06/2023 09:29, Chen-Yu Tsai wrote:
> Hi,
>
> This adds more of the DVFS stuff at the SoC .dtsi level. This includes
> the CCI and GPU.
>
> Changes since v1:
> - Dropped opp-level property from CPU and CCI OPP tables
> - Used "opp-supported-hw = <0xff>" for GPU base OPPs to denote "all
> variations"
>
> Please have a look and merge for this cycle if possible.
>
> On another note, I'm still cleaning up the MT6366 regulator's binding.
> We shouldn't upstream the boards until the PMIC is ready.
>
> ChenYu
>
> Chen-Yu Tsai (4):
> arm64: dts: mediatek: mt8186: Add CCI node and CCI OPP table
> arm64: dts: mediatek: mt8186: Wire up CPU frequency/voltage scaling
> arm64: dts: mediatek: mt8186: Add GPU speed bin NVMEM cells
> arm64: dts: mediatek: mt8186: Wire up GPU voltage/frequency scaling
>
> arch/arm64/boot/dts/mediatek/mt8186.dtsi | 490 ++++++++++++++++++++++-
> 1 file changed, 489 insertions(+), 1 deletion(-)
>
Series applied,
thanks!
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2023-06-09 15:55 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-09 7:29 [PATCH v2 0/4] arm64: dts: mediatek: mt8186: More DVFS nodes Chen-Yu Tsai
2023-06-09 7:29 ` [PATCH v2 1/4] arm64: dts: mediatek: mt8186: Add CCI node and CCI OPP table Chen-Yu Tsai
2023-06-09 7:54 ` AngeloGioacchino Del Regno
2023-06-09 7:29 ` [PATCH v2 2/4] arm64: dts: mediatek: mt8186: Wire up CPU frequency/voltage scaling Chen-Yu Tsai
2023-06-09 7:54 ` AngeloGioacchino Del Regno
2023-06-09 7:29 ` [PATCH v2 3/4] arm64: dts: mediatek: mt8186: Add GPU speed bin NVMEM cells Chen-Yu Tsai
2023-06-09 7:29 ` [PATCH v2 4/4] arm64: dts: mediatek: mt8186: Wire up GPU voltage/frequency scaling Chen-Yu Tsai
2023-06-09 7:54 ` AngeloGioacchino Del Regno
2023-06-09 15:55 ` [PATCH v2 0/4] arm64: dts: mediatek: mt8186: More DVFS nodes Matthias Brugger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).