Skip to content

Commit 657ef40

Browse files
author
Herton R. Krzesinski
committed
Merge: soc: qcom: bring up to 6.2rc1
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/1834 Bugzilla: https://bugzilla.redhat.com/2158216 Bring up drivers/soc/qcom/ to 6.2rc1. There's only a minor context diff in one of the patches for the ARM device tree bindings. Bringing in all of the changes + related binding dependencies is going to add an additional 100 patches or so. Signed-off-by: Brian Masney <bmasney@redhat.com> Approved-by: Adrien Thierry <athierry@redhat.com> Approved-by: Andrew Halaney <ahalaney@redhat.com> Approved-by: Eric Chanudet <echanude@redhat.com> Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2 parents a45e095 + e4db3f3 commit 657ef40

File tree

33 files changed

+1833
-436
lines changed

33 files changed

+1833
-436
lines changed

Documentation/devicetree/bindings/arm/qcom.yaml

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,126 @@ properties:
249249
- qcom,sm8350-mtp
250250
- const: qcom,sm8350
251251

252+
# Board compatibles go above
253+
254+
qcom,msm-id:
255+
$ref: /schemas/types.yaml#/definitions/uint32-matrix
256+
minItems: 1
257+
maxItems: 8
258+
items:
259+
items:
260+
- description: |
261+
MSM chipset ID - an exact match value consisting of two bitfields::
262+
- bits 0-15 - The unique MSM chipset ID
263+
- bits 16-31 - Reserved; should be 0
264+
- description: |
265+
Hardware revision ID - a chipset specific 32-bit ID representing
266+
the version of the chipset. It is best a match value - the
267+
bootloader will look for the closest possible match.
268+
deprecated: true
269+
description:
270+
The MSM chipset and hardware revision used Qualcomm bootloaders. It
271+
can optionally be an array of these to indicate multiple hardware that
272+
use the same device tree. It is expected that the bootloader will use
273+
this information at boot-up to decide which device tree to use when given
274+
multiple device trees, some of which may not be compatible with the
275+
actual hardware. It is the bootloader's responsibility to pass the
276+
correct device tree to the kernel.
277+
The property is deprecated.
278+
279+
qcom,board-id:
280+
$ref: /schemas/types.yaml#/definitions/uint32-matrix
281+
minItems: 1
282+
maxItems: 8
283+
oneOf:
284+
- items:
285+
- items:
286+
- description: |
287+
Board ID consisting of three bitfields::
288+
- bits 31-24 - Unused
289+
- bits 23-16 - Platform Version Major
290+
- bits 15-8 - Platform Version Minor
291+
- bits 7-0 - Platform Type
292+
Platform Type field is an exact match value. The
293+
Platform Major/Minor field is a best match. The bootloader will
294+
look for the closest possible match.
295+
- description: |
296+
Subtype ID unique to a Platform Type/Chipset ID. For a given
297+
Platform Type, there will typically only be a single board and the
298+
subtype_id will be 0. However in some cases board variants may
299+
need to be distinguished by different subtype_id values.
300+
- items:
301+
# OnePlus uses a variant of board-id with four elements:
302+
- items:
303+
- const: 8
304+
- const: 0
305+
- description: OnePlus board ID
306+
- description: OnePlus subtype ID
307+
deprecated: true
308+
description:
309+
The board type and revision information. It can optionally be an array
310+
of these to indicate multiple boards that use the same device tree. It
311+
is expected that the bootloader will use this information at boot-up to
312+
decide which device tree to use when given multiple device trees, some of
313+
which may not be compatible with the actual hardware. It is the
314+
bootloader's responsibility to pass the correct device tree to the
315+
kernel
316+
The property is deprecated.
317+
318+
allOf:
319+
# Explicit allow-list for older SoCs. The legacy properties are not allowed
320+
# on newer SoCs.
321+
- if:
322+
properties:
323+
compatible:
324+
contains:
325+
enum:
326+
- qcom,apq8026
327+
- qcom,apq8094
328+
- qcom,apq8096
329+
- qcom,msm8992
330+
- qcom,msm8994
331+
- qcom,msm8996
332+
- qcom,msm8998
333+
- qcom,sdm630
334+
- qcom,sdm632
335+
- qcom,sdm845
336+
- qcom,sdx55
337+
- qcom,sdx65
338+
- qcom,sm6125
339+
- qcom,sm6350
340+
- qcom,sm7225
341+
- qcom,sm8150
342+
- qcom,sm8250
343+
then:
344+
properties:
345+
qcom,board-id: true
346+
qcom,msm-id: true
347+
else:
348+
properties:
349+
qcom,board-id: false
350+
qcom,msm-id: false
351+
352+
- if:
353+
properties:
354+
compatible:
355+
contains:
356+
enum:
357+
- oneplus,cheeseburger
358+
- oneplus,dumpling
359+
- oneplus,enchilada
360+
- oneplus,fajita
361+
then:
362+
properties:
363+
qcom,board-id:
364+
items:
365+
minItems: 4
366+
else:
367+
properties:
368+
qcom,board-id:
369+
items:
370+
maxItems: 2
371+
252372
additionalProperties: true
253373

