:p
atchew
Login
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. Patch3 depends on below patch series: https://lore.kernel.org/all/20240925-qcs8300_initial_dtsi-v2-0-494c40fa2a42@quicinc.com/ Signed-off-by: Jingyi Wang <quic_jingyw@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 - 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 | 72 ++++++++++++++++++++++ 3 files changed, 89 insertions(+) --- base-commit: 33ce24234fca4c083e6685a18b460a18ebb5d5c1 change-id: 20241010-qcs8300_llcc-234bc652179c prerequisite-change-id: 20240925-qcs8300_initial_dtsi-ea614fe45341:v2 prerequisite-patch-id: 73c78f31fa1d504124d4a82b578a6a14126cccd8 prerequisite-patch-id: 5a01283c8654ae7c696d9c69cb21505b71c5ca27 prerequisite-patch-id: dc633d5aaac790776a8a213ea2faa4890a3f665d prerequisite-patch-id: 9ecf4cb8b5842ac64e51d6baa0e6c1fbe449ee66 Best regards, -- Jingyi Wang <quic_jingyw@quicinc.com>
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 XXXXXXX..XXXXXXX 100644 --- a/Documentation/devicetree/bindings/cache/qcom,llcc.yaml +++ b/Documentation/devicetree/bindings/cache/qcom,llcc.yaml @@ -XXX,XX +XXX,XX @@ description: | properties: compatible: enum: + - qcom,qcs8300-llcc - qcom,qdu1000-llcc - qcom,sa8775p-llcc - qcom,sc7180-llcc @@ -XXX,XX +XXX,XX @@ allOf: compatible: contains: enum: + - qcom,qcs8300-llcc - qcom,sdm845-llcc - qcom,sm8150-llcc - qcom,sm8250-llcc -- 2.25.1
Add LLCC configuration for the QCS8300 platform. There is an errata on LB_CNT information on QCS8300 platform, override the value to get the right number of banks. Signed-off-by: Jingyi Wang <quic_jingyw@quicinc.com> --- drivers/soc/qcom/llcc-qcom.c | 72 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c index XXXXXXX..XXXXXXX 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -XXX,XX +XXX,XX @@ 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, @@ -XXX,XX +XXX,XX @@ 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, + }, +}; + static const struct qcom_llcc_config qdu1000_cfg[] = { { .sct_data = qdu1000_data_8ch, @@ -XXX,XX +XXX,XX @@ 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), @@ -XXX,XX +XXX,XX @@ static int qcom_llcc_probe(struct platform_device *pdev) num_banks >>= LLCC_LB_CNT_SHIFT; drv_data->num_banks = num_banks; + /* LB_CNT information is wrong on QCS8300, override the value */ + if (of_device_is_compatible(dev->of_node, "qcom,qcs8300-llcc")) { + num_banks = 4; + drv_data->num_banks = 4; + } + drv_data->regmaps = devm_kcalloc(dev, num_banks, sizeof(*drv_data->regmaps), GFP_KERNEL); if (!drv_data->regmaps) { ret = -ENOMEM; @@ -XXX,XX +XXX,XX @@ 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,sc7180-llcc", .data = &sc7180_cfgs }, -- 2.25.1
Add Last Level Cache Controller node on the QCS8300 platform. 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 XXXXXXX..XXXXXXX 100644 --- a/arch/arm64/boot/dts/qcom/qcs8300.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs8300.dtsi @@ -XXX,XX +XXX,XX @@ 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
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>
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 XXXXXXX..XXXXXXX 100644 --- a/Documentation/devicetree/bindings/cache/qcom,llcc.yaml +++ b/Documentation/devicetree/bindings/cache/qcom,llcc.yaml @@ -XXX,XX +XXX,XX @@ description: | properties: compatible: enum: + - qcom,qcs8300-llcc - qcom,qdu1000-llcc - qcom,sa8775p-llcc - qcom,sar1130p-llcc @@ -XXX,XX +XXX,XX @@ allOf: compatible: contains: enum: + - qcom,qcs8300-llcc - qcom,sdm845-llcc - qcom,sm8150-llcc - qcom,sm8250-llcc -- 2.25.1
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 XXXXXXX..XXXXXXX 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -XXX,XX +XXX,XX @@ 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, @@ -XXX,XX +XXX,XX @@ 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, @@ -XXX,XX +XXX,XX @@ 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), @@ -XXX,XX +XXX,XX @@ 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
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 XXXXXXX..XXXXXXX 100644 --- a/arch/arm64/boot/dts/qcom/qcs8300.dtsi +++ b/arch/arm64/boot/dts/qcom/qcs8300.dtsi @@ -XXX,XX +XXX,XX @@ 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