-
Notifications
You must be signed in to change notification settings - Fork 222
Enable ModemManager QRTR + QCOM SoC plugin with external M.2 attach through MHI ports #1728
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mdembla-bit
wants to merge
2
commits into
qualcomm-linux:master
Choose a base branch
from
mdembla-bit:rb3gen2-mm-qrtr
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+90
−0
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
.../openembedded-layer/recipes-connectivity/modemmanager/files/0001-enable-mhi-support.patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| From: Mrigank Dembla <mdembla@qti.qualcomm.com> | ||
| Subject: [PATCH] modemmanager: enable MHI support | ||
|
|
||
| This patch enables MHI support over ModemManager. | ||
|
|
||
| Upstream-Status: Pending | ||
| Signed-off-by: Mrigank Dembla <mdembla@qti.qualcomm.com> | ||
|
|
||
|
|
||
| diff --git a/src/80-mm-candidate.rules b/src/80-mm-candidate.rules | ||
| index a9c5a6ea..d551307a 100644 | ||
| --- a/src/80-mm-candidate.rules | ||
| +++ b/src/80-mm-candidate.rules | ||
| @@ -28,6 +28,20 @@ KERNEL=="cdc-wdm*", SUBSYSTEM=="usbmisc", ENV{ID_MM_CANDIDATE}="1" | ||
| # the "wwan_dev" device type (full device, not just one port) | ||
| SUBSYSTEMS=="usb", GOTO="mm_candidate_end" | ||
| SUBSYSTEM=="wwan", ENV{DEVTYPE}=="wwan_dev", GOTO="mm_candidate_end" | ||
| -SUBSYSTEM=="wwan", ENV{ID_MM_CANDIDATE}="1" | ||
| +SUBSYSTEM=="wwan", ENV{ID_MM_CANDIDATE}="0", GOTO="mm_candidate_end" | ||
| + | ||
| +SUBSYSTEM=="wwan", ATTR{type}=="AT", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1" | ||
| +SUBSYSTEM=="wwan", ATTR{type}=="MBIM", ENV{ID_MM_PORT_TYPE_MBIM}="1" | ||
| +SUBSYSTEM=="wwan", ATTR{type}=="QMI", ENV{ID_MM_PORT_TYPE_QMI}="1" | ||
| +SUBSYSTEM=="wwan", ATTR{type}=="QCDM", ENV{ID_MM_PORT_TYPE_QCDM}="1" | ||
| +SUBSYSTEM=="wwan", ATTR{type}=="FIREHOSE", ENV{ID_MM_PORT_IGNORE}="1" | ||
| + | ||
| +# Linux 5.13 does not have "type" attribute yet, match kernel name instead | ||
| +SUBSYSTEM=="wwan", KERNEL=="*MBIM", ENV{ID_MM_PORT_TYPE_MBIM}="1" | ||
| +SUBSYSTEM=="wwan", KERNEL=="*QMI", ENV{ID_MM_PORT_TYPE_QMI}="1" | ||
| +SUBSYSTEM=="wwan", KERNEL=="*AT", ENV{ID_MM_PORT_TYPE_AT_PRIMARY}="1" | ||
| +SUBSYSTEM=="wwan", KERNEL=="*QCDM", ENV{ID_MM_PORT_TYPE_QCDM}="1" | ||
| +SUBSYSTEM=="wwan", KERNEL=="*FIREHOSE", ENV{ID_MM_PORT_IGNORE}="1" | ||
| + | ||
|
|
||
| LABEL="mm_candidate_end" | ||
| diff --git a/src/mm-bearer-qmi.c b/src/mm-bearer-qmi.c | ||
| index cf6c1fcf..85ed7185 100644 | ||
| --- a/src/mm-bearer-qmi.c | ||
| +++ b/src/mm-bearer-qmi.c | ||
| @@ -2442,8 +2442,9 @@ load_settings_from_bearer (MMBearerQmi *self, | ||
| if (ctx->multiplex == MM_BEARER_MULTIPLEX_SUPPORT_UNKNOWN) { | ||
| if (mm_context_get_test_multiplex_requested ()) | ||
| ctx->multiplex = MM_BEARER_MULTIPLEX_SUPPORT_REQUESTED; | ||
| - else if (!g_strcmp0 (data_port_driver, "ipa")) | ||
| - ctx->multiplex = MM_BEARER_MULTIPLEX_SUPPORT_REQUIRED; | ||
| + else if (!g_strcmp0 (data_port_driver, "ipa") || | ||
| + !g_strcmp0 (data_port_driver, "mhi_net")) | ||
| + ctx->multiplex = MM_BEARER_MULTIPLEX_SUPPORT_REQUIRED; | ||
| else | ||
| ctx->multiplex = MM_BEARER_MULTIPLEX_SUPPORT_NONE; | ||
| } | ||
| diff --git a/src/plugins/qcom-soc/77-mm-qcom-soc.rules b/src/plugins/qcom-soc/77-mm-qcom-soc.rules | ||
| index 9719f96f..d4e50be8 100644 | ||
| --- a/src/plugins/qcom-soc/77-mm-qcom-soc.rules | ||
| +++ b/src/plugins/qcom-soc/77-mm-qcom-soc.rules | ||
| @@ -5,6 +5,7 @@ ACTION!="add|change|move|bind", GOTO="mm_qcom_soc_end" | ||
| # Process only known wwan, net and rpmsg ports | ||
| SUBSYSTEM=="net", DRIVERS=="bam-dmux", GOTO="mm_qcom_soc_process" | ||
| SUBSYSTEM=="net", DRIVERS=="ipa", GOTO="mm_qcom_soc_process" | ||
| +SUBSYSTEM=="net", DRIVERS=="mhi_net", GOTO="mm_qcom_soc_process" | ||
| SUBSYSTEM=="wwan", DRIVERS=="qcom-q6v5-mss", GOTO="mm_qcom_soc_process" | ||
| SUBSYSTEM=="rpmsg", DRIVERS=="qcom-q6v5-mss", GOTO="mm_qcom_soc_process" | ||
| GOTO="mm_qcom_soc_end" | ||
| diff --git a/src/plugins/qcom-soc/mm-broadband-modem-qmi-qcom-soc.c b/src/plugins/qcom-soc/mm-broadband-modem-qmi-qcom-soc.c | ||
| index fa19bd4d..8da9176e 100644 | ||
| --- a/src/plugins/qcom-soc/mm-broadband-modem-qmi-qcom-soc.c | ||
| +++ b/src/plugins/qcom-soc/mm-broadband-modem-qmi-qcom-soc.c | ||
| @@ -125,7 +125,8 @@ peek_port_qmi_for_data (MMBroadbandModemQmi *self, | ||
| net_port = mm_port_peek_kernel_device (data); | ||
| net_port_driver = mm_kernel_device_get_driver (net_port); | ||
|
|
||
| - if (g_strcmp0 (net_port_driver, "ipa") == 0) | ||
| + if (g_strcmp0 (net_port_driver, "ipa") == 0 || | ||
| + g_strcmp0 (net_port_driver, "mhi_net") == 0) | ||
| return peek_port_qmi_for_data_ipa (self, data, out_endpoint, error); | ||
|
|
||
| if (g_strcmp0 (net_port_driver, "bam-dmux") == 0) | ||
13 changes: 13 additions & 0 deletions
13
dynamic-layers/openembedded-layer/recipes-connectivity/modemmanager/modemmanager_%.bbappend
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| FILESEXTRAPATHS:prepend := "${THISDIR}/files:" | ||
|
|
||
| # --- Enable QRTR support, disable MBIM --- | ||
| PACKAGECONFIG:remove = "mbim" | ||
| PACKAGECONFIG:append = " qrtr" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
|
||
| # --- Allow QRTR to be enabled by meson --- | ||
| EXTRA_OEMESON:remove = "-Dqrtr=false" | ||
|
|
||
| # --- Enable Qualcomm SoC plugin (required for QRTR/MM on QCOM) --- | ||
| EXTRA_OECONF:append = " --enable-plugin-qcom-soc" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This also should go upstream as a PACKAGECONFIG |
||
|
|
||
| SRC_URI += "file://0001-enable-mhi-support.patch" | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NAK, please post upstream first and get at least some reviews.