Commit Graph

376 Commits

Author SHA1 Message Date
Linus Torvalds
0d5ec7919f Char / Misc / IIO / other driver updates for 6.17-rc1
Here is the big set of char/misc/iio and other smaller driver subsystems
 for 6.17-rc1.  It's a big set this time around, with the huge majority
 being in the iio subsystem with new drivers and dts files being added
 there.
 
 Highlights include:
   - IIO driver updates, additions, and changes making more code const
     and cleaning up some init logic
   - bus_type constant conversion changes
   - misc device test functions added
   - rust miscdevice minor fixup
   - unused function removals for some drivers
   - mei driver updates
   - mhi driver updates
   - interconnect driver updates
   - Android binder updates and test infrastructure added
   - small cdx driver updates
   - small comedi fixes
   - small nvmem driver updates
   - small pps driver updates
   - some acrn virt driver fixes for printk messages
   - other small driver updates
 
 All of these have been in linux-next with no reported issues.
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCaIeYDg8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+yk3dwCdF6xoEVZaDkLM5IF3XKWWgdYxjNsAoKUy2kUx
 YtmVh4S0tMmugfeRGac7
 =3Wxi
 -----END PGP SIGNATURE-----

Merge tag 'char-misc-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc

Pull char / misc / IIO / other driver updates from Greg KH:
 "Here is the big set of char/misc/iio and other smaller driver
  subsystems for 6.17-rc1. It's a big set this time around, with the
  huge majority being in the iio subsystem with new drivers and dts
  files being added there.

  Highlights include:
   - IIO driver updates, additions, and changes making more code const
     and cleaning up some init logic
   - bus_type constant conversion changes
   - misc device test functions added
   - rust miscdevice minor fixup
   - unused function removals for some drivers
   - mei driver updates
   - mhi driver updates
   - interconnect driver updates
   - Android binder updates and test infrastructure added
   - small cdx driver updates
   - small comedi fixes
   - small nvmem driver updates
   - small pps driver updates
   - some acrn virt driver fixes for printk messages
   - other small driver updates

  All of these have been in linux-next with no reported issues"

* tag 'char-misc-6.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (292 commits)
  binder: Use seq_buf in binder_alloc kunit tests
  binder: Add copyright notice to new kunit files
  misc: ti_fpc202: Switch to of_fwnode_handle()
  bus: moxtet: Use dev_fwnode()
  pc104: move PC104 option to drivers/Kconfig
  drivers: virt: acrn: Don't use %pK through printk
  comedi: fix race between polling and detaching
  interconnect: qcom: Add Milos interconnect provider driver
  dt-bindings: interconnect: document the RPMh Network-On-Chip Interconnect in Qualcomm Milos SoC
  mei: more prints with client prefix
  mei: bus: use cldev in prints
  bus: mhi: host: pci_generic: Add Telit FN990B40 modem support
  bus: mhi: host: Detect events pointing to unexpected TREs
  bus: mhi: host: pci_generic: Add Foxconn T99W696 modem
  bus: mhi: host: Use str_true_false() helper
  bus: mhi: host: pci_generic: Add support for EM929x and set MRU to 32768 for better performance.
  bus: mhi: host: Fix endianness of BHI vector table
  bus: mhi: host: pci_generic: Disable runtime PM for QDU100
  bus: mhi: host: pci_generic: Fix the modem name of Foxconn T99W640
  dt-bindings: interconnect: qcom,msm8998-bwmon: Allow 'nonposted-mmio'
  ...
2025-07-29 09:52:01 -07:00
Georgi Djakov
ca652cf0c2 Merge branch 'icc-milos' into icc-next
Add documentation and driver for the interconnect on the Milos SoC.

* icc-milos
  dt-bindings: interconnect: document the RPMh Network-On-Chip Interconnect in Qualcomm Milos SoC
  interconnect: qcom: Add Milos interconnect provider driver

