Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp362983pxf; Thu, 8 Apr 2021 04:55:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwLx/lzWqDypf9QcVN/kdIMuIqOMWRVzzshtiUaxshcmbVQpv+0oJGFKaJuKGapbXbOaMrY X-Received: by 2002:aa7:dd99:: with SMTP id g25mr2702802edv.279.1617882914655; Thu, 08 Apr 2021 04:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617882914; cv=none; d=google.com; s=arc-20160816; b=HJwPe4dTeJUoEZi8xHBkQZM9tADLhU2eC9vtftLPC3eTwOo2OEE/VlUJt+IcPPhF6x Q7vcls9MaBLeTjNuvJDW9B1zXJF4yRu+go97dsyGZa2S6PtF4l+9MetP1e/t6iJ/96Bz PHAjvvW5nX2xu7XpH8MsJGtUGoINaDFZzGlEVtHgwcY56eX3wF7DFUMBi71DjSnPN8SR D9hXWrcVo32Gqw0yoMUpqQNz1ZTBQvRqNF0+RF2RqL7EZNEBfInpHEo4ee3uaV/Fd5H2 DbTCrgxnabMIkPCEv7K071jAWW6mp8Vgdg7EqISJZPx9W0IJQ87lsVMfAeDxFDGXp6Du lpDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=b8N5/slbOHKAsMgxg+NRLYuuOFp0gJPAj2masL5iJQo=; b=UCQxKpLEjx24Gm/KeIZbicWIdmikLm2Qi0AHBbQOPcm4kDoTuTyjecYtAX1J/fsxL8 1BJZxud3fN6Pt1eKzxMiMKCqjB+U6kFS0I5Ly7o6lKkYJzLkd3kIdMSSRwTZ1Sw2Zi/y J8zRdZKegU3eig6cXjqn92PtKMv9OboWrvwF+Zu3LCEE4d54CJ3Y+xJHmelzN3o+ki4s vaDnFZDvJ7rIJSGJWhhHaDLrxpZy7P7L/Ewtri8UfOiTsu5PQJfgNmj1i4DARwTWQ2T4 ZIdcMHX4DDmB71G7o6WA1tz/qN4VatVGjMyjy5XKfXzK01HxrLTqOsKxmn7cbvynOYS3 fUQA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="M/4KlLXa"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ch4si2769741edb.253.2021.04.08.04.54.51; Thu, 08 Apr 2021 04:55:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="M/4KlLXa"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231259AbhDHLyK (ORCPT + 99 others); Thu, 8 Apr 2021 07:54:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229751AbhDHLyJ (ORCPT ); Thu, 8 Apr 2021 07:54:09 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B76A4C061761 for ; Thu, 8 Apr 2021 04:53:58 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id i190so1603265pfc.12 for ; Thu, 08 Apr 2021 04:53:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=b8N5/slbOHKAsMgxg+NRLYuuOFp0gJPAj2masL5iJQo=; b=M/4KlLXaQmDVKI5QcskXqIJ7oHrc6YdEGB8lSeS6LRMfvbwxSLDBgcIQmWDu+Cf0WS EMCuik8LrSYeWHHWhdx9W3oMrQ6Ntcsq+lTm8WyNA4j2Un8sq2EHOQNcois4gnICluP7 OpcNYz4ByVanAVKY2wjQzxooLpp3f1O4XcU3MGADFxJXSM9pV4vDeNxkaSDVaiBR9Hwk HsbR/Yy5ZzrWWkdhXgoa6GiMtgLV/vpwGYdiEUVDaLIw1mi3puVLtK1o/vjEny6kED+C gCpeKBZSUyjlQ9u2dti7Ptt9gC6iWkYRB2M30X/sCwYzBwY3C3NpnmlsfSJBEBFf9q2U QJBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=b8N5/slbOHKAsMgxg+NRLYuuOFp0gJPAj2masL5iJQo=; b=Ne5fSqufv2dlUGFYuUGlR55yUF0DxWriaPZ75u79bpKf1d7ko7QxqZOVAeGmx7CbTa fBmnHyaQmcSvJHUl9/7c3Ip+gKNFb5NvUWj9SucL/XhXQfPnLSeVmru4L3poCc9rDKyy S/2h08OYetnbcmYc/67+DbqBEXoymbsqSyrLLD1Oslf8BNi5nZFHuTXllD7J/Qnhukf/ uuQx96VFBwmuN2b0ah78gOjnImw7TojmSiFi1lbi//kNuwnkPT5m+fw1PoJQHOEZJA/r nWxnwgbnzsj8CtX2hdwSC2dhS3w6blOtZwsMnI6FFQrs910YpzCgnjXxELk1/3KmQozd xqwg== X-Gm-Message-State: AOAM532JaWz9NkaBQb06wa7eh7bO2d00HnGL/UsJ0OMWobisf1rujHBT 14BJ1aSQTZnuT2lEQjAmiIqI814gytFYqXIWPZaOJA== X-Received: by 2002:a63:62c4:: with SMTP id w187mr7472449pgb.173.1617882837913; Thu, 08 Apr 2021 04:53:57 -0700 (PDT) MIME-Version: 1.0 References: <20210408095524.3559-1-jarvis.w.jiang@gmail.com> In-Reply-To: <20210408095524.3559-1-jarvis.w.jiang@gmail.com> From: Loic Poulain Date: Thu, 8 Apr 2021 14:02:07 +0200 Message-ID: Subject: Re: [PATCH 1/2] [v2] bus: mhi: pci_generic: Introduce Foxconn T99W175 support To: Jarvis Jiang Cc: Manivannan Sadhasivam , Hemant Kumar , open list , linux-arm-msm , cchen50@lenovo.com, mpearson@lenovo.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 8 Apr 2021 at 11:56, Jarvis Jiang wrote: > > Add support for T99W175 modems, this modem series is based on SDX55 > qcom chip. The modem is mainly based on MBIM protocol for both the > data and control path. > > This patch adds support for below modems: > > - T99W175(based on sdx55), Both for eSIM and Non-eSIM > - DW5930e(based on sdx55), With eSIM, It's also T99W175 > - DW5930e(based on sdx55), Non-eSIM, It's also T99W175 > > This patch was tested with Ubuntu 20.04 X86_64 PC as host > > Signed-off-by: Jarvis Jiang It looks good, I assume that for now, you're relying on additional patches for the control path, like mhi_uci or mhi_wwan_ctrl. Reviewed-by: Loic Poulain > --- > drivers/bus/mhi/pci_generic.c | 47 +++++++++++++++++++++++++++++++++++ > 1 file changed, 47 insertions(+) > > diff --git a/drivers/bus/mhi/pci_generic.c b/drivers/bus/mhi/pci_generic.c > index 544853c67e02..c66fb73e47ad 100644 > --- a/drivers/bus/mhi/pci_generic.c > +++ b/drivers/bus/mhi/pci_generic.c > @@ -269,6 +269,44 @@ static const struct mhi_pci_dev_info mhi_quectel_em1xx_info = { > .dma_data_width = 32 > }; > > +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), > + MHI_CHANNEL_CONFIG_UL(4, "DIAG", 32, 1), > + MHI_CHANNEL_CONFIG_DL(5, "DIAG", 32, 1), > + MHI_CHANNEL_CONFIG_UL(12, "MBIM", 32, 0), > + MHI_CHANNEL_CONFIG_DL(13, "MBIM", 32, 0), > + MHI_CHANNEL_CONFIG_UL(32, "AT", 32, 0), > + MHI_CHANNEL_CONFIG_DL(33, "AT", 32, 0), > + MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0_MBIM", 128, 2), > + MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0_MBIM", 128, 3), > +}; > + > +static struct mhi_event_config mhi_foxconn_sdx55_events[] = { > + MHI_EVENT_CONFIG_CTRL(0, 128), > + MHI_EVENT_CONFIG_DATA(1, 128), > + MHI_EVENT_CONFIG_HW_DATA(2, 1024, 100), > + MHI_EVENT_CONFIG_HW_DATA(3, 1024, 101) > +}; > + > +static struct mhi_controller_config modem_foxconn_sdx55_config = { > + .max_channels = 128, > + .timeout_ms = 20000, > + .num_channels = ARRAY_SIZE(mhi_foxconn_sdx55_channels), > + .ch_cfg = mhi_foxconn_sdx55_channels, > + .num_events = ARRAY_SIZE(mhi_foxconn_sdx55_events), > + .event_cfg = mhi_foxconn_sdx55_events, > +}; > + > +static const struct mhi_pci_dev_info mhi_foxconn_sdx55_info = { > + .name = "foxconn-sdx55", > + .fw = "qcom/sdx55m/sbl1.mbn", > + .edl = "qcom/sdx55m/edl.mbn", > + .config = &modem_foxconn_sdx55_config, > + .bar_num = MHI_PCI_DEFAULT_BAR_NUM, > + .dma_data_width = 32 > +}; > + > static const struct pci_device_id mhi_pci_id_table[] = { > { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0306), > .driver_data = (kernel_ulong_t) &mhi_qcom_sdx55_info }, > @@ -280,6 +318,15 @@ static const struct pci_device_id mhi_pci_id_table[] = { > .driver_data = (kernel_ulong_t) &mhi_quectel_em1xx_info }, > { PCI_DEVICE(PCI_VENDOR_ID_QCOM, 0x0308), > .driver_data = (kernel_ulong_t) &mhi_qcom_sdx65_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 }, > + /* DW5930e (sdx55), With eSIM, It's also T99W175 */ > + { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0b0), > + .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info }, > + /* DW5930e (sdx55), Non-eSIM, It's also T99W175 */ > + { PCI_DEVICE(PCI_VENDOR_ID_FOXCONN, 0xe0b1), > + .driver_data = (kernel_ulong_t) &mhi_foxconn_sdx55_info }, > { } > }; > MODULE_DEVICE_TABLE(pci, mhi_pci_id_table); > -- > 2.25.1 >