This series adds:
1. Device tree register mapping for Broadcast_AND region in SM8450,
SM8550, SM8650.
2. LLCC driver updates to reflect addition of Broadcast_AND regmap.
To support CSR programming, a broadcast interface is used to program all
channels in a single command. Until SM8450 there was only one broadcast
region (Broadcast_OR) used to broadcast write and check for status bit
0. From SM8450 onwards another broadcast region (Broadcast_AND) has been
added which checks for status bit 1.
This series updates the device trees from SM8450 onwards to have a
mapping to this Broadcast_AND region. It also updates the llcc_drv_data
structure with a regmap for Broadcast_AND region and corrects the
broadcast region used to check for status bit 1.
Merging strategy
----------------
All patches should be merged due to LLCC DeviceTree/driver dependency.
Changes in v2:
- Added an additional check in the case old DT files are used for
above mentioned chipsets for backwards compatibility
- Moved addition of if check in llcc_update_act_ctrl() to a separate
"Fixes" patch; not part of this series
Link to v1: https://lore.kernel.org/all/[email protected]/
Unnathi Chalicheemala (5):
dt-bindings: arm: msm: Add llcc Broadcast_AND register region
arm64: dts: qcom: sm8450: Add mapping to llcc Broadcast_AND region
arm64: dts: qcom: sm8550: Add mapping to llcc Broadcast_AND region
arm64: dts: qcom: sm8650: Add mapping to llcc Broadcast_AND region
soc: qcom: llcc: Add regmap for Broadcast_AND region
.../devicetree/bindings/cache/qcom,llcc.yaml | 41 +++++++++++++++----
arch/arm64/boot/dts/qcom/sm8450.dtsi | 5 ++-
arch/arm64/boot/dts/qcom/sm8550.dtsi | 6 ++-
arch/arm64/boot/dts/qcom/sm8650.dtsi | 6 ++-
drivers/soc/qcom/llcc-qcom.c | 22 ++++++++--
include/linux/soc/qcom/llcc-qcom.h | 4 +-
6 files changed, 66 insertions(+), 18 deletions(-)
--
2.25.1
Mapping Broadcast_AND region for LLCC in SM8450.
Signed-off-by: Unnathi Chalicheemala <[email protected]>
---
arch/arm64/boot/dts/qcom/sm8450.dtsi | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 01e4dfc4babd..d2d6fae55e2a 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -4306,9 +4306,10 @@ system-cache-controller@19200000 {
compatible = "qcom,sm8450-llcc";
reg = <0 0x19200000 0 0x80000>, <0 0x19600000 0 0x80000>,
<0 0x19300000 0 0x80000>, <0 0x19700000 0 0x80000>,
- <0 0x19a00000 0 0x80000>;
+ <0 0x19a00000 0 0x80000>, <0 0x19c00000 0 0x80000>;
reg-names = "llcc0_base", "llcc1_base", "llcc2_base",
- "llcc3_base", "llcc_broadcast_base";
+ "llcc3_base", "llcc_broadcast_base",
+ "llcc_broadcast_and_base";
interrupts = <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>;
};
--
2.25.1
Mapping Broadcast_AND region for LLCC in SM8550.
Signed-off-by: Unnathi Chalicheemala <[email protected]>
---
arch/arm64/boot/dts/qcom/sm8550.dtsi | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index ee1ba5a8c8fc..1a52e30330c3 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -4193,12 +4193,14 @@ system-cache-controller@25000000 {
<0 0x25200000 0 0x200000>,
<0 0x25400000 0 0x200000>,
<0 0x25600000 0 0x200000>,
- <0 0x25800000 0 0x200000>;
+ <0 0x25800000 0 0x200000>,
+ <0 0x25a00000 0 0x200000>;
reg-names = "llcc0_base",
"llcc1_base",
"llcc2_base",
"llcc3_base",
- "llcc_broadcast_base";
+ "llcc_broadcast_base",
+ "llcc_broadcast_and_base";
interrupts = <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>;
};
--
2.25.1
On 06/02/2024 08:15, Unnathi Chalicheemala wrote:
> This series adds:
> 1. Device tree register mapping for Broadcast_AND region in SM8450,
> SM8550, SM8650.
> 2. LLCC driver updates to reflect addition of Broadcast_AND regmap.
>
> To support CSR programming, a broadcast interface is used to program all
> channels in a single command. Until SM8450 there was only one broadcast
> region (Broadcast_OR) used to broadcast write and check for status bit
> 0. From SM8450 onwards another broadcast region (Broadcast_AND) has been
> added which checks for status bit 1.
>
> This series updates the device trees from SM8450 onwards to have a
> mapping to this Broadcast_AND region. It also updates the llcc_drv_data
> structure with a regmap for Broadcast_AND region and corrects the
> broadcast region used to check for status bit 1.
>
> Merging strategy
> ----------------
>
> All patches should be merged due to LLCC DeviceTree/driver dependency.
Dependency? Sorry, there cannot be a dependency between DTS and driver.
Please fix your patchset.
Best regards,
Krzysztof
On 06/02/2024 08:15, Unnathi Chalicheemala wrote:
> Mapping Broadcast_AND region for LLCC in SM8450.
Why?
And why your DTS is in the middle of driver changes? Driver cannot
depend on DTS - you are now breaking all existing boards and users.
Best regards,
Krzysztof
On 2/6/2024 12:34 AM, Krzysztof Kozlowski wrote:
> On 06/02/2024 08:15, Unnathi Chalicheemala wrote:
>> This series adds:
>> 1. Device tree register mapping for Broadcast_AND region in SM8450,
>> SM8550, SM8650.
>> 2. LLCC driver updates to reflect addition of Broadcast_AND regmap.
>>
>> To support CSR programming, a broadcast interface is used to program all
>> channels in a single command. Until SM8450 there was only one broadcast
>> region (Broadcast_OR) used to broadcast write and check for status bit
>> 0. From SM8450 onwards another broadcast region (Broadcast_AND) has been
>> added which checks for status bit 1.
>>
>> This series updates the device trees from SM8450 onwards to have a
>> mapping to this Broadcast_AND region. It also updates the llcc_drv_data
>> structure with a regmap for Broadcast_AND region and corrects the
>> broadcast region used to check for status bit 1.
>>
>> Merging strategy
>> ----------------
>>
>> All patches should be merged due to LLCC DeviceTree/driver dependency.
>
> Dependency? Sorry, there cannot be a dependency between DTS and driver.
> Please fix your patchset.
>
This is the suggested merge strategy. But I have updated the driver in v2
to ensure that applying the driver patch alone will work with existing DTs.
Sorry for being unclear; "should" does make it sound like there is a hard
dependency.
>
>
> Best regards,
> Krzysztof
>
On 06/02/2024 20:41, Unnathi Chalicheemala wrote:
> On 2/6/2024 12:34 AM, Krzysztof Kozlowski wrote:
>> On 06/02/2024 08:15, Unnathi Chalicheemala wrote:
>>> This series adds:
>>> 1. Device tree register mapping for Broadcast_AND region in SM8450,
>>> SM8550, SM8650.
>>> 2. LLCC driver updates to reflect addition of Broadcast_AND regmap.
>>>
>>> To support CSR programming, a broadcast interface is used to program all
>>> channels in a single command. Until SM8450 there was only one broadcast
>>> region (Broadcast_OR) used to broadcast write and check for status bit
>>> 0. From SM8450 onwards another broadcast region (Broadcast_AND) has been
>>> added which checks for status bit 1.
>>>
>>> This series updates the device trees from SM8450 onwards to have a
>>> mapping to this Broadcast_AND region. It also updates the llcc_drv_data
>>> structure with a regmap for Broadcast_AND region and corrects the
>>> broadcast region used to check for status bit 1.
>>>
>>> Merging strategy
>>> ----------------
>>>
>>> All patches should be merged due to LLCC DeviceTree/driver dependency.
>>
>> Dependency? Sorry, there cannot be a dependency between DTS and driver.
>> Please fix your patchset.
>>
>
> This is the suggested merge strategy. But I have updated the driver in v2
> to ensure that applying the driver patch alone will work with existing DTs.
> Sorry for being unclear; "should" does make it sound like there is a hard
> dependency.
OK, anyway, the patch was not tested.
Please drop my Reviewed-by and test the patch before sending.
Best regards,
Krzysztof
On 2/6/2024 12:35 AM, Krzysztof Kozlowski wrote:
> On 06/02/2024 08:15, Unnathi Chalicheemala wrote:
>> Mapping Broadcast_AND region for LLCC in SM8450.
>
> Why?
>
> And why your DTS is in the middle of driver changes? Driver cannot
> depend on DTS - you are now breaking all existing boards and users.
>
I was following a similar patch which has DT and driver changes in the
same patchset:
https://lore.kernel.org/all/[email protected]/
The AND region was added in the IP block in SM8450, but was not added to the DT or
driver. That is why I included both in the same patchset - if you think the DT
changes should be separate I can correct it in the next version.
Thanks a lot for taking the time to review Krzysztof.
>
> Best regards,
> Krzysztof
>
On Tue, 6 Feb 2024 at 22:07, Unnathi Chalicheemala
<[email protected]> wrote:
>
> On 2/6/2024 12:35 AM, Krzysztof Kozlowski wrote:
> > On 06/02/2024 08:15, Unnathi Chalicheemala wrote:
> >> Mapping Broadcast_AND region for LLCC in SM8450.
> >
> > Why?
> >
> > And why your DTS is in the middle of driver changes? Driver cannot
> > depend on DTS - you are now breaking all existing boards and users.
> >
>
> I was following a similar patch which has DT and driver changes in the
> same patchset:
> https://lore.kernel.org/all/[email protected]/
>
> The AND region was added in the IP block in SM8450, but was not added to the DT or
> driver. That is why I included both in the same patchset - if you think the DT
> changes should be separate I can correct it in the next version.
Just move the DT changes to be the last patches in the patchset.
>
> Thanks a lot for taking the time to review Krzysztof.
>
> >
> > Best regards,
> > Krzysztof
> >
>
--
With best wishes
Dmitry