Commit graph

185 commits

Author SHA1 Message Date
Greg Kroah-Hartman
3b65010018 interconnect changes for 6.3
Here are the interconnect changes for the 6.3-rc1 merge window with the
 significant part being new drivers.
 
 Driver changes:
 - New driver for Qualcomm SM8550
 - New driver for Qualcomm QDU1000/QRU1000
 - New driver for Qualcomm SDM670
 - New driver for Qualcomm SA8775P
 - Drop the IP0 interconnects and migrate them to RPMh clocks instead
 - Misc improvements in the DT schema for some existing drivers
 
 Signed-off-by: Georgi Djakov <djakov@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJj4QSOAAoJEIDQzArG2BZjfyIQAKiXhX993QUzbOMf7k/3ynNI
 aFw6JG1ACyf7CuFCxkV/oZQmxq3M05Ja9YmqUDYyzwF9kagcIJ9yvFZP0xkV+Aq/
 l8FN53/ElO4MwBbOuHJMnpREq632PjX/NIsPdivKMPLsqk0oXuoMtYU9w59D7Y5h
 SbPoK8k/FE3odg60A7TAxvrKhWkvM6xMc4w+E64015WiChU//RHlmBZjdTZGnvbK
 F32bKFHMtiRIU7uNAkYUyL6g+WB4zeS2hTbqbhOyq0E+XixptQkMxvbd0jRxiO0j
 /RFLnlzFSq1C2d25T8oVxC1NkVLFjnldM3e7GVcK/d15Z2fkih/LLdjRqeHlW9pm
 Yh3iVLGZgmNBLZfkybLszjnY0LNF7zFqxFe9MV/B5DWx+MnQv29ubxB+L5p2pGPj
 +FvpB026CUzT11wDO+YJIAB1Tkc/WF1Jg+2jagBffMQAX9sy/E4GDnrHXneVoV31
 uWWgMbczZLQy8AF52FZlIbY2zFfAUaZDbLU53K+49xVfertUxyee7fs4+in11/Ii
 A636Shp5hc/h51Io4udA7pD5T1zBOLBxEC5TJBpNPiUkVcQrGYi4iCBJ8/bq+m94
 cudggzhMEhQd9TD0QRXFR6yPMpICOGEE27SUSPUAdfbztZqv11mmcToLagFkyrA7
 XeJB3KmICjJ0fvIhGTO2
 =/mVV
 -----END PGP SIGNATURE-----

Merge tag 'icc-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-misc-next

Georgi writes:

interconnect changes for 6.3

Here are the interconnect changes for the 6.3-rc1 merge window with the
significant part being new drivers.

Driver changes:
- New driver for Qualcomm SM8550
- New driver for Qualcomm QDU1000/QRU1000
- New driver for Qualcomm SDM670
- New driver for Qualcomm SA8775P
- Drop the IP0 interconnects and migrate them to RPMh clocks instead
- Misc improvements in the DT schema for some existing drivers

Signed-off-by: Georgi Djakov <djakov@kernel.org>

* tag 'icc-6.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc: (25 commits)
  dt-bindings: interconnect: samsung,exynos-bus: allow opp-table
  dt-bindings: interconnect: qcom,sa8775p-rpmh: fix a typo
  dt-bindings: interconnect: Exclude all non msm8939 from snoc-mm
  interconnect: qcom: add a driver for sa8775p
  dt-bindings: interconnect: qcom: document the interconnects for sa8775p
  interconnect: qcom: add sdm670 interconnects
  dt-bindings: interconnect: add sdm670 interconnects
  dt-bindings: interconnect: OSM L3: Add SM6350 OSM L3 compatible
  dt-bindings: interconnect: qcom-bwmon: document SM8550 compatibles
  dt-bindings: interconnect: split SM8450 to own schema
  dt-bindings: interconnect: split SC8280XP to own schema
  dt-bindings: interconnect: split SC7280 to own schema
  dt-bindings: interconnect: qcom: drop IPA_CORE related defines
  dt-bindings: interconnect: qcom: Remove ipa-virt compatibles
  interconnect: qcom: sc8280xp: Drop IP0 interconnects
  interconnect: qcom: sc8180x: Drop IP0 interconnects
  interconnect: qcom: sm8250: Drop IP0 interconnects
  interconnect: qcom: sm8150: Drop IP0 interconnects
  interconnect: move ignore_list out of of_count_icc_providers()
  interconnect: qcom: sc7180: drop IP0 remnants
  ...
