Merge tag 'qcom-drivers-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux into soc/drivers

Qualcomm driver updates for v6.16

Allow list QSEECOM for EFI variable services on on the Asus Zenbook A14,
and block list TZMEM on the SM7150 platform to avoid issues with rmtfs.

Extend the last-level cache (llcc) driver to support version 6 of the
hardware and enable SM8750 support.
Also add socinfo for the SM8750 platform.

Re-enable UCSI support on SC8280XP, now that the reported crash has been
dealt with, and filter the altmode notifications to avoid spurious
hotplug events being propagated to user space.

Add SM7150 support to pd-mapper.

* tag 'qcom-drivers-for-6.16' of https://git.kernel.org/pub/scm/linux/kernel/git/qcom/linux:
  soc: qcom: llcc-qcom: Add support for SM8750
  soc: qcom: llcc-qcom: Add support for LLCC V6
  dt-bindings: cache: qcom,llcc: Document SM8750 LLCC block
  soc: qcom: socinfo: add SM8750 SoC ID
  dt-bindings: arm: qcom,ids: add SoC ID for SM8750
  dt-bindings: soc: qcom: qcom,rpm: add missing clock/-names properties
  dt-bindings: soc: qcom,rpm: add missing clock-controller node
  soc: qcom: smem: Update max processor count
  firmware: qcom: tzmem: disable sm7150 platform
  soc: qcom: pd-mapper: Add support for SM7150
  soc: qcom: pmic_glink_altmode: fix spurious DP hotplug events
  soc: qcom: smp2p: Fix fallback to qcom,ipc parse
  soc: qcom: pmic_glink: enable UCSI on sc8280xp
  firmware: qcom: scm: Allow QSEECOM on Asus Zenbook A14
  dt-bindings: soc: qcom,rpmh-rsc: Limit power-domains requirement

