Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 45 additions & 2 deletions Documentation/devicetree/bindings/cache/qcom,llcc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ description: |
properties:
compatible:
enum:
- qcom,glymur-llcc
- qcom,ipq5424-llcc
- qcom,kaanapali-llcc
- qcom,qcs615-llcc
Expand All @@ -46,11 +47,11 @@ properties:

reg:
minItems: 1
maxItems: 10
maxItems: 14

reg-names:
minItems: 1
maxItems: 10
maxItems: 14

interrupts:
maxItems: 1
Expand Down Expand Up @@ -84,6 +85,48 @@ allOf:
items:
- const: llcc0_base

- if:
properties:
compatible:
contains:
enum:
- qcom,glymur-llcc
then:
properties:
reg:
items:
- description: LLCC0 base register region
- description: LLCC1 base register region
- description: LLCC2 base register region
- description: LLCC3 base register region
- description: LLCC4 base register region
- description: LLCC5 base register region
- description: LLCC6 base register region
- description: LLCC7 base register region
- description: LLCC8 base register region
- description: LLCC9 base register region
- description: LLCC10 base register region
- description: LLCC11 base register region
- description: LLCC broadcast base register region
- description: LLCC broadcast AND register region
reg-names:
items:
- const: llcc0_base
- const: llcc1_base
- const: llcc2_base
- const: llcc3_base
- const: llcc4_base
- const: llcc5_base
- const: llcc6_base
- const: llcc7_base
- const: llcc7_base
- const: llcc8_base
- const: llcc9_base
- const: llcc10_base
- const: llcc11_base
- const: llcc_broadcast_base
- const: llcc_broadcast_and_base

- if:
properties:
compatible:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ properties:
- items:
- enum:
- qcom,glymur-cpucp-mbox
- qcom,kaanapali-cpucp-mbox
- const: qcom,x1e80100-cpucp-mbox
- enum:
- qcom,x1e80100-cpucp-mbox
Expand Down
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/mailbox/qcom-ipcc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ properties:
compatible:
items:
- enum:
- qcom,glymur-ipcc
- qcom,kaanapali-ipcc
- qcom,milos-ipcc
- qcom,qcs8300-ipcc
- qcom,qdu1000-ipcc
Expand Down
4 changes: 4 additions & 0 deletions Documentation/devicetree/bindings/mfd/qcom,spmi-pmic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ properties:
- qcom,pmc8380
- qcom,pmd8028
- qcom,pmd9635
- qcom,pmh0101
- qcom,pmh0104
- qcom,pmh0110
- qcom,pmi632
- qcom,pmi8950
- qcom,pmi8962
Expand All @@ -89,6 +92,7 @@ properties:
- qcom,pmk8002
- qcom,pmk8350
- qcom,pmk8550
- qcom,pmk8850
- qcom,pmm8155au
- qcom,pmm8654au
- qcom,pmp8074
Expand Down
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/sram/sram.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ properties:
- nvidia,tegra186-sysram
- nvidia,tegra194-sysram
- nvidia,tegra234-sysram
- qcom,kaanapali-imem
- qcom,rpm-msg-ram
- rockchip,rk3288-pmu-sram

Expand Down Expand Up @@ -89,6 +90,7 @@ patternProperties:
- arm,juno-scp-shmem
- arm,scmi-shmem
- arm,scp-shmem
- qcom,pil-reloc-info
- renesas,smp-sram
- rockchip,rk3066-smp-sram
- samsung,exynos4210-sysram
Expand Down
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -3274,6 +3274,7 @@ F: arch/arm64/boot/dts/qcom/
F: drivers/bus/qcom*
F: drivers/firmware/qcom/
F: drivers/soc/qcom/
F: drivers/watchdog/gunyah_wdt.c
F: include/dt-bindings/arm/qcom,ids.h
F: include/dt-bindings/firmware/qcom,scm.h
F: include/dt-bindings/soc/qcom*
Expand Down
68 changes: 68 additions & 0 deletions arch/arm64/boot/dts/qcom/glymur-ipcc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
/*
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/

#ifndef __DTS_GLYMUR_MAILBOX_IPCC_H
#define __DTS_GLYMUR_MAILBOX_IPCC_H

/* Glymur physical client IDs */
#define IPCC_MPROC_AOP 0
#define IPCC_MPROC_TZ 1
#define IPCC_MPROC_MPSS 2
#define IPCC_MPROC_LPASS 3
#define IPCC_MPROC_SLPI 4
#define IPCC_MPROC_SDC 5
#define IPCC_MPROC_CDSP 6
#define IPCC_MPROC_NPU 7
#define IPCC_MPROC_APSS 8
#define IPCC_MPROC_GPU 9
#define IPCC_MPROC_ICP 11
#define IPCC_MPROC_VPU 12
#define IPCC_MPROC_PCIE0 13
#define IPCC_MPROC_PCIE1 14
#define IPCC_MPROC_PCIE2 15
#define IPCC_MPROC_SPSS 16
#define IPCC_MPROC_PCIE3 19
#define IPCC_MPROC_PCIE4 20
#define IPCC_MPROC_PCIE5 21
#define IPCC_MPROC_PCIE6 22
#define IPCC_MPROC_TME 23
#define IPCC_MPROC_WPSS 24
#define IPCC_MPROC_PCIE7 44
#define IPCC_MPROC_SOCCP 46

