* [PATCH v4 0/3] qcom: ipq5424: Add LLCC/system-cache-controller
@ 2024-11-21 5:19 Varadarajan Narayanan
2024-11-21 5:19 ` [PATCH v4 1/3] dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible Varadarajan Narayanan
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Varadarajan Narayanan @ 2024-11-21 5:19 UTC (permalink / raw)
To: andersson, konradybcio, conor, robh, krzk+dt, linux-arm-msm,
devicetree, linux-kernel
Cc: Varadarajan Narayanan
Unlike other Qcom SoCs, IPQ5424 doesn't have multiple instances
of LLCC IP and hence doesn't have a LLCC_BROADCAST register
space, and the LLCC & LLCC_BROADCAST point to the same register
space.
Alter the driver accordingly and add the relevant entries for
enabling LLCC/system-cache-controller on the Qcom IPQ5424 SoC.
Depends On:
https://lore.kernel.org/linux-arm-msm/20241028060506.246606-1-quic_srichara@quicinc.com/
---
v4: Fix ipq5424 placement per the sorted order
v3: Rebase to ToT
Remove 'need_llcc_config = true'
v2: Add reviewed-by for dt-bindings and dts patches
Add 'no_broadcast_register' to identify SoC without LLCC_BROADCAST register space
v1: https://lore.kernel.org/linux-arm-msm/20241104073840.3686674-1-quic_varada@quicinc.com/
Varadarajan Narayanan (3):
dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible
soc: qcom: llcc: Update configuration data for IPQ5424
arm64: dts: qcom: ipq5424: Add LLCC/system-cache-controller
.../devicetree/bindings/cache/qcom,llcc.yaml | 20 ++++++-
arch/arm64/boot/dts/qcom/ipq5424.dtsi | 7 +++
drivers/soc/qcom/llcc-qcom.c | 57 ++++++++++++++++++-
3 files changed, 80 insertions(+), 4 deletions(-)
base-commit: ac24e26aa08fe026804f678599f805eb13374a5d
--
2.34.1
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH v4 1/3] dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible 2024-11-21 5:19 [PATCH v4 0/3] qcom: ipq5424: Add LLCC/system-cache-controller Varadarajan Narayanan @ 2024-11-21 5:19 ` Varadarajan Narayanan 2024-11-21 5:19 ` [PATCH v4 2/3] soc: qcom: llcc: Update configuration data for IPQ5424 Varadarajan Narayanan ` (2 subsequent siblings) 3 siblings, 0 replies; 7+ messages in thread From: Varadarajan Narayanan @ 2024-11-21 5:19 UTC (permalink / raw) To: andersson, konradybcio, conor, robh, krzk+dt, linux-arm-msm, devicetree, linux-kernel Cc: Varadarajan Narayanan Document the Last Level Cache Controller on IPQ5424. The 'broadcast' register space is present only in chipsets that have multiple instances of LLCC IP. Since IPQ5424 has only one instance, both the LLCC and LLCC_BROADCAST points to the same register space. Hence, allow only '1' reg & reg-names entry for IPQ5424. Reviewed-by: Rob Herring (Arm) <robh@kernel.org> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> --- v4: Fix ipq5424-llcc placement according to the sort order v3: Rebase to ToT v2: Add Reviewed-by --- .../devicetree/bindings/cache/qcom,llcc.yaml | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/cache/qcom,llcc.yaml b/Documentation/devicetree/bindings/cache/qcom,llcc.yaml index 03b1941eaa33..e5effbb4a606 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,ipq5424-llcc - qcom,qcs615-llcc - qcom,qcs8300-llcc - qcom,qdu1000-llcc @@ -42,11 +43,11 @@ properties: - qcom,x1e80100-llcc reg: - minItems: 2 + minItems: 1 maxItems: 10 reg-names: - minItems: 2 + minItems: 1 maxItems: 10 interrupts: @@ -66,6 +67,21 @@ required: - reg-names allOf: + - if: + properties: + compatible: + contains: + enum: + - qcom,ipq5424-llcc + then: + properties: + reg: + items: + - description: LLCC0 base register region + reg-names: + items: + - const: llcc0_base + - if: properties: compatible: -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4 2/3] soc: qcom: llcc: Update configuration data for IPQ5424 2024-11-21 5:19 [PATCH v4 0/3] qcom: ipq5424: Add LLCC/system-cache-controller Varadarajan Narayanan 2024-11-21 5:19 ` [PATCH v4 1/3] dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible Varadarajan Narayanan @ 2024-11-21 5:19 ` Varadarajan Narayanan 2024-11-21 18:32 ` Dmitry Baryshkov 2024-11-22 12:09 ` Konrad Dybcio 2024-11-21 5:19 ` [PATCH v4 3/3] arm64: dts: qcom: ipq5424: Add LLCC/system-cache-controller Varadarajan Narayanan 2025-01-08 2:52 ` (subset) [PATCH v4 0/3] " Bjorn Andersson 3 siblings, 2 replies; 7+ messages in thread From: Varadarajan Narayanan @ 2024-11-21 5:19 UTC (permalink / raw) To: andersson, konradybcio, conor, robh, krzk+dt, linux-arm-msm, devicetree, linux-kernel Cc: Varadarajan Narayanan The 'broadcast' register space is present only in chipsets that have multiple instances of LLCC IP. Since IPQ5424 has only one instance, both the LLCC and LLCC_BROADCAST points to the same register space. Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> --- v4: Fix ipq5424-llcc placement according to the sort order v3: Rebase to ToT Remove 'need_llcc_cfg = true' v2: Use 'true/false' instead of '1/0' for boolean variables. Add 'no_broadcast_register' to qcom_llcc_config structure to identify SoC without LLCC_BROADCAST register space instead of using 'num_banks'. --- drivers/soc/qcom/llcc-qcom.c | 57 ++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c index 32c3bc887cef..2b832b730be7 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -142,6 +142,7 @@ struct qcom_llcc_config { bool skip_llcc_cfg; bool no_edac; bool irq_configured; + bool no_broadcast_register; }; struct qcom_sct_config { @@ -154,6 +155,38 @@ enum llcc_reg_offset { LLCC_COMMON_STATUS0, }; +static const struct llcc_slice_config ipq5424_data[] = { + { + .usecase_id = LLCC_CPUSS, + .slice_id = 1, + .max_cap = 768, + .priority = 1, + .bonus_ways = 0xFFFF, + .retain_on_pc = true, + .activate_on_init = true, + .write_scid_cacheable_en = true, + .stale_en = true, + .stale_cap_en = true, + .alloc_oneway_en = true, + .ovcap_en = true, + .ovcap_prio = true, + .vict_prio = true, + }, + { + .usecase_id = LLCC_VIDSC0, + .slice_id = 2, + .max_cap = 256, + .priority = 2, + .fixed_size = true, + .bonus_ways = 0xF000, + .retain_on_pc = true, + .activate_on_init = true, + .write_scid_cacheable_en = true, + .stale_en = true, + .stale_cap_en = true, + }, +}; + static const struct llcc_slice_config sa8775p_data[] = { { .usecase_id = LLCC_CPUSS, @@ -3185,6 +3218,16 @@ static const struct qcom_llcc_config qdu1000_cfg[] = { }, }; +static const struct qcom_llcc_config ipq5424_cfg[] = { + { + .sct_data = ipq5424_data, + .size = ARRAY_SIZE(ipq5424_data), + .reg_offset = llcc_v2_1_reg_offset, + .edac_reg_offset = &llcc_v2_1_edac_reg_offset, + .no_broadcast_register = true, + }, +}; + static const struct qcom_llcc_config sa8775p_cfg[] = { { .sct_data = sa8775p_data, @@ -3360,6 +3403,11 @@ static const struct qcom_sct_config qdu1000_cfgs = { .num_config = ARRAY_SIZE(qdu1000_cfg), }; +static const struct qcom_sct_config ipq5424_cfgs = { + .llcc_config = ipq5424_cfg, + .num_config = ARRAY_SIZE(ipq5424_cfg), +}; + static const struct qcom_sct_config sa8775p_cfgs = { .llcc_config = sa8775p_cfg, .num_config = ARRAY_SIZE(sa8775p_cfg), @@ -3957,8 +4005,12 @@ static int qcom_llcc_probe(struct platform_device *pdev) drv_data->bcast_regmap = qcom_llcc_init_mmio(pdev, i, "llcc_broadcast_base"); if (IS_ERR(drv_data->bcast_regmap)) { - ret = PTR_ERR(drv_data->bcast_regmap); - goto err; + if (cfg->no_broadcast_register) { + drv_data->bcast_regmap = regmap; + } else { + ret = PTR_ERR(drv_data->bcast_regmap); + goto err; + } } /* Extract version of the IP */ @@ -4029,6 +4081,7 @@ static int qcom_llcc_probe(struct platform_device *pdev) } static const struct of_device_id qcom_llcc_of_match[] = { + { .compatible = "qcom,ipq5424-llcc", .data = &ipq5424_cfgs}, { .compatible = "qcom,qcs615-llcc", .data = &qcs615_cfgs}, { .compatible = "qcom,qcs8300-llcc", .data = &qcs8300_cfgs}, { .compatible = "qcom,qdu1000-llcc", .data = &qdu1000_cfgs}, -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4 2/3] soc: qcom: llcc: Update configuration data for IPQ5424 2024-11-21 5:19 ` [PATCH v4 2/3] soc: qcom: llcc: Update configuration data for IPQ5424 Varadarajan Narayanan @ 2024-11-21 18:32 ` Dmitry Baryshkov 2024-11-22 12:09 ` Konrad Dybcio 1 sibling, 0 replies; 7+ messages in thread From: Dmitry Baryshkov @ 2024-11-21 18:32 UTC (permalink / raw) To: Varadarajan Narayanan Cc: andersson, konradybcio, conor, robh, krzk+dt, linux-arm-msm, devicetree, linux-kernel On Thu, Nov 21, 2024 at 10:49:34AM +0530, Varadarajan Narayanan wrote: > The 'broadcast' register space is present only in chipsets that > have multiple instances of LLCC IP. Since IPQ5424 has only one > instance, both the LLCC and LLCC_BROADCAST points to the same > register space. > > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> > --- > v4: Fix ipq5424-llcc placement according to the sort order > > v3: Rebase to ToT > Remove 'need_llcc_cfg = true' > > v2: Use 'true/false' instead of '1/0' for boolean variables. > Add 'no_broadcast_register' to qcom_llcc_config structure > to identify SoC without LLCC_BROADCAST register space instead > of using 'num_banks'. > --- > drivers/soc/qcom/llcc-qcom.c | 57 ++++++++++++++++++++++++++++++++++-- > 1 file changed, 55 insertions(+), 2 deletions(-) > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> -- With best wishes Dmitry ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v4 2/3] soc: qcom: llcc: Update configuration data for IPQ5424 2024-11-21 5:19 ` [PATCH v4 2/3] soc: qcom: llcc: Update configuration data for IPQ5424 Varadarajan Narayanan 2024-11-21 18:32 ` Dmitry Baryshkov @ 2024-11-22 12:09 ` Konrad Dybcio 1 sibling, 0 replies; 7+ messages in thread From: Konrad Dybcio @ 2024-11-22 12:09 UTC (permalink / raw) To: Varadarajan Narayanan, andersson, konradybcio, conor, robh, krzk+dt, linux-arm-msm, devicetree, linux-kernel On 21.11.2024 6:19 AM, Varadarajan Narayanan wrote: > The 'broadcast' register space is present only in chipsets that > have multiple instances of LLCC IP. Since IPQ5424 has only one > instance, both the LLCC and LLCC_BROADCAST points to the same > register space. > > Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> > --- Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Konrad ^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH v4 3/3] arm64: dts: qcom: ipq5424: Add LLCC/system-cache-controller 2024-11-21 5:19 [PATCH v4 0/3] qcom: ipq5424: Add LLCC/system-cache-controller Varadarajan Narayanan 2024-11-21 5:19 ` [PATCH v4 1/3] dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible Varadarajan Narayanan 2024-11-21 5:19 ` [PATCH v4 2/3] soc: qcom: llcc: Update configuration data for IPQ5424 Varadarajan Narayanan @ 2024-11-21 5:19 ` Varadarajan Narayanan 2025-01-08 2:52 ` (subset) [PATCH v4 0/3] " Bjorn Andersson 3 siblings, 0 replies; 7+ messages in thread From: Varadarajan Narayanan @ 2024-11-21 5:19 UTC (permalink / raw) To: andersson, konradybcio, conor, robh, krzk+dt, linux-arm-msm, devicetree, linux-kernel Cc: Varadarajan Narayanan, Konrad Dybcio Add a DT node for Last level cache (aka. system cache) controller which provides control over the last level cache present on IPQ5424 SoCs. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Varadarajan Narayanan <quic_varada@quicinc.com> --- v3: Rebase to ToT v2: Add Reviewed-by --- arch/arm64/boot/dts/qcom/ipq5424.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/ipq5424.dtsi b/arch/arm64/boot/dts/qcom/ipq5424.dtsi index 5e219f900412..bdb73f8c09f9 100644 --- a/arch/arm64/boot/dts/qcom/ipq5424.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq5424.dtsi @@ -145,6 +145,13 @@ soc@0 { #size-cells = <2>; ranges = <0 0 0 0 0x10 0>; + system-cache-controller@800000 { + compatible = "qcom,ipq5424-llcc"; + reg = <0 0x00800000 0 0x200000>; + reg-names = "llcc0_base"; + interrupts = <GIC_SPI 68 IRQ_TYPE_LEVEL_HIGH>; + }; + tlmm: pinctrl@1000000 { compatible = "qcom,ipq5424-tlmm"; reg = <0 0x01000000 0 0x300000>; -- 2.34.1 ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: (subset) [PATCH v4 0/3] qcom: ipq5424: Add LLCC/system-cache-controller 2024-11-21 5:19 [PATCH v4 0/3] qcom: ipq5424: Add LLCC/system-cache-controller Varadarajan Narayanan ` (2 preceding siblings ...) 2024-11-21 5:19 ` [PATCH v4 3/3] arm64: dts: qcom: ipq5424: Add LLCC/system-cache-controller Varadarajan Narayanan @ 2025-01-08 2:52 ` Bjorn Andersson 3 siblings, 0 replies; 7+ messages in thread From: Bjorn Andersson @ 2025-01-08 2:52 UTC (permalink / raw) To: konradybcio, conor, robh, krzk+dt, linux-arm-msm, devicetree, linux-kernel, Varadarajan Narayanan On Thu, 21 Nov 2024 10:49:32 +0530, Varadarajan Narayanan wrote: > Unlike other Qcom SoCs, IPQ5424 doesn't have multiple instances > of LLCC IP and hence doesn't have a LLCC_BROADCAST register > space, and the LLCC & LLCC_BROADCAST point to the same register > space. > > Alter the driver accordingly and add the relevant entries for > enabling LLCC/system-cache-controller on the Qcom IPQ5424 SoC. > > [...] Applied, thanks! [1/3] dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible commit: f35a4397bec51509aa08c109041428958621d5f5 [2/3] soc: qcom: llcc: Update configuration data for IPQ5424 commit: c88c323b610a6048b87c5d9fff69659678f69924 Best regards, -- Bjorn Andersson <andersson@kernel.org> ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2025-01-08 2:53 UTC | newest] Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2024-11-21 5:19 [PATCH v4 0/3] qcom: ipq5424: Add LLCC/system-cache-controller Varadarajan Narayanan 2024-11-21 5:19 ` [PATCH v4 1/3] dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible Varadarajan Narayanan 2024-11-21 5:19 ` [PATCH v4 2/3] soc: qcom: llcc: Update configuration data for IPQ5424 Varadarajan Narayanan 2024-11-21 18:32 ` Dmitry Baryshkov 2024-11-22 12:09 ` Konrad Dybcio 2024-11-21 5:19 ` [PATCH v4 3/3] arm64: dts: qcom: ipq5424: Add LLCC/system-cache-controller Varadarajan Narayanan 2025-01-08 2:52 ` (subset) [PATCH v4 0/3] " Bjorn Andersson
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®