Linux-ARM-MSM Archive mirror
 help / color / mirror / Atom feed
From: "Slark Xiao" <slark_xiao@163.com>
To: "Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org>
Cc: loic.poulain@linaro.org, mhi@lists.linux.dev,
	linux-arm-msm@vger.kernel.org,  linux-kernel@vger.kernel.org
Subject: Re:Re: Re:Re: [PATCH] bus: mhi: host: Add Foxconn SDX72 related support
Date: Wed, 15 May 2024 15:57:59 +0800 (CST)	[thread overview]
Message-ID: <4717acb4.7aa5.18f7b421477.Coremail.slark_xiao@163.com> (raw)
In-Reply-To: <20240515074315.GB2445@thinkpad>

At 2024-05-15 15:43:15, "Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org> wrote:
>On Wed, May 15, 2024 at 09:43:53AM +0800, Slark Xiao wrote:
>> 
>> Send again with text mode.
>> At 2024-05-15 09:29:20, "Slark Xiao" <slark_xiao@163.com> wrote:
>> >At 2024-05-14 22:37:41, "Manivannan Sadhasivam" <manivannan.sadhasivam@linaro.org> wrote:
>> >>On Fri, May 10, 2024 at 11:26:57AM +0800, Slark Xiao wrote:
>> >>> Align with Qcom SDX72, add ready timeout item for Foxconn SDX72.
>> >>> And also, add firehose support since SDX72.
>> >>> 
>> >>> Signed-off-by: Slark Xiao <slark_xiao@163.com>
>> >>> ---
>> >>>  drivers/bus/mhi/host/pci_generic.c | 31 ++++++++++++++++++++++++++++++
>> >>>  1 file changed, 31 insertions(+)
>> >>> 
>> >>> diff --git a/drivers/bus/mhi/host/pci_generic.c b/drivers/bus/mhi/host/pci_generic.c
>> >>> index 08844ee79654..0fd94c193fc6 100644
>> >>> --- a/drivers/bus/mhi/host/pci_generic.c
>> >>> +++ b/drivers/bus/mhi/host/pci_generic.c
>> >>> @@ -399,6 +399,8 @@ static const struct mhi_channel_config mhi_foxconn_sdx55_channels[] = {
>> >>>  	MHI_CHANNEL_CONFIG_DL(13, "MBIM", 32, 0),
>> >>>  	MHI_CHANNEL_CONFIG_UL(32, "DUN", 32, 0),
>> >>>  	MHI_CHANNEL_CONFIG_DL(33, "DUN", 32, 0),
>> >>> +	MHI_CHANNEL_CONFIG_UL_FP(34, "FIREHOSE", 32, 0),
>> >>> +	MHI_CHANNEL_CONFIG_DL_FP(35, "FIREHOSE", 32, 0),
>> >>
>> >>This means SDX55 is also supporting FIREHOSE channels, which is not true I
>> >>believe.
>> >Actually, I just verified it with my sdx55 and the answer is Yes. These channels
>> >are common settings for Qcom device which support PCIe mode. BTW, the
>> >default settings of Qcom and Quectel support firehose for their sdx55 products.
>> >>
>> >>>  	MHI_CHANNEL_CONFIG_HW_UL(100, "IP_HW0_MBIM", 128, 2),
>> >>>  	MHI_CHANNEL_CONFIG_HW_DL(101, "IP_HW0_MBIM", 128, 3),
>> >>>  };
>> >>> @@ -419,6 +421,16 @@ static const struct mhi_controller_config modem_foxconn_sdx55_config = {
>> >>>  	.event_cfg = mhi_foxconn_sdx55_events,
>> >>>  };
>> >>>  
>> >>> +static const struct mhi_controller_config modem_foxconn_sdx72_config = {
>> >>> +	.max_channels = 128,
>> >>> +	.timeout_ms = 20000,
>> >>> +	.ready_timeout_ms = 50000,
>> >>> +	.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_sdx24_info = {
>> >>>  	.name = "foxconn-sdx24",
>> >>>  	.config = &modem_foxconn_sdx55_config,
>> >>> @@ -448,6 +460,16 @@ static const struct mhi_pci_dev_info mhi_foxconn_sdx65_info = {
>> >>>  	.sideband_wake = false,
>> >>>  };
>> >>>  
>> >>> +static const struct mhi_pci_dev_info mhi_foxconn_sdx72_info = {
>> >>> +	.name = "foxconn-sdx72",
>> >>> +	.edl = "qcom/sdx72m/xbl_s_devprg_ns.melf",
>> >>
>> >>What is '.melf'? Is the firmware available somewhere? Did you plan to upstream
>> >>it to linux-firmware?
>> >>
>> >This file similar with "edl.mbn". In SDX72 product, the default "edl" file name is
>> >"xbl_s_devprg_ns.melf". Currently we don't plan to upstream it to linux-firmware
>> >since 2 reasons: 1: we share the same fold name sdx72m with qcom or other vendors
>> >2: this file may be changed since sdx72 product still under developing in our side. we
>> >may change the base line according to QCOM release.
>> >>- Mani
>> >>
>> And I want to say, the os or driver can't recover device with this "edl" file only. This file
>> only used when device needs to be changed to firehose mode. After that, we need
>> a tool and a complete firmware package to do the firehose download. Unfortunately,
>> there is no open source tool to support this download. Even Qcom PCAT tool only
>> supports their own VID/PID with their own driver. So the function of mhi driver is:
>> Put device into firehose mode and enumerate the wwan0firehose0 port. The rest
>> shall be done by enduser themselves. 
>
>Can't you use QDL tool? https://github.com/linux-msm/qdl
>
>- Mani
>
No. We used this tool for USB only. This tool don't support PCIE device currently.
qdl will call the function usb_open to get device node in 
/dev/bus/usb. But for PCIE device , we will communicate device with wwan0firehose0
port. 
>-- 
>மணிவண்ணன் சதாசிவம்

  reply	other threads:[~2024-05-15  7:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-10  3:26 [PATCH] bus: mhi: host: Add Foxconn SDX72 related support Slark Xiao
2024-05-14 14:37 ` Manivannan Sadhasivam
2024-05-15  1:29   ` Slark Xiao
2024-05-15  1:43     ` Slark Xiao
2024-05-15  7:43       ` Manivannan Sadhasivam
2024-05-15  7:57         ` Slark Xiao [this message]
2024-05-15  7:41     ` Manivannan Sadhasivam
2024-05-15  8:01       ` Slark Xiao
2024-05-15 11:52         ` Manivannan Sadhasivam
2024-05-15 12:17           ` Slark Xiao
2024-05-16 14:23             ` Manivannan Sadhasivam
2024-05-17  1:09               ` Slark Xiao
2024-05-17  9:59                 ` Slark Xiao
2024-05-17 10:49                   ` Manivannan Sadhasivam
2024-05-20  1:21                     ` Slark Xiao
2024-05-15 11:46       ` Qiang Yu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4717acb4.7aa5.18f7b421477.Coremail.slark_xiao@163.com \
    --to=slark_xiao@163.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.poulain@linaro.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=mhi@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).