2023-02-06 19:00:54 +01:00
Georgi Djakov
b1f5e7ff0c Merge branch 'icc-sa8775p' into icc-next
* icc-sa8775p
  dt-bindings: interconnect: qcom: document the interconnects for sa8775p
  interconnect: qcom: add a driver for sa8775p
  dt-bindings: interconnect: qcom,sa8775p-rpmh: fix a typo

Link: https://lore.kernel.org/r/20230118140825.242544-2-brgl@bgdev.pl
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-02-06 15:39:41 +02:00
Georgi Djakov
b9544fb577 Merge branch 'icc-sdm670' into icc-next
* icc-sdm670
  dt-bindings: interconnect: add sdm670 interconnects
  interconnect: qcom: add sdm670 interconnects

Link: https://lore.kernel.org/r/20230111005155.50452-1-mailingradian@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-02-06 15:39:15 +02:00
Georgi Djakov
863ed40ea9 Merge branch 'icc-ip0-migration' into icc-next
Commits 2f3724930e ("interconnect: qcom: sc7180: Drop IP0
interconnects") and 2fb251c265 ("interconnect: qcom: sdx55: Drop IP0
interconnects") removed IP0 interconnects (and ipa-virt devices support)
in favour of the RPMH clocks. Follow this example for other platforms
defining IP0 RPMH resource. While we are at it, remove several leftover
from the mentioned patches.

* icc-ip0-migration:
  interconnect: qcom: sdx55: drop IP0 remnants
  interconnect: qcom: sc7180: drop IP0 remnants
  interconnect: move ignore_list out of of_count_icc_providers()
  interconnect: qcom: sm8150: Drop IP0 interconnects
  interconnect: qcom: sm8250: Drop IP0 interconnects
  interconnect: qcom: sc8180x: Drop IP0 interconnects
  interconnect: qcom: sc8280xp: Drop IP0 interconnects
  dt-bindings: interconnect: qcom: Remove ipa-virt compatibles
  dt-bindings: interconnect: qcom: drop IPA_CORE related defines

Link: https://lore.kernel.org/r/20230109002935.244320-1-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-02-06 15:38:22 +02:00
Shazad Hussain
3655a63f96 interconnect: qcom: add a driver for sa8775p
Introduce QTI SA8775P-specific interconnect driver.

Signed-off-by: Shazad Hussain <quic_shazhuss@quicinc.com>
[Bartosz: made the driver ready for upstream]
Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230118140825.242544-1-brgl@bgdev.pl
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-19 20:23:00 +02:00
Richard Acayan
7e438e1887 interconnect: qcom: add sdm670 interconnects
The interconnects for Snapdragon 670 can be controlled via RPMh. Add
driver support for this.

This driver was generated by the linux-interconnect-driver-generator and
the virtual NoC's were merged with their parents.

Link: https://git.sr.ht/~z3ntu/linux-interconnect-driver-generator
Signed-off-by: Richard Acayan <mailingradian@gmail.com>
Link: https://lore.kernel.org/r/20230111005155.50452-3-mailingradian@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-19 20:12:47 +02:00
Dmitry Baryshkov
b136d257ee interconnect: qcom: sc8280xp: Drop IP0 interconnects
Similar to the sdx55 and sc7180, let's drop the MASTER_IPA_CORE and
SLAVE_IPA_CORE interconnects for this platform. There are no actual users
of this interconnect. The IP0 resource will be handled by clk-rpmh
driver.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230109002935.244320-8-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-18 16:15:03 +02:00
Dmitry Baryshkov
c4801e2441 interconnect: qcom: sc8180x: Drop IP0 interconnects
Similar to the sdx55 and sc7180, let's drop the MASTER_IPA_CORE and
SLAVE_IPA_CORE interconnects for this platofm. There are no actual users
of this intercoonect. The IP0 resource will be handled by clk-rpmh
driver.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230109002935.244320-7-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-18 16:14:33 +02:00
Dmitry Baryshkov
10d13cb595 interconnect: qcom: sm8250: Drop IP0 interconnects
Similar to the sdx55 and sc7180, let's drop the MASTER_IPA_CORE and
SLAVE_IPA_CORE interconnects for this platform. There are no actual users
of this interconnect. The IP0 resource will be handled by clk-rpmh
driver.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230109002935.244320-6-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-18 16:14:13 +02:00
Dmitry Baryshkov
a532439199 interconnect: qcom: sm8150: Drop IP0 interconnects
Similar to the sdx55 and sc7180, let's drop the MASTER_IPA_CORE and
SLAVE_IPA_CORE interconnects for this platform. There are no actual users
of this interconnect. The IP0 resource will be handled by clk-rpmh
driver.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230109002935.244320-5-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-18 16:12:54 +02:00
Dmitry Baryshkov
1c0c93d04e interconnect: qcom: sc7180: drop IP0 remnants
Drop two defines leftover from the commit 2f3724930e ("interconnect:
qcom: sc7180: Drop IP0 interconnects"), which dropped handling of the
IP0 resource in favour of handling it in the clk-rpmh driver.

Fixes: 2f3724930e ("interconnect: qcom: sc7180: Drop IP0 interconnects")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20230109002935.244320-3-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-18 16:12:17 +02:00
Dmitry Baryshkov
7d6d7bfd4c interconnect: qcom: sdx55: drop IP0 remnants
Drop two defines leftover from the commit 2fb251c265 ("interconnect:
qcom: sdx55: Drop IP0 interconnects"), which dropped handling of the IP0
resource in favour of handling it in the clk-rpmh driver.

Fixes: 2fb251c265 ("interconnect: qcom: sdx55: Drop IP0 interconnects")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20230109002935.244320-2-dmitry.baryshkov@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-18 16:11:52 +02:00
Konrad Dybcio
dd42ec8ea5 interconnect: qcom: rpm: Use _optional func for provider clocks
It turned out that - very unfortunately - msm8996 needs a binding
update, adding 2 more clocks to the A2NoC node. Use the _optional
variant of devm_clk_get to make sure old DTs will still probe with
newer versions of the driver.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> #db820c
Link: https://lore.kernel.org/r/20221210200353.418391-5-konrad.dybcio@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-05 17:29:57 +02:00
Konrad Dybcio
4be39d5d86 interconnect: qcom: msm8996: Fix regmap max_register values
The device tree reg starts at BUS_BASE + QoS_OFFSET, but the regmap
configs in the ICC driver had values suggesting the reg started at
BUS_BASE. Shrink them down (where they haven't been already, so for
providers where QoS_OFFSET = 0) to make sure they stay within their
window.

Fixes: 7add937f52 ("interconnect: qcom: Add MSM8996 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> #db820c
Link: https://lore.kernel.org/r/20221210200353.418391-4-konrad.dybcio@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-05 17:29:50 +02:00
Konrad Dybcio
60426ff08a interconnect: qcom: msm8996: Provide UFS clocks to A2NoC
On eMMC devices the bootloader has no business enabling UFS clocks.
That results in a platform hang and hard reboot when trying to vote
on paths including MASTER_UFS and since sync_state guarantees that
it's done at boot time, this effectively prevents such devices from
booting. Fix that.

Fixes: 7add937f52 ("interconnect: qcom: Add MSM8996 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> #db820c
Link: https://lore.kernel.org/r/20221210200353.418391-3-konrad.dybcio@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-05 17:29:40 +02:00
Georgi Djakov
163ea2048d Merge branch 'icc-qdu1000' into icc-next
Add dt bindings and driver support for the Qualcomm QDU1000 and QRU1000
SoCs.

The Qualcomm Technologies, Inc. Distributed Unit 1000 and Radio Unit
1000 are new SoCs meant for enabling Open RAN solutions. See more at
https://www.qualcomm.com/content/dam/qcomm-martech/dm-assets/documents/qualcomm_5g_ran_platforms_product_brief.pdf

Link: https://lore.kernel.org/r/20221216230914.21771-1-quic_molvera@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-05 16:17:08 +02:00
Melody Olvera
1f51339f7d interconnect: qcom: Add QDU1000/QRU1000 interconnect driver
Add interconnect provider driver for Qualcomm QDU1000 and QRU1000
platforms.

Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
Link: https://lore.kernel.org/r/20221216230914.21771-3-quic_molvera@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2023-01-05 16:16:49 +02:00
Abel Vesa
e6f0d6a30f interconnect: qcom: Add SM8550 interconnect provider driver
Add driver for the Qualcomm interconnect buses found in SM8550 based
platforms. The topology consists of several NoCs that are controlled by
a remote processor that collects the aggregated bandwidth for each
master-slave pairs.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Link: https://lore.kernel.org/r/20221202232054.2666830-3-abel.vesa@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-12-29 11:36:33 +02:00
Georgi Djakov
26e90ec7a8 Merge branch 'icc-sc8280xp-l3' into icc-next
The SC8280XP currently shows depressing results in memory benchmarks.
Fix this by introducing support for the platform in the OSM (and EPSS)
L3 driver and support for the platform in the bwmon binding.

Link: https://lore.kernel.org/r/20221111032515.3460-1-quic_bjorande@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-11-17 17:44:14 +02:00
Krzysztof Kozlowski
c1c537cf30 interconnect: qcom: sc8180x: constify pointer to qcom_icc_node
Pointers to struct qcom_icc_node are const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221027154848.293523-3-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-11-17 17:39:50 +02:00
Krzysztof Kozlowski
7870c7076a interconnect: qcom: sc7180: drop double space
Drop double white-space.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221027154848.293523-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-11-17 17:39:49 +02:00
Krzysztof Kozlowski
f24227a640 interconnect: qcom: sc7180: fix dropped const of qcom_icc_bcm
Pointers to struct qcom_icc_bcm are const, but the change was dropped
during merge.

Fixes: 016fca59f9 ("Merge branch 'icc-const' into icc-next")
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20221027154848.293523-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-11-17 17:39:49 +02:00
Shang XiaoJing
c423f01633 interconnect: qcom: icc-rpm: Remove redundant dev_err call
devm_ioremap_resource() prints error message in itself. Remove the
dev_err call to avoid redundant error message.

Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20220924015043.25130-1-shangxiaojing@huawei.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-11-17 17:39:49 +02:00
Bjorn Andersson
b6bcef163a interconnect: qcom: osm-l3: Simplify osm_l3_set()
The aggregation over votes for all nodes in the provider will always
only find the bandwidth votes for the destination side of the path.
Further more, the average kBps value will always be 0.

Simplify the logic by directly looking at the destination node's peak
bandwidth request.

Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Tested-by: Steev Klimaszewski <steev@kali.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
Link: https://lore.kernel.org/r/20221111032515.3460-5-quic_bjorande@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-11-14 15:05:30 +02:00
Bjorn Andersson
9235253ec7 interconnect: qcom: osm-l3: Add per-core EPSS L3 support
The EPSS instance in e.g. SM8350 and SC8280XP has per-core L3 voting
enabled. In this configuration, the "shared" vote is done using the
REG_L3_VOTE register instead of PERF_STATE.

Rename epss_l3 to clarify that it's affecting the PERF_STATE register
and add a new L3_VOTE description. Given platform lineage it's assumed
that the L3_VOTE-based case will be the predominant one, so use this for
a new generic qcom,epss-l3 compatible.

While adding the EPSS generic, also add qcom,osm-l3.

Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Tested-by: Steev Klimaszewski <steev@kali.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
Link: https://lore.kernel.org/r/20221111032515.3460-4-quic_bjorande@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-11-14 15:05:30 +02:00
Bjorn Andersson
d623264f62 interconnect: qcom: osm-l3: Squash common descriptors
Each platform defines their own OSM L3 descriptor, but in practice
there's only two: one for OSM and one for EPSS. Remove the duplicated
definitions.

Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Tested-by: Steev Klimaszewski <steev@kali.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
Link: https://lore.kernel.org/r/20221111032515.3460-3-quic_bjorande@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-11-14 15:05:30 +02:00
Bjorn Andersson
4529992c94 interconnect: qcom: osm-l3: Use platform-independent node ids
The identifiers used for nodes needs to be unique in the running system,
but defining them per platform results in a lot of duplicated
definitions and prevents us from using generic compatibles.

As these identifiers are not exposed outside the kernel, change to use
driver-local numbers, picked completely at random.

Signed-off-by: Bjorn Andersson <quic_bjorande@quicinc.com>
Tested-by: Steev Klimaszewski <steev@kali.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
Link: https://lore.kernel.org/r/20221111032515.3460-2-quic_bjorande@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-11-14 15:05:30 +02:00
Georgi Djakov
7360d55ba1 Merge branch 'icc-ignore-return-val' into icc-next
Today remove callbacks of platform devices return an int. This is unfortunate
because the device core ignores the return value and so the platform code only
emits a warning (and still removes the device).

The longterm quest is to make these remove callbacks return void instead.
This series is a preparation for that, with the goal to make the remove
callbacks obviously always return 0. This way when the prototype of
these functions is changed to return void, the change is straight
forward and easy to review.

Link: https://lore.kernel.org/r/20220718121409.171773-1-u.kleine-koenig@pengutronix.de
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-09-20 15:57:00 +03:00
Huang Yiwei
7aa429e8d4 interconnect: qcom: Kconfig: Make INTERCONNECT_QCOM tristate
Make INTERCONNECT_QCOM tristate so that icc-common.c can be
compiled as a module.

Signed-off-by: Huang Yiwei <quic_hyiwei@quicinc.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20220914064122.16222-1-quic_hyiwei@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-09-20 15:53:57 +03:00
Uwe Kleine-König
fa80a2994d interconnect: sm8450: Ignore return value of icc_provider_del() in .remove()
icc_provider_del() already emits an error message on failure. In this
case letting .remove() return the corresponding error code results in
another error message and the device is removed anyhow. (See
platform_remove().)

So ignore the return value of icc_provider_del() and return 0
unconditionally.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220718121409.171773-7-u.kleine-koenig@pengutronix.de
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-08-16 16:38:35 +03:00
Uwe Kleine-König
f221bd781f interconnect: osm-l3: Ignore return value of icc_provider_del() in .remove()
icc_provider_del() already emits an error message on failure. In this
case letting .remove() return the corresponding error code results in
another error message and the device is removed anyhow. (See
platform_remove().)

So ignore the return value of icc_provider_del() and return 0
unconditionally.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220718121409.171773-6-u.kleine-koenig@pengutronix.de
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-08-16 16:38:24 +03:00
Uwe Kleine-König
919d4e1a20 interconnect: msm8974: Ignore return value of icc_provider_del() in .remove()
icc_provider_del() already emits an error message on failure. In this
case letting .remove() return the corresponding error code results in
another error message and the device is removed anyhow. (See
platform_remove().)

So ignore the return value of icc_provider_del() and return 0
unconditionally.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220718121409.171773-5-u.kleine-koenig@pengutronix.de
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-08-16 16:38:11 +03:00
Uwe Kleine-König
4681086c9b interconnect: icc-rpmh: Ignore return value of icc_provider_del() in .remove()
icc_provider_del() already emits an error message on failure. In this
case letting .remove() return the corresponding error code results in
another error message and the device is removed anyhow. (See
platform_remove().)

So ignore the return value of icc_provider_del() and return 0
unconditionally.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220718121409.171773-4-u.kleine-koenig@pengutronix.de
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-08-16 16:38:04 +03:00
Uwe Kleine-König
8ef2ca2075 interconnect: icc-rpm: Ignore return value of icc_provider_del() in .remove()
icc_provider_del() already emits an error message on failure. In this
case letting .remove() return the corresponding error code results in
another error message and the device is removed anyhow. (See
platform_remove().)

So ignore the return value of icc_provider_del() and return 0
unconditionally.

This is a preparation for making platform remove callbacks return void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Link: https://lore.kernel.org/r/20220718121409.171773-3-u.kleine-koenig@pengutronix.de
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-08-16 16:37:55 +03:00
Georgi Djakov
009c963eef Merge branch 'icc-rpm' into icc-next
This patch set is to support bucket in icc-rpm driver, so it implements
the similar mechanism in the icc-rpmh driver.

It uses interconnect path tag to indicate the bandwidth voting is for
which buckets, and there have three kinds of buckets: AWC, WAKE and
SLEEP, finally the wake and sleep bucket values are used to set the
corresponding clock (active and sleep clocks).  So far, we keep the AWC
bucket but doesn't really use it.

Link: https://lore.kernel.org/r/20220712015929.2789881-1-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-07-15 17:56:31 +03:00
Leo Yan
e3305daad6 interconnect: qcom: icc-rpm: Set bandwidth and clock for bucket values
This commit uses buckets for support bandwidth and clock rates.  It
introduces a new function qcom_icc_bus_aggregate() to calculate the
aggregate average and peak bandwidths for every bucket, and also it
calculates the maximum value of aggregated average bandwidth across all
buckets.

The maximum aggregated average is used to calculate the final bandwidth
requests.  And we can set the clock rate per bucket, we use SLEEP bucket
as default bucket if a platform doesn't enable the interconnect path
tags in DT binding; otherwise, we use WAKE bucket to set active clock
and use SLEEP bucket for other clocks.  So far we don't use AMC bucket.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Link: https://lore.kernel.org/r/20220712015929.2789881-6-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-07-12 10:04:01 +03:00
Leo Yan
dcbce7b0a7 interconnect: qcom: icc-rpm: Support multiple buckets
The current interconnect rpm driver uses a single aggregate bandwidth to
calculate the clock rates for both active and sleep clocks; therefore,
it has no chance to separate bandwidth requests for these two kinds of
clocks.

This patch studies the implementation from interconnect rpmh driver to
support multiple buckets.  The rpmh driver provides three buckets for
AMC, WAKE, and SLEEP; this driver only needs to use WAKE and SLEEP
buckets, but we keep the same way with rpmh driver, this can allow us to
reuse the DT binding and avoid to define duplicated data structures.

This patch introduces two callbacks: qcom_icc_pre_bw_aggregate() is used
to clean up bucket values before aggregate bandwidth requests, and
qcom_icc_bw_aggregate() is to aggregate bandwidth for buckets.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Link: https://lore.kernel.org/r/20220712015929.2789881-5-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-07-12 10:03:09 +03:00
Leo Yan
ad510e4ed2 interconnect: qcom: icc-rpm: Change to use qcom_icc_xlate_extended()
This commit changes to use callback qcom_icc_xlate_extended().  This
is a preparation for population path tags from the interconnect DT
binding, it doesn't introduce functionality change for the existed DT
binding without path tags.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20220712015929.2789881-4-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-07-12 10:03:01 +03:00
Leo Yan
cb4805b5a5 interconnect: qcom: Move qcom_icc_xlate_extended() to a common file
since there have conflict between two headers icc-rpmh.h and icc-rpm.h,
the function qcom_icc_xlate_extended() is declared in icc-rpmh.h thus
it cannot be used by icc-rpm driver.

Move the function to a new common file icc-common.c so that allow it to
be called by multiple drivers.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20220712015929.2789881-3-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-07-12 10:01:30 +03:00
Bryan O'Donoghue
751f4d14cd interconnect: icc-rpm: Set destination bandwidth as well as source bandwidth
Make it possible to set destination as well as source bandwidth. If the
*dst pointer is non-NULL. Right now it appears that we never make the
destination bw allocation call, which is inconsistent with the downstream
way of doing this.

Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Link: https://lore.kernel.org/r/20220707093823.1691870-1-bryan.odonoghue@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-07-07 16:42:36 +03:00
Georgi Djakov
2be9e84707 Merge branch 'icc-sm6350' into icc-next
This series adds interconnect support for the various NoCs found on
sm6350.

A more special modification is allowing child NoC devices, like done for
rpm-based qcm2290 which was already merged, but now for rpmh-based
interconnect.

See also downstream dts:
https://android.googlesource.com/kernel/msm-extra/devicetree/+/refs/tags/android-11.0.0_r0.81/qcom/lagoon-bus.dtsi

Link: https://lore.kernel.org/r/20220525144404.200390-1-luca.weiss@fairphone.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-07-05 16:41:00 +03:00
Leo Yan
76a748e2c1 interconnect: qcom: msm8939: Use icc_sync_state
It's fashion to use the icc_sync_state callback to notify the framework
when all consumers are probed, so that the bandwidth request doesn't
need to stay on maximum value.

Do the same thing for msm8939 driver.

Signed-off-by: Leo Yan <leo.yan@linaro.org>
Link: https://lore.kernel.org/r/20220416012634.479617-1-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-07-05 16:39:48 +03:00
Luca Weiss
6a6eff73a9 interconnect: qcom: Add SM6350 driver support
Add a driver that handles the different NoCs found on SM6350, generated
from the downstream dtb.

We're exluding ALC, IP0 and all _display nodes. ALC will not be voted
from the kernel[1] and IP0 is handled by the clk-rpmh driver[2].

[1] https://lore.kernel.org/linux-arm-msm/1e79c73f22c8891dc9f868babd940fca@codeaurora.org/
[2] https://lore.kernel.org/linux-arm-msm/20220412220033.1273607-1-swboyd@chromium.org/

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/r/20220525144404.200390-5-luca.weiss@fairphone.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-06-20 14:27:07 +03:00
Luca Weiss
57eb14779d interconnect: qcom: icc-rpmh: Support child NoC device probe
As per e39bf2972c ("interconnect: icc-rpm: Support child NoC device
probe") also update the rpmh interconnect driver to support probing NoCs
that are modelled as child devices of a different NoC.

As the driver doesn't yet use the 'reg' property, no change is done for
that.

Downstream DT reference:
https://android.googlesource.com/kernel/msm-extra/devicetree/+/refs/tags/android-11.0.0_r0.56/qcom/lagoon-bus.dtsi

Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/r/20220525144404.200390-2-luca.weiss@fairphone.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-06-20 14:21:15 +03:00
Georgi Djakov
3a4c63f5d9 Merge branch 'icc-rpm' into icc-next
This patch set is to address two clock rate setting issues.

The first patch is to fix a potential cached clock rate mismatching
issue, the issue can lead to the clock rate is missed to be set. Note,
since this potential issue requires specific time window and certain
condition (consumers need to request the same bandwidth) to produce,
the patch is based on analysis but not a real trace log.

The second patch is an extension to cache clock rates for active and
sleep clocks separately, with this change it gives us possibility to set
active and sleep clock with different clock rates.

* icc-rpm
  interconnect: qcom: icc-rpm: Fix for cached clock rate
  interconnect: qcom: icc-rpm: Cache every clock rate

Link: https://lore.kernel.org/r/20220416031029.693211-1-leo.yan@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-05-18 03:03:30 +03:00
Georgi Djakov
314cf651fa Merge branch 'icc-sc8180x' into icc-next
This contains a few fixes for the sc8180x interconnect provider driver to make
it functional.

* icc-sc8180x
  dt-bindings: interconnect: Add SC8180X QUP0 virt provider
  interconnect: qcom: sc8180x: Modernize sc8180x probe
  interconnect: qcom: sc8180x: Fix QUP0 nodes
  interconnect: qcom: sc8180x: Mark some BCMs keepalive

Link: https://lore.kernel.org/r/20220503211925.1022169-1-bjorn.andersson@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-05-18 03:02:55 +03:00
Georgi Djakov
016fca59f9 Merge branch 'icc-const' into icc-next
Constify structs that are not modified.

Link: https://lore.kernel.org/r/20220412102623.227607-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-05-18 03:02:32 +03:00
Bjorn Andersson
04548d4e27 interconnect: qcom: sc8180x: Reformat node and bcm definitions
The Qualcomm interconnect providers started off defining nodes and BCMs
using the DEFINE_QNODE() and DEFINE_QBCM() macros. Unfortunately this
results in a block of long lines that are hard to read, a transition to
explicitly stated definition has been made for newly introduced
platforms.

Transition the SC8180X interconnect provider driver to this style as
well, to make it easier to read while debugging interconnect related
issues.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220503225300.1141814-1-bjorn.andersson@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-05-18 02:51:34 +03:00
Bjorn Andersson
ce83211c87 interconnect: qcom: sc8180x: Mark some BCMs keepalive
In line with other platforms, mark BCMs controlling paths between the
CPU, AOSS, GIC and memory as keepalive.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220503211925.1022169-5-bjorn.andersson@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-05-18 02:51:34 +03:00
Bjorn Andersson
42c4e3f670 interconnect: qcom: sc8180x: Fix QUP0 nodes
The QUP0 BCM relates to some internal property of the QUPs, and should
be configured independently of the path to the QUP. In line with other
platforms expose QUP_CORE endpoints in order allow this configuration.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Link: https://lore.kernel.org/r/20220503211925.1022169-4-bjorn.andersson@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2022-05-18 02:51:34 +03:00