2021-10-21 13:29:15

by Yassine Oudjana

[permalink] [raw]
Subject: [PATCH RESEND v5 0/5] interconnect: qcom: Add MSM8996 interconnect driver

This series adds a driver for interconnects on MSM8996. This fixes some rare display underflows
and provides a slight heat reduction.

Resending because some addresses in CC got mixed up.

Changes since v4:
- Rebase on Dmitry's icc-rpm patches[1].
- Combine SDM660 bindings into the RPM interconnect schema.
- Clean up qcom_icc_node structs by removing unused properties, moving links to external
arrays and using the same arrays for multiple nodes where possible.
- Add support for Aggregate 0 NoC (a0noc).
Changes since v3:
- Expand DEFINE_QNODE macros in msm8996.c.
- Commonize probe function.
- Don't rename qcom_icc_set in icc-rpmh since it's no longer needed.
- Code style fixes.
Changes since v2:
- Dual-license qcom,msm8996.h and move it to the dt bindings patch
- Remove interconnect paths from CPUs since cpufreq driver doesn't support icc scaling yet.
Changes since v1:
- Split first patch into 2 patches, one for renaming qcom_icc_set in icc-rpmh, and another
one for the actual commonization.
- Revert unnecessary move of include line in sdm660.c

[1] https://lore.kernel.org/linux-arm-msm/[email protected]/

Yassine Oudjana (5):
dt-bindings: interconnect: Combine SDM660 bindings into RPM schema
interconnect: icc-rpm: Add support for bus power domain
dt-bindings: interconnect: Add Qualcomm MSM8996 DT bindings
interconnect: qcom: Add MSM8996 interconnect provider driver
arm64: dts: qcom: msm8996: Add interconnect support

.../bindings/interconnect/qcom,rpm.yaml | 143 +-
.../bindings/interconnect/qcom,sdm660.yaml | 185 --
arch/arm64/boot/dts/qcom/msm8996.dtsi | 93 +
drivers/interconnect/qcom/Kconfig | 9 +
drivers/interconnect/qcom/Makefile | 2 +
drivers/interconnect/qcom/icc-rpm.c | 7 +
drivers/interconnect/qcom/icc-rpm.h | 1 +
drivers/interconnect/qcom/msm8996.c | 2113 +++++++++++++++++
drivers/interconnect/qcom/msm8996.h | 149 ++
.../dt-bindings/interconnect/qcom,msm8996.h | 163 ++
10 files changed, 2673 insertions(+), 192 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sdm660.yaml
create mode 100644 drivers/interconnect/qcom/msm8996.c
create mode 100644 drivers/interconnect/qcom/msm8996.h
create mode 100644 include/dt-bindings/interconnect/qcom,msm8996.h

--
2.33.1



2021-10-21 13:29:45

by Yassine Oudjana

[permalink] [raw]
Subject: [PATCH RESEND v5 2/5] interconnect: icc-rpm: Add support for bus power domain

Add support for attaching to a power domain. This is required
for Aggregate 0 NoC on MSM8996, which is powered by a GDSC.

Signed-off-by: Yassine Oudjana <[email protected]>
---
drivers/interconnect/qcom/icc-rpm.c | 7 +++++++
drivers/interconnect/qcom/icc-rpm.h | 1 +
2 files changed, 8 insertions(+)

diff --git a/drivers/interconnect/qcom/icc-rpm.c b/drivers/interconnect/qcom/icc-rpm.c
index ef7999a08c8b..6b918d082ab6 100644
--- a/drivers/interconnect/qcom/icc-rpm.c
+++ b/drivers/interconnect/qcom/icc-rpm.c
@@ -11,6 +11,7 @@
#include <linux/of_device.h>
#include <linux/of_platform.h>
#include <linux/platform_device.h>
+#include <linux/pm_domain.h>
#include <linux/regmap.h>
#include <linux/slab.h>

@@ -340,6 +341,12 @@ int qnoc_probe(struct platform_device *pdev)
if (ret)
return ret;