#define IPCC_COMPUTE_L0_LPASS 0
#define IPCC_COMPUTE_L0_CDSP 1
#define IPCC_COMPUTE_L0_APSS 2
#define IPCC_COMPUTE_L0_GPU 3
#define IPCC_COMPUTE_L0_CVP 6
#define IPCC_COMPUTE_L0_ICP 7
#define IPCC_COMPUTE_L0_VPU 8
#define IPCC_COMPUTE_L0_DPU 9
#define IPCC_COMPUTE_L0_SOCCP 11

#define IPCC_COMPUTE_L1_LPASS 0
#define IPCC_COMPUTE_L1_CDSP 1
#define IPCC_COMPUTE_L1_APSS 2
#define IPCC_COMPUTE_L1_GPU 3
#define IPCC_COMPUTE_L1_CVP 6
#define IPCC_COMPUTE_L1_ICP 7
#define IPCC_COMPUTE_L1_VPU 8
#define IPCC_COMPUTE_L1_DPU 9
#define IPCC_COMPUTE_L1_SOCCP 11

#define IPCC_PERIPH_LPASS 0
#define IPCC_PERIPH_APSS 1
#define IPCC_PERIPH_PCIE0 2
#define IPCC_PERIPH_PCIE1 3
#define IPCC_PERIPH_PCIE2 6
#define IPCC_PERIPH_PCIE3 7
#define IPCC_PERIPH_PCIE4 8
#define IPCC_PERIPH_PCIE5 9
#define IPCC_PERIPH_PCIE6 10
#define IPCC_PERIPH_PCIE7 11
#define IPCC_PERIPH_SOCCP 13
#define IPCC_PERIPH_WPSS 16

#endif
58 changes: 58 additions & 0 deletions arch/arm64/boot/dts/qcom/kaanapali-ipcc.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
/*
* Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
*/

#ifndef __DTS_KAANAPALI_MAILBOX_IPCC_H
#define __DTS_KAANAPALI_MAILBOX_IPCC_H

/* Physical client IDs */
#define IPCC_MPROC_AOP 0
#define IPCC_MPROC_TZ 1
#define IPCC_MPROC_MPSS 2
#define IPCC_MPROC_LPASS 3
#define IPCC_MPROC_SDC 4
#define IPCC_MPROC_CDSP 5
#define IPCC_MPROC_APSS 6
#define IPCC_MPROC_SOCCP 13
#define IPCC_MPROC_DCP 14
#define IPCC_MPROC_SPSS 15
#define IPCC_MPROC_TME 16
#define IPCC_MPROC_WPSS 17

#define IPCC_COMPUTE_L0_CDSP 2
#define IPCC_COMPUTE_L0_APSS 3
#define IPCC_COMPUTE_L0_GPU 4
#define IPCC_COMPUTE_L0_CVP 8
#define IPCC_COMPUTE_L0_CAM 9
#define IPCC_COMPUTE_L0_CAM1 10
#define IPCC_COMPUTE_L0_DCP 11
#define IPCC_COMPUTE_L0_VPU 12
#define IPCC_COMPUTE_L0_SOCCP 16

#define IPCC_COMPUTE_L1_CDSP 2
#define IPCC_COMPUTE_L1_APSS 3
#define IPCC_COMPUTE_L1_GPU 4
#define IPCC_COMPUTE_L1_CVP 8
#define IPCC_COMPUTE_L1_CAM 9
#define IPCC_COMPUTE_L1_CAM1 10
#define IPCC_COMPUTE_L1_DCP 11
#define IPCC_COMPUTE_L1_VPU 12
#define IPCC_COMPUTE_L1_SOCCP 16

