From patchwork Mon Mar 13 12:40:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Komal Bajaj X-Patchwork-Id: 68815 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1163982wrd; Mon, 13 Mar 2023 05:49:31 -0700 (PDT) X-Google-Smtp-Source: AK7set8oXZZUE1kWLA47bdWB7QhYdQ3Z2Mlf58ekzKAjmhegJNck8xIG5UxIoIx7d3OHhzQfRaRd X-Received: by 2002:a17:90b:3a82:b0:237:c5cc:15bf with SMTP id om2-20020a17090b3a8200b00237c5cc15bfmr35263827pjb.13.1678711770773; Mon, 13 Mar 2023 05:49:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678711770; cv=none; d=google.com; s=arc-20160816; b=xj4eRYxhcUpRVpoeK6/o2L92MtlRsP/ATLPH9IlLep6XUmV8iEl0F3Ql75LBS5Gs1+ nIUaU0AcCzBJBpCva4KrJDb4Z5XtuowdeEslGe0E6Up0PPG8Bnn4rMtv4/bpc9AXIKO8 5GhzcmDR1179AwnUzDsBEkdMEMF3zPpUUZ0cVYmKdrcy4p0c9mCFZ/IQj6/VIWukM3xe TXQXTDzLbL4hqSQVMr2jN7fng0xYEkX+z72tXr9eOdA1cMSqgGRthLDj9H5F+gA8n+X6 N1D6d7tRXPX2LJMUjT2VHR3PtOVFK5CWQPGzNHJEGkf7Wc9zKEr6K5aw9dpQ2Twz9ORM XrCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=arWtPEA0bcJXqwG62AWlaCRZSxo1cNJCkmPGoarEGKM=; b=AlaK19FCBsZz95hJo8mgLjpaoOc8PvT/YCdVMceMcjdIsoEGS49GofWniSGPphsrhG WEmjVHldh1pjxsLZnazty6C08/TjpX1BBmo0LZtGnUAbJR87Z9lgYqH9i9BoUYbTIEW+ YuRABM+mW4kUqzdzJoe+c8yzpe28NR0Dc6EEdBPJtQVbHXbi3xz+aoDePUBKe8R61ZOZ RfOd3TWbPqHO2db2WylYq9ysUY4D5hw0QF3KeLCKqnY8q69POEu2BF5kMbKTt5bvxD02 vk/Ua7s365EDQRCJdtEDlAeHBF0r2oqJECnPaGvF9wszm1pNN+rA1dK0bqN+loKHVutA O4/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fgyVn41o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i16-20020a17090acf9000b0023cfec474b3si3178208pju.163.2023.03.13.05.49.16; Mon, 13 Mar 2023 05:49:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=fgyVn41o; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230017AbjCMMlZ (ORCPT + 99 others); Mon, 13 Mar 2023 08:41:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229929AbjCMMlT (ORCPT ); Mon, 13 Mar 2023 08:41:19 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C5CD1CBCC; Mon, 13 Mar 2023 05:41:17 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32DBB9hl004997; Mon, 13 Mar 2023 12:40:50 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=qcppdkim1; bh=arWtPEA0bcJXqwG62AWlaCRZSxo1cNJCkmPGoarEGKM=; b=fgyVn41oDlCBU2wl84LmZ6RUp9ionDxqbxwGvoKVyOc+fbTxxqd2dsVWt0McyFZGCH8T qn/reMVYkxOnmnyLu4ZyaATU7aGPz/tyqwe2ybSeO9x52j1AC2D+DAOei7GC3zw11sCA 0plrcWOgQSuq+mp4/k8eRvn0jfJXjVNmroQe8oJx8xXlffMhpFHhycPt1f+/hHqCegMV pYTy+q+8Unuz1OHZPHsWWXfaV/YvtBODMCPwLuQim8OijJffinX4sNHyasnBmMHepPIm qfHKxuoDSPHAALb9bMRthL/oLLgfsqBcNzLRDoBEHzS2Sglma0WQ6e44yY0nPTQtstga OQ== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3p8gnq4vq2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 12:40:49 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 32DCek7D022388; Mon, 13 Mar 2023 12:40:46 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3p8jqkna00-1; Mon, 13 Mar 2023 12:40:46 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32DCekvh022378; Mon, 13 Mar 2023 12:40:46 GMT Received: from kbajaj-linux.qualcomm.com (kbajaj-linux.qualcomm.com [10.214.66.129]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 32DCekMO022376; Mon, 13 Mar 2023 12:40:46 +0000 Received: from kbajaj-linux.qualcomm.com (localhost [127.0.0.1]) by kbajaj-linux.qualcomm.com (Postfix) with ESMTP id 3235F2A3; Mon, 13 Mar 2023 18:10:45 +0530 (IST) From: Komal Bajaj To: Rob Herring , Bjorn Andersson , Konrad Dybcio , Abel Vesa , Rishabh Bhatnagar , Prakash Ranjan , Krzysztof Kozlowski , Andy Gross Cc: Komal Bajaj , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 1/5] soc: qcom: llcc: Refactor llcc driver to support multiple configuration Date: Mon, 13 Mar 2023 18:10:36 +0530 Message-Id: <20230313124040.9463-2-quic_kbajaj@quicinc.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230313124040.9463-1-quic_kbajaj@quicinc.com> References: <20230313124040.9463-1-quic_kbajaj@quicinc.com> MIME-Version: 1.0 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: 4AVdA55gPYnlCUldzeJXZ6HWXP5az5de X-Proofpoint-ORIG-GUID: 4AVdA55gPYnlCUldzeJXZ6HWXP5az5de X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-13_05,2023-03-13_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 mlxlogscore=999 spamscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 impostorscore=0 clxscore=1015 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303130102 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760256873841149896?= X-GMAIL-MSGID: =?utf-8?q?1760256873841149896?= Refactor driver to support multiple configuration for llcc on a target. Signed-off-by: Komal Bajaj Reviewed-by: Abel Vesa --- drivers/soc/qcom/llcc-qcom.c | 191 ++++++++++++++++++++--------------- 1 file changed, 112 insertions(+), 79 deletions(-) diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c index 23ce2f78c4ed..00699a0c047e 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -416,92 +416,125 @@ static const u32 llcc_v2_1_reg_offset[] = { [LLCC_COMMON_STATUS0] = 0x0003400c, }; -static const struct qcom_llcc_config sc7180_cfg = { - .sct_data = sc7180_data, - .size = ARRAY_SIZE(sc7180_data), - .need_llcc_cfg = true, - .reg_offset = llcc_v1_reg_offset, - .edac_reg_offset = &llcc_v1_edac_reg_offset, +static const struct qcom_llcc_config sc7180_cfg[] = { + { + .sct_data = sc7180_data, + .size = ARRAY_SIZE(sc7180_data), + .need_llcc_cfg = true, + .reg_offset = llcc_v1_reg_offset, + .edac_reg_offset = &llcc_v1_edac_reg_offset, + }, + { }, }; -static const struct qcom_llcc_config sc7280_cfg = { - .sct_data = sc7280_data, - .size = ARRAY_SIZE(sc7280_data), - .need_llcc_cfg = true, - .reg_offset = llcc_v1_reg_offset, - .edac_reg_offset = &llcc_v1_edac_reg_offset, +static const struct qcom_llcc_config sc7280_cfg[] = { + { + .sct_data = sc7280_data, + .size = ARRAY_SIZE(sc7280_data), + .need_llcc_cfg = true, + .reg_offset = llcc_v1_reg_offset, + .edac_reg_offset = &llcc_v1_edac_reg_offset, + }, + { }, }; -static const struct qcom_llcc_config sc8180x_cfg = { - .sct_data = sc8180x_data, - .size = ARRAY_SIZE(sc8180x_data), - .need_llcc_cfg = true, - .reg_offset = llcc_v1_reg_offset, - .edac_reg_offset = &llcc_v1_edac_reg_offset, +static const struct qcom_llcc_config sc8180x_cfg[] = { + { + .sct_data = sc8180x_data, + .size = ARRAY_SIZE(sc8180x_data), + .need_llcc_cfg = true, + .reg_offset = llcc_v1_reg_offset, + .edac_reg_offset = &llcc_v1_edac_reg_offset, + }, + { }, }; -static const struct qcom_llcc_config sc8280xp_cfg = { - .sct_data = sc8280xp_data, - .size = ARRAY_SIZE(sc8280xp_data), - .need_llcc_cfg = true, - .reg_offset = llcc_v1_reg_offset, - .edac_reg_offset = &llcc_v1_edac_reg_offset, +static const struct qcom_llcc_config sc8280xp_cfg[] = { + { + .sct_data = sc8280xp_data, + .size = ARRAY_SIZE(sc8280xp_data), + .need_llcc_cfg = true, + .reg_offset = llcc_v1_reg_offset, + .edac_reg_offset = &llcc_v1_edac_reg_offset, + }, + { }, }; -static const struct qcom_llcc_config sdm845_cfg = { - .sct_data = sdm845_data, - .size = ARRAY_SIZE(sdm845_data), - .need_llcc_cfg = false, - .reg_offset = llcc_v1_reg_offset, - .edac_reg_offset = &llcc_v1_edac_reg_offset, +static const struct qcom_llcc_config sdm845_cfg[] = { + { + .sct_data = sdm845_data, + .size = ARRAY_SIZE(sdm845_data), + .need_llcc_cfg = false, + .reg_offset = llcc_v1_reg_offset, + .edac_reg_offset = &llcc_v1_edac_reg_offset, + }, + { }, }; -static const struct qcom_llcc_config sm6350_cfg = { - .sct_data = sm6350_data, - .size = ARRAY_SIZE(sm6350_data), - .need_llcc_cfg = true, - .reg_offset = llcc_v1_reg_offset, - .edac_reg_offset = &llcc_v1_edac_reg_offset, +static const struct qcom_llcc_config sm6350_cfg[] = { + { + .sct_data = sm6350_data, + .size = ARRAY_SIZE(sm6350_data), + .need_llcc_cfg = true, + .reg_offset = llcc_v1_reg_offset, + .edac_reg_offset = &llcc_v1_edac_reg_offset, + }, + { }, }; -static const struct qcom_llcc_config sm8150_cfg = { - .sct_data = sm8150_data, - .size = ARRAY_SIZE(sm8150_data), - .need_llcc_cfg = true, - .reg_offset = llcc_v1_reg_offset, - .edac_reg_offset = &llcc_v1_edac_reg_offset, +static const struct qcom_llcc_config sm8150_cfg[] = { + { + .sct_data = sm8150_data, + .size = ARRAY_SIZE(sm8150_data), + .need_llcc_cfg = true, + .reg_offset = llcc_v1_reg_offset, + .edac_reg_offset = &llcc_v1_edac_reg_offset, + }, + { }, }; -static const struct qcom_llcc_config sm8250_cfg = { - .sct_data = sm8250_data, - .size = ARRAY_SIZE(sm8250_data), - .need_llcc_cfg = true, - .reg_offset = llcc_v1_reg_offset, - .edac_reg_offset = &llcc_v1_edac_reg_offset, +static const struct qcom_llcc_config sm8250_cfg[] = { + { + .sct_data = sm8250_data, + .size = ARRAY_SIZE(sm8250_data), + .need_llcc_cfg = true, + .reg_offset = llcc_v1_reg_offset, + .edac_reg_offset = &llcc_v1_edac_reg_offset, + }, + { }, }; -static const struct qcom_llcc_config sm8350_cfg = { - .sct_data = sm8350_data, - .size = ARRAY_SIZE(sm8350_data), - .need_llcc_cfg = true, - .reg_offset = llcc_v1_reg_offset, - .edac_reg_offset = &llcc_v1_edac_reg_offset, +static const struct qcom_llcc_config sm8350_cfg[] = { + { + .sct_data = sm8350_data, + .size = ARRAY_SIZE(sm8350_data), + .need_llcc_cfg = true, + .reg_offset = llcc_v1_reg_offset, + .edac_reg_offset = &llcc_v1_edac_reg_offset, + }, + { }, }; -static const struct qcom_llcc_config sm8450_cfg = { - .sct_data = sm8450_data, - .size = ARRAY_SIZE(sm8450_data), - .need_llcc_cfg = true, - .reg_offset = llcc_v2_1_reg_offset, - .edac_reg_offset = &llcc_v2_1_edac_reg_offset, +static const struct qcom_llcc_config sm8450_cfg[] = { + { + .sct_data = sm8450_data, + .size = ARRAY_SIZE(sm8450_data), + .need_llcc_cfg = true, + .reg_offset = llcc_v2_1_reg_offset, + .edac_reg_offset = &llcc_v2_1_edac_reg_offset, + }, + { }, }; -static const struct qcom_llcc_config sm8550_cfg = { - .sct_data = sm8550_data, - .size = ARRAY_SIZE(sm8550_data), - .need_llcc_cfg = true, - .reg_offset = llcc_v2_1_reg_offset, - .edac_reg_offset = &llcc_v2_1_edac_reg_offset, +static const struct qcom_llcc_config sm8550_cfg[] = { + { + .sct_data = sm8550_data, + .size = ARRAY_SIZE(sm8550_data), + .need_llcc_cfg = true, + .reg_offset = llcc_v2_1_reg_offset, + .edac_reg_offset = &llcc_v2_1_edac_reg_offset, + }, + { }, }; static struct llcc_drv_data *drv_data = (void *) -EPROBE_DEFER; @@ -966,8 +999,8 @@ static int qcom_llcc_probe(struct platform_device *pdev) num_banks >>= LLCC_LB_CNT_SHIFT; drv_data->num_banks = num_banks; - llcc_cfg = cfg->sct_data; - sz = cfg->size; + llcc_cfg = cfg[0].sct_data; + sz = cfg[0].size; for (i = 0; i < sz; i++) if (llcc_cfg[i].slice_id > drv_data->max_slices) @@ -1016,17 +1049,17 @@ static int qcom_llcc_probe(struct platform_device *pdev) } static const struct of_device_id qcom_llcc_of_match[] = { - { .compatible = "qcom,sc7180-llcc", .data = &sc7180_cfg }, - { .compatible = "qcom,sc7280-llcc", .data = &sc7280_cfg }, - { .compatible = "qcom,sc8180x-llcc", .data = &sc8180x_cfg }, - { .compatible = "qcom,sc8280xp-llcc", .data = &sc8280xp_cfg }, - { .compatible = "qcom,sdm845-llcc", .data = &sdm845_cfg }, - { .compatible = "qcom,sm6350-llcc", .data = &sm6350_cfg }, - { .compatible = "qcom,sm8150-llcc", .data = &sm8150_cfg }, - { .compatible = "qcom,sm8250-llcc", .data = &sm8250_cfg }, - { .compatible = "qcom,sm8350-llcc", .data = &sm8350_cfg }, - { .compatible = "qcom,sm8450-llcc", .data = &sm8450_cfg }, - { .compatible = "qcom,sm8550-llcc", .data = &sm8550_cfg }, + { .compatible = "qcom,sc7180-llcc", .data = sc7180_cfg }, + { .compatible = "qcom,sc7280-llcc", .data = sc7280_cfg }, + { .compatible = "qcom,sc8180x-llcc", .data = sc8180x_cfg }, + { .compatible = "qcom,sc8280xp-llcc", .data = sc8280xp_cfg }, + { .compatible = "qcom,sdm845-llcc", .data = sdm845_cfg }, + { .compatible = "qcom,sm6350-llcc", .data = sm6350_cfg }, + { .compatible = "qcom,sm8150-llcc", .data = sm8150_cfg }, + { .compatible = "qcom,sm8250-llcc", .data = sm8250_cfg }, + { .compatible = "qcom,sm8350-llcc", .data = sm8350_cfg }, + { .compatible = "qcom,sm8450-llcc", .data = sm8450_cfg }, + { .compatible = "qcom,sm8550-llcc", .data = sm8550_cfg }, { } }; MODULE_DEVICE_TABLE(of, qcom_llcc_of_match); From patchwork Mon Mar 13 12:40:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Komal Bajaj X-Patchwork-Id: 68810 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1160703wrd; Mon, 13 Mar 2023 05:42:47 -0700 (PDT) X-Google-Smtp-Source: AK7set9i3MSLE0oOAuc6uMDHa5Ne1SHh+FrbUPa2o3UWnC72+6K44Q3uOzqLVdzGBNwGPNkiO933 X-Received: by 2002:a05:6a00:7:b0:624:cfbe:bbfa with SMTP id h7-20020a056a00000700b00624cfbebbfamr1750890pfk.15.1678711367041; Mon, 13 Mar 2023 05:42:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678711367; cv=none; d=google.com; s=arc-20160816; b=k/UZJ8eSpR9gzOTtgEVfCR6BPmYnsEV0RXoaID+Pb0CGV1sspz8gmigdqXGGG1BKTa CjutUOuGkwrVejUmFKDeemwYlQqXDRQTp8NnPNkinUxt0nIEO6+RQSjiR82y8a5gBVJ+ cxWCy5Kklx9bYv1RNYF5gaG2AOORimmyNwdZUME9bapKJL53X8labvIFu+HLDHg6i31i sEmR6quCJscx6M2dXNthhy/narSZ5tNUquO+SDziRZJg1IvkE63ph6ccmicBOCSTv2U7 QUY+4FjUtAf35UuAJB6h2q7R8un7Z4vvX/b2bSlxuamjfgtkva8FlqO89sAp7s9ewN4L Kbfw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=GSBLp78dcLJUo81PqS68p2voIQ9C1DQmMhPbqlXQWgs=; b=Lw9EOrk8CvoF0hGZSW1jyQGKa8MdZpRgZh9S4BU7hzayGWyssQ/Xj1lGn2kTCUnRxM VxRgrSSqKLD5pSehS6f3EUqVo7CQmsU3UnJGi20MX5LaK2NmQcQE5bF7PRW4gGUeGeZp VhLM6iv02MzLhZN/o8CkRYrJaAxCXvxvtwPyLS5dEc/N8P52ApShyHFZRYo4V2N8IJXp oZxy71mRFgZRWgzP4QPhACXjFMdHECZExSht+DfgFW0p3FphrUN+rssokgv1ED5mB8eP uMIqDHsQOWkw+uF7pkfiP1Ue03jPXdD/k0jiu2fWQ5UeeFcctKTL84J4izT8zvuRAch1 vZ3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="e/QEE1O7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e22-20020a63e016000000b004fb3547c61bsi6519614pgh.735.2023.03.13.05.42.31; Mon, 13 Mar 2023 05:42:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="e/QEE1O7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229783AbjCMMl2 (ORCPT + 99 others); Mon, 13 Mar 2023 08:41:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44904 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229944AbjCMMlT (ORCPT ); Mon, 13 Mar 2023 08:41:19 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9999A52F65; Mon, 13 Mar 2023 05:41:18 -0700 (PDT) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32DBABB4009745; Mon, 13 Mar 2023 12:40:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=qcppdkim1; bh=GSBLp78dcLJUo81PqS68p2voIQ9C1DQmMhPbqlXQWgs=; b=e/QEE1O7IgMpI0+kv+UfnjHPwj5UZ0KlpH4QGkw5WDjYfOFFiX+YOd1GwS+kSVLWWyDh CHv/6jx36JOEoedg/+iqcuzSjKS7UmXb2NThp5WYYPRzg0dVolHcGa15hgmQHi265mxO rzu3SvcAOjU7jzFTyR/y6wdC5d2sd+YuRIstZq0+iMraETOR5ogXUe8IWVgkjlyEED+5 ed+Pfff2nPGAqDV16UrLEPhc22sj9bmzC3maohalbWpKb8HPc2vqFcKajVVlOlJ7WEPn p9RrJHcadGP0rnQM3k42Nj/uYMuZPxm2wReE3kahVIQnhNQ5KDCNQgLtPnsDBu8SZCaY NA== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pa1qgrcay-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 12:40:51 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 32DCelpu022400; Mon, 13 Mar 2023 12:40:47 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3p8jqkna06-1; Mon, 13 Mar 2023 12:40:47 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32DCelkF022392; Mon, 13 Mar 2023 12:40:47 GMT Received: from kbajaj-linux.qualcomm.com (kbajaj-linux.qualcomm.com [10.214.66.129]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 32DCelMb022391; Mon, 13 Mar 2023 12:40:47 +0000 Received: from kbajaj-linux.qualcomm.com (localhost [127.0.0.1]) by kbajaj-linux.qualcomm.com (Postfix) with ESMTP id 5B2142A3; Mon, 13 Mar 2023 18:10:46 +0530 (IST) From: Komal Bajaj To: Rob Herring , Bjorn Andersson , Konrad Dybcio , Abel Vesa , Rishabh Bhatnagar , Prakash Ranjan , Krzysztof Kozlowski , Andy Gross Cc: Komal Bajaj , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 2/5] dt-bindings: arm: msm: Add bindings for multi channel DDR in LLCC Date: Mon, 13 Mar 2023 18:10:37 +0530 Message-Id: <20230313124040.9463-3-quic_kbajaj@quicinc.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230313124040.9463-1-quic_kbajaj@quicinc.com> References: <20230313124040.9463-1-quic_kbajaj@quicinc.com> MIME-Version: 1.0 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: M_3ZUgZGXRB_BD1gLn-dHmWd5ysD-KDy X-Proofpoint-GUID: M_3ZUgZGXRB_BD1gLn-dHmWd5ysD-KDy X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-13_05,2023-03-13_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 mlxscore=0 suspectscore=0 phishscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=880 spamscore=0 clxscore=1015 lowpriorityscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303130102 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760256450121199347?= X-GMAIL-MSGID: =?utf-8?q?1760256450121199347?= Add description for additional nodes needed to support mulitple channel DDR configurations in LLCC. Signed-off-by: Komal Bajaj --- Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml b/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml index 38efcad56dbd..9a4a76caf490 100644 --- a/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml +++ b/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml @@ -37,15 +37,24 @@ properties: items: - description: LLCC base register region - description: LLCC broadcast base register region + - description: Feature register to decide which LLCC configuration + to use, this is optional reg-names: items: - const: llcc_base - const: llcc_broadcast_base + - const: multi_channel_register interrupts: maxItems: 1 + multi-ch-bit-off: + items: + - description: Specifies the offset in bits into the multi_channel_register + and the number of bits used to decide which LLCC configuration + to use + required: - compatible - reg From patchwork Mon Mar 13 12:40:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Komal Bajaj X-Patchwork-Id: 68814 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1163926wrd; Mon, 13 Mar 2023 05:49:23 -0700 (PDT) X-Google-Smtp-Source: AK7set8k8kAeE47ASJlsAbHiPUZlj1qha14CEBbKNZOD40Cq4HtWwP7jakAjk2chsLS28Ry1Ifyq X-Received: by 2002:a05:6a20:69a6:b0:bf:58d1:cea0 with SMTP id t38-20020a056a2069a600b000bf58d1cea0mr7741623pzk.31.1678711762767; Mon, 13 Mar 2023 05:49:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678711762; cv=none; d=google.com; s=arc-20160816; b=eTBcJp4uObi56vPAIcD0xogYozbzlc7mpBzPXPpa0wGO6Ho7Rx9T5zBKz//n4taFIy KseRcQ4y0lJaNzy4SAM5NJ63vfRF9yBvGn9AtdsgMQZjbghFTktZ3bOVxq8C05MXB7i+ MLsyoOxDD+4CFErWE4EnWK3y3fVLTgxRSQd+AQMnK390N4l1hRTOzYlHpLk6uCv821LK Q9zUSqW8KBpza1Kiw1pwOKzsuz6BadKqiBGNC0Jspc4AHWLos9kIjvJgiMCU/fvo3pao +3L+gWogYKRvXajs+SlsSoEmB1cHEwQdNTuXsRMuma3qujTpoAeyuKeyaREHhdBZhUai iSlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=oKssoe7bYKrxW+GfKOP2L8FXlwSL+Mk+Ar8Hss8Pzeg=; b=jKsm+eeIOY+XmTDSgQo4sGToINtPWJHKt3MImYF0s8itNvLOUYT3ISWJevI4vtKfJ2 74k9r3AEyKCb8MrRuqeqsYAN19HXxmL1c21r/48TpaNK37v6fPFKf8Trzs1kx+rzD3/L HuRqMZXibTrhmpj1wf03gGVT18xVy2/5B8DuvsZCUrHKvfU4KzLtBWj0BZqfjBs62KgZ s94XsCCz75pbZwqok3p4V5heJ+jVxs4ABWnkUhwbCHj8qhGZb2KzrP0GNLQTKyz5b40m 0NrCuqmNJCqFU8SyV8C5FktXjIM9D012YaM8SzvljRmxG5gzxhV0QIb8toa5jYAL/3PZ QCww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ONUuzyBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s11-20020a65644b000000b005030925d30asi6593838pgv.347.2023.03.13.05.49.08; Mon, 13 Mar 2023 05:49:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=ONUuzyBk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229919AbjCMMlU (ORCPT + 99 others); Mon, 13 Mar 2023 08:41:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44876 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbjCMMlS (ORCPT ); Mon, 13 Mar 2023 08:41:18 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 780A64BEAA; Mon, 13 Mar 2023 05:41:16 -0700 (PDT) Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32DC4BsO004326; Mon, 13 Mar 2023 12:40:51 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=qcppdkim1; bh=oKssoe7bYKrxW+GfKOP2L8FXlwSL+Mk+Ar8Hss8Pzeg=; b=ONUuzyBkigHsQHcNdDTIHGxmgQDpRmXzzwrFSDoxdba8X9drtYBcTP3oZZOZ8X+ap0b4 1J+pYYzzC51OOhr9twaBOe4VNsJ29CkgpzA3tKB4rF1nvJfdXe09YmUUnVSqFof78gOt E+Dx0fsQJYnDbOpz2xbsxYjEqYFHslsZScngN+TQgEXbn4LC4jkfhsSV+MlRDu7lZW6k Z+K2jUWxH9H4Ean63FRMxzYxTS9+vD/U5qKMwY53SyUIpKyw1L2eH51ZWbvyP7FgNqPm /Fa7b+iCNx4tPQ5gjDdxmVnX3BhHmVpwZTlW7A1KO4EzxcNTqjsFjqg9ZHx5T07/egpP fA== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pa35w85p5-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 12:40:51 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 32DCej38022375; Mon, 13 Mar 2023 12:40:48 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3p8jqkna0e-1; Mon, 13 Mar 2023 12:40:48 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32DCemJh022406; Mon, 13 Mar 2023 12:40:48 GMT Received: from kbajaj-linux.qualcomm.com (kbajaj-linux.qualcomm.com [10.214.66.129]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 32DCem3R022404; Mon, 13 Mar 2023 12:40:48 +0000 Received: from kbajaj-linux.qualcomm.com (localhost [127.0.0.1]) by kbajaj-linux.qualcomm.com (Postfix) with ESMTP id 711BC2B7; Mon, 13 Mar 2023 18:10:47 +0530 (IST) From: Komal Bajaj To: Rob Herring , Bjorn Andersson , Konrad Dybcio , Abel Vesa , Rishabh Bhatnagar , Prakash Ranjan , Krzysztof Kozlowski , Andy Gross Cc: Komal Bajaj , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 3/5] dt-bindings: arm: msm: Add LLCC compatible for QDU1000/QRU1000 Date: Mon, 13 Mar 2023 18:10:38 +0530 Message-Id: <20230313124040.9463-4-quic_kbajaj@quicinc.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230313124040.9463-1-quic_kbajaj@quicinc.com> References: <20230313124040.9463-1-quic_kbajaj@quicinc.com> MIME-Version: 1.0 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: B8Szmv_528w0S2xc8msvGSb1gTQhB-vW X-Proofpoint-GUID: B8Szmv_528w0S2xc8msvGSb1gTQhB-vW X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-13_05,2023-03-13_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 suspectscore=0 adultscore=0 phishscore=0 impostorscore=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 bulkscore=0 spamscore=0 priorityscore=1501 mlxlogscore=769 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303130102 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760256865206989704?= X-GMAIL-MSGID: =?utf-8?q?1760256865206989704?= Add LLCC compatible for QDU1000/QRU1000 SoCs. Signed-off-by: Komal Bajaj --- Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml b/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml index 9a4a76caf490..afb1b84907e0 100644 --- a/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml +++ b/Documentation/devicetree/bindings/arm/msm/qcom,llcc.yaml @@ -32,6 +32,7 @@ properties: - qcom,sm8350-llcc - qcom,sm8450-llcc - qcom,sm8550-llcc + - qcom,qdu1000-llcc reg: items: From patchwork Mon Mar 13 12:40:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Komal Bajaj X-Patchwork-Id: 68819 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1167343wrd; Mon, 13 Mar 2023 05:56:43 -0700 (PDT) X-Google-Smtp-Source: AK7set+5L6iIvTdb6idhQa9pyi3L7uvyJ2oyybnfVjcsjy0aB+qthnlXaSAAqAyR7wdMOdQzopVp X-Received: by 2002:a62:7995:0:b0:622:c72a:d0e0 with SMTP id u143-20020a627995000000b00622c72ad0e0mr6677893pfc.13.1678712202954; Mon, 13 Mar 2023 05:56:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678712202; cv=none; d=google.com; s=arc-20160816; b=MOHluiGp6hKr4PhpQfoHhVQGVyN53HMvWUJ91CO4HJPqr6Eoiyy8g2VeJDHBP92HcE QR/PsGEHiNCJWuwxX3WczJrTLUmdLfGMrjAuoaYtQq1B05k5ucmVKTICfbxYnrGMk3u1 vLwequZq6G+eLloxJUwLOLbzrglxlQyjr7ft4PvN+/fsuUYsOXMtJVEEhBenAnw7ND7K xtBWkK1HG83/8wpjLdqQuVQsZo39cSbw3u+1NeppQ9VT8zLC6WRPdy3cyLhp6f+Y7pXZ NhYlSTDvyG+epcyhTP7Us6drsm5jUxQvbPMmxVisUhSjrpmQ14/pbANDL8iT2RGahB4X gYAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pw2qauJDJ1GtPyu7CN6d2qKRJxDzjTe1P/Bh9VDw4Cw=; b=fP2XYjmEqLdfx3d45klEt6Xp+S1J59644jDtHiGXqCSlMzLfbxtrXerUwYCkmlsjcR 9WjeHy5/dyJC6MtOUFjp16yYVcwdNFE4CUrNTOW9Anz7UMs8MNop287HmtehZ5/T1sXv vxP3z2hen4aji3ydZOhkKkc8wtQ8j0ggNbOyDoB1HLKJCTTbgo6Ge7ABM9A/++3lfnrE pD1xxaqmz0YZonrUmWLw/DatN7fSi8MCZAkmuyQE8lI50e+oGzfdFjYvirs3tlmSiKD2 t8ku4g1IFHNITsIWccMTPS6nHn10F8g8/x1l7rKqa8Ft2zeuFuznqBc4kLWg/VcSbU6B 1nAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=nTnQK5WT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l63-20020a638842000000b004fbe9c0d3c8si6592257pgd.692.2023.03.13.05.56.29; Mon, 13 Mar 2023 05:56:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=nTnQK5WT; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230080AbjCMMlf (ORCPT + 99 others); Mon, 13 Mar 2023 08:41:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229958AbjCMMlW (ORCPT ); Mon, 13 Mar 2023 08:41:22 -0400 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C5CC5ADEE; Mon, 13 Mar 2023 05:41:21 -0700 (PDT) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32DBB94f005024; Mon, 13 Mar 2023 12:40:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=qcppdkim1; bh=pw2qauJDJ1GtPyu7CN6d2qKRJxDzjTe1P/Bh9VDw4Cw=; b=nTnQK5WT7Ab3+vDPRs9Am7WfG6t1GnbfppqfQPy6HHV43QgsO1wnHomeGki6++V+GinU 0HJK9S2ypj3XFOFyXS+DmPDhLmzqXF8Sh8z72CKkpcIbGgspzQmFFTz+YGoUknYuo/VG FZeew+cdITDA771tDhGF3Kzve69B6TOnj2g5pEIE9dg5SH8dpk/zdqwBeTr4sb15reik jkr7oZRLCGkzeCejEsKxcQyn58Lb/r3tkwbH/SMucGo3pWOBSkGrOrSokdllyUjDuc6b 6TdxgUUg8aR4z3vNNdgVZBiiYobNKrGlug204I+F3iJ5jMk3JXXMcTpSbpfRSZj+r5ow eQ== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3p8gnq4vqm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 12:40:53 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 32DCekCB022385; Mon, 13 Mar 2023 12:40:50 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3p8jqkna0n-1; Mon, 13 Mar 2023 12:40:50 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32DCeo9t022428; Mon, 13 Mar 2023 12:40:50 GMT Received: from kbajaj-linux.qualcomm.com (kbajaj-linux.qualcomm.com [10.214.66.129]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 32DCeo6p022427; Mon, 13 Mar 2023 12:40:50 +0000 Received: from kbajaj-linux.qualcomm.com (localhost [127.0.0.1]) by kbajaj-linux.qualcomm.com (Postfix) with ESMTP id 4DAFE2A3; Mon, 13 Mar 2023 18:10:49 +0530 (IST) From: Komal Bajaj To: Rob Herring , Bjorn Andersson , Konrad Dybcio , Abel Vesa , Rishabh Bhatnagar , Prakash Ranjan , Krzysztof Kozlowski , Andy Gross Cc: Komal Bajaj , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 4/5] soc: qcom: Add LLCC support for multi channel DDR Date: Mon, 13 Mar 2023 18:10:39 +0530 Message-Id: <20230313124040.9463-5-quic_kbajaj@quicinc.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230313124040.9463-1-quic_kbajaj@quicinc.com> References: <20230313124040.9463-1-quic_kbajaj@quicinc.com> MIME-Version: 1.0 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: TP067fexm3GBBYZsc_DOq5Y833zzEi_C X-Proofpoint-ORIG-GUID: TP067fexm3GBBYZsc_DOq5Y833zzEi_C X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-13_05,2023-03-13_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 bulkscore=0 mlxlogscore=999 spamscore=0 phishscore=0 suspectscore=0 lowpriorityscore=0 priorityscore=1501 adultscore=0 impostorscore=0 clxscore=1015 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303130102 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760257326989822309?= X-GMAIL-MSGID: =?utf-8?q?1760257326989822309?= Add LLCC support for multi channel DDR configurations based off of a feature register. Signed-off-by: Komal Bajaj --- drivers/soc/qcom/llcc-qcom.c | 56 ++++++++++++++++++++++++++++-- include/linux/soc/qcom/llcc-qcom.h | 2 ++ 2 files changed, 55 insertions(+), 3 deletions(-) diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c index 00699a0c047e..f4d3e266c629 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #define ACTIVATE BIT(0) @@ -924,6 +925,40 @@ static int qcom_llcc_cfg_program(struct platform_device *pdev, return ret; } +static int qcom_llcc_get_cfg_index(struct platform_device *pdev, u32 *cfg_index) +{ + struct device *dev = &pdev->dev; + struct resource *ch_res = NULL; + + u32 ch_reg_sz; + u32 ch_reg_off; + u32 val; + int ret = 0; + + ch_res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "multi_channel_register"); + if (ch_res) { + if (of_property_read_u32(dev->of_node, "multi-ch-bit-off", &ch_reg_off)) { + dev_err(&pdev->dev, + "Couldn't get offset for multi channel feature register\n"); + return -ENODEV; + } + if (of_property_read_u32_index(dev->of_node, "multi-ch-bit-off", 1, &ch_reg_sz)) { + dev_err(&pdev->dev, + "Couldn't get size of multi channel feature register\n"); + return -ENODEV; + } + + if (qcom_scm_io_readl(ch_res->start, &val)) { + dev_err(&pdev->dev, "Couldn't access multi channel feature register\n"); + ret = -EINVAL; + } + *cfg_index = (val >> ch_reg_off) & ((1 << ch_reg_sz) - 1); + } else + *cfg_index = 0; + + return ret; +} + static int qcom_llcc_remove(struct platform_device *pdev) { /* Set the global pointer to a error code to avoid referencing it */ @@ -956,10 +991,13 @@ static int qcom_llcc_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; int ret, i; struct platform_device *llcc_edac; - const struct qcom_llcc_config *cfg; + const struct qcom_llcc_config *cfg, *entry; const struct llcc_slice_config *llcc_cfg; + u32 sz; + u32 cfg_index; u32 version; + u32 no_of_entries = 0; drv_data = devm_kzalloc(dev, sizeof(*drv_data), GFP_KERNEL); if (!drv_data) { @@ -999,8 +1037,20 @@ static int qcom_llcc_probe(struct platform_device *pdev) num_banks >>= LLCC_LB_CNT_SHIFT; drv_data->num_banks = num_banks; - llcc_cfg = cfg[0].sct_data; - sz = cfg[0].size; + ret = qcom_llcc_get_cfg_index(pdev, &cfg_index); + if (ret) + goto err; + + for (entry = cfg; entry->sct_data; entry++, no_of_entries++) + ; + if (cfg_index >= no_of_entries) { + ret = -EINVAL; + goto err; + } + + drv_data->cfg_index = cfg_index; + llcc_cfg = cfg[cfg_index].sct_data; + sz = cfg[cfg_index].size; for (i = 0; i < sz; i++) if (llcc_cfg[i].slice_id > drv_data->max_slices) diff --git a/include/linux/soc/qcom/llcc-qcom.h b/include/linux/soc/qcom/llcc-qcom.h index ad1fd718169d..225891a02f5d 100644 --- a/include/linux/soc/qcom/llcc-qcom.h +++ b/include/linux/soc/qcom/llcc-qcom.h @@ -125,6 +125,7 @@ struct llcc_edac_reg_offset { * @cfg: pointer to the data structure for slice configuration * @edac_reg_offset: Offset of the LLCC EDAC registers * @lock: mutex associated with each slice + * @cfg_index: index of config table if multiple configs present for a target * @cfg_size: size of the config data table * @max_slices: max slices as read from device tree * @num_banks: Number of llcc banks @@ -139,6 +140,7 @@ struct llcc_drv_data { const struct llcc_slice_config *cfg; const struct llcc_edac_reg_offset *edac_reg_offset; struct mutex lock; + u32 cfg_index; u32 cfg_size; u32 max_slices; u32 num_banks; From patchwork Mon Mar 13 12:40:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Komal Bajaj X-Patchwork-Id: 68812 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1163497wrd; Mon, 13 Mar 2023 05:48:31 -0700 (PDT) X-Google-Smtp-Source: AK7set9rmfRrZAd/Wk5HhgLeqhFv0NYxcTj3a5LmSwn4XuJvp1O0r/FVrmtHcps49Qq1vsJ8LauW X-Received: by 2002:a05:6a21:32a8:b0:c1:1561:406 with SMTP id yt40-20020a056a2132a800b000c115610406mr10732459pzb.4.1678711710000; Mon, 13 Mar 2023 05:48:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678711709; cv=none; d=google.com; s=arc-20160816; b=gRjgXcsZKZmSiWzUeMKq8U+xg+XbDMqcRp6UfH7v/29EwNb8HM480GqJRmtd5mEhfI FWhELOrZyWlY0dLW7z6Y3DIzuieAflQvri3XcwOosFrr9y98Z9KPsNWNnUmjyUiWxzgW Y8TqeVDwDmSIyMsi/1zARsvsR6/2e2nSxXOKVkkTGOmqkqtQ8HRRRHKa4ESi9oD4VCDK H/t9YjqIqhTrY1O691DA4CeuWmMoDRxRvJKGuqPMhST78/r1tZUzh7cx/kVaNJFAquZv QH+s/hyXJy5Gsf6U+cjHF85NHqm7isE3XyOyvB2kmzNtpcVeEM5nCG6Nb2UAIeUHFA8D SJTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Mlhqt/TQMW/XaKNhevXXYT1CK62k+l/39EDBwWNGHkE=; b=HU7EpEV0HvHkS5PUaDEdDzpajZXqD1JpUS4kJ4uOBTAex+dABxl5RtiFrCkuDyPl9q 3hlxdfcJ4Pmm58BvlXKrXgsIGldUo1QJ1umZmabo8YynyJs/8aQ/ZGyGPl9dJt2H7i2u 73fR1Wb948LF9XNc/PO4HupIns6KMgxq+RC7vN8jQdaUgZTUIgDVU0MWBbf3I7q2nG2u eBCNfApzdvi5Aln0Ne4ZWHNxXo9oZlchGeL53InH9n2IP3YQd7ekkMdhibY6CF3T6G37 y1DmFD+/Ons7/3RkgSeB7uxPCaEmrMXuGqusP0K8rNm74c/4MyONZ8rz0oNFCMr7L7KG bVzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=WLx9BsfZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z8-20020a630a48000000b004fbb61ea01dsi6864612pgk.273.2023.03.13.05.48.12; Mon, 13 Mar 2023 05:48:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=WLx9BsfZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230071AbjCMMlb (ORCPT + 99 others); Mon, 13 Mar 2023 08:41:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44998 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229988AbjCMMlW (ORCPT ); Mon, 13 Mar 2023 08:41:22 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA9BE5AB7D; Mon, 13 Mar 2023 05:41:20 -0700 (PDT) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32DBAT5W017663; Mon, 13 Mar 2023 12:40:56 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=qcppdkim1; bh=Mlhqt/TQMW/XaKNhevXXYT1CK62k+l/39EDBwWNGHkE=; b=WLx9BsfZTssmxMhYe0jxzm4fRoChUAbebaGR+IZHQy4X6Mabx45Lp5t4aTao8YtH6RWd EBYtVaqX8/1KzUdamcAOp6tB0AzBE3l21OP9TOqI7Ct3Wf4VddOGw9CJDw1d/7HSM8qU KechRNbrTNUQ5P/2sY42uWP8q7wgKglvW0A/CuCIiEIRhjYtm1DehFLENKu5v5DN6YvK 9TdWgOQZ5G/2jyPrNY/EajwheBkfH5nq0PbE1BsJXx2ASPVzd1KRsatYSTegK6KXwZDa mwVf4gp3L87DFztgk99HVy4D59q3BBvXCuxHRZvbzkmITERUyHeXhi8dQUHdSXMHWJ2f hw== Received: from apblrppmta01.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3p8jtwvtjk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 13 Mar 2023 12:40:56 +0000 Received: from pps.filterd (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 32DCemJU022410; Mon, 13 Mar 2023 12:40:52 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3p8jqkna0y-1; Mon, 13 Mar 2023 12:40:52 +0000 Received: from APBLRPPMTA01.qualcomm.com (APBLRPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32DCeqlS022445; Mon, 13 Mar 2023 12:40:52 GMT Received: from kbajaj-linux.qualcomm.com (kbajaj-linux.qualcomm.com [10.214.66.129]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 32DCeqL0022443; Mon, 13 Mar 2023 12:40:52 +0000 Received: from kbajaj-linux.qualcomm.com (localhost [127.0.0.1]) by kbajaj-linux.qualcomm.com (Postfix) with ESMTP id 6F0652A3; Mon, 13 Mar 2023 18:10:51 +0530 (IST) From: Komal Bajaj To: Rob Herring , Bjorn Andersson , Konrad Dybcio , Abel Vesa , Rishabh Bhatnagar , Prakash Ranjan , Krzysztof Kozlowski , Andy Gross Cc: Komal Bajaj , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 5/5] soc: qcom: llcc: Add QDU1000 and QRU1000 LLCC support Date: Mon, 13 Mar 2023 18:10:40 +0530 Message-Id: <20230313124040.9463-6-quic_kbajaj@quicinc.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230313124040.9463-1-quic_kbajaj@quicinc.com> References: <20230313124040.9463-1-quic_kbajaj@quicinc.com> MIME-Version: 1.0 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: jQnTkOtyOMnd6PtDUG2z37wiY9buHtQF X-Proofpoint-GUID: jQnTkOtyOMnd6PtDUG2z37wiY9buHtQF X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-13_05,2023-03-13_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 impostorscore=0 phishscore=0 suspectscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 mlxscore=0 adultscore=0 lowpriorityscore=0 mlxlogscore=999 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303130102 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760256809915681169?= X-GMAIL-MSGID: =?utf-8?q?1760256809915681169?= Add LLCC configuration data for QDU1000 and QRU1000 SoCs and updating macro name for LLCC_DRE to LLCC_ECC as per the latest specification. Signed-off-by: Komal Bajaj --- drivers/soc/qcom/llcc-qcom.c | 65 +++++++++++++++++++++++++++++- include/linux/soc/qcom/llcc-qcom.h | 2 +- 2 files changed, 65 insertions(+), 2 deletions(-) diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c index f4d3e266c629..2dd9fc4e2858 100644 --- a/drivers/soc/qcom/llcc-qcom.c +++ b/drivers/soc/qcom/llcc-qcom.c @@ -188,7 +188,7 @@ static const struct llcc_slice_config sc8280xp_data[] = { { LLCC_MMUHWT, 13, 1024, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 }, { LLCC_DISP, 16, 6144, 1, 1, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 }, { LLCC_AUDHW, 22, 2048, 1, 1, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 }, - { LLCC_DRE, 26, 1024, 1, 1, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 }, + { LLCC_ECC, 26, 1024, 1, 1, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 }, { LLCC_CVP, 28, 512, 3, 1, 0xfff, 0x0, 0, 0, 0, 1, 0, 0 }, { LLCC_APTCM, 30, 1024, 3, 1, 0x0, 0x1, 1, 0, 0, 1, 0, 0 }, { LLCC_WRCACHE, 31, 1024, 1, 1, 0xfff, 0x0, 0, 0, 0, 0, 1, 0 }, @@ -351,6 +351,36 @@ static const struct llcc_slice_config sm8550_data[] = { {LLCC_VIDVSP, 28, 256, 4, 1, 0xFFFFFF, 0x0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, }, }; +static const struct llcc_slice_config qdu1000_data_2ch[] = { + {LLCC_MDMHPGRW, 7, 512, 1, 1, 0xFFF, 0x0, 0, 0, 0, 1, 0, 0, 0 }, + {LLCC_MODHW, 9, 256, 1, 1, 0xFFF, 0x0, 0, 0, 0, 1, 0, 0, 0 }, + {LLCC_MDMPNG, 21, 256, 0, 1, 0x3, 0x0, 0, 0, 0, 1, 0, 0, 0 }, + {LLCC_ECC, 26, 512, 3, 1, 0xFFC, 0x0, 0, 0, 0, 0, 1, 0, 0 }, + {LLCC_MODPE, 29, 256, 1, 1, 0xFFF, 0x0, 0, 0, 0, 1, 0, 0, 0 }, + {LLCC_APTCM, 30, 256, 3, 1, 0x0, 0xC, 1, 0, 0, 1, 0, 0, 0 }, + {LLCC_WRCACHE, 31, 128, 1, 1, 0x3, 0x0, 0, 0, 0, 0, 1, 0, 0 }, +}; + +static const struct llcc_slice_config qdu1000_data_4ch[] = { + {LLCC_MDMHPGRW, 7, 1024, 1, 1, 0xFFF, 0x0, 0, 0, 0, 1, 0, 0, 0 }, + {LLCC_MODHW, 9, 512, 1, 1, 0xFFF, 0x0, 0, 0, 0, 1, 0, 0, 0 }, + {LLCC_MDMPNG, 21, 512, 0, 1, 0x3, 0x0, 0, 0, 0, 1, 0, 0, 0 }, + {LLCC_ECC, 26, 1024, 3, 1, 0xFFC, 0x0, 0, 0, 0, 0, 1, 0, 0 }, + {LLCC_MODPE, 29, 512, 1, 1, 0xFFF, 0x0, 0, 0, 0, 1, 0, 0, 0 }, + {LLCC_APTCM, 30, 512, 3, 1, 0x0, 0xC, 1, 0, 0, 1, 0, 0, 0 }, + {LLCC_WRCACHE, 31, 256, 1, 1, 0x3, 0x0, 0, 0, 0, 0, 1, 0, 0 }, +}; + +static const struct llcc_slice_config qdu1000_data_8ch[] = { + {LLCC_MDMHPGRW, 7, 2048, 1, 1, 0xFFF, 0x0, 0, 0, 0, 1, 0, 0, 0 }, + {LLCC_MODHW, 9, 1024, 1, 1, 0xFFF, 0x0, 0, 0, 0, 1, 0, 0, 0 }, + {LLCC_MDMPNG, 21, 1024, 0, 1, 0x3, 0x0, 0, 0, 0, 1, 0, 0, 0 }, + {LLCC_ECC, 26, 2048, 3, 1, 0xFFC, 0x0, 0, 0, 0, 0, 1, 0, 0 }, + {LLCC_MODPE, 29, 1024, 1, 1, 0xFFF, 0x0, 0, 0, 0, 1, 0, 0, 0 }, + {LLCC_APTCM, 30, 1024, 3, 1, 0x0, 0xC, 1, 0, 0, 1, 0, 0, 0 }, + {LLCC_WRCACHE, 31, 512, 1, 1, 0x3, 0x0, 0, 0, 0, 0, 1, 0, 0 }, +}; + static const struct llcc_edac_reg_offset llcc_v1_edac_reg_offset = { .trp_ecc_error_status0 = 0x20344, .trp_ecc_error_status1 = 0x20348, @@ -538,6 +568,38 @@ static const struct qcom_llcc_config sm8550_cfg[] = { { }, }; +static const struct qcom_llcc_config qdu1000_cfg[] = { + { + .sct_data = qdu1000_data_8ch, + .size = ARRAY_SIZE(qdu1000_data_8ch), + .need_llcc_cfg = true, + .reg_offset = llcc_v2_1_reg_offset, + .edac_reg_offset = &llcc_v2_1_edac_reg_offset, + }, + { + .sct_data = qdu1000_data_4ch, + .size = ARRAY_SIZE(qdu1000_data_4ch), + .need_llcc_cfg = true, + .reg_offset = llcc_v2_1_reg_offset, + .edac_reg_offset = &llcc_v2_1_edac_reg_offset, + }, + { + .sct_data = qdu1000_data_4ch, + .size = ARRAY_SIZE(qdu1000_data_4ch), + .need_llcc_cfg = true, + .reg_offset = llcc_v2_1_reg_offset, + .edac_reg_offset = &llcc_v2_1_edac_reg_offset, + }, + { + .sct_data = qdu1000_data_2ch, + .size = ARRAY_SIZE(qdu1000_data_2ch), + .need_llcc_cfg = true, + .reg_offset = llcc_v2_1_reg_offset, + .edac_reg_offset = &llcc_v2_1_edac_reg_offset, + }, + { }, +}; + static struct llcc_drv_data *drv_data = (void *) -EPROBE_DEFER; /** @@ -1110,6 +1172,7 @@ static const struct of_device_id qcom_llcc_of_match[] = { { .compatible = "qcom,sm8350-llcc", .data = sm8350_cfg }, { .compatible = "qcom,sm8450-llcc", .data = sm8450_cfg }, { .compatible = "qcom,sm8550-llcc", .data = sm8550_cfg }, + { .compatible = "qcom,qdu1000-llcc", .data = qdu1000_cfg}, { } }; MODULE_DEVICE_TABLE(of, qcom_llcc_of_match); diff --git a/include/linux/soc/qcom/llcc-qcom.h b/include/linux/soc/qcom/llcc-qcom.h index 225891a02f5d..150b2836c8b9 100644 --- a/include/linux/soc/qcom/llcc-qcom.h +++ b/include/linux/soc/qcom/llcc-qcom.h @@ -30,7 +30,7 @@ #define LLCC_NPU 23 #define LLCC_WLHW 24 #define LLCC_PIMEM 25 -#define LLCC_DRE 26 +#define LLCC_ECC 26 #define LLCC_CVP 28 #define LLCC_MODPE 29 #define LLCC_APTCM 30