diff options
author | Aleksander Morgado <aleksander@aleksander.es> | 2020-10-22 12:48:35 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@aleksander.es> | 2020-11-20 09:24:51 +0000 |
commit | 8fc60754dd1df91560a3123454df1ad0ecf0ac92 (patch) | |
tree | 4a53db0baee7b907eef264df6936dc302467ffc9 /plugins/qcom-soc/77-mm-qcom-soc.rules | |
parent | cab4b54ad106caadb7f70025348f0aab5522bde4 (diff) |
qcom-soc: new plugin for Qualcomm SoCs
This plugin implements support for old Qualcomm SoCs like the MSM8916
or the MSM8974, where:
* control ports are available via RPMSG channels exported as devices
e.g. with rpmsgexport:
https://github.com/andersson/rpmsgexport
* network ports are exposed by the bam-dmux kernel driver:
https://github.com/msm8916-mainline/linux/commits/bam-dmux
Adding support for newer Qualcomm SoCs (e.g. QRTR+IPA) could be done
in a similar way on this very same plugin.
This plugin is the first and only one that implements support for a
modem device that is "built in" the system, as opposed to external
modems that may be available via USB or PCI.
The ID_MM_PHYSDEV_UID based udev tags provided by the plugin provide
the logic to bind all the SoC ports together in the same modem object,
and therefore ID_MM_PHYSDEV_UID should not be used by users to
override the ones set by the plugin.
All "rpmsg[0-9]*" ports that are considered part of the modem are
flagged as candidate, ignoring the parent "rpmsg_ctrl[0-9]*" ports on
purpose. This setup therefore assumes that the channels have been
exported already as devices (e.g. using rpmsgexport).
libqmi 1.27.2 is required to support the "WDS Bind Data Port" message.
Diffstat (limited to 'plugins/qcom-soc/77-mm-qcom-soc.rules')
-rw-r--r-- | plugins/qcom-soc/77-mm-qcom-soc.rules | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/plugins/qcom-soc/77-mm-qcom-soc.rules b/plugins/qcom-soc/77-mm-qcom-soc.rules new file mode 100644 index 00000000..772f498c --- /dev/null +++ b/plugins/qcom-soc/77-mm-qcom-soc.rules @@ -0,0 +1,46 @@ +# do not edit this file, it will be overwritten on update + +ACTION!="add|change|move|bind", GOTO="mm_qcom_soc_end" + +# Process only known net and rpmsg ports +SUBSYSTEM=="net", DRIVERS=="bam-dmux", GOTO="mm_qcom_soc_process" +SUBSYSTEM=="rpmsg", DRIVERS=="qcom-q6v5-mss", GOTO="mm_qcom_soc_process" +GOTO="mm_qcom_soc_end" + +LABEL="mm_qcom_soc_process" + +# +# Add a common physdev UID to all ports in the Qualcomm SoC, so that they +# are all bound together to the same modem object. +# +# The MSM8916, MSM8974, .... Qualcomm SoCs use the combination of RPMSG +# based control ports plus BAM-DMUX based network ports. +# +ENV{ID_MM_PHYSDEV_UID}="qcom-soc" + +# port type hints for the rpmsgexport-ed ports +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA5_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA6_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA7_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA8_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA9_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA12_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA13_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA14_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA15_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA16_CNTL", ENV{ID_MM_PORT_TYPE_QMI}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA1", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA2", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA3", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" +SUBSYSTEM=="rpmsg", ATTR{name}=="DATA4", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}="1" + +# ignore every other port without explicit hints +SUBSYSTEM=="rpmsg", ENV{ID_MM_PORT_TYPE_QMI}!="1", ENV{ID_MM_PORT_TYPE_AT_SECONDARY}!="1", ENV{ID_MM_PORT_IGNORE}="1" + +# explicitly ignore bam-dmux network ports like rmnet_usb0 +KERNEL=="rmnet_usb[0-9]*", ENV{ID_MM_PORT_IGNORE}="1" + +# flag all rpmsg ports under this plugin as candidate +KERNEL=="rpmsg[0-9]*", SUBSYSTEM=="rpmsg", ENV{ID_MM_CANDIDATE}="1" + +LABEL="mm_qcom_soc_end" |