+ if (desc->has_bus_pd) {
+ ret = dev_pm_domain_attach(dev, true);
+ if (ret)
+ return ret;
+ }
+
provider = &qp->provider;
INIT_LIST_HEAD(&provider->nodes);
provider->dev = dev;
diff --git a/drivers/interconnect/qcom/icc-rpm.h b/drivers/interconnect/qcom/icc-rpm.h
index f5744de4da19..fd06a3b9e3f7 100644
--- a/drivers/interconnect/qcom/icc-rpm.h
+++ b/drivers/interconnect/qcom/icc-rpm.h
@@ -77,6 +77,7 @@ struct qcom_icc_desc {
size_t num_nodes;
const char * const *clocks;
size_t num_clocks;
+ bool has_bus_pd;
bool is_bimc_node;
const struct regmap_config *regmap_cfg;
unsigned int qos_offset;
--
2.33.1


2021-10-21 19:22:38

by Dmitry Baryshkov

[permalink] [raw]
Subject: Re: [PATCH RESEND v5 0/5] interconnect: qcom: Add MSM8996 interconnect driver

On 21/10/2021 16:24, Yassine Oudjana wrote:
> This series adds a driver for interconnects on MSM8996. This fixes some rare display underflows
> and provides a slight heat reduction.
>
> Resending because some addresses in CC got mixed up.
>
> Changes since v4:
> - Rebase on Dmitry's icc-rpm patches[1].
> - Combine SDM660 bindings into the RPM interconnect schema.
> - Clean up qcom_icc_node structs by removing unused properties, moving links to external
> arrays and using the same arrays for multiple nodes where possible.
> - Add support for Aggregate 0 NoC (a0noc).
> Changes since v3:
> - Expand DEFINE_QNODE macros in msm8996.c.
> - Commonize probe function.
> - Don't rename qcom_icc_set in icc-rpmh since it's no longer needed.
> - Code style fixes.
> Changes since v2:
> - Dual-license qcom,msm8996.h and move it to the dt bindings patch
> - Remove interconnect paths from CPUs since cpufreq driver doesn't support icc scaling yet.
> Changes since v1:
> - Split first patch into 2 patches, one for renaming qcom_icc_set in icc-rpmh, and another
> one for the actual commonization.
> - Revert unnecessary move of include line in sdm660.c
>
> [1] https://lore.kernel.org/linux-arm-msm/[email protected]/

For the whole series:

Reviewed-by: Dmitry Baryshkov <[email protected]>
Tested-by: Dmitry Baryshkov <[email protected]> #db820c

>
> Yassine Oudjana (5):
> dt-bindings: interconnect: Combine SDM660 bindings into RPM schema
> interconnect: icc-rpm: Add support for bus power domain
> dt-bindings: interconnect: Add Qualcomm MSM8996 DT bindings
> interconnect: qcom: Add MSM8996 interconnect provider driver
> arm64: dts: qcom: msm8996: Add interconnect support
>
> .../bindings/interconnect/qcom,rpm.yaml | 143 +-
> .../bindings/interconnect/qcom,sdm660.yaml | 185 --
> arch/arm64/boot/dts/qcom/msm8996.dtsi | 93 +
> drivers/interconnect/qcom/Kconfig | 9 +
> drivers/interconnect/qcom/Makefile | 2 +
> drivers/interconnect/qcom/icc-rpm.c | 7 +
> drivers/interconnect/qcom/icc-rpm.h | 1 +
> drivers/interconnect/qcom/msm8996.c | 2113 +++++++++++++++++
> drivers/interconnect/qcom/msm8996.h | 149 ++
> .../dt-bindings/interconnect/qcom,msm8996.h | 163 ++
> 10 files changed, 2673 insertions(+), 192 deletions(-)
> delete mode 100644 Documentation/devicetree/bindings/interconnect/qcom,sdm660.yaml
> create mode 100644 drivers/interconnect/qcom/msm8996.c
> create mode 100644 drivers/interconnect/qcom/msm8996.h
> create mode 100644 include/dt-bindings/interconnect/qcom,msm8996.h
>


--
With best wishes
Dmitry