Support for newer SoCs with BAM-DMUX (e.g. MSM8909)
The modem firmware on newer SoCs with BAM-DMUX (e.g. MSM8909) behaves a bit differently from already supported configurations (e.g. on MSM8916). This is mostly an overview of the changes that would be needed for full functionality, basic functionality already works with the two MRs I made and linked below.
-
There is no RPMSG/WWAN QMI port by default. Instead the modem is available through QRTR similar to the platforms with QRTR + IPA. (However, note that it is possible to create RPMSG/WWAN ports using the Data Port Mapper/DPM.)
-
The QRTR port is already detected correctly by the existing code and added to the modem while probing.
-
-
"Bind Data Port" always fails with "device unsupported". Instead, it is possible to use the newer "Bind Mux Data Port" using
ENDPOINT_TYPE_BAM_DMUX
and the channel number (available indev_port
from the network interface). The mux-id is ignored if QMAP is not enabled in WDA "Set Data Format".-
!853 (merged): Add fallback to "Bind Mux Data Port" if "Bind Data Port" fails. -
!852 (merged): Fix endpoint type detection (at the moment SUBSYS_QRTR
impliesENDPOINT_TYPE_EMBEDDED
, but it should beENDPOINT_TYPE_BAM_DMUX
in this case). -
!858 (merged): To allow using multiplexing: Refactor code to handle endpoint interface number specific to the data/net port chosen for a connection. At least the "Bind Mux Data Port" should be done with the correct endpoint interface number to make it work. -
Ideally: Properly set WDA Data Format for all endpoints. (Once per endpoint interface number.) This is not strictly required in this setup because the interfaces are in the correct Raw-IP mode by default. -
Ideally: Avoid requiring a wwan0
interface. At the moment this is needed to set the initial data format while probing, becauseinitialize_endpoint_info()
inmm-port-qmi.c
assumes that BAM-DMUX hasendpoint interface number = 0
.
-
-
There are no BAM-DMUX network interfaces by default. They need to be created through the Data Port Mapper/DPM as well. (For multiplexing, multiple network interfaces can be created or QMAP can be used.)
-
To match already supported platforms I currently have a startup script that creates a number of network interfaces on boot, using: $ qmicli -d qrtr://0 --dpm-open-port="hw-data-ep-type=bam-dmux,hw-data-ep-iface-number=0,hw-data-rx-id=42,hw-data-tx-id=42"
hw-data-ep-iface-number
is the channel number (dev_port
in the BAM-DMUX network interface).hw-data-rx/tx-id
seem to be ignored. -
Ideally, ModemManager should probe using only the "bam-dmux" platform device (there are no network interfaces yet!). Then it should create at least one network interface using DPM (somewhat related code exists already for IPA but only during connection setup...) -
Additional network interfaces could be created dynamically for multiplexing. -
Alternatively: Multiplexing is also possible with QMAP using a single network interface (note: this requires minor changes in the qcom_bam_dmux
Linux driver).
-