Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH v3 0/3] soc: qcom: llcc: Add LLCC support for the QCS8300 platform
@ 2024-10-31  7:14 Jingyi Wang
  2024-10-31  7:14 ` [PATCH v3 1/3] dt-bindings: cache: qcom,llcc: Document the QCS8300 LLCC Jingyi Wang
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Jingyi Wang @ 2024-10-31  7:14 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: quic_tengfan, linux-arm-msm, devicetree, linux-kernel,
	quic_tingweiz, quic_aiquny, Jingyi Wang,
	20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42,
	20241026-sar2130p-llcc-v3-0-2a58fa1b4d12, Krzysztof Kozlowski,
	Konrad Dybcio

The QCS8300 platform has LLCC(Last Level Cache Controller) as the system
cache controller. Add binding, configuration and device tree node to
support this. There is an errata to get the number of the banks of the
LLCC on QCS8300 platform, hardcode it as a workaround.

This series depends on below patch series:
https://lore.kernel.org/all/20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42@quicinc.com/ - Reviewed
https://lore.kernel.org/all/20241026-sar2130p-llcc-v3-0-2a58fa1b4d12@linaro.org/ - Reviewed

Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com>
---
Changes in v3:
- patch rebased for using "num_banks" property defined in the config for hardcoding
- Add reviewed-by tag for dt change
- Link to v2: https://lore.kernel.org/r/20241010-qcs8300_llcc-v2-0-d4123a241db2@quicinc.com

Changes in v2:
- Hardcoding instead of adding property in dt node and remove related patches
- Add LLCC deivcetree node
- Add reviewed-by tag for binding change
- Patch rebased for LLCC configuration format change
- Link to v1: https://lore.kernel.org/r/20240903-qcs8300_llcc_driver-v1-0-228659bdf067@quicinc.com

---
Jingyi Wang (3):
      dt-bindings: cache: qcom,llcc: Document the QCS8300 LLCC
      soc: qcom: llcc: Add LLCC configuration for the QCS8300 platform
      arm64: dts: qcom: qcs8300: Add LLCC support for QCS8300

 .../devicetree/bindings/cache/qcom,llcc.yaml       |  2 +
 arch/arm64/boot/dts/qcom/qcs8300.dtsi              | 15 +++++
 drivers/soc/qcom/llcc-qcom.c                       | 67 ++++++++++++++++++++++
 3 files changed, 84 insertions(+)
---
base-commit: dec9255a128e19c5fcc3bdb18175d78094cc624d
change-id: 20241031-qcs8300_llcc-32ab1ce4eeac
prerequisite-message-id: <20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42@quicinc.com>
prerequisite-patch-id: dc633d5aaac790776a8a213ea2faa4890a3f665d
prerequisite-patch-id: 9ecf4cb8b5842ac64e51d6baa0e6c1fbe449ee66
prerequisite-patch-id: 5a01283c8654ae7c696d9c69cb21505b71c5ca27
prerequisite-patch-id: 73c78f31fa1d504124d4a82b578a6a14126cccd8
prerequisite-message-id: <20241026-sar2130p-llcc-v3-0-2a58fa1b4d12@linaro.org>
prerequisite-patch-id: cdb161d351ba3ff4f9e53efaa67eb32b603af435
prerequisite-patch-id: dc04e235391820e4ab04c72ac64fd852e73fade5
prerequisite-patch-id: 6ca6eacd9ceca6d060d23ef95594fb892e51a506

Best regards,
-- 
Jingyi Wang <quic_jingyw@quicinc.com>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v3 1/3] dt-bindings: cache: qcom,llcc: Document the QCS8300 LLCC
  2024-10-31  7:14 [PATCH v3 0/3] soc: qcom: llcc: Add LLCC support for the QCS8300 platform Jingyi Wang
@ 2024-10-31  7:14 ` Jingyi Wang
  2024-10-31  7:14 ` [PATCH v3 2/3] soc: qcom: llcc: Add LLCC configuration for the QCS8300 platform Jingyi Wang
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: Jingyi Wang @ 2024-10-31  7:14 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: quic_tengfan, linux-arm-msm, devicetree, linux-kernel,
	quic_tingweiz, quic_aiquny, Jingyi Wang,
	20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42,
	20241026-sar2130p-llcc-v3-0-2a58fa1b4d12, Krzysztof Kozlowski

Document the Last Level Cache Controller on QCS8300 platform.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com>
---
 Documentation/devicetree/bindings/cache/qcom,llcc.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/cache/qcom,llcc.yaml b/Documentation/devicetree/bindings/cache/qcom,llcc.yaml
index 2edacf28944c..869bce968fc3 100644
--- a/Documentation/devicetree/bindings/cache/qcom,llcc.yaml
+++ b/Documentation/devicetree/bindings/cache/qcom,llcc.yaml
@@ -20,6 +20,7 @@ description: |
 properties:
   compatible:
     enum:
+      - qcom,qcs8300-llcc
       - qcom,qdu1000-llcc
       - qcom,sa8775p-llcc
       - qcom,sar1130p-llcc
@@ -193,6 +194,7 @@ allOf:
         compatible:
           contains:
             enum:
+              - qcom,qcs8300-llcc
               - qcom,sdm845-llcc
               - qcom,sm8150-llcc
               - qcom,sm8250-llcc

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 2/3] soc: qcom: llcc: Add LLCC configuration for the QCS8300 platform
  2024-10-31  7:14 [PATCH v3 0/3] soc: qcom: llcc: Add LLCC support for the QCS8300 platform Jingyi Wang
  2024-10-31  7:14 ` [PATCH v3 1/3] dt-bindings: cache: qcom,llcc: Document the QCS8300 LLCC Jingyi Wang
