From nobody Wed Nov 27 15:40:14 2024 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44D731BE251; Thu, 10 Oct 2024 10:09:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728554985; cv=none; b=Z5w1ul52mLP2tMJca8F4OQjd46QsMcZJsq5bYtNvt8LnVIVwjFygunI+i2MatO1Hi0DT7QuFuZmElC2fQ6LHpmUjAMYw72fEP8MzqzEtGJfRzXizoCfPPcsSbwaeFcK2CWDMBsxFS0f+jA32HyD4SyKXo2lnr/TsnqwpwTqolg0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728554985; c=relaxed/simple; bh=1devtUPHuNl3wWnbl3BrC/SkHddisfze/2kLWT0uMFA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-ID:References: In-Reply-To:To:CC; b=paxuT/lU0CrL8wGqz5S8SGskTa6RELGrkdbsbbR7d9IJhdTl7Zy3pe7Xpm3KdtLjvysREghKMTGlhPzcoAgXwyCbwY3PVtpkkF5au+kqZq8JnJylHS3mNnGYJJ4LKDcVH9V1xmzK/SLVKF1wvLK9v0hC4gMNXMUSs02fVTOwahk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=Ai0iFDgF; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="Ai0iFDgF" Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49A1av7w029300; Thu, 10 Oct 2024 10:09:35 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= R5OhkkmuVXJYEIOqzZ44+3xoVlPdSu7q/ZnNqPoHAEw=; b=Ai0iFDgFYRTwt6wW M8Ge7EAf/dCvxOVUGEkr6pgaDvt0lkmPgKJp6Jvz1SY00NBXompBo3fF6GIso64/ q0VrSnS9tHzpTruR6oePG4YdO8kjCSjZh05GdW9EVmb4I4T7qCxbE0r84kK9t0QF ACpNk8UbFK1iDMmygDA1Dl3oQQf1FpnnJ5HvHw1CbX/v4OCMoGNQi8cJiTX8O/fR 1aBvOilg4l9FGO85NTjZatvNIpbxpPRqIKpAdxhms9QBt1MqMaUvIr+gDTs7d98b YDdowedhnD3UKucjWXaYHTkfV7njgKBbQqXTruJ1k6hhrFZbdPo6MOdNIhkCUhHj PcVHrQ== Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 424x7s05gp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Oct 2024 10:09:35 +0000 (GMT) Received: from nalasex01b.na.qualcomm.com (nalasex01b.na.qualcomm.com [10.47.209.197]) by NALASPPMTA01.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 49AA9Y9h014634 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Oct 2024 10:09:34 GMT Received: from jingyw-gv.qualcomm.com (10.80.80.8) by nalasex01b.na.qualcomm.com (10.47.209.197) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Thu, 10 Oct 2024 03:09:30 -0700 From: Jingyi Wang Date: Thu, 10 Oct 2024 18:08:47 +0800 Subject: [PATCH v2 2/3] soc: qcom: llcc: Add LLCC configuration for the QCS8300 platform Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-ID: <20241010-qcs8300_llcc-v2-2-d4123a241db2@quicinc.com> References: <20241010-qcs8300_llcc-v2-0-d4123a241db2@quicinc.com> In-Reply-To: <20241010-qcs8300_llcc-v2-0-d4123a241db2@quicinc.com> To: Bjorn Andersson , Konrad Dybcio , Conor Dooley , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , , , , Jingyi Wang X-Mailer: b4 0.15-dev-99b12 X-Developer-Signature: v=1; a=ed25519-sha256; t=1728554962; l=3538; i=quic_jingyw@quicinc.com; s=20240910; h=from:subject:message-id; bh=1devtUPHuNl3wWnbl3BrC/SkHddisfze/2kLWT0uMFA=; b=KK4X+bDXIWDmad0t+o1yB9MhbVKEcEWvtOKZaGIN9KATF4UVRauCzibUUIx4hq8rLq36JO5jo V9nO6y1RYwfDOjgsm3cHu4ksCQRketQI7Ytt5J55qZORzp+0DpQhdLH X-Developer-Key: i=quic_jingyw@quicinc.com; a=ed25519; pk=ZRP1KgWMhlXXWlSYLoO7TSfwKgt6ke8hw5xWcSY+wLQ= X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01b.na.qualcomm.com (10.47.209.197) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: OYnoeCuZ2qYEbT09m6SSCNBeQIpMSFRW X-Proofpoint-ORIG-GUID: OYnoeCuZ2qYEbT09m6SSCNBeQIpMSFRW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 suspectscore=0 phishscore=0 mlxlogscore=999 spamscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 priorityscore=1501 mlxscore=0 adultscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2409260000 definitions=main-2410100067 Add LLCC configuration for the QCS8300 platform. There is an errata on LB_CNT information on QCS8300 platform, override the value to get the right number of banks. Signed-off-by: Jingyi Wang --- drivers/soc/qcom/llcc-qcom.c | 72 ++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 72 insertions(+) diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c index a470285f54a8..d867b1596725 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -2225,6 +2225,56 @@ static const struct llcc_slice_config sm8650_data[] = =3D { }, }; =20 +static const struct llcc_slice_config qcs8300_data[] =3D { + { + .usecase_id =3D LLCC_GPUHTW, + .slice_id =3D 11, + .max_cap =3D 128, + .priority =3D 1, + .fixed_size =3D true, + .bonus_ways =3D 0xf, + .cache_mode =3D 0, + .retain_on_pc =3D true, + }, { + .usecase_id =3D LLCC_GPU, + .slice_id =3D 12, + .max_cap =3D 512, + .priority =3D 1, + .fixed_size =3D true, + .bonus_ways =3D 0xf, + .cache_mode =3D 0, + .retain_on_pc =3D true, + .write_scid_en =3D true, + }, { + .usecase_id =3D LLCC_MMUHWT, + .slice_id =3D 13, + .max_cap =3D 128, + .priority =3D 1, + .fixed_size =3D true, + .bonus_ways =3D 0xf, + .cache_mode =3D 0, + .activate_on_init =3D true, + }, { + .usecase_id =3D LLCC_ECC, + .slice_id =3D 26, + .max_cap =3D 256, + .priority =3D 3, + .fixed_size =3D true, + .bonus_ways =3D 0xf, + .cache_mode =3D 0, + .activate_on_init =3D true, + }, { + .usecase_id =3D LLCC_WRCACHE, + .slice_id =3D 31, + .max_cap =3D 128, + .priority =3D 1, + .fixed_size =3D true, + .bonus_ways =3D 0xf, + .cache_mode =3D 0, + .activate_on_init =3D true, + }, +}; + static const struct llcc_slice_config qdu1000_data_2ch[] =3D { { .usecase_id =3D LLCC_MDMHPGRW, @@ -2646,6 +2696,16 @@ static const u32 llcc_v2_1_reg_offset[] =3D { [LLCC_COMMON_STATUS0] =3D 0x0003400c, }; =20 +static const struct qcom_llcc_config qcs8300_cfg[] =3D { + { + .sct_data =3D qcs8300_data, + .size =3D ARRAY_SIZE(qcs8300_data), + .need_llcc_cfg =3D true, + .reg_offset =3D llcc_v2_1_reg_offset, + .edac_reg_offset =3D &llcc_v2_1_edac_reg_offset, + }, +}; + static const struct qcom_llcc_config qdu1000_cfg[] =3D { { .sct_data =3D qdu1000_data_8ch, @@ -2829,6 +2889,11 @@ static const struct qcom_llcc_config x1e80100_cfg[] = =3D { }, }; =20 +static const struct qcom_sct_config qcs8300_cfgs =3D { + .llcc_config =3D qcs8300_cfg, + .num_config =3D ARRAY_SIZE(qcs8300_cfg), +}; + static const struct qcom_sct_config qdu1000_cfgs =3D { .llcc_config =3D qdu1000_cfg, .num_config =3D ARRAY_SIZE(qdu1000_cfg), @@ -3391,6 +3456,12 @@ static int qcom_llcc_probe(struct platform_device *p= dev) num_banks >>=3D LLCC_LB_CNT_SHIFT; drv_data->num_banks =3D num_banks; =20 + /* LB_CNT information is wrong on QCS8300, override the value */ + if (of_device_is_compatible(dev->of_node, "qcom,qcs8300-llcc")) { + num_banks =3D 4; + drv_data->num_banks =3D 4; + } + drv_data->regmaps =3D devm_kcalloc(dev, num_banks, sizeof(*drv_data->regm= aps), GFP_KERNEL); if (!drv_data->regmaps) { ret =3D -ENOMEM; @@ -3484,6 +3555,7 @@ static int qcom_llcc_probe(struct platform_device *pd= ev) } =20 static const struct of_device_id qcom_llcc_of_match[] =3D { + { .compatible =3D "qcom,qcs8300-llcc", .data =3D &qcs8300_cfgs}, { .compatible =3D "qcom,qdu1000-llcc", .data =3D &qdu1000_cfgs}, { .compatible =3D "qcom,sa8775p-llcc", .data =3D &sa8775p_cfgs }, { .compatible =3D "qcom,sc7180-llcc", .data =3D &sc7180_cfgs }, --=20 2.25.1