Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp28642rdb; Mon, 30 Oct 2023 22:13:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGY4uE2hjAnl7TkrPzi48RoGecf3lIXr6UHkVUzC5rCJPPEdgZD6RIaNQ2sIRa6gwd37REo X-Received: by 2002:a05:6a20:1588:b0:159:d4f5:d59 with SMTP id h8-20020a056a20158800b00159d4f50d59mr1945958pzj.12.1698729186521; Mon, 30 Oct 2023 22:13:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698729186; cv=none; d=google.com; s=arc-20160816; b=cyg+PsN5mAW/ki8TP/yDy2FS1906remFcODEuxUlwJNqJlUAHEuF68cAO9puM4hEz0 1OS4CipiWZfDYAJOV6XYZAqCyXDKcmauOfy7ZHAMY5LGw4dfif8Z1BmoBTVcd7PZi6tf 7HUtIwN4R+KH5TAZpbN2nCLC6rmuG+6KxRZkN3M5LKJywsPOtL6g81TaEBZcihvS4UYd eQDGFk6TmiJaLDoKIMVm1v8CIj+bicyy2rONiWp9lW4q74oVyqw8+65HlLxmm+bCbaoE YUN8BSAlXXa+k87xhiOL3ojPtcKXeCcpG+nD6v9umW6MbysZ/fWzTO4MsG0AW70+num8 y6dQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=YZxv9NCfA0KoehyT/p5DCELEr7QA33wTbAEWtL2k5fo=; fh=lBmHJ3Y4lTFTz8EdZvdYgZDSva4naO2W/ycnjVOB2p0=; b=T+NKufSIuAIqwBswTjQ+uOohYlR19IEvoILtcd8CAXHLhqnE9MZvu/AtncAU7rSGsP sMZGBBNZTs777mHxzYivkyB8Msi/dfHaVwN9bvExvvAlvT6fdwyFvRSVpVTXv5cl6QtB OhVkKCk3scn4U7AZq8eXTpw5ymlDT5uu5jhLTk/PjFa49XQNNZkYNahjgiRnrNRNct1q P67SEAiD2gtY6Cq96E7te0e2tvXDF9BUZeYrqJfQVnkbpIK0WVB3asVD4xtL/mvZd4Ht iqkbbtytXUoanFz8LNTBakJQWMXob5LseMU44tXSKM05oWlGjqYPdtl6+5KpJVvk/FYE 5FOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=TKCOKNPx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id f4-20020aa79d84000000b0068fe9c452acsi462786pfq.376.2023.10.30.22.13.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Oct 2023 22:13:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=TKCOKNPx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 6EDD380B6C32; Mon, 30 Oct 2023 22:12:58 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231484AbjJaFMX (ORCPT + 99 others); Tue, 31 Oct 2023 01:12:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52916 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230227AbjJaFMQ (ORCPT ); Tue, 31 Oct 2023 01:12:16 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F1BEEA; Mon, 30 Oct 2023 22:12:13 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39V3c6Zo013703; Tue, 31 Oct 2023 05:12:05 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; s=qcppdkim1; bh=YZxv9NCfA0KoehyT/p5DCELEr7QA33wTbAEWtL2k5fo=; b=TKCOKNPx0eynIiyCvuiIJN8aTN+A1J/hfbotaPiO65R5XskRLbUomJKoTUxa1q8X8Kxv CWkIchLuJntsEMEXjKd7zMHUgP7nyyHKrK6ZuciSq3ujDCeHtQYX7l2DoMWkDaLyCaDc /Vhhepqo3lTIsbrdfvsPTvC6SzVevwO+SnVWzOgNQXl3/0K/RptIlGl+l2oymEsuK8Ms ASP736Xo9Ij2iw1AzG0HA5MpvCVYcsMaO6OLObjntTfg1frjNCWdPwKhtRQZWKc0oYW0 KE2HxxEUU+SDbacDOPf5swBKPPZiY1p5rReePgp5nQmZThyL4AvH3qvB8VFTgBV1zPLa nQ== Received: from apblrppmta02.qualcomm.com (blr-bdr-fw-01_GlobalNAT_AllZones-Outside.qualcomm.com [103.229.18.19]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3u29fetc7w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 31 Oct 2023 05:12:04 +0000 Received: from pps.filterd (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 39V5Bv2j010023; Tue, 31 Oct 2023 05:12:01 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 3u0ucktx9y-1; Tue, 31 Oct 2023 05:12:01 +0000 Received: from APBLRPPMTA02.qualcomm.com (APBLRPPMTA02.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 39V5C1aF010043; Tue, 31 Oct 2023 05:12:01 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-msarkar-hyd.qualcomm.com [10.213.111.194]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 39V5C1bn010041; Tue, 31 Oct 2023 05:12:01 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 3891782) id 65465450D; Tue, 31 Oct 2023 10:42:00 +0530 (+0530) From: Mrinmay Sarkar To: agross@kernel.org, andersson@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, konrad.dybcio@linaro.org, mani@kernel.org Cc: quic_shazhuss@quicinc.com, quic_nitegupt@quicinc.com, quic_ramkri@quicinc.com, quic_nayiluri@quicinc.com, dmitry.baryshkov@linaro.org, robh@kernel.org, quic_krichai@quicinc.com, quic_vbadigan@quicinc.com, quic_parass@quicinc.com, quic_schintav@quicinc.com, quic_shijose@quicinc.com, Mrinmay Sarkar , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Bjorn Helgaas , Kishon Vijay Abraham I , linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mhi@lists.linux.dev Subject: [PATCH v6 3/4] PCI: epf-mhi: Add support for SA8775P Date: Tue, 31 Oct 2023 10:41:47 +0530 Message-Id: <1698729108-27356-4-git-send-email-quic_msarkar@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1698729108-27356-1-git-send-email-quic_msarkar@quicinc.com> References: <1698729108-27356-1-git-send-email-quic_msarkar@quicinc.com> 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: Q1xJZGI9LKMsFjbK0Z3yIwoKzBW03tU6 X-Proofpoint-ORIG-GUID: Q1xJZGI9LKMsFjbK0Z3yIwoKzBW03tU6 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.987,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-30_13,2023-10-31_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 phishscore=0 impostorscore=0 spamscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 clxscore=1015 bulkscore=0 mlxlogscore=653 mlxscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310240000 definitions=main-2310310039 X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 30 Oct 2023 22:12:58 -0700 (PDT) Add support for Qualcomm Snapdragon SA8775P SoC to the EPF driver. Reusing DID (0x0306) for SA8775P and it supports HDMA. Currently, it has no fixed PCI class, so it is being advertised as "PCI_CLASS_OTHERS". Signed-off-by: Mrinmay Sarkar --- drivers/pci/endpoint/functions/pci-epf-mhi.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c index b7b9d3e..23ea94e 100644 --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c @@ -114,6 +114,22 @@ static const struct pci_epf_mhi_ep_info sm8450_info = { .flags = MHI_EPF_USE_DMA, }; +static struct pci_epf_header sa8775p_header = { + .vendorid = PCI_VENDOR_ID_QCOM, + .deviceid = 0x0306, /* FIXME: Update deviceid for sa8775p EP */ + .baseclass_code = PCI_CLASS_OTHERS, + .interrupt_pin = PCI_INTERRUPT_INTA, +}; + +static const struct pci_epf_mhi_ep_info sa8775p_info = { + .config = &mhi_v1_config, + .epf_header = &sa8775p_header, + .bar_num = BAR_0, + .epf_flags = PCI_BASE_ADDRESS_MEM_TYPE_32, + .msi_count = 32, + .mru = 0x8000, +}; + struct pci_epf_mhi { const struct pci_epc_features *epc_features; const struct pci_epf_mhi_ep_info *info; @@ -677,6 +693,7 @@ static int pci_epf_mhi_probe(struct pci_epf *epf, } static const struct pci_epf_device_id pci_epf_mhi_ids[] = { + { .name = "sa8775p", .driver_data = (kernel_ulong_t)&sa8775p_info }, { .name = "sdx55", .driver_data = (kernel_ulong_t)&sdx55_info }, { .name = "sm8450", .driver_data = (kernel_ulong_t)&sm8450_info }, {}, -- 2.7.4