Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp979771rdb; Fri, 1 Dec 2023 04:07:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IHQ7AXDH97dWsDEg3A11iJqQPTzPONwdGzm+z7WPya+pvZeeqk2WeDISs6x2gajdCBsQeuU X-Received: by 2002:a05:6a00:3988:b0:6be:25c5:4f74 with SMTP id fi8-20020a056a00398800b006be25c54f74mr29118071pfb.13.1701432425866; Fri, 01 Dec 2023 04:07:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701432425; cv=none; d=google.com; s=arc-20160816; b=QqsqjZV4Hpr7drefS0mAfvV1GyDF2aHCEjJtkigqZoo8NVjdnpiROk6Oh4evLoMD4z VxIBOzM44I789AbWtCzYrgNHSDX7MIpWNIgdy8F7WlcfYV2Tl4BnFLuCoPU/GAbqK9ue p+PQFiKwIePGrc/QLuJilRB5VmL8v29KCUxB47hCRMiwny6aGdy3NdlboQFOi37rCVQT X9QlPHOKLWsfOzY1IlX00koG9kASusdGr6M2maHRImgfaH0GHiGAyfcZ3FPm9hpGAssU uglZj7l8W/gr4E4RcFNwQYarM6hOvPCtFewoArozbX6yHTe0AUUSrgVi7pERuIacsauw s8zA== 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=V99Fmz14JVM/5E/xWPdfO+v2v+AZcFA2pv/tRNAlPh4=; fh=72EESTaQti9jWwEdJgn5hsP2k6nTzn4cvUgqYCpq0+Q=; b=lUZ1hGVcf3nSqr6qjsSYcI5S0AlFud1U12yOHxX2rVtYCBliJ2NPr1PUO2joTvbWkR ASoNxyEDJI/X0LlJPH6YdlFbp1FKXm6VhOOBqkUCOSGwLhlLQUKwNH1lX3IPD2AE+per Vd5eUAQkiMEBlTv+J2Pjj41IIbUvAURYpiyb+7QIs79ayoR4wxLoJVl51iKWCot96yfT cJI+WfzP4RFdU2N/QNiG/JQB5AOW+GFwfUiePVr+SCUJ4uoEcFVSueJ/BrUToVhrg9wr ve/hlbJgpeePh+ymVxnikUcDxjnrtbVsh7GkDRJXZGxgUIGkHFFLj6RGFXatbGI0Wnpw PpDw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jxlZDxZV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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. [23.128.96.37]) by mx.google.com with ESMTPS id d15-20020a65620f000000b005b8eaeabf49si3323388pgv.178.2023.12.01.04.07.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Dec 2023 04:07:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=jxlZDxZV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 D7C918106599; Fri, 1 Dec 2023 04:07:02 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378768AbjLAMGw (ORCPT + 99 others); Fri, 1 Dec 2023 07:06:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378730AbjLAMGh (ORCPT ); Fri, 1 Dec 2023 07:06:37 -0500 Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 789F210F3; Fri, 1 Dec 2023 04:06:43 -0800 (PST) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3B1BkKp3005187; Fri, 1 Dec 2023 12:06:30 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=V99Fmz14JVM/5E/xWPdfO+v2v+AZcFA2pv/tRNAlPh4=; b=jxlZDxZVLdGgfPzy1YS9T7beCpMvuDs1HyCF+REiDXT6KVYumCGZZe30WtmIHwJYDwMa vVZkPuv2ZlPDXOX/4kL0wyrka5BRHF5I5AEolHEtXK6RtkB7y5olFQx6xmh5YtbXMQHZ fjw3H1IoDepvSwiB+gAs8DbBQDdZp8fl6gBr+YmP3uzUMlA1A/p5YDirGXwqotvHXxcS DgBxDmoZ+NLvlbYNe4fkJhLPfTKqzg2aYmHM4A6NODEV5xLeSQcGVQ9EoG8LoGGDWo5A 5YGugPM5dwGIjjHo4kcRR/AsTfbhwKAzgRsjFjvS1fExzOUVl2IXvgD6XMzOqzSAlJJY ag== 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 3uprhducd8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 01 Dec 2023 12:06:30 +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 3B1C6M3O020124; Fri, 1 Dec 2023 12:06:27 GMT Received: from pps.reinject (localhost [127.0.0.1]) by APBLRPPMTA01.qualcomm.com (PPS) with ESMTP id 3unmf08sjw-1; Fri, 01 Dec 2023 12:06:27 +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 3B1C6Q54020166; Fri, 1 Dec 2023 12:06:26 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 3B1C6Q17020164; Fri, 01 Dec 2023 12:06:26 +0000 Received: by hu-sgudaval-hyd.qualcomm.com (Postfix, from userid 3891782) id 95F483064; Fri, 1 Dec 2023 17:36: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, robh+dt@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_shijjose@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 v9 4/5] PCI: epf-mhi: Add support for SA8775P Date: Fri, 1 Dec 2023 17:36:15 +0530 Message-Id: <1701432377-16899-5-git-send-email-quic_msarkar@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1701432377-16899-1-git-send-email-quic_msarkar@quicinc.com> References: <1701432377-16899-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: YEyc7yuii9YXr-AmI_HL_yNBi294Et4C X-Proofpoint-GUID: YEyc7yuii9YXr-AmI_HL_yNBi294Et4C X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-01_09,2023-11-30_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 phishscore=0 spamscore=0 suspectscore=0 impostorscore=0 mlxlogscore=821 clxscore=1015 mlxscore=0 priorityscore=1501 adultscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311060000 definitions=main-2312010080 X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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]); Fri, 01 Dec 2023 04:07:03 -0800 (PST) Add support for Qualcomm Snapdragon SA8775P SoC to the EPF driver. SA8775P is currently reusing the PID 0x0306 (the default one hardcoded in the config space header) as the unique PID is not yet allocated. But the host side stack works fine with the default PID. It will get updated once the PID is finalized. Currently, it has no fixed PCI class, so it is being advertised as "PCI_CLASS_OTHERS". Signed-off-by: Mrinmay Sarkar Reviewed-by: Manivannan Sadhasivam --- 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 5b0515a..68801c2 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 = "pci_epf_mhi_sa8775p", .driver_data = (kernel_ulong_t)&sa8775p_info }, { .name = "pci_epf_mhi_sdx55", .driver_data = (kernel_ulong_t)&sdx55_info }, { .name = "pci_epf_mhi_sm8450", .driver_data = (kernel_ulong_t)&sm8450_info }, {}, -- 2.7.4