From patchwork Sat Jan 28 02:47:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?RHVrZSBYaW4o6L6b5a6J5paHKQ==?= X-Patchwork-Id: 648075 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A55A9C38142 for ; Sat, 28 Jan 2023 03:04:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229681AbjA1DEz (ORCPT ); Fri, 27 Jan 2023 22:04:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231975AbjA1DEy (ORCPT ); Fri, 27 Jan 2023 22:04:54 -0500 X-Greylist: delayed 941 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Fri, 27 Jan 2023 19:04:52 PST Received: from m12.mail.163.com (m12.mail.163.com [123.126.96.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3B2967264D for ; Fri, 27 Jan 2023 19:04:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=163.com; s=s110527; h=From:Subject:Date:Message-Id:MIME-Version: Content-Type; bh=z4JngmKmsUiT6Go8w637Ajw0YEGtBAe0+3wXDZzMYvg=; b=kVuso8PSwtcAuQ2ZHvxkpAdJpB13oJnDQ30kpcUR2cgTS1r44qWR0c2jvymaUe xZh9VKeH7XHjtIoniXIjHcmuTuNtNHx8tjt3Hz41r5urW6u36uZ6E5Ngzj3KCRAh UHQOZMefaRF8g2tC0JMIqY0LXSvmEvC2Sb6Bk2RweN8+o= Received: from ubuntu.localdomain (unknown [220.180.239.55]) by smtp19 (Coremail) with SMTP id R9xpCgDHwKTgjNRjTovaBw--.8240S2; Sat, 28 Jan 2023 10:48:03 +0800 (CST) From: =?utf-8?b?RHVrZSBYaW4o6L6b5a6J5paHKQ==?= To: mani@kernel.org, slark_xiao@163.com Cc: loic.poulain@linaro.org, gregkh@linuxfoundation.org, dnlplm@gmail.com, yonglin.tan@outlook.com, fabio.porcedda@gmail.com, mhi@lists.linux.dev, linux-arm-msm@vger.kernel.org, inux-kernel@vger.kernel.org, jerry.meng@quectel.com, duke.xin@quectel.com, =?utf-8?b?RHVrZSBYaW4o6L6b?= =?utf-8?b?5a6J5paHKQ==?= Subject: [PATCH v3] bus: mhi: host: pci_generic: Add support for Quectel RM520N-GL modem Date: Fri, 27 Jan 2023 18:47:54 -0800 Message-Id: <20230128024754.2562-1-duke_xinanwen@163.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-CM-TRANSID: R9xpCgDHwKTgjNRjTovaBw--.8240S2 X-Coremail-Antispam: 1Uf129KBjvJXoW7tF1DtryfWr1kuw48KFy8Zrb_yoW8AFWfpF 45ZrWIvF4ktFW5ta97A34DGFn5Wwsxury7KFnrG34IgF1qy3yYqryvgF12vF4Y9a95XF13 tFyrJr9Ig3WqkFUanT9S1TB71UUUUU7qnTZGkaVYY2UrUUUUjbIjqfuFe4nvWSU5nxnvy2 9KBjDUYxBIdaVFxhVjvjDU0xZFpf9x0JUn_-gUUUUU= X-Originating-IP: [220.180.239.55] X-CM-SenderInfo: 5gxnvsp0lqt0xzhqqiywtou0bp/1tbiPRQFe2I0VCdKYAABsZ Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org The project is based on Qualcomm's sdx6x chips for laptop,so the mhi interface definition and enumeration align with previous Quectel sdx24 configuration Signed-off-by: Duke Xin(辛安文) --- drivers/bus/mhi/host/pci_generic.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c index f39657f71483..416dabe2c282 100644 --- a/drivers/bus/mhi/host/pci_generic.c +++ b/drivers/bus/mhi/host/pci_generic.c @@ -335,6 +335,16 @@ static const struct mhi_pci_dev_info mhi_quectel_em1xx_info = { .sideband_wake = true, }; +static const struct mhi_pci_dev_info mhi_quectel_rm5xx_info = { + .name = "quectel-rm5xx", + .edl = "qcom/prog_firehose_sdx6x.elf", + .config = &modem_quectel_em1xx_config, + .bar_num = MHI_PCI_DEFAULT_BAR_NUM, + .dma_data_width = 32, + .mru_default = 32768, + .sideband_wake = true, +}; + static const struct mhi_channel_config mhi_foxconn_sdx55_channels[] = { MHI_CHANNEL_CONFIG_UL(0, "LOOPBACK", 32, 0), MHI_CHANNEL_CONFIG_DL(1, "LOOPBACK", 32, 0), @@ -569,6 +579,9 @@ static const struct pci_device_id mhi_pci_id_table[] = { .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x2001), /* EM120R-GL for FCCL (sdx24) */ .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, + /* RM520N-GL (sdx6x), eSIM Project */ + { PCI_DEVICE(PCI_VENDOR_ID_QUECTEL, 0x1004), + .driver_data = (kernel_ulong_t) &mhi_quectel_rm5xx_info }, /* T99W175 (sdx55), Both for eSIM and Non-eSIM */ { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0ab), .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info },