Skip to content

Commit f2ad904

Browse files
committed
Merge tag 'soc-drivers-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc
Pull SoC driver updates from Arnd Bergmann: "These are changes to SoC specific drivers and DT bindings that don't have a separate subsystem tree, or that get grouped here for simplicity. Nothing out of the ordinary for the 6.14 release here: - Most of the updates are for Qualcomm specific drivers, adding support for additional SoCs in the exssting drivers, and support for wrapped encryption key access in the SCM firmware. - The Arm SCMI firmware code gains support for having multiple instances of firmware running, and better module auto loading. - A few minor updates for litex, samsung, ti, tegra, mediatek, imx and renesas platforms. - Reset controller updates for amlogic, to add support for the A1 soc and clean up the existing code. - Memory controller updates for ti davinci aemif, refactoring the code and adding a few interfaces to other drivers" * tag 'soc-drivers-6.14' of git://git.kernel.org/pub/scm/linux/kernel/git/soc/soc: (58 commits) drivers/soc/litex: Use devm_register_restart_handler() reset: amlogic: aux: drop aux registration helper reset: amlogic: aux: get regmap through parent device reset: amlogic: add support for A1 SoC in auxiliary reset driver dt-bindings: reset: add bindings for A1 SoC audio reset controller soc/tegra: fuse: Update Tegra234 nvmem keepout list soc/tegra: Fix spelling error in tegra234_lookup_slave_timeout() soc/tegra: cbb: Drop unnecessary debugfs error handling firmware: qcom: scm: add calls for wrapped key support soc: qcom: pd_mapper: Add SM7225 compatible dt-bindings: firmware: qcom,scm: Document ipq5424 SCM soc: qcom: llcc: Update configuration data for IPQ5424 dt-bindings: cache: qcom,llcc: Add IPQ5424 compatible soc: mediatek: mtk-devapc: Fix leaking IO map on driver remove soc: mediatek: mtk-devapc: Fix leaking IO map on error paths firmware: qcom: scm: smc: Narrow 'mempool' variable scope firmware: qcom: scm: smc: Handle missing SCM device firmware: qcom: scm: Cleanup global '__scm' on probe failures firmware: qcom: scm: Fix missing read barrier in qcom_scm_get_tzmem_pool() firmware: qcom: scm: Fix missing read barrier in qcom_scm_is_available() ...
2 parents f102039 + 9ec8002 commit f2ad904

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+876
-374
lines changed

Documentation/devicetree/bindings/cache/qcom,llcc.yaml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ description: |
2020
properties:
2121
compatible:
2222
enum:
23+
- qcom,ipq5424-llcc
2324
- qcom,qcs615-llcc
2425
- qcom,qcs8300-llcc
2526
- qcom,qdu1000-llcc
@@ -42,11 +43,11 @@ properties:
4243
- qcom,x1e80100-llcc
4344

4445
reg:
45-
minItems: 2
46+
minItems: 1
4647
maxItems: 10
4748

4849
reg-names:
49-
minItems: 2
50+
minItems: 1
5051
maxItems: 10
5152

5253
interrupts:
@@ -66,6 +67,21 @@ required:
6667
- reg-names
6768

6869
allOf:
70+
- if:
71+
properties:
72+
compatible:
73+
contains:
74+
enum:
75+
- qcom,ipq5424-llcc
76+
then:
77+
properties:
78+
reg:
79+
items:
80+
- description: LLCC0 base register region
81+
reg-names:
82+
items:
83+
- const: llcc0_base
84+
6985
- if:
7086
properties:
7187
compatible:

Documentation/devicetree/bindings/firmware/qcom,scm.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- qcom,scm-ipq4019
2727
- qcom,scm-ipq5018
2828
- qcom,scm-ipq5332
29+
- qcom,scm-ipq5424
2930
- qcom,scm-ipq6018
3031
- qcom,scm-ipq806x
3132
- qcom,scm-ipq8074
@@ -42,6 +43,7 @@ properties:
4243
- qcom,scm-msm8996
4344
- qcom,scm-msm8998
4445
- qcom,scm-qcm2290
46+
- qcom,scm-qcs615
4547
- qcom,scm-qcs8300
4648
- qcom,scm-qdu1000
4749
- qcom,scm-sa8255p

Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- items:
2727
- enum:
2828
- qcom,qcm2290-cpu-bwmon
29+
- qcom,qcs615-cpu-bwmon
2930
- qcom,qcs8300-cpu-bwmon
3031
- qcom,sa8775p-cpu-bwmon
3132
- qcom,sc7180-cpu-bwmon
@@ -41,6 +42,7 @@ properties:
4142
- const: qcom,sdm845-bwmon # BWMON v4, unified register space
4243
- items:
4344
- enum:
45+
- qcom,qcs615-llcc-bwmon
4446
- qcom,qcs8300-llcc-bwmon
4547
- qcom,sa8775p-llcc-bwmon
4648
- qcom,sc7180-llcc-bwmon

Documentation/devicetree/bindings/soc/qcom/qcom,aoss-qmp.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ properties:
2525
compatible:
2626
items:
2727
- enum:
28+
- qcom,qcs615-aoss-qmp
2829
- qcom,qcs8300-aoss-qmp
2930
- qcom,qdu1000-aoss-qmp
3031
- qcom,sa8255p-aoss-qmp

Documentation/devicetree/bindings/soc/samsung/exynos-usi.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ properties:
6464

6565
samsung,mode:
6666
$ref: /schemas/types.yaml#/definitions/uint32
67+
enum: [0, 1, 2, 3]
6768
description:
6869
Selects USI function (which serial protocol to use). Refer to
6970
<include/dt-bindings/soc/samsung,exynos-usi.h> for valid USI mode values.

Documentation/devicetree/bindings/soc/samsung/samsung,exynos-sysreg.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ properties:
2121
- samsung,exynos3-sysreg
2222
- samsung,exynos4-sysreg
2323
- samsung,exynos5-sysreg
24+
- samsung,exynos8895-fsys0-sysreg
25+
- samsung,exynos8895-fsys1-sysreg
26+
- samsung,exynos8895-peric0-sysreg
27+
- samsung,exynos8895-peric1-sysreg
2428
- samsung,exynosautov920-peric0-sysreg
2529
- samsung,exynosautov920-peric1-sysreg
2630
- tesla,fsd-cam-sysreg
@@ -79,6 +83,10 @@ allOf:
7983
- samsung,exynos850-cmgp-sysreg
8084
- samsung,exynos850-peri-sysreg
8185
- samsung,exynos850-sysreg
86+
- samsung,exynos8895-fsys0-sysreg
87+
- samsung,exynos8895-fsys1-sysreg
88+
- samsung,exynos8895-peric0-sysreg
89+
- samsung,exynos8895-peric1-sysreg
8290
then:
8391
required:
8492
- clocks

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23661,6 +23661,7 @@ T: git git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git
2366123661
F: Documentation/devicetree/bindings/soc/ti/ti,pruss.yaml
2366223662
F: drivers/pmdomain/ti/omap_prm.c
2366323663
F: drivers/soc/ti/*
23664+
F: include/linux/pruss_driver.h
2366423665

2366523666
TI LM49xxx FAMILY ASoC CODEC DRIVERS
2366623667
M: M R Swami Reddy <[email protected]>

drivers/firmware/arm_scmi/common.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ struct scmi_transport_core_operations {
442442
*/
443443
struct scmi_transport {
444444
struct device *supplier;
445-
struct scmi_desc *desc;
445+
struct scmi_desc desc;
446446
struct scmi_transport_core_operations **core_ops;
447447
};
448448

@@ -468,7 +468,7 @@ static int __tag##_probe(struct platform_device *pdev) \
468468
device_set_of_node_from_dev(&spdev->dev, dev); \
469469
\
470470
strans.supplier = dev; \
471-
strans.desc = &(__desc); \
471+
memcpy(&strans.desc, &(__desc), sizeof(strans.desc)); \
472472
strans.core_ops = &(__core_ops); \
473473
\
474474
ret = platform_device_add_data(spdev, &strans, sizeof(strans)); \

drivers/firmware/arm_scmi/driver.c

Lines changed: 55 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <linux/io.h>
2525
#include <linux/io-64-nonatomic-hi-lo.h>
2626
#include <linux/kernel.h>
27+
#include <linux/kmod.h>
2728
#include <linux/ktime.h>
2829
#include <linux/hashtable.h>
2930
#include <linux/list.h>
@@ -43,6 +44,8 @@
4344
#define CREATE_TRACE_POINTS
4445
#include <trace/events/scmi.h>
4546

47+
#define SCMI_VENDOR_MODULE_ALIAS_FMT "scmi-protocol-0x%02x-%s"
48+
4649
static DEFINE_IDA(scmi_id);
4750

4851
static DEFINE_XARRAY(scmi_protocols);
@@ -275,6 +278,44 @@ scmi_vendor_protocol_lookup(int protocol_id, char *vendor_id,
275278
return proto;
276279
}
277280

281+
static const struct scmi_protocol *
282+
scmi_vendor_protocol_get(int protocol_id, struct scmi_revision_info *version)
283+
{
284+
const struct scmi_protocol *proto;
285+
286+
proto = scmi_vendor_protocol_lookup(protocol_id, version->vendor_id,
287+
version->sub_vendor_id,
288+
version->impl_ver);
289+
if (!proto) {
290+
int ret;
291+
292+
pr_debug("Looking for '" SCMI_VENDOR_MODULE_ALIAS_FMT "'\n",
293+
protocol_id, version->vendor_id);
294+
295+
/* Note that vendor_id is mandatory for vendor protocols */
296+
ret = request_module(SCMI_VENDOR_MODULE_ALIAS_FMT,
297+
protocol_id, version->vendor_id);
298+
if (ret) {
299+
pr_warn("Problem loading module for protocol 0x%x\n",
300+
protocol_id);
301+
return NULL;
302+
}
303+
304+
/* Lookup again, once modules loaded */
305+
proto = scmi_vendor_protocol_lookup(protocol_id,
306+
version->vendor_id,
307+
version->sub_vendor_id,
308+
version->impl_ver);
309+
}
310+
311+
if (proto)
312+
pr_info("Loaded SCMI Vendor Protocol 0x%x - %s %s %X\n",
313+
protocol_id, proto->vendor_id ?: "",
314+
proto->sub_vendor_id ?: "", proto->impl_ver);
315+
316+
return proto;
317+
}
318+
278319
static const struct scmi_protocol *
279320
scmi_protocol_get(int protocol_id, struct scmi_revision_info *version)
280321
{
@@ -283,22 +324,15 @@ scmi_protocol_get(int protocol_id, struct scmi_revision_info *version)
283324
if (protocol_id < SCMI_PROTOCOL_VENDOR_BASE)
284325
proto = xa_load(&scmi_protocols, protocol_id);
285326
else
286-
proto = scmi_vendor_protocol_lookup(protocol_id,
287-
version->vendor_id,
288-
version->sub_vendor_id,
289-
version->impl_ver);
327+
proto = scmi_vendor_protocol_get(protocol_id, version);
328+
290329
if (!proto || !try_module_get(proto->owner)) {
291330
pr_warn("SCMI Protocol 0x%x not found!\n", protocol_id);
292331
return NULL;
293332
}
294333

295334
pr_debug("Found SCMI Protocol 0x%x\n", protocol_id);
296335

297-
if (protocol_id >= SCMI_PROTOCOL_VENDOR_BASE)
298-
pr_info("Loaded SCMI Vendor Protocol 0x%x - %s %s %X\n",
299-
protocol_id, proto->vendor_id ?: "",
300-
proto->sub_vendor_id ?: "", proto->impl_ver);
301-
302336
return proto;
303337
}
304338