254374
...

Documentation/devicetree/bindings/power/qcom,rpmpd.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ properties:
1818
enum:
1919
- qcom,mdm9607-rpmpd
2020
- qcom,msm8226-rpmpd
21+
- qcom,msm8909-rpmpd
2122
- qcom,msm8916-rpmpd
2223
- qcom,msm8939-rpmpd
2324
- qcom,msm8953-rpmpd
@@ -27,22 +28,27 @@ properties:
2728
- qcom,msm8998-rpmpd
2829
- qcom,qcm2290-rpmpd
2930
- qcom,qcs404-rpmpd
31+
- qcom,qdu1000-rpmhpd
3032
- qcom,sa8540p-rpmhpd
3133
- qcom,sdm660-rpmpd
3234
- qcom,sc7180-rpmhpd
3335
- qcom,sc7280-rpmhpd
3436
- qcom,sc8180x-rpmhpd
3537
- qcom,sc8280xp-rpmhpd
38+
- qcom,sdm670-rpmhpd
3639
- qcom,sdm845-rpmhpd
3740
- qcom,sdx55-rpmhpd
3841
- qcom,sdx65-rpmhpd
42+
- qcom,sm4250-rpmpd
3943
- qcom,sm6115-rpmpd
4044
- qcom,sm6125-rpmpd
4145
- qcom,sm6350-rpmhpd
46+
- qcom,sm6375-rpmpd
4247
- qcom,sm8150-rpmhpd
4348
- qcom,sm8250-rpmhpd
4449
- qcom,sm8350-rpmhpd
4550
- qcom,sm8450-rpmhpd
51+
- qcom,sm8550-rpmhpd
4652

4753
'#power-domain-cells':
4854
const: 1

drivers/base/power/domain.c

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,31 @@ void dev_pm_genpd_set_next_wakeup(struct device *dev, ktime_t next)
494494
}
495495
EXPORT_SYMBOL_GPL(dev_pm_genpd_set_next_wakeup);
496496

