Received: by 2002:a05:7412:37c9:b0:e2:908c:2ebd with SMTP id jz9csp1542350rdb; Wed, 20 Sep 2023 12:04:20 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGBcwpYRzCOalvzjvWZIhf2VSZkctMlgMIxT1oVuw2qbK+ox8qJeO06W3hCv0ryrN+ILuSK X-Received: by 2002:a17:90a:fb57:b0:263:ac11:c6d2 with SMTP id iq23-20020a17090afb5700b00263ac11c6d2mr3732374pjb.25.1695236660450; Wed, 20 Sep 2023 12:04:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695236660; cv=none; d=google.com; s=arc-20160816; b=NMryV7Sh4E60SZFJpLQiAg3qVD20in4l4rbh04pLX7fhQGwyS8rcXQH6Y5zKp3hiFo Qlsh7DSOGkFLEfwC+bl6zk+tUCbMfQ0TAZ8NfaU/u2Wx8KmFq0odaoS1JzPPkD8V60xa n3hmh+DXzxqBeq167/EnQBrHUo8Q/KysONqCWL6bwTg3hC+vrnclZ6LokF86dX6WVwWi s2iNe4MePg3SCHS0ZRENEAg3G9Dl1wH9dbkpIIj1WuNZltf4Ilm3Bqz4ljM3274c7OAD YRQNm6PWg7hrmpsR6KsGCiBdimX/zjtKNdblir00Add+3CdzW+V0e3dTEnDZp6jVa+lK bWxg== 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=G1NiSk7dbZydvhDu2qxwMegcpcoHgjUaFjClTxqGWPA=; fh=8/2vfUA7MWOES13nxpYPH5OUCdymynOzflmEVMN0z8c=; b=r2ePSz2BIEbEXlVmBFkJFm1HE8G1Dtfr6cYtGVWAldJzf0A4TR9PWokZDnRbZhTIyK UlQHR/wvqd429AvzKcOfJ0GiqdE2p0rYgNf41uBcGM2j+F2F57TDwDnsUMryoj3hJRvI zRYorPnmTjL4BcHRHnEwNrH6nv5DjeXzYsyE9ZU6CNbLWYKCYcjRBjHeIIx7538DhuK2 V5hiZ559arc5s9DDSOdQZwPNKUXSjktrtIvvgHx1H3V1vt0r/IqnNrmSehWhiFxfa38l mNbzp1/yl2Q4rHEZir2jZwdgXjyzoH0LA5i4bS/DoM/v0I2URLqQD5H395wJS+jaSvwh ZDGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="g/YfGdnt"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id a17-20020a17090ad81100b00273edf4d3a5si2123258pjv.68.2023.09.20.12.04.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 12:04:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="g/YfGdnt"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 9CEB3826C0DB; Wed, 20 Sep 2023 06:57:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236708AbjITN5S (ORCPT + 99 others); Wed, 20 Sep 2023 09:57:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236570AbjITNzz (ORCPT ); Wed, 20 Sep 2023 09:55:55 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E1D4186; Wed, 20 Sep 2023 06:55:49 -0700 (PDT) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38KD1Swb026760; Wed, 20 Sep 2023 13:55:29 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=G1NiSk7dbZydvhDu2qxwMegcpcoHgjUaFjClTxqGWPA=; b=g/YfGdnt1LOl/X64XJbS1yv2VjE5BbLbcWxwydnOBvVknBP7KyQTYkxRzbPPswt5caCa lhou/3sCcUe9aYiRLEO5Dfx8x5LYF6ZE2NKz233Yo7/almaqoFhGHvYxUrEcl01mEvAM GZYYWRUdlysNUtomdAUJs7Ff1f6AvlqnqticZDaWzWb54YAMxqJ+u6a35zFNDxB/fWhQ qCy12iWDirI9/X+POrIOsBPH1x4zoW16RnDAD06r1AtN0gyQm7M43YlSug3XYtwXiSxj eHthM3jOxAZM4ZC/sFDf3/+4gPPt1d+FJyZrQFJzedvTTYavJDUnIKS6tQJMDmh6/71N qg== 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 3t7amnb3cn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 20 Sep 2023 13:55:29 +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 38KDtQL0008251; Wed, 20 Sep 2023 13:55:26 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTP id 3t55ekk8pb-1; Wed, 20 Sep 2023 13:55:26 +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 38KDtPqb008245; Wed, 20 Sep 2023 13:55:26 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 38KDtPvi008243; Wed, 20 Sep 2023 13:55:25 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 3891782) id 2E3434070; Wed, 20 Sep 2023 19:25:25 +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, quic_krichai@quicinc.com, quic_vbadigan@quicinc.com, quic_parass@quicinc.com, Mrinmay Sarkar , Bjorn Helgaas , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Rob Herring , Kishon Vijay Abraham I , Vinod Koul , linux-pci@vger.kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mhi@lists.linux.dev, linux-phy@lists.infradead.org Subject: [PATCH v1 4/5] PCI: epf-mhi: Add support for SA8775P Date: Wed, 20 Sep 2023 19:25:11 +0530 Message-Id: <1695218113-31198-5-git-send-email-quic_msarkar@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1695218113-31198-1-git-send-email-quic_msarkar@quicinc.com> References: <1695218113-31198-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: vq6l8cMg1aEbu5m2I4lr4qRfMvJkv3Gq X-Proofpoint-ORIG-GUID: vq6l8cMg1aEbu5m2I4lr4qRfMvJkv3Gq X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-20_05,2023-09-20_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 phishscore=0 clxscore=1015 bulkscore=0 priorityscore=1501 suspectscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 mlxlogscore=697 mlxscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309200114 X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_NONE autolearn=no 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Wed, 20 Sep 2023 06:57:19 -0700 (PDT) Add support for Qualcomm Snapdragon SA8775P SoC to the EPF driver. SA8775P has the PID (0x0306) and 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 | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/drivers/pci/endpoint/functions/pci-epf-mhi.c b/drivers/pci/endpoint/functions/pci-epf-mhi.c index b7b9d3e..4b349fd 100644 --- a/drivers/pci/endpoint/functions/pci-epf-mhi.c +++ b/drivers/pci/endpoint/functions/pci-epf-mhi.c @@ -114,6 +114,23 @@ 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, + .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, + .flags = MHI_EPF_USE_DMA, +}; + struct pci_epf_mhi { const struct pci_epc_features *epc_features; const struct pci_epf_mhi_ep_info *info; @@ -677,6 +694,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