@ 2024-10-31  7:14 ` Jingyi Wang
  2024-10-31 20:16   ` Konrad Dybcio
  2024-10-31  7:14 ` [PATCH v3 3/3] arm64: dts: qcom: qcs8300: Add LLCC support for QCS8300 Jingyi Wang
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 7+ messages in thread
From: Jingyi Wang @ 2024-10-31  7:14 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: quic_tengfan, linux-arm-msm, devicetree, linux-kernel,
	quic_tingweiz, quic_aiquny, Jingyi Wang,
	20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42,
	20241026-sar2130p-llcc-v3-0-2a58fa1b4d12

Add LLCC configuration for the QCS8300 platform. There is an errata on
LB_CNT information on QCS8300 platform, hardcode num_banks to get the
correct value.

Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com>
---
 drivers/soc/qcom/llcc-qcom.c | 67 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 67 insertions(+)

diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c
index 783545b22aaa..61b91939aae4 100644
--- a/drivers/soc/qcom/llcc-qcom.c
+++ b/drivers/soc/qcom/llcc-qcom.c
@@ -2629,6 +2629,56 @@ static const struct llcc_slice_config sm8650_data[] = {
 	},
 };
 
+static const struct llcc_slice_config qcs8300_data[] = {
+	{
+		.usecase_id = LLCC_GPUHTW,
+		.slice_id = 11,
+		.max_cap = 128,
+		.priority = 1,
+		.fixed_size = true,
+		.bonus_ways = 0xf,
+		.cache_mode = 0,
+		.retain_on_pc = true,
+	}, {
+		.usecase_id = LLCC_GPU,
+		.slice_id = 12,
+		.max_cap = 512,
+		.priority = 1,
+		.fixed_size = true,
+		.bonus_ways = 0xf,
+		.cache_mode = 0,
+		.retain_on_pc = true,
+		.write_scid_en = true,
+	}, {
+		.usecase_id = LLCC_MMUHWT,
+		.slice_id = 13,
+		.max_cap = 128,
+		.priority = 1,
+		.fixed_size = true,
+		.bonus_ways = 0xf,
+		.cache_mode = 0,
+		.activate_on_init = true,
+	}, {
+		.usecase_id = LLCC_ECC,
+		.slice_id = 26,
+		.max_cap = 256,
+		.priority = 3,
+		.fixed_size = true,
+		.bonus_ways = 0xf,
+		.cache_mode = 0,
+		.activate_on_init = true,
+	}, {
+		.usecase_id = LLCC_WRCACHE,
+		.slice_id = 31,
+		.max_cap = 128,
+		.priority = 1,
+		.fixed_size = true,
+		.bonus_ways = 0xf,
+		.cache_mode = 0,
+		.activate_on_init = true,
+	},
+};
+
 static const struct llcc_slice_config qdu1000_data_2ch[] = {
 	{
 		.usecase_id = LLCC_MDMHPGRW,
@@ -3050,6 +3100,17 @@ static const u32 llcc_v2_1_reg_offset[] = {
 	[LLCC_COMMON_STATUS0]	= 0x0003400c,
 };
 
+static const struct qcom_llcc_config qcs8300_cfg[] = {
+	{
+		.sct_data	= qcs8300_data,
+		.size		= ARRAY_SIZE(qcs8300_data),
+		.need_llcc_cfg	= true,
+		.reg_offset	= llcc_v2_1_reg_offset,
+		.edac_reg_offset = &llcc_v2_1_edac_reg_offset,
+		.num_banks	= 4,
+	},
+};
+
 static const struct qcom_llcc_config qdu1000_cfg[] = {
 	{
 		.sct_data       = qdu1000_data_8ch,
@@ -3257,6 +3318,11 @@ static const struct qcom_llcc_config x1e80100_cfg[] = {
 	},
 };
 
+static const struct qcom_sct_config qcs8300_cfgs = {
+	.llcc_config	= qcs8300_cfg,
+	.num_config	= ARRAY_SIZE(qcs8300_cfg),
+};
+
 static const struct qcom_sct_config qdu1000_cfgs = {
 	.llcc_config	= qdu1000_cfg,
 	.num_config	= ARRAY_SIZE(qdu1000_cfg),
@@ -3930,6 +3996,7 @@ static int qcom_llcc_probe(struct platform_device *pdev)
 }
 
 static const struct of_device_id qcom_llcc_of_match[] = {
+	{ .compatible = "qcom,qcs8300-llcc", .data = &qcs8300_cfgs},
 	{ .compatible = "qcom,qdu1000-llcc", .data = &qdu1000_cfgs},
 	{ .compatible = "qcom,sa8775p-llcc", .data = &sa8775p_cfgs },
 	{ .compatible = "qcom,sar1130p-llcc", .data = &sar1130p_cfgs },

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH v3 3/3] arm64: dts: qcom: qcs8300: Add LLCC support for QCS8300
  2024-10-31  7:14 [PATCH v3 0/3] soc: qcom: llcc: Add LLCC support for the QCS8300 platform Jingyi Wang
  2024-10-31  7:14 ` [PATCH v3 1/3] dt-bindings: cache: qcom,llcc: Document the QCS8300 LLCC Jingyi Wang
  2024-10-31  7:14 ` [PATCH v3 2/3] soc: qcom: llcc: Add LLCC configuration for the QCS8300 platform Jingyi Wang
@ 2024-10-31  7:14 ` Jingyi Wang
  2024-11-04  4:13 ` (subset) [PATCH v3 0/3] soc: qcom: llcc: Add LLCC support for the QCS8300 platform Bjorn Andersson
  2024-12-27  4:15 ` Bjorn Andersson
  4 siblings, 0 replies; 7+ messages in thread