497+
/**
498+
* dev_pm_genpd_get_next_hrtimer - Return the next_hrtimer for the genpd
499+
* @dev: A device that is attached to the genpd.
500+
*
501+
* This routine should typically be called for a device, at the point of when a
502+
* GENPD_NOTIFY_PRE_OFF notification has been sent for it.
503+
*
504+
* Returns the aggregated value of the genpd's next hrtimer or KTIME_MAX if no
505+
* valid value have been set.
506+
*/
507+
ktime_t dev_pm_genpd_get_next_hrtimer(struct device *dev)
508+
{
509+
struct generic_pm_domain *genpd;
510+
511+
genpd = dev_to_genpd_safe(dev);
512+
if (!genpd)
513+
return KTIME_MAX;
514+
515+
if (genpd->gd)
516+
return genpd->gd->next_hrtimer;
517+
518+
return KTIME_MAX;
519+
}
520+
EXPORT_SYMBOL_GPL(dev_pm_genpd_get_next_hrtimer);
521+
497522
static int _genpd_power_on(struct generic_pm_domain *genpd, bool timed)
498523
{
499524
unsigned int state_idx = genpd->state_idx;
@@ -1994,6 +2019,7 @@ static int genpd_alloc_data(struct generic_pm_domain *genpd)
19942019
gd->max_off_time_ns = -1;
19952020
gd->max_off_time_changed = true;
19962021
gd->next_wakeup = KTIME_MAX;
2022+
gd->next_hrtimer = KTIME_MAX;
19972023
}
19982024

19992025
/* Use only one "off" state if there were no states declared */

drivers/base/power/domain_governor.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,9 @@ static bool cpu_power_down_ok(struct dev_pm_domain *pd)
375375
if (idle_duration_ns <= 0)
376376
return false;
377377

378+
/* Store the next domain_wakeup to allow consumers to use it. */
379+
genpd->gd->next_hrtimer = domain_wakeup;
380+
378381
/*
379382
* Find the deepest idle state that has its residency value satisfied
380383
* and by also taking into account the power off latency for the state.

drivers/soc/qcom/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ config QCOM_GSBI
6363
config QCOM_LLCC
6464
tristate "Qualcomm Technologies, Inc. LLCC driver"
6565
depends on ARCH_QCOM || COMPILE_TEST
66+
select REGMAP_MMIO
6667
help
6768
Qualcomm Technologies, Inc. platform specific
6869
Last Level Cache Controller(LLCC) driver for platforms such as,
@@ -236,6 +237,7 @@ config QCOM_ICC_BWMON
236237
tristate "QCOM Interconnect Bandwidth Monitor driver"
237238
depends on ARCH_QCOM || COMPILE_TEST
238239
select PM_OPP
240+
select REGMAP_MMIO
239241
help
240242
Sets up driver monitoring bandwidth on various interconnects and
241243
based on that voting for interconnect bandwidth, adjusting their

drivers/soc/qcom/apr.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -454,11 +454,19 @@ static int apr_add_device(struct device *dev, struct device_node *np,
454454
adev->dev.driver = NULL;
455455

456456
spin_lock(&apr->svcs_lock);
457-
idr_alloc(&apr->svcs_idr, svc, svc_id, svc_id + 1, GFP_ATOMIC);
457+
ret = idr_alloc(&apr->svcs_idr, svc, svc_id, svc_id + 1, GFP_ATOMIC);
458458
spin_unlock(&apr->svcs_lock);
459+
if (ret < 0) {
460+
dev_err(dev, "idr_alloc failed: %d\n", ret);
461+
goto out;
462+
}
459463

460-
of_property_read_string_index(np, "qcom,protection-domain",
461-
1, &adev->service_path);
464+
ret = of_property_read_string_index(np, "qcom,protection-domain",
465+
1, &adev->service_path);
466+
if (ret < 0) {
467+
dev_err(dev, "Failed to read second value of qcom,protection-domain\n");
468+
goto out;
469+
}
462470

463471
dev_info(dev, "Adding APR/GPR dev: %s\n", dev_name(&adev->dev));
464472

@@ -468,6 +476,7 @@ static int apr_add_device(struct device *dev, struct device_node *np,
468476
put_device(&adev->dev);
469477
}
470478

479+
out:
471480
return ret;
472481
}
473482

drivers/soc/qcom/cmd-db.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,8 @@ static int cmd_db_dev_probe(struct platform_device *pdev)
338338

339339
debugfs_create_file("cmd-db", 0400, NULL, NULL, &cmd_db_debugfs_ops);
340340

341+
device_set_pm_not_required(&pdev->dev);
342+
341343
return 0;
342344
}
343345

0 commit comments

Comments
 (0)