Link: https://lore.kernel.org/r/20250709-sm7635-icc-v3-0-c446203c3b3a@fairphone.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-07-22 14:41:12 +03:00
Luca Weiss
4781dbbfa5 interconnect: qcom: Add Milos interconnect provider driver
Add driver for the Qualcomm interconnect buses found in Milos 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: Luca Weiss <luca.weiss@fairphone.com>
Link: https://lore.kernel.org/r/20250709-sm7635-icc-v3-2-c446203c3b3a@fairphone.com
[georgi: remove null termination of nodes and links]
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-07-22 14:36:27 +03:00
Konrad Dybcio
cbabc73e85 interconnect: qcom: qcs615: Drop IP0 interconnects
In the same spirit as e.g. Commit b136d257ee ("interconnect: qcom:
sc8280xp: Drop IP0 interconnects"), drop the resources that should be
taken care of through the clk-rpmh driver.

Fixes: 77d79677b0 ("interconnect: qcom: add QCS615 interconnect provider driver")
Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250627-topic-qcs615_icc_ipa-v1-2-dc47596cde69@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-07-18 17:54:58 +03:00
Dmitry Baryshkov
7e0b59496a interconnect: qcom: sc8180x: specify num_nodes
Specify .num_nodes for several BCMs which missed this declaration.

Fixes: 04548d4e27 ("interconnect: qcom: sc8180x: Reformat node and bcm definitions")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250704-rework-icc-v2-2-875fac996ef5@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-07-18 17:54:57 +03:00
Dmitry Baryshkov
02ee375506 interconnect: qcom: sc8280xp: specify num_links for qnm_a1noc_cfg
The qnm_a1noc_cfg declaration didn't include .num_links definition, fix
it.

Fixes: f29dabda79 ("interconnect: qcom: Add SC8280XP interconnect provider")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250704-rework-icc-v2-1-875fac996ef5@oss.qualcomm.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-07-18 17:54:57 +03:00
Gabor Juhos
c5b6059288 interconnect: avoid memory allocation when 'icc_bw_lock' is held
The 'icc_bw_lock' mutex is introduced in commit af42269c35
("interconnect: Fix locking for runpm vs reclaim") in order to decouple
serialization of bw aggregation from codepaths that require memory
allocation.

However commit d30f83d278 ("interconnect: core: Add dynamic id
allocation support") added a devm_kasprintf() call into a path protected
by the 'icc_bw_lock' which causes the following lockdep warning on
machines like the Lenovo ThinkPad X13s:

    ======================================================
    WARNING: possible circular locking dependency detected
    6.16.0-rc3 #15 Not tainted
    ------------------------------------------------------
    (udev-worker)/342 is trying to acquire lock:
    ffffb973f7ec4638 (fs_reclaim){+.+.}-{0:0}, at: __kmalloc_node_track_caller_noprof+0xa0/0x3e0

    but task is already holding lock:
    ffffb973f7f7f0e8 (icc_bw_lock){+.+.}-{4:4}, at: icc_node_add+0x44/0x154

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -> #1 (icc_bw_lock){+.+.}-{4:4}:
           icc_init+0x48/0x108
           do_one_initcall+0x64/0x30c
           kernel_init_freeable+0x27c/0x500
           kernel_init+0x20/0x1d8
           ret_from_fork+0x10/0x20

    -> #0 (fs_reclaim){+.+.}-{0:0}:
           __lock_acquire+0x136c/0x2114
           lock_acquire+0x1c8/0x354
           fs_reclaim_acquire+0x74/0xa8
           __kmalloc_node_track_caller_noprof+0xa0/0x3e0
           devm_kmalloc+0x54/0x124
           devm_kvasprintf+0x74/0xd4
           devm_kasprintf+0x58/0x80
           icc_node_add+0xb4/0x154
           qcom_osm_l3_probe+0x20c/0x314 [icc_osm_l3]
           platform_probe+0x68/0xd8
           really_probe+0xc0/0x38c
           __driver_probe_device+0x7c/0x160
           driver_probe_device+0x40/0x110
           __driver_attach+0xfc/0x208
           bus_for_each_dev+0x74/0xd0
           driver_attach+0x24/0x30
           bus_add_driver+0x110/0x234
           driver_register+0x60/0x128
           __platform_driver_register+0x24/0x30
           osm_l3_driver_init+0x20/0x1000 [icc_osm_l3]
           do_one_initcall+0x64/0x30c
           do_init_module+0x58/0x23c
           load_module+0x1df8/0x1f70
           init_module_from_file+0x88/0xc4
           idempotent_init_module+0x188/0x280
           __arm64_sys_finit_module+0x6c/0xd8
           invoke_syscall+0x48/0x110
           el0_svc_common.constprop.0+0xc0/0xe0
           do_el0_svc+0x1c/0x28
           el0_svc+0x4c/0x158
           el0t_64_sync_handler+0xc8/0xcc
           el0t_64_sync+0x198/0x19c

    other info that might help us debug this:

     Possible unsafe locking scenario:

           CPU0                    CPU1
           ----                    ----
      lock(icc_bw_lock);
                                   lock(fs_reclaim);
                                   lock(icc_bw_lock);
      lock(fs_reclaim);

     *** DEADLOCK ***

The icc_node_add() functions is not designed to fail, and as such it
should not do any memory allocation. In order to avoid this, add a new
helper function for the name generation to be called by drivers which
are using the new dynamic id feature.

Fixes: d30f83d278 ("interconnect: core: Add dynamic id allocation support")
Signed-off-by: Gabor Juhos <j4g8y7@gmail.com>
Link: https://lore.kernel.org/r/20250625-icc-bw-lockdep-v3-1-2b8f8b8987c4@gmail.com
Co-developed-by: Johan Hovold <johan+linaro@kernel.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20250627075854.26943-1-johan+linaro@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-06-27 21:43:40 +03:00
Xilin Wu
886a94f008 interconnect: qcom: sc7280: Add missing num_links to xm_pcie3_1 node
This allows adding interconnect paths for PCIe 1 in device tree later.

Fixes: 46bdcac533 ("interconnect: qcom: Add SC7280 interconnect provider driver")
Signed-off-by: Xilin Wu <sophon@radxa.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250613-sc7280-icc-pcie1-fix-v1-1-0b09813e3b09@radxa.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-06-23 17:56:01 +03:00
Georgi Djakov
5fed7fe33c Merge branch 'icc-sa8775p' into icc-next
Add Epoch Subsystem (EPSS) L3 provider support on SA8775P SoCs.

Current interconnect framework is based on static IDs for creating node
and registering with framework. This becomes a limitation for topologies
where there are multiple instances of same interconnect provider.
Modified interconnect framework APIs to create and link icc node with
dynamic IDs, this will help to overcome the dependency on static IDs.

* icc-sa8775p
  dt-bindings: interconnect: Add EPSS L3 compatible for SA8775P
  interconnect: core: Add dynamic id allocation support
  interconnect: qcom: Add multidev EPSS L3 support
  interconnect: qcom: icc-rpmh: Add dynamic icc node id support
  interconnect: qcom: sa8775p: Add dynamic icc node id support

Link: https://lore.kernel.org/r/20250415095343.32125-1-quic_rlaggysh@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-05-19 17:09:50 +03:00
Neil Armstrong
b0779ea486 interconnect: qcom: sm8650: remove regmap config for mc_virt & clk_virt
The mc_virt & clk_virt nodes are virtual and doesn't have associated registers,
thus the regmap config will fail with:
qnoc-sm8650 interconnect-0: error -EINVAL: invalid resource (null)

Remove the regmap config since QoS will never be applied to those virtual
nodes.

Reported-by: Pengyu Luo <mitltlatltl@gmail.com>
Fixes: 40ef9b6b77 ("interconnect: qcom: sm8650: enable QoS configuration")
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250519-topic-sm8650-upstream-icc-qos-fix-v1-1-6ace779250aa@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-05-19 17:09:32 +03:00
Neil Armstrong
463f2eaa20 interconnect: qcom: sm8650: add the MASTER_APSS_NOC
Add the MASTER_APSS_NOC interconnect node of the system NoC
and the associated QoS configuration.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250415-topic-sm8650-upstream-icc-apss-noc-v1-2-9e6bea3943d8@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-04-28 17:50:21 +03:00
Neil Armstrong
40ef9b6b77 interconnect: qcom: sm8650: enable QoS configuration
Enable QoS configuration for master ports with predefined values
for priority and urgency forwarding.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250407-topic-sm8650-upstream-icc-qos-v1-1-93b33f99a455@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-04-28 17:49:04 +03:00
Raviteja Laggyshetty
b1244645ad interconnect: qcom: sa8775p: Add dynamic icc node id support
To facilitate dynamic id allocation, discard the static IDs
from node data and set alloc_dyn_id in descriptor structure
to indicate dynamic ID allocation. Update the topology to use
node pointers for links instead of static IDs and forward declare
the node pointer to avoid undefined references.

Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250415095343.32125-6-quic_rlaggysh@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-04-15 14:13:54 +03:00
Raviteja Laggyshetty
7f9560a3be interconnect: qcom: icc-rpmh: Add dynamic icc node id support
Interconnect framework relies on static IDs for creating,
linking and maintaning the topology. This dependency on static
IDs prevents creating two instances of same provider. To overcome
the dependency on static IDs, dynamic ID support is being added.
To facilitate dynamic node ID support, the driver now uses
node pointers for links instead of static node IDs and icc_node
pointer is added as member in qcom_icc_node structure to track
the node creation.

Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250415095343.32125-5-quic_rlaggysh@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-04-15 14:13:47 +03:00
Raviteja Laggyshetty
ac2c390650 interconnect: qcom: Add multidev EPSS L3 support
EPSS on SA8775P has two instances, necessitating the creation of two
device nodes with different compatibles due to the unique ICC node ID
and name limitations in the interconnect framework. Add multidevice
support for the OSM-L3 provider to dynamically obtain unique node IDs
and register with the framework.
EPSS topology includes a single master-slave pair within the same
provider, the node linking logic is simplified by directly connecting
the master node to the slave node.

Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
Link: https://lore.kernel.org/r/20250415095343.32125-4-quic_rlaggysh@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-04-15 14:13:40 +03:00
Greg Kroah-Hartman
797212a81c interconnect changes for 6.14
This pull request contains the interconnect changes for the 6.14-rc1 merge
 window. It contains one new driver and DT documentation updates for L3
 and bandwidth monitors.
 
 Driver changes:
 - New driver for the SM8750 platform
 - Add DT compatibles for QCS615 BWMON and SM8650 OSM
 
 Signed-off-by: Georgi Djakov <djakov@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJniPt0AAoJEIDQzArG2BZjuhAP/R+Ru2DtgMQX5EBCkAKKORWc
 FSOzWUjgL0kwP3lc9GMHTomyHDpP7ftiYjcodjg0dmt7Vbdo959YDwkzysWp9kb0
 uzQfE+ZVO8SSQ+JuGvzrL+nP5CB/ImTybpVRtsZY5GmLif4E9Wz9ZwDMKXy1F0/r
 oUhy8G3LwHUPmRvCZL3ASBOE05Yg43huLXCi6Lm4HTfC4dTZGyJYasgLnMMF90KH
 XZKy3oq9z1dUHzJS4tP4104mL9qkgeKaT2mM+NTM6RK1P39KcGmrq2YjiMLjwzvk
 0sbF53f4S9rDaPSOw2OuBUXqf8iYWglS9VXXgNTWovOYSahbQpJUaRks/kacUDIz
 6viqeqj78wwvQ9qYsKPbBScdQ0KuHbb4zzy5o6VE+m6oMDDFKIoyQGUY3o9ydNVl
 kwveT3hwQYpefIX7mddHsTfqMi54W5/Nwo4h3jH3vLuXDHnik3pjuppwyhEjD2aM
 ZB+Y/Q1+EmkWA173FjMyU15aQ8qmPZKEc+2CdBhWz+FsGPNzJBx5Rip+08Vu78CI
 O3Gnuki+GzVazatBVGRGlzGd29CinGl55zyz6rVlQHaP2cr5cafpZMPg4NJvUXvG
 krgbiuIe7akB+Z6f922RJzGmIvT9IIY1vwj0BjPGl/svjTk1lW0qE4MMDd/lnT3D
 8yo3cUinoos9S0MMQegA
 =eGKk
 -----END PGP SIGNATURE-----

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

Pull interconnect changes from Georgi:

interconnect changes for 6.14

This pull request contains the interconnect changes for the 6.14-rc1 merge
window. It contains one new driver and DT documentation updates for L3
and bandwidth monitors.

Driver changes:
- New driver for the SM8750 platform
- Add DT compatibles for QCS615 BWMON and SM8650 OSM

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

* tag 'icc-6.14-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  dt-bindings: interconnect: qcom,msm8998-bwmon: Add SM8750 CPU BWMONs
  dt-bindings: interconnect: OSM L3: Document sm8650 OSM L3 compatible
  dt-bindings: interconnect: qcom-bwmon: Document QCS615 bwmon compatibles
  interconnect: sm8750: Add missing const to static qcom_icc_desc
  interconnect: qcom: Add interconnect provider driver for SM8750
  dt-bindings: interconnect: add interconnect bindings for SM8750
2025-01-16 14:01:40 +01:00
Krzysztof Kozlowski
d071b81f94 interconnect: sm8750: Add missing const to static qcom_icc_desc
The statically allocated 'struct qcom_icc_desc' is not modified by the
driver and like all other instances should be const.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Link: https://lore.kernel.org/r/20250109164630.175093-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2025-01-13 19:59:09 +02:00
Raviteja Laggyshetty
5e0db3c2cd interconnect: qcom: Add interconnect provider driver for SM8750
Introduce SM8750 interconnect provider driver using the interconnect
framework.

Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
Signed-off-by: Melody Olvera <quic_molvera@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20241204-sm8750_master_interconnects-v3-2-3d9aad4200e9@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-12-17 14:05:50 +02:00
Georgi Djakov
00a973e093 interconnect: qcom: icc-rpm: Set the count member before accessing the flex array
The following UBSAN error is reported during boot on the db410c board on
a clang-19 build:

Internal error: UBSAN: array index out of bounds: 00000000f2005512 [#1] PREEMPT SMP
...
pc : qnoc_probe+0x5f8/0x5fc
...

The cause of the error is that the counter member was not set before
accessing the annotated flexible array member, but after that. Fix this
by initializing it earlier.

Reported-by: Linux Kernel Functional Testing <lkft@linaro.org>
Closes: https://lore.kernel.org/r/CA+G9fYs+2mBz1y2dAzxkj9-oiBJ2Acm1Sf1h2YQ3VmBqj_VX2g@mail.gmail.com
Fixes: dd4904f3b9 ("interconnect: qcom: Annotate struct icc_onecell_data with __counted_by")
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/r/20241203223334.233404-1-djakov@kernel.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-12-17 14:03:02 +02:00
Georgi Djakov
b1fd28da86 Merge branch 'icc-sar2130p' into icc-next
Add driver for the network of connects present on the SAR2130P platform.

* icc-sar2130p
  dt-bindings: interconnect: qcom: document SAR2130P NoC
  interconnect: qcom: add support for SAR2130P

Link: https://lore.kernel.org/r/20241018-sar2130p-icc-v2-0-c58c73dcd19d@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-11-05 01:32:05 +02:00
Georgi Djakov
55aac0ea75 Merge branch 'icc-qcs615' into icc-next
Add interconnect dt-bindings and driver support for Qualcomm QCS615 SoC.

* icc-qcs615
  dt-bindings: interconnect: document the RPMh Network-On-Chip interconnect in QCS615 SoC
  interconnect: qcom: add QCS615 interconnect provider driver

Link: https://lore.kernel.org/r/20240924143958.25-1-quic_rlaggysh@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-11-05 01:30:52 +02:00
Georgi Djakov
3b7dd9d88c Merge branch 'icc-qcs8300' into icc-next
Add interconnect support for QCS8300 SoC

* icc-qcs8300
  dt-bindings: interconnect: document the RPMh Network-On-Chip interconnect in QCS8300 SoC
  interconnect: qcom: add QCS8300 interconnect provider driver

Link: https://lore.kernel.org/r/20240910101013.3020-1-quic_rlaggysh@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-11-05 01:28:34 +02:00
Raviteja Laggyshetty
3063c3dfa0 interconnect: qcom: add QCS8300 interconnect provider driver
Add driver for the Qualcomm interconnect buses found in QCS8300
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: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
Link: https://lore.kernel.org/r/20240910101013.3020-3-quic_rlaggysh@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-10-22 12:36:29 +03:00
Uwe Kleine-König
31f1b03fbd interconnect: Switch back to struct platform_driver::remove()
After commit 0edb555a65 ("platform: Make platform_driver::remove()
return void") .remove() is (again) the right callback to implement for
platform drivers.

Convert all platform drivers below drivers/interconnect to use
.remove(), with the eventual goal to drop struct
platform_driver::remove_new(). As .remove() and .remove_new() have the
same prototypes, conversion is done by just changing the structure
member name in the driver initializer.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://lore.kernel.org/r/20241017154920.136220-2-u.kleine-koenig@baylibre.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-10-22 12:34:18 +03:00
Dmitry Baryshkov
92c366a53c interconnect: qcom: add support for SAR2130P
Add driver for the interconnects as present on the Qualcomm
SAR2130P platform. This is based on the msm-5.10 tree, tag
KERNEL.PLATFORM.1.0.r4-00400-NEO.0.

Co-developed-by: Odelu Kukatla <quic_okukatla@quicinc.com>
Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20241018-sar2130p-icc-v2-2-c58c73dcd19d@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-10-22 12:27:38 +03:00
Raviteja Laggyshetty
77d79677b0 interconnect: qcom: add QCS615 interconnect provider driver
Add driver for the Qualcomm interconnect buses found in QCS615
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: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
Link: https://lore.kernel.org/r/20240924143958.25-3-quic_rlaggysh@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-10-22 11:30:14 +03:00
Krzysztof Kozlowski
326b42d861 interconnect: qcom: msm8937: 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/20240905151636.280065-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-10-22 11:12:03 +03:00
Raviteja Laggyshetty
f874c74d08 interconnect: qcom: icc-rpmh: rename qos_clks_required flag
rename qos_clks_required flag to qos_requires_clocks in qcom_icc_desc
structure. This flag indicates that clocks are required for accessing
and programming the QoS registers.

Suggested-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
Link: https://lore.kernel.org/r/20240911093516.22347-1-quic_rlaggysh@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-10-22 11:11:25 +03:00
Raviteja Laggyshetty
05123e3299 interconnect: qcom: icc-rpmh: probe defer incase of missing QoS clock dependency
Return -EPROBE_DEFER from interconnect provider incase probe defer is
received from devm_clk_bulk_get_all(). This would help in reattempting
the inteconnect driver probe, once the required QoS clocks are
available.

Suggested-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Raviteja Laggyshetty <quic_rlaggysh@quicinc.com>
Reviewed-by: Konrad Dybcio <konradybcio@kernel.org>
Fixes: 0a7be6b35d ("interconnect: qcom: icc-rpmh: Add QoS configuration support")
Link: https://lore.kernel.org/r/20240911094516.16901-1-quic_rlaggysh@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-10-22 11:06:17 +03:00
Georgi Djakov
a5733950fe Merge branch 'icc-sm8350' into icc-next
A set of fixes that target stability of the SM8350 platform.

* icc-sm8350
  interconnect: qcom: sm8350: drop DISP nodes
  dt-bindings: interconnect: qcom,sm8350: drop DISP nodes
  interconnect: qcom: sm8250: Enable sync_state

Link: https://lore.kernel.org/r/20240804-sm8350-fixes-v1-0-1149dd8399fe@linaro.org/
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-08-26 01:36:44 +03:00
Adam Skladowski
1d4f55b5c5 interconnect: qcom: msm8953: Add ab_coeff
BIMC and SNOC-MM on downstream feature
qcom,util-fact which translates to ab_coeff, add it.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Link: https://lore.kernel.org/r/20240709102728.15349-9-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-08-24 02:54:43 +03:00
Adam Skladowski
7f3ea8a922 interconnect: qcom: qcs404: Add regmaps and more bus descriptions
Currently we are lacking descriptions of regmaps, bus clocks
and types of busses, provide them.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Link: https://lore.kernel.org/r/20240709102728.15349-7-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-08-24 02:54:42 +03:00
Adam Skladowski
16e5d505e4 interconnect: qcom: qcs404: Mark AP-owned nodes as such
When driver was upstreamed it seems ap_owned nodes were not available,
bring them now.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Link: https://lore.kernel.org/r/20240709102728.15349-6-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-08-24 02:54:42 +03:00
Adam Skladowski
755acd36fe interconnect: qcom: Add MSM8937 interconnect provider driver
Add driver for interconnect busses found in MSM8937 based platforms.
The topology consists of four NoCs that are partially controlled by a
RPM processor.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Link: https://lore.kernel.org/r/20240709102728.15349-5-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-08-24 02:54:42 +03:00
Dmitry Baryshkov
d3681b3021 interconnect: qcom: sm8250: Enable sync_state
Enable the generic icc sync_state callback to ensure interconnect votes
are actually taken into account, instead of being forced to the maximum
value.

Fixes: b95b668eaa ("interconnect: qcom: icc-rpmh: Add BCMs to commit list in pre_aggregate")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240804-sm8350-fixes-v1-8-1149dd8399fe@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-08-23 23:08:57 +03:00
Dmitry Baryshkov
c1bf21373f interconnect: qcom: sm8350: drop DISP nodes
The msm-5.x kernels have additional display RSC and separate display BCM
voter. Since upstream kernel doesn't yet provide display RSC, we end up
duplicating several nodes, which can result in incorrect votes being
cast. Drop *_DISP nodes.

Fixes: d26a566744 ("interconnect: qcom: Add SM8350 interconnect provider driver")
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240804-sm8350-fixes-v1-4-1149dd8399fe@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-08-23 23:04:51 +03:00
Adam Skladowski
6e3ea1f36b interconnect: qcom: Add MSM8976 interconnect provider driver
Add driver for interconnect busses found in MSM8976 based platforms.
The topology consists of four NoCs that are partially controlled by a
RPM processor.

Signed-off-by: Adam Skladowski <a39.skl@gmail.com>
Link: https://lore.kernel.org/r/20240709102728.15349-3-a39.skl@gmail.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-08-23 21:19:29 +03:00
Georgi Djakov
226e58b209 Merge branch 'icc-rpmh-qos' into icc-next
This series adds QoS support for QNOC type device which can be found on
SC7280 platform. It adds support for programming priority,
priority forward disable and urgency forwarding. This helps in
priortizing the traffic originating from different interconnect masters
at NOC (Network On Chip).

* icc-rpmh-qos
  dt-bindings: interconnect: add clock property to enable QOS on SC7280
  interconnect: qcom: icc-rpmh: Add QoS configuration support
  interconnect: qcom: sc7280: enable QoS configuration
  interconnect: qcom: Fix DT backwards compatibility for QoS

Link: https://lore.kernel.org/r/20240607173927.26321-1-quic_okukatla@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-07-04 22:45:20 +03:00
Odelu Kukatla
8b6bd8391f interconnect: qcom: Fix DT backwards compatibility for QoS
Add qos_clks_required flag to skip QoS configuration if clocks property
is not populated in devicetree for providers which require clocks to be
enabled for accessing registers. This is to keep the QoS configuration
backwards compatible with devices that have older DTB.

Reported-by: Bjorn Andersson <andersson@kernel.org>
Closes: https://lore.kernel.org/all/ciji6nlxn752ina4tmh6kwvek52nxpnguomqek6plwvwgvoqef@yrtexkpmn5br/
Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com>
Tested-by: Bjorn Andersson <andersson@kernel.org>
Fixes: fbd908bb8b ("interconnect: qcom: sc7280: enable QoS configuration")
Link: https://lore.kernel.org/r/20240704125515.22194-1-quic_okukatla@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-07-04 22:43:59 +03:00
Georgi Djakov
19990ff048 Merge branch 'icc-msm8953' into icc-next
Add interconnect driver for MSM8953-based devices.

* icc-msm8953
  dt-bindings: interconnect: qcom: Add Qualcomm MSM8953 NoC
  interconnect: qcom: Add MSM8953 driver

Link: https://lore.kernel.org/r/20240628-msm8953-interconnect-v3-0-a70d582182dc@mainlining.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-07-04 22:41:12 +03:00
Georgi Djakov
f61207ad09 Merge branch 'icc-fixes' into icc-next
* icc-fixes
  interconnect: qcom: qcm2290: Fix mas_snoc_bimc RPM master ID

Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-07-04 22:40:33 +03:00
Vladimir Lypak
90b400170b interconnect: qcom: Add MSM8953 driver
Add driver for interconnect busses found in MSM8953 based platforms.
The topology consists of four NoCs that are partially controlled by a
RPM processor.

Note that one of NoCs (System NoC) has a counterpart (System NoC MM)
that is modelled as child device to avoid resource conflicts, since it
uses same MMIO space for configuration.

Signed-off-by: Vladimir Lypak <vladimir.lypak@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Barnabás Czémán <barnabas.czeman@mainlining.org>
Link: https://lore.kernel.org/r/20240628-msm8953-interconnect-v3-2-a70d582182dc@mainlining.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-28 21:11:25 +03:00
Konrad Dybcio
cd5ce45890 interconnect: qcom: qcm2290: Fix mas_snoc_bimc RPM master ID
The value was wrong, resulting in misprogramming of the hardware.
Fix it.

Fixes: 1a14b1ac39 ("interconnect: qcom: Add QCM2290 driver support")
Reported-by: Stephan Gerhold <stephan@gerhold.net>
Closes: https://lore.kernel.org/linux-arm-msm/ZgMs_xZVzWH5uK-v@gerhold.net/
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240618-topic-2290_icc_2-v1-1-64446888a133@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-24 15:51:04 +03:00
Odelu Kukatla
fbd908bb8b interconnect: qcom: sc7280: enable QoS configuration
Enable QoS configuration for master ports with predefined values
for priority and urgency forawrding.

Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240607173927.26321-3-quic_okukatla@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-24 15:20:27 +03:00
Odelu Kukatla
0a7be6b35d interconnect: qcom: icc-rpmh: Add QoS configuration support
Add QoS support for QNOC device for configuring priority,
priority forward disable and urgency forwarding. QoS is required
to prioritize the traffic originating from different interconnect
masters at NoC (Network On Chip).

Signed-off-by: Odelu Kukatla <quic_okukatla@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240607173927.26321-2-quic_okukatla@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-24 15:20:27 +03:00
Jeff Johnson
b14aa62c83 interconnect: qcom: add missing MODULE_DESCRIPTION() macros
With ARCH=arm64, make allmodconfig && make W=1 C=1 reports:
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/qcom/interconnect_qcom.o
WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/interconnect/qcom/icc-rpmh.o

Add the missing invocations of the MODULE_DESCRIPTION() macro.

Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Link: https://lore.kernel.org/r/20240612-md-drivers-interconnect-qcom-v1-1-da0462d6301b@quicinc.com
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-06-13 16:12:26 +03:00
Greg Kroah-Hartman
eacdd8e36d interconnect changes for 6.10
This pull request contains the interconnect changes for the 6.10-rc1 merge
 window. It contains some small driver changes listed below:
 
 Driver changes:
 - Cleanup sm6115 QoS port numbering.
 - Fix incorrect port value in qcm2290 driver.
 
 Signed-off-by: Georgi Djakov <djakov@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJmNK6fAAoJEIDQzArG2BZjYtQP/3SjjMcXKV0eDjrH1AKwbg+c
 B3ePdDExkKa5sDi2X4a2TEz/cQD8pVb8BhtI7SR4uqbsYGHHAAqeXvPz2fw6am0z
 XVAMFZ6CkQIBDAIxJ0rPjc3LJ8GxXjipFnI0L5hLFRjNmGV9r7TS3Q7m/1OrTLHm
 YP6sS5LvPm0nfJfaELI+WPdO3mTol48owV5CDkkFwMWMB3E9kf/hTaBcP+q9h+5b
 Kr92jH4jq5cwp57mfIUXZlohK0S8owJutk3aCB1uC7eun9HFKvb1ejKl4GXowbPi
 SUC5FZwA/GThvMjVhbF2qcuzg6QGaR6HhnvAwHCmusXek1p7DwpHx/LUq7m6pv70
 YYHwoe9cepL/Oii1fuUmveW23fzHWXcryv1zucB5o4hqTDFxSUL5ctHTpFiULrYx
 kkRiNIwc6VusH6sJ2jYqG/L+TBnkEiiuQ/Pl2kmtwqlJ7n1JqbFq4XNHfknfnWIb
 35rqZ1jommQ1eR2Z6suCyOSCBOuC0YwNknVjshpGDzfn+6m5bNnQDYgi44TfYenA
 d3jSkxO3VixEIIYgnILoKxa2NepBhwGMJTcpFbvvaA9zeSHGoE4QSk4iA2cwV6Fp
 SM0Ovbw1fN22efyEcbCLlQbVLQ4CN2+w+lnjcTSI9CONlopo0hCjw/rMdkUVlX7a
 9jlmrMZEY0NwmrqyxEbo
 =UapV
 -----END PGP SIGNATURE-----

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

Georgi writes:

interconnect changes for 6.10

This pull request contains the interconnect changes for the 6.10-rc1 merge
window. It contains some small driver changes listed below:

Driver changes:
- Cleanup sm6115 QoS port numbering.
- Fix incorrect port value in qcm2290 driver.

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

* tag 'icc-6.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  interconnect: qcom: qcm2290: Fix mas_snoc_bimc QoS port assignment
  interconnect: qcom: sm6115: Unspaghettify SNoC QoS port numbering
2024-05-04 09:47:38 +02:00
Konrad Dybcio
230d05b117 interconnect: qcom: qcm2290: Fix mas_snoc_bimc QoS port assignment
The value was wrong, resulting in misprogramming of the hardware.
Fix it.

Fixes: 1a14b1ac39 ("interconnect: qcom: Add QCM2290 driver support")
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/20240326-topic-rpm_icc_qos_cleanup-v1-2-357e736792be@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-04-11 20:46:26 +03:00
Konrad Dybcio
2adc731188 interconnect: qcom: sm6115: Unspaghettify SNoC QoS port numbering
When I was creating this driver, my bright mind overlooked the existence
of desc->qos_offset and decided to make up for the difference it made by
adding 21 (0x15) to the port index on SNoC and its downstream buses.

Undo this mistake to make the indices actually mean something.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20240326-topic-rpm_icc_qos_cleanup-v1-1-357e736792be@linaro.org
Signed-off-by: Georgi Djakov <djakov@kernel.org>
2024-04-11 20:46:01 +03:00
Greg Kroah-Hartman
64fe9a8f9f interconnect fixes for v6.9-rc
Here are fixes for two reported issues. One of them is a fix for
 a driver that tries to access a non-existent resource which prints
 a warning message during boot. The other one is fixing a race
 condition in the core framework where one struct member has been
 left unprotected by mutex.
 
 - interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM
 - interconnect: Don't access req_list while it's being manipulated
 
 Signed-off-by: Georgi Djakov <djakov@kernel.org>
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJmBWPGAAoJEIDQzArG2BZj5EIP/im57/L6BX3IfvoS+2y3xrxD
 p8AzJnFxuiqPH1azaN9jvqH0iMNfb6ysjYklweCRbxPG0PuODeZq44SLTRbl8eF7
 YR31G/AYTftM7AZcVRiJZ+CCqFruE4g91wVTKMhnmUKH8VhQDz0bwP7S94ym5Ps2
 CUsnXa7fjoFp/Qp/uxWvr+cLD3foKj6EdSNuDYuv+ClmDOU7lUZ3jE6khDe4FioS
 9KjRVaaEO+kBC8nMOFUk/JEyxKOPpD8GItqrppkeC917gAO/2D5FL7/uO4BsU10n
 4a2X+CEr44k4KN6BXpGh/lc3PRhFjEiNYUdTLJMBCytfNALhnO58LGfkWdENiBEn
 yPpXLalJOz9wgAENS06LI52rF0LyU8kS2/QO2k9oC7WvTW8uttaCgEzUeSyxq2CO
 FUAeA0+y9uYIg7l6Zotpcl4i5CAV4A1w3zloIAGpFolnZ/YiGb0xNNp7OXu8pb86
 Kgz16jiH+HecO8RMlHkT4r7SnSKOaDtOscF5SKP7/6afhWYa5K4c4ECQXlCaAndj
 m0h70+rCAQ8GP77GGMtQQgMaycFnr2G67kvalAe7DYuI9OVg8XZMBWLWVUpb5Hch
 Kdm4bIyjHWPz79df7JweErj64hZeXsY55ggwjho5SPCPcxyZvjSDGDo9h/0RB/lq
 Jyl1o3DyBb/0ZDdTJrTg
 =FkyX
 -----END PGP SIGNATURE-----

Merge tag 'icc-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc into char-work-linus

Georgi writes:

interconnect fixes for v6.9-rc

Here are fixes for two reported issues. One of them is a fix for
a driver that tries to access a non-existent resource which prints
a warning message during boot. The other one is fixing a race
condition in the core framework where one struct member has been
left unprotected by mutex.

- interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM
- interconnect: Don't access req_list while it's being manipulated

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

* tag 'icc-6.9-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/djakov/icc:
  interconnect: Don't access req_list while it's being manipulated
  interconnect: qcom: x1e80100: Remove inexistent ACV_PERF BCM
2024-04-11 14:44:49 +02:00