From: Jingyi Wang @ 2024-10-31  7:14 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Conor Dooley, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: quic_tengfan, linux-arm-msm, devicetree, linux-kernel,
	quic_tingweiz, quic_aiquny, Jingyi Wang,
	20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42,
	20241026-sar2130p-llcc-v3-0-2a58fa1b4d12, Konrad Dybcio

Add Last Level Cache Controller node on the QCS8300 platform.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com>
---
 arch/arm64/boot/dts/qcom/qcs8300.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/qcs8300.dtsi b/arch/arm64/boot/dts/qcom/qcs8300.dtsi
index 2c35f96c3f28..811c926c94f4 100644
--- a/arch/arm64/boot/dts/qcom/qcs8300.dtsi
+++ b/arch/arm64/boot/dts/qcom/qcs8300.dtsi
@@ -882,6 +882,21 @@ gem_noc: interconnect@9100000 {
 			qcom,bcm-voters = <&apps_bcm_voter>;
 		};
 
+		llcc: system-cache-controller@9200000 {
+			compatible = "qcom,qcs8300-llcc";
+			reg = <0x0 0x09200000 0x0 0x80000>,
+			      <0x0 0x09300000 0x0 0x80000>,
+			      <0x0 0x09400000 0x0 0x80000>,
+			      <0x0 0x09500000 0x0 0x80000>,
+			      <0x0 0x09a00000 0x0 0x80000>;
+			reg-names = "llcc0_base",
+				    "llcc1_base",
+				    "llcc2_base",
+				    "llcc3_base",
+				    "llcc_broadcast_base";
+			interrupts = <GIC_SPI 582 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
 		pdc: interrupt-controller@b220000 {
 			compatible = "qcom,qcs8300-pdc", "qcom,pdc";
 			reg = <0x0 0xb220000 0x0 0x30000>,

-- 
2.25.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH v3 2/3] soc: qcom: llcc: Add LLCC configuration for the QCS8300 platform
  2024-10-31  7:14 ` [PATCH v3 2/3] soc: qcom: llcc: Add LLCC configuration for the QCS8300 platform Jingyi Wang
@ 2024-10-31 20:16   ` Konrad Dybcio
  0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2024-10-31 20:16 UTC (permalink / raw)
  To: Jingyi Wang, Bjorn Andersson, Konrad Dybcio, Conor Dooley,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: quic_tengfan, linux-arm-msm, devicetree, linux-kernel,
	quic_tingweiz, quic_aiquny,
	20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42,
	20241026-sar2130p-llcc-v3-0-2a58fa1b4d12

On 31.10.2024 8:14 AM, Jingyi Wang wrote:
> Add LLCC configuration for the QCS8300 platform. There is an errata on
> LB_CNT information on QCS8300 platform, hardcode num_banks to get the
> correct value.
> 
> Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com>
> ---

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Konrad

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: (subset) [PATCH v3 0/3] soc: qcom: llcc: Add LLCC support for the QCS8300 platform
  2024-10-31  7:14 [PATCH v3 0/3] soc: qcom: llcc: Add LLCC support for the QCS8300 platform Jingyi Wang
                   ` (2 preceding siblings ...)
  2024-10-31  7:14 ` [PATCH v3 3/3] arm64: dts: qcom: qcs8300: Add LLCC support for QCS8300 Jingyi Wang
@ 2024-11-04  4:13 ` Bjorn Andersson
  2024-12-27  4:15 ` Bjorn Andersson
  4 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2024-11-04  4:13 UTC (permalink / raw)
  To: Konrad Dybcio, Conor Dooley, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Jingyi Wang
  Cc: quic_tengfan, linux-arm-msm, devicetree, linux-kernel,
	quic_tingweiz, quic_aiquny,
	20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42,
	20241026-sar2130p-llcc-v3-0-2a58fa1b4d12, Krzysztof Kozlowski,
	Konrad Dybcio


On Thu, 31 Oct 2024 15:14:35 +0800, Jingyi Wang wrote:
> The QCS8300 platform has LLCC(Last Level Cache Controller) as the system
> cache controller. Add binding, configuration and device tree node to
> support this. There is an errata to get the number of the banks of the
> LLCC on QCS8300 platform, hardcode it as a workaround.
> 
> This series depends on below patch series:
> https://lore.kernel.org/all/20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42@quicinc.com/ - Reviewed
> https://lore.kernel.org/all/20241026-sar2130p-llcc-v3-0-2a58fa1b4d12@linaro.org/ - Reviewed
> 
> [...]

Applied, thanks!

[1/3] dt-bindings: cache: qcom,llcc: Document the QCS8300 LLCC
      commit: a83e18ca83583ce191848ee73975894d43093cde
[2/3] soc: qcom: llcc: Add LLCC configuration for the QCS8300 platform
      commit: 584e936feedfcf678510a749f407115bdc811fbd

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: (subset) [PATCH v3 0/3] soc: qcom: llcc: Add LLCC support for the QCS8300 platform
  2024-10-31  7:14 [PATCH v3 0/3] soc: qcom: llcc: Add LLCC support for the QCS8300 platform Jingyi Wang
                   ` (3 preceding siblings ...)
  2024-11-04  4:13 ` (subset) [PATCH v3 0/3] soc: qcom: llcc: Add LLCC support for the QCS8300 platform Bjorn Andersson
@ 2024-12-27  4:15 ` Bjorn Andersson
  4 siblings, 0 replies; 7+ messages in thread
From: Bjorn Andersson @ 2024-12-27  4:15 UTC (permalink / raw)
  To: Konrad Dybcio, Conor Dooley, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Jingyi Wang
  Cc: quic_tengfan, linux-arm-msm, devicetree, linux-kernel,
	quic_tingweiz, quic_aiquny,
	20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42,
	20241026-sar2130p-llcc-v3-0-2a58fa1b4d12, Krzysztof Kozlowski,
	Konrad Dybcio


On Thu, 31 Oct 2024 15:14:35 +0800, Jingyi Wang wrote:
> The QCS8300 platform has LLCC(Last Level Cache Controller) as the system
> cache controller. Add binding, configuration and device tree node to
> support this. There is an errata to get the number of the banks of the
> LLCC on QCS8300 platform, hardcode it as a workaround.
> 
> This series depends on below patch series:
> https://lore.kernel.org/all/20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42@quicinc.com/ - Reviewed
> https://lore.kernel.org/all/20241026-sar2130p-llcc-v3-0-2a58fa1b4d12@linaro.org/ - Reviewed
> 
> [...]

Applied, thanks!

[3/3] arm64: dts: qcom: qcs8300: Add LLCC support for QCS8300
      commit: f17a2293d0ed99ed4f5c6886ee6dd847da99a728

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-12-27  4:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-31  7:14 [PATCH v3 0/3] soc: qcom: llcc: Add LLCC support for the QCS8300 platform Jingyi Wang
2024-10-31  7:14 ` [PATCH v3 1/3] dt-bindings: cache: qcom,llcc: Document the QCS8300 LLCC Jingyi Wang
2024-10-31  7:14 ` [PATCH v3 2/3] soc: qcom: llcc: Add LLCC configuration for the QCS8300 platform Jingyi Wang
2024-10-31 20:16   ` Konrad Dybcio
2024-10-31  7:14 ` [PATCH v3 3/3] arm64: dts: qcom: qcs8300: Add LLCC support for QCS8300 Jingyi Wang
2024-11-04  4:13 ` (subset) [PATCH v3 0/3] soc: qcom: llcc: Add LLCC support for the QCS8300 platform Bjorn Andersson
2024-12-27  4:15 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox