Received: by 2002:a05:7412:d8a:b0:e2:908c:2ebd with SMTP id b10csp737679rdg; Wed, 11 Oct 2023 04:19:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHL1y0CiCx+S2Bpl1Z1Nh3e/25bf7S2KuYLVsLVZDFBDnpJ5YvgCNMrEcyAZ4wH3GKs09tq X-Received: by 2002:a05:6871:d12:b0:1e5:865d:cd0b with SMTP id vh18-20020a0568710d1200b001e5865dcd0bmr15552983oab.38.1697023189803; Wed, 11 Oct 2023 04:19:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697023189; cv=none; d=google.com; s=arc-20160816; b=Vuk5/GkUScMqh7wx0Yf8JByXn/HmVzY8yltk5WnEyflPHTHhRXw/HfmJZQ7682kN/G 6KvJI98ShTpj1eQjqkjIADQjekk+CsS5hi6OogQx/cwBphV4s4M/MvCw6uKtfQEWf2B8 HI0uFjqesb3MRRpI7vU6QlMVrbQq4c7jVZnScaSxn7MuKfz+d4yEXaJMQEDqdsVqwEGV EuMoN8H+TQ5Qg9N8wbuVmi5Q1FqJznd7YK/L1bfpmH29Y++MmrueC2yTTuzaqvvZU5zD ihOAw9A6h1IPv5syT7DcIvfS74t8vzwZItZsmlP34FRx2b4GDoyQo2Wf+WNlT/80/zc3 lL6Q== 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=riWMjx1iyAEzeQqpsEoG3bfXjaRMEi88Qoq3gaqR96U=; fh=D6wsGfRpFNqdyuMaXCdv3p6g7iwFtyFFEHMGVlL16lY=; b=yT0TJZmgWQehn6LAUysVzD2fZXxS1JmYTX/Ng4/AW1JpUL+32lV0/qpZEYuPbZmQTh 0Ab71TBfqXKqpCuT6QNnuhRYGRKv6MWVLNqpk6i2swmJNs1JpJsaobQ3ztHo7CtIVsZH ArPtoFQH+BeHxCwfSL2spJkardGF7XlDfJpes/Qys0/QR+nbBz9cEuryY5eb6qsXGjiC FIZTp0pJZZIQ++/HU3SL6QGY7mQlKDoqBIlRjjmKQZfxSxP3hxXQItr4wk4P4+ye8WlM nWdyrZzNkDP/X4in9VA03CV+TFMOReT4kv8RG7DKIDb6gvIp8U2P3ec42GrAycJDCzSW QnSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="FXYbEa/o"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id bk13-20020a056a02028d00b00573e329b014si14419246pgb.339.2023.10.11.04.19.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Oct 2023 04:19:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="FXYbEa/o"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 12AFB802132C; Wed, 11 Oct 2023 04:19:45 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346177AbjJKLTc (ORCPT + 99 others); Wed, 11 Oct 2023 07:19:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346262AbjJKLTO (ORCPT ); Wed, 11 Oct 2023 07:19:14 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6420B93; Wed, 11 Oct 2023 04:19:12 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39BAJDaO015176; Wed, 11 Oct 2023 11:18:48 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=riWMjx1iyAEzeQqpsEoG3bfXjaRMEi88Qoq3gaqR96U=; b=FXYbEa/oNTVnRQnOpoxnPO9fVnb6hn49GWScYmetmx38QD6DtYqrSJc1vhI+E0hBdDhI acIeTP15Yipq5Zo6jSvpCysnqCSkh0fKCxl0QTl2Zj7fdwOD1uf3vTDE+Q0mb4b/7QTX 6ilCndUu4OYoSdhuWiT+aXg69e6TSYfCcd+fI5J0GtlBRqTmKRstaqmNHumtoH7X0b42 +rufIB/Q0PdjU2Ad9naik4fTYfS5adCjqdQ2PaJfz+BgdUCmyfMp6HwKecm7PqwgKQpe EpbYATxIUhETvwP4xe99n+jlZWdf8GHqSjczG9dPq1wvMwHim6LxPWmosOE6J4W1Ys4n 0w== 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 3tnstyr4hf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 11 Oct 2023 11:18:48 +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 39BBIcrY011196; Wed, 11 Oct 2023 11:18:44 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA02.qualcomm.com (PPS) with ESMTPS id 3tk0dkmaxh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 11 Oct 2023 11:18:44 +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 39BBIigF011243; Wed, 11 Oct 2023 11:18:44 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 39BBIhIC011242; Wed, 11 Oct 2023 11:18:44 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 3891782) id D037243B8; Wed, 11 Oct 2023 16:48:42 +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, Mrinmay Sarkar , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Bjorn Helgaas , Kishon Vijay Abraham I , Vinod Koul , linux-arm-msm@vger.kernel.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, mhi@lists.linux.dev, linux-phy@lists.infradead.org Subject: [PATCH v2 3/4] PCI: epf-mhi: Add support for SA8775P Date: Wed, 11 Oct 2023 16:48:28 +0530 Message-Id: <1697023109-23671-4-git-send-email-quic_msarkar@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1697023109-23671-1-git-send-email-quic_msarkar@quicinc.com> References: <1697023109-23671-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-ORIG-GUID: U52HIdSpd3SdmBXiSGiRjMUR6agh1dJh X-Proofpoint-GUID: U52HIdSpd3SdmBXiSGiRjMUR6agh1dJh X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-11_09,2023-10-11_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 mlxscore=0 bulkscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 impostorscore=0 mlxlogscore=695 lowpriorityscore=0 clxscore=1015 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310110099 X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.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 (fry.vger.email [0.0.0.0]); Wed, 11 Oct 2023 04:19:45 -0700 (PDT) X-Spam-Level: ** 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 | 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..f05c2e4 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 const 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, +}; + 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