Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp282856rdb; Thu, 19 Oct 2023 04:38:06 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFNiVQqCvSYyrcciZwwwiBmlcOHX+ogCXrgD3iQYKwFUyoi3JHJ2dFf7daP4Zy34+3bt8Pf X-Received: by 2002:a17:902:e548:b0:1c9:e48c:7266 with SMTP id n8-20020a170902e54800b001c9e48c7266mr2774965plf.57.1697715486152; Thu, 19 Oct 2023 04:38:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697715486; cv=none; d=google.com; s=arc-20160816; b=tZQ0rVz4BhMWaHh4AqCEqD5qsBlSHE/Bm0N3pCUcSG5MVJOlIkgFmJGDLfMYhdfXJL eXG+7ufVMv300a3PqpMt5QyVE+9WhfriK468uKWyme0IiHexE3b/z8wJfcAsERx7pNXc L5IGRB7SW4kTdRMdFkrLHEvNeWTRAP06YV4oLBRKMMetDMXD2EboXNW+zq12iA6pxISR qJMU73xAuaFb9UgXx4Dc8d8mFq+Pjqo6LjTXksq4Wasv+Rd2qpLnPDA99ABUv3Smsq74 4eL/dsq9JSvYocgTDeag3JMcKp2D9bjepTKReM9hby0BeMQoMlYiq4Fg+w3RkpSITImb ulmg== 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=a83HculrgWR6iA2xJ098F6UFEv4+SD3Pe6mwajchMWs=; fh=UE3isoYUUj07V4wcSu19mzBzMc4QKdv2w9tbmGoDVyM=; b=pmUGNyGqxWqH81stziEekPDeKVCS/YLkyq+YYBNqGADNnghCMtvIdhDZc1qlz0RaAn dH+Dif8obmMxZfUhZysNU/p5J3rWPGAtT8WBcB7MMIyg5sNkkQMYOBF6xYgPgvVJefAN OtLdHtzavv506afPLEhF9gMmMQcIFMvzBJX0Q32gBO12h1uJRBfMMmFzQMplOugJHv/g qUZOV4t4uMPWjxxayPivixdN8ZizzwIwY8lrwjqFGd3QcAuzRneYnnGavTCi++FMby1B k9DXyO1x7bvlcZIjuLuf2JNI98FP0joahfGPANcAxdO10TMjh0CZTbPo36TZCS1mVSXc njqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="eyMlTl/y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id c1-20020a170902c1c100b001c5c632aea4si1963362plc.217.2023.10.19.04.38.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 Oct 2023 04:38:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b="eyMlTl/y"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 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 4052283524E3; Thu, 19 Oct 2023 04:37:59 -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 S1345458AbjJSLhn (ORCPT + 99 others); Thu, 19 Oct 2023 07:37:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58522 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235256AbjJSLhf (ORCPT ); Thu, 19 Oct 2023 07:37:35 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BD307186; Thu, 19 Oct 2023 04:37:33 -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 39JAnMGA023534; Thu, 19 Oct 2023 11:37:23 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=a83HculrgWR6iA2xJ098F6UFEv4+SD3Pe6mwajchMWs=; b=eyMlTl/yYr9mJ0efFELbjwmAFb3PfY0nMkUnE9FgIcMrYqNwbeeX+0KPU1BRrlo+vkNr 9Na2LasmNH80un00x8E6V8rT6LJLy7hBixcEZF4Y3R/Sibee4m1iSmDZaVV0EKpgA2z6 4F7E8rBb1RA/LvaOo6MkkN/hi3Ev8yJWrXQ+78J+W/+BF8KePS+9qgv+AtJF4xROJYTe fOOZMlLFaGHZ7TvaOnzYgCdWjp/MKkN+6w2YXd9dgCbcb2ycHxySsYSipXPVSsrsWW34 aoB3R+NVbyiDFCQSHCH2NlnGtCQIs5bgBJ+4Codfig/URbrmBSoPu2JVbhcc9NguJUoe dQ== 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 3ttfeuapbf-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 19 Oct 2023 11:37:23 +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 39JBbEAB000801; Thu, 19 Oct 2023 11:37:19 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3tqm2mcs3p-1; Thu, 19 Oct 2023 11:37:19 +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 39JBbIkP000835; Thu, 19 Oct 2023 11:37:19 GMT Received: from hu-sgudaval-hyd.qualcomm.com (hu-msarkar-hyd.qualcomm.com [10.213.111.194]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 39JBbJYm000855; Thu, 19 Oct 2023 11:37:19 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 3891782) id 82E65441C; Thu, 19 Oct 2023 17:07:18 +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 , Bjorn Helgaas , Lorenzo Pieralisi , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , 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 v3 4/5] PCI: epf-mhi: Add support for SA8775P Date: Thu, 19 Oct 2023 17:07:09 +0530 Message-Id: <1697715430-30820-5-git-send-email-quic_msarkar@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1697715430-30820-1-git-send-email-quic_msarkar@quicinc.com> References: <1697715430-30820-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: pj77LZnN4BKcH8RtOp25gPlrrkkyq_l1 X-Proofpoint-GUID: pj77LZnN4BKcH8RtOp25gPlrrkkyq_l1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-19_09,2023-10-19_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 malwarescore=0 spamscore=0 impostorscore=0 bulkscore=0 adultscore=0 phishscore=0 mlxlogscore=695 suspectscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2309180000 definitions=main-2310190099 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 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]); Thu, 19 Oct 2023 04:37:59 -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 | 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..4487260 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, + .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