@@ -366,7 +400,9 @@ int scmi_protocol_register(const struct scmi_protocol *proto)
366400
return ret;
367401
}
368402

369-
pr_debug("Registered SCMI Protocol 0x%x\n", proto->id);
403+
pr_debug("Registered SCMI Protocol 0x%x - %s %s 0x%08X\n",
404+
proto->id, proto->vendor_id, proto->sub_vendor_id,
405+
proto->impl_ver);
370406

371407
return 0;
372408
}
@@ -3028,7 +3064,7 @@ static const struct scmi_desc *scmi_transport_setup(struct device *dev)
30283064
int ret;
30293065

30303066
trans = dev_get_platdata(dev);
3031-
if (!trans || !trans->desc || !trans->supplier || !trans->core_ops)
3067+
if (!trans || !trans->supplier || !trans->core_ops)
30323068
return NULL;
30333069

30343070
if (!device_link_add(dev, trans->supplier, DL_FLAG_AUTOREMOVE_CONSUMER)) {
@@ -3043,33 +3079,33 @@ static const struct scmi_desc *scmi_transport_setup(struct device *dev)
30433079
dev_info(dev, "Using %s\n", dev_driver_string(trans->supplier));
30443080

30453081
ret = of_property_read_u32(dev->of_node, "arm,max-rx-timeout-ms",
3046-
&trans->desc->max_rx_timeout_ms);
3082+
&trans->desc.max_rx_timeout_ms);
30473083
if (ret && ret != -EINVAL)
30483084
dev_err(dev, "Malformed arm,max-rx-timeout-ms DT property.\n");
30493085

30503086
ret = of_property_read_u32(dev->of_node, "arm,max-msg-size",
3051-
&trans->desc->max_msg_size);
3087+
&trans->desc.max_msg_size);
30523088
if (ret && ret != -EINVAL)
30533089
dev_err(dev, "Malformed arm,max-msg-size DT property.\n");
30543090

30553091
ret = of_property_read_u32(dev->of_node, "arm,max-msg",
3056-
&trans->desc->max_msg);
3092+
&trans->desc.max_msg);
30573093
if (ret && ret != -EINVAL)
30583094
dev_err(dev, "Malformed arm,max-msg DT property.\n");
30593095

30603096
dev_info(dev,
30613097
"SCMI max-rx-timeout: %dms / max-msg-size: %dbytes / max-msg: %d\n",
3062-
trans->desc->max_rx_timeout_ms, trans->desc->max_msg_size,
3063-
trans->desc->max_msg);
3098+
trans->desc.max_rx_timeout_ms, trans->desc.max_msg_size,
3099+
trans->desc.max_msg);
30643100

30653101
/* System wide atomic threshold for atomic ops .. if any */
30663102
if (!of_property_read_u32(dev->of_node, "atomic-threshold-us",
3067-
&trans->desc->atomic_threshold))
3103+
&trans->desc.atomic_threshold))
30683104
dev_info(dev,
30693105
"SCMI System wide atomic threshold set to %u us\n",
3070-
trans->desc->atomic_threshold);
3106+
trans->desc.atomic_threshold);
30713107

3072-
return trans->desc;
3108+
return &trans->desc;
30733109
}
30743110

30753111
static int scmi_probe(struct platform_device *pdev)

drivers/firmware/arm_scmi/transports/mailbox.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ static const struct of_device_id scmi_of_match[] = {
378378
{ .compatible = "arm,scmi" },
379379
{ /* Sentinel */ },
380380
};
381+
MODULE_DEVICE_TABLE(of, scmi_of_match);
381382

382383
DEFINE_SCMI_TRANSPORT_DRIVER(scmi_mailbox, scmi_mailbox_driver,
383384
scmi_mailbox_desc, scmi_of_match, core);

0 commit comments

Comments
 (0)