From: Stephan Gerhold <firstname.lastname@example.org> To: Jeffrey Hugo <email@example.com> Cc: "David S. Miller" <firstname.lastname@example.org>, Jakub Kicinski <email@example.com>, Loic Poulain <firstname.lastname@example.org>, Sergey Ryazanov <email@example.com>, Johannes Berg <firstname.lastname@example.org>, Bjorn Andersson <email@example.com>, Andy Gross <firstname.lastname@example.org>, Vinod Koul <email@example.com>, Rob Herring <firstname.lastname@example.org>, Aleksander Morgado <email@example.com>, "open list:NETWORKING DRIVERS" <firstname.lastname@example.org>, MSM <email@example.com>, firstname.lastname@example.org, DTML <email@example.com>, lkml <firstname.lastname@example.org>, email@example.com, ~firstname.lastname@example.org Subject: Re: [RFC PATCH net-next 0/4] net: wwan: Add Qualcomm BAM-DMUX WWAN network driver Date: Mon, 19 Jul 2021 20:23:29 +0200 [thread overview] Message-ID: <YPXC7PDCUopdCdTV@gerhold.net> (raw) In-Reply-To: <CAOCk7NonuOKWrpr-MwdjAwF1F4jviEMf=c04vVBxQ-OmfY2bemail@example.com> On Mon, Jul 19, 2021 at 09:43:27AM -0600, Jeffrey Hugo wrote: > On Mon, Jul 19, 2021 at 9:01 AM Stephan Gerhold <firstname.lastname@example.org> wrote: > > > > The BAM Data Multiplexer provides access to the network data channels > > of modems integrated into many older Qualcomm SoCs, e.g. Qualcomm MSM8916 > > or MSM8974. This series adds a driver that allows using it. > > > > For more information about BAM-DMUX, see PATCH 4/4. > > > > Shortly said, BAM-DMUX is built using a simple protocol layer on top of > > a DMA engine (Qualcomm BAM DMA). For BAM-DMUX, the BAM DMA engine runs in > > a quite strange mode that I call "remote power collapse", where the > > modem/remote side is responsible for powering on the BAM when needed but we > > are responsible to initialize it. The BAM is power-collapsed when unneeded > > by coordinating power control via bidirectional interrupts from the > > BAM-DMUX driver. > > The hardware is physically located on the modem, and tied to the modem > regulators, etc. The modem has the ultimate "off" switch. However, > due to the BAM architecture (which is complicated), configuration uses > cooperation on both ends. > What I find strange is that it wasn't done similarly to e.g. Slimbus which has a fairly similar setup. (I used that driver as inspiration for how to use the mainline qcom_bam driver instead of the "SPS" from downstream.) Slimbus uses qcom,controlled-remotely together with the LPASS remoteproc, so it looks like there LPASS does both power-collapse and initialization of the BAM. Whereas here the modem does the power-collapse but we're supposed to do the initialization. > > > > The series first adds one possible solution for handling this "remote power > > collapse" mode in the bam_dma driver, then it adds the BAM-DMUX driver to > > the WWAN subsystem. Note that the BAM-DMUX driver does not actually make > > use of the WWAN subsystem yet, since I'm not sure how to fit it in there > > yet (see PATCH 4/4). > > > > Please note that all of the changes in this patch series are based on > > a fairly complicated driver from Qualcomm . > > I do not have access to any documentation about "BAM-DMUX". :( > > I'm pretty sure I still have the internal docs. > > Are there specific things you want to know? Oh, thanks a lot for asking! I mainly mentioned this here to avoid in-depth questions about the hardware (since I can't answer those). I can probably think of many, many questions, but I'll try to limit myself to the two I'm most confused about. :-) It's somewhat unrelated to this initial patch set since I'm not using QMAP at the moment, but I'm quite confused about the "MTU negotiation feature" that you added support for in . (I *think* that is you, right?) :) The part that I somewhat understand is the "signal" sent in the "OPEN" command from the modem. It tells us the maximum buffer size the modem is willing to accept for TX packets ("ul_mtu" in that commit). Similarly, if we send "OPEN" to the modem we make the modem aware of our maximum RX buffer size plus the number of RX buffers. (create_open_signal() function). The part that is confusing me is the way the "dynamic MTU" is enabled/disabled based on the "signal" in "DATA" commands as well. (process_dynamic_mtu() function). When would that happen? The code suggests that the modem might just suddenly announce that the large MTU should be used from now on. But the "buffer_size" is only changed for newly queued RX buffers so I'm not even sure how the modem knows that it can now send more data at once. Any chance you could clarify how this should work exactly? And a second question if you don't mind: What kind of hardware block am I actually talking to here? I say "modem" above but I just know about the BAM and the DMUX protocol layer. I have also seen assertion failures of the modem DSP firmware if I implement something incorrectly. Is the DMUX protocol just some firmware concept or actually something understood by some hardware block? I've also often seen mentions of some "A2" hardware block but I have no idea what that actually is. What's even worse, in a really old kernel A2/BAM-DMUX also appears as part of the IPA driver , and I thought IPA is the new thing after BAM-DMUX... Not sure how much you can reveal about this. :) Thanks a lot! Stephan : https://source.codeaurora.org/quic/la/kernel/msm-3.10/commit/?h=LA.BR.126.96.36.199-02310-8x16.0&id=c7001b82388129ee02ac9ae1a1ef9993eafbcb26 : https://source.codeaurora.org/quic/la/kernel/msm/tree/drivers/platform/msm/ipa/a2_service.c?h=LA.BF.1.1.3-01610-8x74.0
next prev parent reply other threads:[~2021-07-19 20:27 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-07-19 14:53 Stephan Gerhold 2021-07-19 14:53 ` [RFC PATCH net-next 1/4] dt-bindings: dmaengine: bam_dma: Add remote power collapse mode Stephan Gerhold 2021-07-29 19:36 ` Rob Herring 2021-07-29 19:50 ` Stephan Gerhold 2021-07-19 14:53 ` [RFC PATCH net-next 2/4] dmaengine: qcom: " Stephan Gerhold 2021-07-19 14:53 ` [RFC PATCH net-next 3/4] dt-bindings: net: Add schema for Qualcomm BAM-DMUX Stephan Gerhold 2021-07-19 14:53 ` [RFC PATCH net-next 4/4] net: wwan: Add Qualcomm BAM-DMUX WWAN network driver Stephan Gerhold 2021-07-19 16:01 ` Loic Poulain 2021-07-22 15:40 ` Stephan Gerhold 2021-07-24 11:25 ` Sergey Ryazanov 2021-07-26 8:10 ` Aleksander Morgado 2021-07-26 22:40 ` Sergey Ryazanov 2021-07-20 9:10 ` Sergey Ryazanov 2021-07-21 12:17 ` Stephan Gerhold 2021-07-24 10:22 ` Sergey Ryazanov 2021-07-19 15:43 ` [RFC PATCH net-next 0/4] " Jeffrey Hugo 2021-07-19 18:23 ` Stephan Gerhold [this message] 2021-07-19 23:13 ` Jeffrey Hugo 2021-07-22 14:51 ` Stephan Gerhold 2021-07-26 14:58 ` Jeffrey Hugo
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=YPXC7PDCUopdCdTV@gerhold.net \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.com \ --subject='Re: [RFC PATCH net-next 0/4] net: wwan: Add Qualcomm BAM-DMUX WWAN network driver' \ /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
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 NNTP newsgroup(s).