* [PATCH v2 1/7] clk: qcom: gpucc-sm6350: Introduce index-based clk lookup
2023-06-14 11:35 [PATCH v2 0/7] SM6350 GPU Konrad Dybcio
@ 2023-06-14 11:35 ` Konrad Dybcio
2023-06-14 11:35 ` [PATCH v2 2/7] clk: qcom: gpucc-sm6350: Fix clock source names Konrad Dybcio
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Konrad Dybcio @ 2023-06-14 11:35 UTC (permalink / raw)
To: Bjorn Andersson, Andy Gross, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, AngeloGioacchino Del Regno,
Conor Dooley
Cc: Marijn Suijten, Rob Herring, linux-arm-msm, linux-clk, devicetree,
linux-kernel, Konrad Dybcio, Konrad Dybcio
Add the nowadays-prefered and marginally faster way of looking up parent
clocks in the device tree. It also allows for clock-names-independent
operation, so long as the order (which is enforced by schema) is kept.
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/clk/qcom/gpucc-sm6350.c | 18 +++++++++++++-----
1 file changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/clk/qcom/gpucc-sm6350.c b/drivers/clk/qcom/gpucc-sm6350.c
index ef15185a99c3..a9887d1f0ed7 100644
--- a/drivers/clk/qcom/gpucc-sm6350.c
+++ b/drivers/clk/qcom/gpucc-sm6350.c
@@ -24,6 +24,12 @@
#define CX_GMU_CBCR_WAKE_MASK 0xF
#define CX_GMU_CBCR_WAKE_SHIFT 8
+enum {
+ DT_BI_TCXO,
+ DT_GPLL0_OUT_MAIN,
+ DT_GPLL0_OUT_MAIN_DIV,
+};
+
enum {
P_BI_TCXO,
P_GPLL0_OUT_MAIN,
@@ -61,6 +67,7 @@ static struct clk_alpha_pll gpu_cc_pll0 = {
.hw.init = &(struct clk_init_data){
.name = "gpu_cc_pll0",
.parent_data = &(const struct clk_parent_data){
+ .index = DT_BI_TCXO,
.fw_name = "bi_tcxo",
},
.num_parents = 1,
@@ -104,6 +111,7 @@ static struct clk_alpha_pll gpu_cc_pll1 = {
.hw.init = &(struct clk_init_data){
.name = "gpu_cc_pll1",
.parent_data = &(const struct clk_parent_data){
+ .index = DT_BI_TCXO,
.fw_name = "bi_tcxo",
},
.num_parents = 1,
@@ -121,11 +129,11 @@ static const struct parent_map gpu_cc_parent_map_0[] = {
};
static const struct clk_parent_data gpu_cc_parent_data_0[] = {
- { .fw_name = "bi_tcxo" },
+ { .index = DT_BI_TCXO, .fw_name = "bi_tcxo" },
{ .hw = &gpu_cc_pll0.clkr.hw },
{ .hw = &gpu_cc_pll1.clkr.hw },
- { .fw_name = "gcc_gpu_gpll0_clk" },
- { .fw_name = "gcc_gpu_gpll0_div_clk" },
+ { .index = DT_GPLL0_OUT_MAIN, .fw_name = "gcc_gpu_gpll0_clk" },
+ { .index = DT_GPLL0_OUT_MAIN_DIV, .fw_name = "gcc_gpu_gpll0_div_clk" },
};
static const struct parent_map gpu_cc_parent_map_1[] = {
@@ -138,12 +146,12 @@ static const struct parent_map gpu_cc_parent_map_1[] = {
};
static const struct clk_parent_data gpu_cc_parent_data_1[] = {
- { .fw_name = "bi_tcxo" },
+ { .index = DT_BI_TCXO, .fw_name = "bi_tcxo" },
{ .hw = &crc_div.hw },
{ .hw = &gpu_cc_pll0.clkr.hw },
{ .hw = &gpu_cc_pll1.clkr.hw },
{ .hw = &gpu_cc_pll1.clkr.hw },
- { .fw_name = "gcc_gpu_gpll0_clk" },
+ { .index = DT_GPLL0_OUT_MAIN, .fw_name = "gcc_gpu_gpll0_clk" },
};
static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = {
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 2/7] clk: qcom: gpucc-sm6350: Fix clock source names
2023-06-14 11:35 [PATCH v2 0/7] SM6350 GPU Konrad Dybcio
2023-06-14 11:35 ` [PATCH v2 1/7] clk: qcom: gpucc-sm6350: Introduce index-based clk lookup Konrad Dybcio
@ 2023-06-14 11:35 ` Konrad Dybcio
2023-06-14 11:35 ` [PATCH v2 3/7] arm64: dts: qcom: sm6350: Add GPUCC node Konrad Dybcio
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Konrad Dybcio @ 2023-06-14 11:35 UTC (permalink / raw)
To: Bjorn Andersson, Andy Gross, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, AngeloGioacchino Del Regno,
Conor Dooley
Cc: Marijn Suijten, Rob Herring, linux-arm-msm, linux-clk, devicetree,
linux-kernel, Konrad Dybcio, Konrad Dybcio
fw_name for GCC inputs didn't match the bindings. Fix it.
Fixes: 013804a727a0 ("clk: qcom: Add GPU clock controller driver for SM6350")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
drivers/clk/qcom/gpucc-sm6350.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/clk/qcom/gpucc-sm6350.c b/drivers/clk/qcom/gpucc-sm6350.c
index a9887d1f0ed7..0bcbba2a2943 100644
--- a/drivers/clk/qcom/gpucc-sm6350.c
+++ b/drivers/clk/qcom/gpucc-sm6350.c
@@ -132,8 +132,8 @@ static const struct clk_parent_data gpu_cc_parent_data_0[] = {
{ .index = DT_BI_TCXO, .fw_name = "bi_tcxo" },
{ .hw = &gpu_cc_pll0.clkr.hw },
{ .hw = &gpu_cc_pll1.clkr.hw },
- { .index = DT_GPLL0_OUT_MAIN, .fw_name = "gcc_gpu_gpll0_clk" },
- { .index = DT_GPLL0_OUT_MAIN_DIV, .fw_name = "gcc_gpu_gpll0_div_clk" },
+ { .index = DT_GPLL0_OUT_MAIN, .fw_name = "gcc_gpu_gpll0_clk_src" },
+ { .index = DT_GPLL0_OUT_MAIN_DIV, .fw_name = "gcc_gpu_gpll0_div_clk_src" },
};
static const struct parent_map gpu_cc_parent_map_1[] = {
@@ -151,7 +151,7 @@ static const struct clk_parent_data gpu_cc_parent_data_1[] = {
{ .hw = &gpu_cc_pll0.clkr.hw },
{ .hw = &gpu_cc_pll1.clkr.hw },
{ .hw = &gpu_cc_pll1.clkr.hw },
- { .index = DT_GPLL0_OUT_MAIN, .fw_name = "gcc_gpu_gpll0_clk" },
+ { .index = DT_GPLL0_OUT_MAIN, .fw_name = "gcc_gpu_gpll0_clk_src" },
};
static const struct freq_tbl ftbl_gpu_cc_gmu_clk_src[] = {
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 3/7] arm64: dts: qcom: sm6350: Add GPUCC node
2023-06-14 11:35 [PATCH v2 0/7] SM6350 GPU Konrad Dybcio
2023-06-14 11:35 ` [PATCH v2 1/7] clk: qcom: gpucc-sm6350: Introduce index-based clk lookup Konrad Dybcio
2023-06-14 11:35 ` [PATCH v2 2/7] clk: qcom: gpucc-sm6350: Fix clock source names Konrad Dybcio
@ 2023-06-14 11:35 ` Konrad Dybcio
2023-06-14 11:35 ` [PATCH v2 4/7] arm64: dts: qcom: sm6350: Add QFPROM node Konrad Dybcio
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Konrad Dybcio @ 2023-06-14 11:35 UTC (permalink / raw)
To: Bjorn Andersson, Andy Gross, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, AngeloGioacchino Del Regno,
Conor Dooley
Cc: Marijn Suijten, Rob Herring, linux-arm-msm, linux-clk, devicetree,
linux-kernel, Konrad Dybcio, Konrad Dybcio, Luca Weiss
From: Konrad Dybcio <konrad.dybcio@somainline.org>
Add and configure a node for the GPU clock controller.
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Reviewed-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
arch/arm64/boot/dts/qcom/sm6350.dtsi | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index 30e77010aed5..fd35810bcfb5 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -5,6 +5,7 @@
*/
#include <dt-bindings/clock/qcom,gcc-sm6350.h>
+#include <dt-bindings/clock/qcom,gpucc-sm6350.h>
#include <dt-bindings/clock/qcom,rpmh.h>
#include <dt-bindings/clock/qcom,sm6350-camcc.h>
#include <dt-bindings/dma/qcom-gpi.h>
@@ -1308,6 +1309,20 @@ compute-cb@5 {
};
};
+ gpucc: clock-controller@3d90000 {
+ compatible = "qcom,sm6350-gpucc";
+ reg = <0 0x03d90000 0 0x9000>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_GPU_GPLL0_CLK>,
+ <&gcc GCC_GPU_GPLL0_DIV_CLK>;
+ clock-names = "bi_tcxo",
+ "gcc_gpu_gpll0_clk_src",
+ "gcc_gpu_gpll0_div_clk_src";
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
mpss: remoteproc@4080000 {
compatible = "qcom,sm6350-mpss-pas";
reg = <0x0 0x04080000 0x0 0x4040>;
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 4/7] arm64: dts: qcom: sm6350: Add QFPROM node
2023-06-14 11:35 [PATCH v2 0/7] SM6350 GPU Konrad Dybcio
` (2 preceding siblings ...)
2023-06-14 11:35 ` [PATCH v2 3/7] arm64: dts: qcom: sm6350: Add GPUCC node Konrad Dybcio
@ 2023-06-14 11:35 ` Konrad Dybcio
2023-06-14 11:35 ` [PATCH v2 5/7] arm64: dts: qcom: sm6350: Add GPU nodes Konrad Dybcio
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Konrad Dybcio @ 2023-06-14 11:35 UTC (permalink / raw)
To: Bjorn Andersson, Andy Gross, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, AngeloGioacchino Del Regno,
Conor Dooley
Cc: Marijn Suijten, Rob Herring, linux-arm-msm, linux-clk, devicetree,
linux-kernel, Konrad Dybcio, Konrad Dybcio, Luca Weiss
From: Konrad Dybcio <konrad.dybcio@somainline.org>
Add a node for the QFPROM NVMEM hw and define the GPU fuse.
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Reviewed-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
arch/arm64/boot/dts/qcom/sm6350.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index fd35810bcfb5..c0f34bc1d78c 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -805,6 +805,18 @@ ipcc: mailbox@408000 {
#mbox-cells = <2>;
};
+ qfprom: qfprom@784000 {
+ compatible = "qcom,sm6350-qfprom", "qcom,qfprom";
+ reg = <0 0x00784000 0 0x3000>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ gpu_speed_bin: gpu-speed-bin@2015 {
+ reg = <0x2015 0x1>;
+ bits = <0 8>;
+ };
+ };
+
rng: rng@793000 {
compatible = "qcom,prng-ee";
reg = <0 0x00793000 0 0x1000>;
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 5/7] arm64: dts: qcom: sm6350: Add GPU nodes
2023-06-14 11:35 [PATCH v2 0/7] SM6350 GPU Konrad Dybcio
` (3 preceding siblings ...)
2023-06-14 11:35 ` [PATCH v2 4/7] arm64: dts: qcom: sm6350: Add QFPROM node Konrad Dybcio
@ 2023-06-14 11:35 ` Konrad Dybcio
2023-06-14 11:35 ` [PATCH v2 6/7] arm64: dts: qcom: sm6350: Fix ZAP region Konrad Dybcio
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: Konrad Dybcio @ 2023-06-14 11:35 UTC (permalink / raw)
To: Bjorn Andersson, Andy Gross, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, AngeloGioacchino Del Regno,
Conor Dooley
Cc: Marijn Suijten, Rob Herring, linux-arm-msm, linux-clk, devicetree,
linux-kernel, Konrad Dybcio, Konrad Dybcio, Luca Weiss
From: Konrad Dybcio <konrad.dybcio@somainline.org>
Add Adreno, GPU SMMU and GMU nodes to hook up everything that
the A619 needs to function properly.
Co-developed-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
arch/arm64/boot/dts/qcom/sm6350.dtsi | 139 +++++++++++++++++++++++++++++++++++
1 file changed, 139 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index c0f34bc1d78c..d928e64e33ae 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -1321,6 +1321,145 @@ compute-cb@5 {
};
};
+ gpu: gpu@3d00000 {
+ compatible = "qcom,adreno-619.0", "qcom,adreno";
+ reg = <0 0x03d00000 0 0x40000>,
+ <0 0x03d9e000 0 0x1000>;
+ reg-names = "kgsl_3d0_reg_memory",
+ "cx_mem";
+ interrupts = <GIC_SPI 300 IRQ_TYPE_LEVEL_HIGH>;
+
+ iommus = <&adreno_smmu 0>;
+ operating-points-v2 = <&gpu_opp_table>;
+ qcom,gmu = <&gmu>;
+ nvmem-cells = <&gpu_speed_bin>;
+ nvmem-cell-names = "speed_bin";
+
+ status = "disabled";
+
+ zap-shader {
+ memory-region = <&pil_gpu_mem>;
+ };
+
+ gpu_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-850000000 {
+ opp-hz = /bits/ 64 <850000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO_L1>;
+ opp-supported-hw = <0x02>;
+ };
+
+ opp-800000000 {
+ opp-hz = /bits/ 64 <800000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_TURBO>;
+ opp-supported-hw = <0x04>;
+ };
+
+ opp-650000000 {
+ opp-hz = /bits/ 64 <650000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM_L1>;
+ opp-supported-hw = <0x08>;
+ };
+
+ opp-565000000 {
+ opp-hz = /bits/ 64 <565000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_NOM>;
+ opp-supported-hw = <0x10>;
+ };
+
+ opp-430000000 {
+ opp-hz = /bits/ 64 <430000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS_L1>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-355000000 {
+ opp-hz = /bits/ 64 <355000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_SVS>;
+ opp-supported-hw = <0xff>;
+ };
+
+ opp-253000000 {
+ opp-hz = /bits/ 64 <253000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_LOW_SVS>;
+ opp-supported-hw = <0xff>;
+ };
+ };
+ };
+
+ adreno_smmu: iommu@3d40000 {
+ compatible = "qcom,sm6350-smmu-v2", "qcom,adreno-smmu", "qcom,smmu-v2";
+ reg = <0 0x03d40000 0 0x10000>;
+ #iommu-cells = <1>;
+ #global-interrupts = <2>;
+ interrupts = <GIC_SPI 229 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 231 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 364 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 365 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 366 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 367 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 368 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 369 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 370 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 371 IRQ_TYPE_LEVEL_HIGH>;
+
+ clocks = <&gpucc GPU_CC_AHB_CLK>,
+ <&gcc GCC_GPU_MEMNOC_GFX_CLK>,
+ <&gcc GCC_GPU_SNOC_DVM_GFX_CLK>;
+ clock-names = "ahb",
+ "bus",
+ "iface";
+
+ power-domains = <&gpucc GPU_CX_GDSC>;
+ };
+
+ gmu: gmu@3d6a000 {
+ compatible = "qcom,adreno-gmu-619.0", "qcom,adreno-gmu";
+ reg = <0 0x03d6a000 0 0x31000>,
+ <0 0x0b290000 0 0x10000>,
+ <0 0x0b490000 0 0x10000>;
+ reg-names = "gmu",
+ "gmu_pdc",
+ "gmu_pdc_seq";
+
+ interrupts = <GIC_SPI 304 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 305 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "hfi",
+ "gmu";
+
+ clocks = <&gpucc GPU_CC_AHB_CLK>,
+ <&gpucc GPU_CC_CX_GMU_CLK>,
+ <&gpucc GPU_CC_CXO_CLK>,
+ <&gcc GCC_DDRSS_GPU_AXI_CLK>,
+ <&gcc GCC_GPU_MEMNOC_GFX_CLK>;
+ clock-names = "ahb",
+ "gmu",
+ "cxo",
+ "axi",
+ "memnoc";
+
+ power-domains = <&gpucc GPU_CX_GDSC>,
+ <&gpucc GPU_GX_GDSC>;
+ power-domain-names = "cx",
+ "gx";
+
+ iommus = <&adreno_smmu 5>;
+
+ operating-points-v2 = <&gmu_opp_table>;
+
+ status = "disabled";
+
+ gmu_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ opp-level = <RPMH_REGULATOR_LEVEL_MIN_SVS>;
+ };
+ };
+ };
+
gpucc: clock-controller@3d90000 {
compatible = "qcom,sm6350-gpucc";
reg = <0 0x03d90000 0 0x9000>;
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 6/7] arm64: dts: qcom: sm6350: Fix ZAP region
2023-06-14 11:35 [PATCH v2 0/7] SM6350 GPU Konrad Dybcio
` (4 preceding siblings ...)
2023-06-14 11:35 ` [PATCH v2 5/7] arm64: dts: qcom: sm6350: Add GPU nodes Konrad Dybcio
@ 2023-06-14 11:35 ` Konrad Dybcio
2023-06-14 11:35 ` [PATCH v2 7/7] arm64: dts: qcom: sm6350: Add DPU1 nodes Konrad Dybcio
2023-07-10 5:07 ` (subset) [PATCH v2 0/7] SM6350 GPU Bjorn Andersson
7 siblings, 0 replies; 9+ messages in thread
From: Konrad Dybcio @ 2023-06-14 11:35 UTC (permalink / raw)
To: Bjorn Andersson, Andy Gross, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, AngeloGioacchino Del Regno,
Conor Dooley
Cc: Marijn Suijten, Rob Herring, linux-arm-msm, linux-clk, devicetree,
linux-kernel, Konrad Dybcio, Konrad Dybcio, Luca Weiss
From: Konrad Dybcio <konrad.dybcio@somainline.org>
The previous ZAP region definition was wrong. Fix it.
Note this is not a device-specific fixup, but a fixup to the generic
PIL load address.
Fixes: 5f82b9cda61e ("arm64: dts: qcom: Add SM6350 device tree")
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Reviewed-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
arch/arm64/boot/dts/qcom/sm6350.dtsi | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index d928e64e33ae..cc72c4b4e7c0 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -634,11 +634,6 @@ pil_ipa_gsi_mem: memory@8b710000 {
no-map;
};
- pil_gpu_mem: memory@8b715400 {
- reg = <0 0x8b715400 0 0x2000>;
- no-map;
- };
-
pil_modem_mem: memory@8b800000 {
reg = <0 0x8b800000 0 0xf800000>;
no-map;
@@ -659,6 +654,11 @@ removed_region: memory@c0000000 {
no-map;
};
+ pil_gpu_mem: memory@f0d00000 {
+ reg = <0 0xf0d00000 0 0x1000>;
+ no-map;
+ };
+
debug_region: memory@ffb00000 {
reg = <0 0xffb00000 0 0xc0000>;
no-map;
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v2 7/7] arm64: dts: qcom: sm6350: Add DPU1 nodes
2023-06-14 11:35 [PATCH v2 0/7] SM6350 GPU Konrad Dybcio
` (5 preceding siblings ...)
2023-06-14 11:35 ` [PATCH v2 6/7] arm64: dts: qcom: sm6350: Fix ZAP region Konrad Dybcio
@ 2023-06-14 11:35 ` Konrad Dybcio
2023-07-10 5:07 ` (subset) [PATCH v2 0/7] SM6350 GPU Bjorn Andersson
7 siblings, 0 replies; 9+ messages in thread
From: Konrad Dybcio @ 2023-06-14 11:35 UTC (permalink / raw)
To: Bjorn Andersson, Andy Gross, Michael Turquette, Stephen Boyd,
Rob Herring, Krzysztof Kozlowski, AngeloGioacchino Del Regno,
Conor Dooley
Cc: Marijn Suijten, Rob Herring, linux-arm-msm, linux-clk, devicetree,
linux-kernel, Konrad Dybcio, Konrad Dybcio
From: Konrad Dybcio <konrad.dybcio@somainline.org>
Add nodes required to enable MDSS/DPU1 on SM6350. There seem to be no
additional changes required to support the derivative SoCs, such as
SM7225.
Signed-off-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
---
arch/arm64/boot/dts/qcom/sm6350.dtsi | 218 +++++++++++++++++++++++++++++++++++
1 file changed, 218 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sm6350.dtsi b/arch/arm64/boot/dts/qcom/sm6350.dtsi
index cc72c4b4e7c0..7af6278d6b23 100644
--- a/arch/arm64/boot/dts/qcom/sm6350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm6350.dtsi
@@ -4,6 +4,7 @@
* Copyright (c) 2022, Luca Weiss <luca.weiss@fairphone.com>
*/
+#include <dt-bindings/clock/qcom,dispcc-sm6350.h>
#include <dt-bindings/clock/qcom,gcc-sm6350.h>
#include <dt-bindings/clock/qcom,gpucc-sm6350.h>
#include <dt-bindings/clock/qcom,rpmh.h>
@@ -1869,6 +1870,223 @@ camcc: clock-controller@ad00000 {
#power-domain-cells = <1>;
};
+ mdss: display-subsystem@ae00000 {
+ compatible = "qcom,sm6350-mdss";
+ reg = <0 0x0ae00000 0 0x1000>;
+ reg-names = "mdss";
+
+ interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+
+ clocks = <&gcc GCC_DISP_AHB_CLK>,
+ <&gcc GCC_DISP_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>;
+ clock-names = "iface",
+ "bus",
+ "core";
+
+ power-domains = <&dispcc MDSS_GDSC>;
+ iommus = <&apps_smmu 0x800 0x2>;
+
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ status = "disabled";
+
+ mdss_mdp: display-controller@ae01000 {
+ compatible = "qcom,sm6350-dpu";
+ reg = <0 0x0ae01000 0 0x8f000>,
+ <0 0x0aeb0000 0 0x2008>;
+ reg-names = "mdp", "vbif";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <0>;
+
+ clocks = <&gcc GCC_DISP_AXI_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&dispcc DISP_CC_MDSS_ROT_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_LUT_CLK>,
+ <&dispcc DISP_CC_MDSS_MDP_CLK>,
+ <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ clock-names = "bus",
+ "iface",
+ "rot",
+ "lut",
+ "core",
+ "vsync";
+
+ assigned-clocks = <&dispcc DISP_CC_MDSS_VSYNC_CLK>;
+ assigned-clock-rates = <19200000>;
+
+ operating-points-v2 = <&mdp_opp_table>;
+ power-domains = <&rpmhpd SM6350_CX>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ dpu_intf1_out: endpoint {
+ remote-endpoint = <&mdss_dsi0_in>;
+ };
+ };
+ };
+
+ mdp_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-19200000 {
+ opp-hz = /bits/ 64 <19200000>;
+ required-opps = <&rpmhpd_opp_min_svs>;
+ };
+
+ opp-200000000 {
+ opp-hz = /bits/ 64 <200000000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-373333333 {
+ opp-hz = /bits/ 64 <373333333>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+
+ opp-448000000 {
+ opp-hz = /bits/ 64 <448000000>;
+ required-opps = <&rpmhpd_opp_nom>;
+ };
+
+ opp-560000000 {
+ opp-hz = /bits/ 64 <560000000>;
+ required-opps = <&rpmhpd_opp_turbo>;
+ };
+ };
+ };
+
+ mdss_dsi0: dsi@ae94000 {
+ compatible = "qcom,sm6350-dsi-ctrl", "qcom,mdss-dsi-ctrl";
+ reg = <0 0x0ae94000 0 0x400>;
+ reg-names = "dsi_ctrl";
+
+ interrupt-parent = <&mdss>;
+ interrupts = <4>;
+
+ clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK>,
+ <&dispcc DISP_CC_MDSS_BYTE0_INTF_CLK>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK>,
+ <&dispcc DISP_CC_MDSS_ESC0_CLK>,
+ <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&gcc GCC_DISP_AXI_CLK>;
+ clock-names = "byte",
+ "byte_intf",
+ "pixel",
+ "core",
+ "iface",
+ "bus";
+
+ assigned-clocks = <&dispcc DISP_CC_MDSS_BYTE0_CLK_SRC>,
+ <&dispcc DISP_CC_MDSS_PCLK0_CLK_SRC>;
+ assigned-clock-parents = <&mdss_dsi0_phy 0>, <&mdss_dsi0_phy 1>;
+
+ operating-points-v2 = <&mdss_dsi_opp_table>;
+ power-domains = <&rpmhpd SM6350_MX>;
+
+ phys = <&mdss_dsi0_phy>;
+ phy-names = "dsi";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+
+ mdss_dsi0_in: endpoint {
+ remote-endpoint = <&dpu_intf1_out>;
+ };
+ };
+
+ port@1 {
+ reg = <1>;
+
+ mdss_dsi0_out: endpoint {
+ };
+ };
+ };
+
+ mdss_dsi_opp_table: opp-table {
+ compatible = "operating-points-v2";
+
+ opp-187500000 {
+ opp-hz = /bits/ 64 <187500000>;
+ required-opps = <&rpmhpd_opp_low_svs>;
+ };
+
+ opp-300000000 {
+ opp-hz = /bits/ 64 <300000000>;
+ required-opps = <&rpmhpd_opp_svs>;
+ };
+
+ opp-358000000 {
+ opp-hz = /bits/ 64 <358000000>;
+ required-opps = <&rpmhpd_opp_svs_l1>;
+ };
+ };
+ };
+
+ mdss_dsi0_phy: phy@ae94400 {
+ compatible = "qcom,dsi-phy-10nm";
+ reg = <0 0x0ae94400 0 0x200>,
+ <0 0x0ae94600 0 0x280>,
+ <0 0x0ae94a00 0 0x1e0>;
+ reg-names = "dsi_phy",
+ "dsi_phy_lane",
+ "dsi_pll";
+
+ #clock-cells = <1>;
+ #phy-cells = <0>;
+
+ clocks = <&dispcc DISP_CC_MDSS_AHB_CLK>,
+ <&rpmhcc RPMH_CXO_CLK>;
+ clock-names = "iface", "ref";
+
+ status = "disabled";
+ };
+ };
+
+ dispcc: clock-controller@af00000 {
+ compatible = "qcom,sm6350-dispcc";
+ reg = <0 0x0af00000 0 0x20000>;
+ clocks = <&rpmhcc RPMH_CXO_CLK>,
+ <&gcc GCC_DISP_GPLL0_CLK>,
+ <&mdss_dsi0_phy 0>,
+ <&mdss_dsi0_phy 1>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_LINK_CLK>,
+ <&usb_1_qmpphy QMP_USB43DP_DP_VCO_DIV_CLK>;
+ clock-names = "bi_tcxo",
+ "gcc_disp_gpll0_clk",
+ "dsi0_phy_pll_out_byteclk",
+ "dsi0_phy_pll_out_dsiclk",
+ "dp_phy_pll_link_clk",
+ "dp_phy_pll_vco_div_clk";
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ #power-domain-cells = <1>;
+ };
+
pdc: interrupt-controller@b220000 {
compatible = "qcom,sm6350-pdc", "qcom,pdc";
reg = <0 0x0b220000 0 0x30000>, <0 0x17c000f0 0 0x64>;
--
2.41.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: (subset) [PATCH v2 0/7] SM6350 GPU
2023-06-14 11:35 [PATCH v2 0/7] SM6350 GPU Konrad Dybcio
` (6 preceding siblings ...)
2023-06-14 11:35 ` [PATCH v2 7/7] arm64: dts: qcom: sm6350: Add DPU1 nodes Konrad Dybcio
@ 2023-07-10 5:07 ` Bjorn Andersson
7 siblings, 0 replies; 9+ messages in thread
From: Bjorn Andersson @ 2023-07-10 5:07 UTC (permalink / raw)
To: Andy Gross, Michael Turquette, Stephen Boyd, Rob Herring,
Krzysztof Kozlowski, AngeloGioacchino Del Regno, Conor Dooley,
Konrad Dybcio
Cc: Marijn Suijten, Rob Herring, linux-arm-msm, linux-clk, devicetree,
linux-kernel, Konrad Dybcio, Luca Weiss
On Wed, 14 Jun 2023 13:35:31 +0200, Konrad Dybcio wrote:
> Add all the required nodes for SM6350's A619 and fix up its GPUCC
> bindings.
>
> This has been ready for like 1.5y now, time to finally merge it as
> the display part will take some more time (due to the HW catalog rework).
>
> Depends on (bindings, admittedly I could have organized it better):
> https://lore.kernel.org/linux-arm-msm/20230314-topic-nvmem_compats-v1-0-508100c17603@linaro.org/#t
>
> [...]
Applied, thanks!
[3/7] arm64: dts: qcom: sm6350: Add GPUCC node
commit: 75a511b1e5ff6ffadb9b51d85beee8c7bcc29ba9
[4/7] arm64: dts: qcom: sm6350: Add QFPROM node
commit: 5b1e5d9a21ec2ad0654ce192371ed81b12088c6f
[5/7] arm64: dts: qcom: sm6350: Add GPU nodes
commit: bd9b767502806faccbac6f2c8db09d0ea6ca6e3e
[6/7] arm64: dts: qcom: sm6350: Fix ZAP region
commit: 44bcded2be4fe9b9d0b6e48075c9947b75c0af63
[7/7] arm64: dts: qcom: sm6350: Add DPU1 nodes
commit: 26c71d31f8be3493006140961acf6be204004fdb
Best regards,
--
Bjorn Andersson <andersson@kernel.org>
^ permalink raw reply [flat|nested] 9+ messages in thread