Link: https://lore.kernel.org/r/20250513215656.44448-1-andersson@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
This commit is contained in:
Arnd Bergmann
2025-05-21 19:23:43 +02:00
14 changed files with 577 additions and 23 deletions
@@ -40,6 +40,7 @@ properties:
- qcom,sm8450-llcc
- qcom,sm8550-llcc
- qcom,sm8650-llcc
- qcom,sm8750-llcc
- qcom,x1e80100-llcc
reg:
@@ -274,6 +275,7 @@ allOf:
- qcom,sm8450-llcc
- qcom,sm8550-llcc
- qcom,sm8650-llcc
- qcom,sm8750-llcc
then:
properties:
reg:
@@ -36,6 +36,13 @@ properties:
- const: err
- const: wakeup
clocks:
maxItems: 1
clock-names:
items:
- const: ram
qcom,ipc:
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
@@ -46,6 +53,14 @@ properties:
description:
Three entries specifying the outgoing ipc bit used for signaling the RPM.
clock-controller:
type: object
additionalProperties: true
properties:
compatible:
contains:
const: qcom,rpmcc
patternProperties:
"^regulators(-[01])?$":
type: object
@@ -44,7 +44,13 @@ description: |
properties:
compatible:
const: qcom,rpmh-rsc
oneOf:
- items:
- enum:
- qcom,sc7180-rpmh-apps-rsc
- qcom,sdm845-rpmh-apps-rsc
- const: qcom,rpmh-rsc
- const: qcom,rpmh-rsc
interrupts:
minItems: 1
@@ -124,7 +130,21 @@ required:
- qcom,tcs-offset
- reg
- reg-names
- power-domains
allOf:
# Some platforms may lack a OSI-mode PSCI implementation, which implies the
# system power domain can't provide feedback about entering power collapse
- if:
not:
properties:
compatible:
contains:
enum:
- qcom,sc7180-rpmh-apps-rsc
- qcom,sdm845-rpmh-apps-rsc
then:
required:
- power-domains
additionalProperties: false
+2
View File
@@ -1986,6 +1986,8 @@ EXPORT_SYMBOL_GPL(qcom_scm_qseecom_app_send);
*/
static const struct of_device_id qcom_scm_qseecom_allowlist[] __maybe_unused = {
{ .compatible = "asus,vivobook-s15" },
{ .compatible = "asus,zenbook-a14-ux3407qa" },
{ .compatible = "asus,zenbook-a14-ux3407ra" },
{ .compatible = "dell,xps13-9345" },
{ .compatible = "hp,omnibook-x14" },
{ .compatible = "huawei,gaokun3" },
+1
View File
@@ -79,6 +79,7 @@ static const char *const qcom_tzmem_blacklist[] = {
"qcom,sc8180x",
"qcom,sdm670", /* failure in GPU firmware loading */
"qcom,sdm845", /* reset in rmtfs memory assignment */
"qcom,sm7150", /* reset in rmtfs memory assignment */
"qcom,sm8150", /* reset in rmtfs memory assignment */
NULL
};
+493 -4
View File
@@ -35,6 +35,11 @@
#define ATTR0_RES_WAYS_MASK GENMASK(15, 0)
#define ATTR0_BONUS_WAYS_MASK GENMASK(31, 16)
#define ATTR0_BONUS_WAYS_SHIFT 16
#define ATTR2_PROBE_TARGET_WAYS_MASK BIT(4)
#define ATTR2_FIXED_SIZE_MASK BIT(8)
#define ATTR2_PRIORITY_MASK GENMASK(14, 12)
#define ATTR2_PARENT_SCID_MASK GENMASK(21, 16)
#define ATTR2_IN_A_GROUP_MASK BIT(24)
#define LLCC_STATUS_READ_DELAY 100
#define CACHE_LINE_SIZE_SHIFT 6
@@ -49,6 +54,10 @@
#define LLCC_TRP_ATTR0_CFGn(n) (0x21000 + SZ_8 * n)
#define LLCC_TRP_ATTR1_CFGn(n) (0x21004 + SZ_8 * n)
#define LLCC_TRP_ATTR2_CFGn(n) (0x21100 + SZ_4 * n)
#define LLCC_V6_TRP_ATTR0_CFGn(n) (cfg->reg_offset[LLCC_TRP_ATTR0_CFG] + SZ_64 * (n))
#define LLCC_V6_TRP_ATTR1_CFGn(n) (cfg->reg_offset[LLCC_TRP_ATTR1_CFG] + SZ_64 * (n))
#define LLCC_V6_TRP_ATTR2_CFGn(n) (cfg->reg_offset[LLCC_TRP_ATTR2_CFG] + SZ_64 * (n))
#define LLCC_V6_TRP_ATTR3_CFGn(n) (cfg->reg_offset[LLCC_TRP_ATTR3_CFG] + SZ_64 * (n))
#define LLCC_TRP_SCID_DIS_CAP_ALLOC 0x21f00
#define LLCC_TRP_PCB_ACT 0x21f04
@@ -66,6 +75,7 @@
#define LLCC_VERSION_2_0_0_0 0x02000000
#define LLCC_VERSION_2_1_0_0 0x02010000
#define LLCC_VERSION_4_1_0_0 0x04010000
#define LLCC_VERSION_6_0_0_0 0X06000000
/**
* struct llcc_slice_config - Data associated with the llcc slice
@@ -106,6 +116,7 @@
* ovcap_en.
* @vict_prio: When current scid is under-capacity, allocate over other
* lower-than victim priority-line threshold scid.
* @parent_slice_id: For grouped slices, specifies the slice id of the parent.
*/
struct llcc_slice_config {
u32 usecase_id;
@@ -130,6 +141,7 @@ struct llcc_slice_config {
bool ovcap_en;
bool ovcap_prio;
bool vict_prio;
u32 parent_slice_id;
};
struct qcom_llcc_config {
@@ -153,6 +165,21 @@ struct qcom_sct_config {
enum llcc_reg_offset {
LLCC_COMMON_HW_INFO,
LLCC_COMMON_STATUS0,
LLCC_TRP_ATTR0_CFG,
LLCC_TRP_ATTR1_CFG,
LLCC_TRP_ATTR2_CFG,
LLCC_TRP_ATTR3_CFG,
LLCC_TRP_SID_DIS_CAP_ALLOC,
LLCC_TRP_ALGO_STALE_EN,
LLCC_TRP_ALGO_STALE_CAP_EN,
LLCC_TRP_ALGO_MRU0,
LLCC_TRP_ALGO_MRU1,
LLCC_TRP_ALGO_ALLOC0,
LLCC_TRP_ALGO_ALLOC1,
LLCC_TRP_ALGO_ALLOC2,
LLCC_TRP_ALGO_ALLOC3,
LLCC_TRP_WRS_EN,
LLCC_TRP_WRS_CACHEABLE_EN,
};
static const struct llcc_slice_config ipq5424_data[] = {
@@ -2662,6 +2689,263 @@ static const struct llcc_slice_config sm8650_data[] = {
},
};
static const struct llcc_slice_config sm8750_data[] = {
{
.usecase_id = LLCC_CPUSS,
.slice_id = 1,
.max_cap = 5120,
.priority = 1,
.bonus_ways = 0xffffffff,
.activate_on_init = true,
.write_scid_en = true,
}, {
.usecase_id = LLCC_MDMHPFX,
.slice_id = 24,
.max_cap = 1024,
.priority = 5,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_VIDSC0,
.slice_id = 2,
.max_cap = 512,
.priority = 4,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_AUDIO,
.slice_id = 35,
.max_cap = 512,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_MDMHPGRW,
.slice_id = 25,
.max_cap = 1024,
.priority = 5,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_MODHW,
.slice_id = 26,
.max_cap = 1024,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_CMPT,
.slice_id = 34,
.max_cap = 4096,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_GPUHTW,
.slice_id = 11,
.max_cap = 512,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_GPU,
.slice_id = 9,
.max_cap = 5632,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.write_scid_en = true,
.write_scid_cacheable_en = true
}, {
.usecase_id = LLCC_MMUHWT,
.slice_id = 18,
.max_cap = 768,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.activate_on_init = true,
}, {
.usecase_id = LLCC_DISP,
.slice_id = 16,
.max_cap = 7168,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.cache_mode = 2,
.stale_en = true,
}, {
.usecase_id = LLCC_VIDFW,
.slice_id = 17,
.priority = 4,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_CAMFW,
.slice_id = 20,
.priority = 4,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_MDMPNG,
.slice_id = 27,
.max_cap = 256,
.priority = 5,
.fixed_size = true,
.bonus_ways = 0xf0000000,
}, {
.usecase_id = LLCC_AUDHW,
.slice_id = 22,
.max_cap = 512,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_CVP,
.slice_id = 8,
.max_cap = 800,
.priority = 5,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.vict_prio = true,
}, {
.usecase_id = LLCC_MODPE,
.slice_id = 29,
.max_cap = 256,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xf0000000,
.alloc_oneway_en = true,
}, {
.usecase_id = LLCC_WRCACHE,
.slice_id = 31,
.max_cap = 512,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.activate_on_init = true,
}, {
.usecase_id = LLCC_CVPFW,
.slice_id = 19,
.max_cap = 64,
.priority = 4,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_CMPTHCP,
.slice_id = 15,
.max_cap = 256,
.priority = 4,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_LCPDARE,
.slice_id = 30,
.max_cap = 128,
.priority = 5,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.activate_on_init = true,
.alloc_oneway_en = true,
}, {
.usecase_id = LLCC_AENPU,
.slice_id = 3,
.max_cap = 3072,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.cache_mode = 2,
}, {
.usecase_id = LLCC_ISLAND1,
.slice_id = 12,
.max_cap = 7936,
.priority = 7,
.fixed_size = true,
.bonus_ways = 0x7fffffff,
}, {
.usecase_id = LLCC_DISP_WB,
.slice_id = 23,
.max_cap = 512,
.priority = 4,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_VIDVSP,
.slice_id = 4,
.max_cap = 256,
.priority = 4,
.fixed_size = true,
.bonus_ways = 0xffffffff,
}, {
.usecase_id = LLCC_VIDDEC,
.slice_id = 5,
.max_cap = 6144,
.priority = 4,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.cache_mode = 2,
.ovcap_prio = true,
.parent_slice_id = 33,
}, {
.usecase_id = LLCC_CAMOFE,
.slice_id = 33,
.max_cap = 6144,
.priority = 4,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.stale_en = true,
.ovcap_prio = true,
.parent_slice_id = 33,
}, {
.usecase_id = LLCC_CAMRTIP,
.slice_id = 13,
.max_cap = 1024,
.priority = 4,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.stale_en = true,
.ovcap_prio = true,
.parent_slice_id = 33,
}, {
.usecase_id = LLCC_CAMSRTIP,
.slice_id = 14,
.max_cap = 6144,
.priority = 4,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.stale_en = true,
.ovcap_prio = true,
.parent_slice_id = 33,
}, {
.usecase_id = LLCC_CAMRTRF,
.slice_id = 7,
.max_cap = 3584,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.stale_en = true,
.ovcap_prio = true,
.parent_slice_id = 33,
}, {
.usecase_id = LLCC_CAMSRTRF,
.slice_id = 21,
.max_cap = 6144,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.stale_en = true,
.ovcap_prio = true,
.parent_slice_id = 33,
}, {
.usecase_id = LLCC_CPUSSMPAM,
.slice_id = 6,
.max_cap = 2048,
.priority = 1,
.fixed_size = true,
.bonus_ways = 0xffffffff,
.activate_on_init = true,
.write_scid_en = true,
},
};
static const struct llcc_slice_config qcs615_data[] = {
{
.usecase_id = LLCC_CPUSS,
@@ -3161,6 +3445,33 @@ static const struct llcc_edac_reg_offset llcc_v2_1_edac_reg_offset = {
.drp_ecc_db_err_syn0 = 0x52120,
};
static const struct llcc_edac_reg_offset llcc_v6_edac_reg_offset = {
.trp_ecc_error_status0 = 0x47448,
.trp_ecc_error_status1 = 0x47450,
.trp_ecc_sb_err_syn0 = 0x47490,
.trp_ecc_db_err_syn0 = 0x474d0,
.trp_ecc_error_cntr_clear = 0x47444,
.trp_interrupt_0_status = 0x47600,
.trp_interrupt_0_clear = 0x47604,
.trp_interrupt_0_enable = 0x47608,
/* LLCC Common registers */
.cmn_status0 = 0x6400c,
.cmn_interrupt_0_enable = 0x6401c,
.cmn_interrupt_2_enable = 0x6403c,
/* LLCC DRP registers */
.drp_ecc_error_cfg = 0x80000,
.drp_ecc_error_cntr_clear = 0x80004,
.drp_interrupt_status = 0x80020,
.drp_interrupt_clear = 0x80028,
.drp_interrupt_enable = 0x8002c,
.drp_ecc_error_status0 = 0x820f4,
.drp_ecc_error_status1 = 0x820f8,
.drp_ecc_sb_err_syn0 = 0x820fc,
.drp_ecc_db_err_syn0 = 0x82120,
};
/* LLCC register offset starting from v1.0.0 */
static const u32 llcc_v1_reg_offset[] = {
[LLCC_COMMON_HW_INFO] = 0x00030000,
@@ -3173,6 +3484,27 @@ static const u32 llcc_v2_1_reg_offset[] = {
[LLCC_COMMON_STATUS0] = 0x0003400c,
};
/* LLCC register offset starting from v6.0.0 */
static const u32 llcc_v6_reg_offset[] = {
[LLCC_COMMON_HW_INFO] = 0x00064000,
[LLCC_COMMON_STATUS0] = 0x0006400c,
[LLCC_TRP_ATTR0_CFG] = 0x00041000,
[LLCC_TRP_ATTR1_CFG] = 0x00041008,
[LLCC_TRP_ATTR2_CFG] = 0x00041010,
[LLCC_TRP_ATTR3_CFG] = 0x00041014,
[LLCC_TRP_SID_DIS_CAP_ALLOC] = 0x00042000,
[LLCC_TRP_ALGO_STALE_EN] = 0x00042008,
[LLCC_TRP_ALGO_STALE_CAP_EN] = 0x00042010,
[LLCC_TRP_ALGO_MRU0] = 0x00042018,
[LLCC_TRP_ALGO_MRU1] = 0x00042020,
[LLCC_TRP_ALGO_ALLOC0] = 0x00042028,
[LLCC_TRP_ALGO_ALLOC1] = 0x00042030,
[LLCC_TRP_ALGO_ALLOC2] = 0x00042038,
[LLCC_TRP_ALGO_ALLOC3] = 0x00042040,
[LLCC_TRP_WRS_EN] = 0x00042080,
[LLCC_TRP_WRS_CACHEABLE_EN] = 0x00042088,
};
static const struct qcom_llcc_config qcs615_cfg[] = {
{
.sct_data = qcs615_data,
@@ -3379,6 +3711,16 @@ static const struct qcom_llcc_config sm8650_cfg[] = {
},
};
static const struct qcom_llcc_config sm8750_cfg[] = {
{
.sct_data = sm8750_data,
.size = ARRAY_SIZE(sm8750_data),
.skip_llcc_cfg = false,
.reg_offset = llcc_v6_reg_offset,
.edac_reg_offset = &llcc_v6_edac_reg_offset,
},
};
static const struct qcom_llcc_config x1e80100_cfg[] = {
{
.sct_data = x1e80100_data,
@@ -3489,6 +3831,11 @@ static const struct qcom_sct_config sm8650_cfgs = {
.num_config = ARRAY_SIZE(sm8650_cfg),
};
static const struct qcom_sct_config sm8750_cfgs = {
.llcc_config = sm8750_cfg,
.num_config = ARRAY_SIZE(sm8750_cfg),
};
static const struct qcom_sct_config x1e80100_cfgs = {
.llcc_config = x1e80100_cfg,
.num_config = ARRAY_SIZE(x1e80100_cfg),
@@ -3869,6 +4216,139 @@ static int _qcom_llcc_cfg_program(const struct llcc_slice_config *config,
return ret;
}
static int _qcom_llcc_cfg_program_v6(const struct llcc_slice_config *config,
const struct qcom_llcc_config *cfg)
{
u32 stale_en, stale_cap_en, mru_uncap_en, mru_rollover;
u32 alloc_oneway_en, ovcap_en, ovcap_prio, vict_prio;
u32 attr0_cfg, attr1_cfg, attr2_cfg, attr3_cfg;
u32 attr0_val, attr1_val, attr2_val, attr3_val;
u32 slice_offset, reg_offset;
struct llcc_slice_desc *desc;
u32 wren, wr_cache_en;
int ret;
attr0_cfg = LLCC_V6_TRP_ATTR0_CFGn(config->slice_id);
attr1_cfg = LLCC_V6_TRP_ATTR1_CFGn(config->slice_id);
attr2_cfg = LLCC_V6_TRP_ATTR2_CFGn(config->slice_id);
attr3_cfg = LLCC_V6_TRP_ATTR3_CFGn(config->slice_id);
attr0_val = config->res_ways;
attr1_val = config->bonus_ways;
attr2_val = config->cache_mode;
attr2_val |= FIELD_PREP(ATTR2_PROBE_TARGET_WAYS_MASK, config->probe_target_ways);
attr2_val |= FIELD_PREP(ATTR2_FIXED_SIZE_MASK, config->fixed_size);
attr2_val |= FIELD_PREP(ATTR2_PRIORITY_MASK, config->priority);
if (config->parent_slice_id && config->fixed_size) {
attr2_val |= FIELD_PREP(ATTR2_PARENT_SCID_MASK, config->parent_slice_id);
attr2_val |= ATTR2_IN_A_GROUP_MASK;
}
attr3_val = MAX_CAP_TO_BYTES(config->max_cap);
attr3_val /= drv_data->num_banks;
attr3_val >>= CACHE_LINE_SIZE_SHIFT;
ret = regmap_write(drv_data->bcast_regmap, attr0_cfg, attr0_val);
if (ret)
return ret;
ret = regmap_write(drv_data->bcast_regmap, attr1_cfg, attr1_val);
if (ret)
return ret;
ret = regmap_write(drv_data->bcast_regmap, attr2_cfg, attr2_val);
if (ret)
return ret;
ret = regmap_write(drv_data->bcast_regmap, attr3_cfg, attr3_val);
if (ret)
return ret;
slice_offset = config->slice_id % 32;
reg_offset = (config->slice_id / 32) * 4;
wren = config->write_scid_en << slice_offset;
ret = regmap_update_bits(drv_data->bcast_regmap,
cfg->reg_offset[LLCC_TRP_WRS_EN] + reg_offset,
BIT(slice_offset), wren);
if (ret)
return ret;
wr_cache_en = config->write_scid_cacheable_en << slice_offset;
ret = regmap_update_bits(drv_data->bcast_regmap,
cfg->reg_offset[LLCC_TRP_WRS_CACHEABLE_EN] + reg_offset,
BIT(slice_offset), wr_cache_en);
if (ret)
return ret;
stale_en = config->stale_en << slice_offset;
ret = regmap_update_bits(drv_data->bcast_regmap,
cfg->reg_offset[LLCC_TRP_ALGO_STALE_EN] + reg_offset,
BIT(slice_offset), stale_en);
if (ret)
return ret;
stale_cap_en = config->stale_cap_en << slice_offset;
ret = regmap_update_bits(drv_data->bcast_regmap,
cfg->reg_offset[LLCC_TRP_ALGO_STALE_CAP_EN] + reg_offset,
BIT(slice_offset), stale_cap_en);
if (ret)
return ret;
mru_uncap_en = config->mru_uncap_en << slice_offset;
ret = regmap_update_bits(drv_data->bcast_regmap,
cfg->reg_offset[LLCC_TRP_ALGO_MRU0] + reg_offset,
BIT(slice_offset), mru_uncap_en);
if (ret)
return ret;
mru_rollover = config->mru_rollover << slice_offset;
ret = regmap_update_bits(drv_data->bcast_regmap,
cfg->reg_offset[LLCC_TRP_ALGO_MRU1] + reg_offset,
BIT(slice_offset), mru_rollover);
if (ret)
return ret;
alloc_oneway_en = config->alloc_oneway_en << slice_offset;
ret = regmap_update_bits(drv_data->bcast_regmap,
cfg->reg_offset[LLCC_TRP_ALGO_ALLOC0] + reg_offset,
BIT(slice_offset), alloc_oneway_en);
if (ret)
return ret;
ovcap_en = config->ovcap_en << slice_offset;
ret = regmap_update_bits(drv_data->bcast_regmap,
cfg->reg_offset[LLCC_TRP_ALGO_ALLOC1] + reg_offset,
BIT(slice_offset), ovcap_en);
if (ret)
return ret;
ovcap_prio = config->ovcap_prio << slice_offset;
ret = regmap_update_bits(drv_data->bcast_regmap,
cfg->reg_offset[LLCC_TRP_ALGO_ALLOC2] + reg_offset,
BIT(slice_offset), ovcap_prio);
if (ret)
return ret;
vict_prio = config->vict_prio << slice_offset;
ret = regmap_update_bits(drv_data->bcast_regmap,
cfg->reg_offset[LLCC_TRP_ALGO_ALLOC3] + reg_offset,
BIT(slice_offset), vict_prio);
if (ret)
return ret;
if (config->activate_on_init) {
desc = llcc_slice_getd(config->usecase_id);
if (PTR_ERR_OR_ZERO(desc))
return -EINVAL;
ret = llcc_slice_activate(desc);
}
return ret;
}
static int qcom_llcc_cfg_program(struct platform_device *pdev,
const struct qcom_llcc_config *cfg)
{
@@ -3880,10 +4360,18 @@ static int qcom_llcc_cfg_program(struct platform_device *pdev,
sz = drv_data->cfg_size;
llcc_table = drv_data->cfg;
for (i = 0; i < sz; i++) {
ret = _qcom_llcc_cfg_program(&llcc_table[i], cfg);
if (ret)
return ret;
if (drv_data->version >= LLCC_VERSION_6_0_0_0) {
for (i = 0; i < sz; i++) {
ret = _qcom_llcc_cfg_program_v6(&llcc_table[i], cfg);
if (ret)
return ret;
}
} else {
for (i = 0; i < sz; i++) {
ret = _qcom_llcc_cfg_program(&llcc_table[i], cfg);
if (ret)
return ret;
}
}
return ret;
@@ -4102,6 +4590,7 @@ static const struct of_device_id qcom_llcc_of_match[] = {
{ .compatible = "qcom,sm8450-llcc", .data = &sm8450_cfgs },
{ .compatible = "qcom,sm8550-llcc", .data = &sm8550_cfgs },
{ .compatible = "qcom,sm8650-llcc", .data = &sm8650_cfgs },
{ .compatible = "qcom,sm8750-llcc", .data = &sm8750_cfgs },
{ .compatible = "qcom,x1e80100-llcc", .data = &x1e80100_cfgs },
{ }
};
-4
View File
@@ -371,15 +371,11 @@ static void pmic_glink_remove(struct platform_device *pdev)
__pmic_glink = NULL;
}
static const unsigned long pmic_glink_sc8280xp_client_mask = BIT(PMIC_GLINK_CLIENT_BATT) |
BIT(PMIC_GLINK_CLIENT_ALTMODE);
static const unsigned long pmic_glink_sm8450_client_mask = BIT(PMIC_GLINK_CLIENT_BATT) |
BIT(PMIC_GLINK_CLIENT_ALTMODE) |
BIT(PMIC_GLINK_CLIENT_UCSI);
static const struct of_device_id pmic_glink_of_match[] = {
{ .compatible = "qcom,sc8280xp-pmic-glink", .data = &pmic_glink_sc8280xp_client_mask },
{ .compatible = "qcom,pmic-glink", .data = &pmic_glink_sm8450_client_mask },
{}
};
+19 -11
View File
@@ -218,21 +218,29 @@ static void pmic_glink_altmode_worker(struct work_struct *work)
{
struct pmic_glink_altmode_port *alt_port = work_to_altmode_port(work);
struct pmic_glink_altmode *altmode = alt_port->altmode;
enum drm_connector_status conn_status;
typec_switch_set(alt_port->typec_switch, alt_port->orientation);
if (alt_port->svid == USB_TYPEC_DP_SID && alt_port->mode == 0xff)
pmic_glink_altmode_safe(altmode, alt_port);
else if (alt_port->svid == USB_TYPEC_DP_SID)
pmic_glink_altmode_enable_dp(altmode, alt_port, alt_port->mode,
alt_port->hpd_state, alt_port->hpd_irq);
else
pmic_glink_altmode_enable_usb(altmode, alt_port);
if (alt_port->svid == USB_TYPEC_DP_SID) {
if (alt_port->mode == 0xff) {
pmic_glink_altmode_safe(altmode, alt_port);
} else {
pmic_glink_altmode_enable_dp(altmode, alt_port,
alt_port->mode,
alt_port->hpd_state,
alt_port->hpd_irq);
}
drm_aux_hpd_bridge_notify(&alt_port->bridge->dev,
alt_port->hpd_state ?
connector_status_connected :
connector_status_disconnected);
if (alt_port->hpd_state)
conn_status = connector_status_connected;
else
conn_status = connector_status_disconnected;
drm_aux_hpd_bridge_notify(&alt_port->bridge->dev, conn_status);
} else {
pmic_glink_altmode_enable_usb(altmode, alt_port);
}
pmic_glink_altmode_request(altmode, ALTMODE_PAN_ACK, alt_port->index);
}
+11
View File
@@ -488,6 +488,16 @@ static const struct qcom_pdm_domain_data *sm6350_domains[] = {
NULL,
};
static const struct qcom_pdm_domain_data *sm7150_domains[] = {
&adsp_audio_pd,
&adsp_root_pd,
&adsp_sensor_pd,
&cdsp_root_pd,
&mpss_root_pd_gps,
&mpss_wlan_pd,
NULL,
};
static const struct qcom_pdm_domain_data *sm8150_domains[] = {
&adsp_audio_pd,
&adsp_root_pd,
@@ -565,6 +575,7 @@ static const struct of_device_id qcom_pdm_domains[] __maybe_unused = {
{ .compatible = "qcom,sm4250", .data = sm6115_domains, },
{ .compatible = "qcom,sm6115", .data = sm6115_domains, },
{ .compatible = "qcom,sm6350", .data = sm6350_domains, },
{ .compatible = "qcom,sm7150", .data = sm7150_domains, },
{ .compatible = "qcom,sm7225", .data = sm6350_domains, },
{ .compatible = "qcom,sm7325", .data = sc7280_domains, },
{ .compatible = "qcom,sm8150", .data = sm8150_domains, },
+1 -1
View File
@@ -86,7 +86,7 @@
#define SMEM_GLOBAL_HOST 0xfffe
/* Max number of processors/hosts in a system */
#define SMEM_HOST_COUNT 20
#define SMEM_HOST_COUNT 25
/**
* struct smem_proc_comm - proc_comm communication struct (legacy)
+1 -1
View File
@@ -575,7 +575,7 @@ static int qcom_smp2p_probe(struct platform_device *pdev)
smp2p->mbox_client.knows_txdone = true;
smp2p->mbox_chan = mbox_request_channel(&smp2p->mbox_client, 0);
if (IS_ERR(smp2p->mbox_chan)) {
if (PTR_ERR(smp2p->mbox_chan) != -ENODEV)
if (PTR_ERR(smp2p->mbox_chan) != -ENOENT)
return PTR_ERR(smp2p->mbox_chan);
smp2p->mbox_chan = NULL;
+1
View File
@@ -444,6 +444,7 @@ static const struct soc_id soc_id[] = {
{ qcom_board_id(IPQ5302) },
{ qcom_board_id(QCS8550) },
{ qcom_board_id(QCM8550) },
{ qcom_board_id(SM8750) },
{ qcom_board_id(IPQ5300) },
{ qcom_board_id(IPQ5321) },
{ qcom_board_id(IPQ5424) },
+1
View File
@@ -277,6 +277,7 @@
#define QCOM_ID_IPQ5302 595
#define QCOM_ID_QCS8550 603
#define QCOM_ID_QCM8550 604
#define QCOM_ID_SM8750 618
#define QCOM_ID_IPQ5300 624
#define QCOM_ID_IPQ5321 650
#define QCOM_ID_IPQ5424 651
+8
View File
@@ -24,6 +24,7 @@
#define LLCC_CMPTDMA 15
#define LLCC_DISP 16
#define LLCC_VIDFW 17
#define LLCC_CAMFW 18
#define LLCC_MDMHPFX 20
#define LLCC_MDMPNG 21
#define LLCC_AUDHW 22
@@ -67,6 +68,13 @@
#define LLCC_EVCS_LEFT 67
#define LLCC_EVCS_RIGHT 68
#define LLCC_SPAD 69
#define LLCC_VIDDEC 70
#define LLCC_CAMOFE 71
#define LLCC_CAMRTIP 72
#define LLCC_CAMSRTIP 73
#define LLCC_CAMRTRF 74
#define LLCC_CAMSRTRF 75
#define LLCC_CPUSSMPAM 89
/**
* struct llcc_slice_desc - Cache slice descriptor