#define IPCC_PERIPH_CDSP 2
#define IPCC_PERIPH_APSS 3
#define IPCC_PERIPH_PCIE0 4
#define IPCC_PERIPH_PCIE1 5

#define IPCC_FENCE_CDSP 2
#define IPCC_FENCE_APSS 3
#define IPCC_FENCE_GPU 4
#define IPCC_FENCE_CVP 8
#define IPCC_FENCE_CAM 8
#define IPCC_FENCE_CAM1 10
#define IPCC_FENCE_DCP 11
#define IPCC_FENCE_VPU 20
#define IPCC_FENCE_SOCCP 24

#endif
53 changes: 53 additions & 0 deletions drivers/firmware/qcom/qcom_scm.c
Original file line number Diff line number Diff line change
Expand Up @@ -2167,6 +2167,56 @@ int qcom_scm_qtee_callback_response(phys_addr_t buf, size_t buf_size,
}
EXPORT_SYMBOL(qcom_scm_qtee_callback_response);

static void qcom_scm_gunyah_wdt_free(void *data)
{
struct platform_device *gunyah_wdt_dev = data;

platform_device_unregister(gunyah_wdt_dev);
}

static void qcom_scm_gunyah_wdt_init(struct qcom_scm *scm)
{
struct platform_device *gunyah_wdt_dev;
struct device_node *np;
bool of_wdt_available;
int i;
static const uuid_t gunyah_uuid = UUID_INIT(0xc1d58fcd, 0xa453, 0x5fdb,
0x92, 0x65, 0xce, 0x36,
0x67, 0x3d, 0x5f, 0x14);
static const char * const of_wdt_compatible[] = {
"qcom,kpss-wdt",
"arm,sbsa-gwdt",
};

/* Bail out if we are not running under Gunyah */
if (!IS_ENABLED(CONFIG_HAVE_ARM_SMCCC_DISCOVERY) ||
!arm_smccc_hypervisor_has_uuid(&gunyah_uuid))
return;

/*
* Gunyah emulates either of Qualcomm watchdog or ARM SBSA watchdog on
* newer platforms. Bail out if we find them in the devicetree.
*/
for (i = 0; i < ARRAY_SIZE(of_wdt_compatible); i++) {
np = of_find_compatible_node(NULL, NULL, of_wdt_compatible[i]);
of_wdt_available = of_device_is_available(np);
of_node_put(np);
if (of_wdt_available)
return;
}

gunyah_wdt_dev = platform_device_register_simple("gunyah-wdt", -1,
NULL, 0);
if (IS_ERR(gunyah_wdt_dev)) {
dev_err(scm->dev, "Failed to register Gunyah watchdog device: %ld\n",
PTR_ERR(gunyah_wdt_dev));
return;
}

devm_add_action_or_reset(scm->dev, qcom_scm_gunyah_wdt_free,
gunyah_wdt_dev);
}

static void qcom_scm_qtee_free(void *data)
{
struct platform_device *qtee_dev = data;
Expand Down Expand Up @@ -2433,6 +2483,9 @@ static int qcom_scm_probe(struct platform_device *pdev)
/* Initialize the QTEE object interface. */
qcom_scm_qtee_init(scm);

/* Initialize the Gunyah watchdog platform device. */
qcom_scm_gunyah_wdt_init(scm);

return 0;
}

Expand Down
4 changes: 2 additions & 2 deletions drivers/soc/qcom/icc-bwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -830,7 +830,7 @@ static const struct icc_bwmon_data msm8998_bwmon_data = {
static const struct icc_bwmon_data sdm845_cpu_bwmon_data = {
.sample_ms = 4,
.count_unit_kb = 64,
.zone1_thres_count = 16,
.zone1_thres_count = 3,
.zone3_thres_count = 1,
.quirks = BWMON_HAS_GLOBAL_IRQ,
.regmap_fields = sdm845_cpu_bwmon_reg_fields,
Expand All @@ -849,7 +849,7 @@ static const struct icc_bwmon_data sdm845_llcc_bwmon_data = {
static const struct icc_bwmon_data sc7280_llcc_bwmon_data = {
.sample_ms = 4,
.count_unit_kb = 64,
.zone1_thres_count = 16,
.zone1_thres_count = 3,
.zone3_thres_count = 1,
.quirks = BWMON_NEEDS_FORCE_CLEAR,
.regmap_fields = sdm845_llcc_bwmon_reg_fields,
Expand Down
Loading