net: wwan: iosm: add rpc interface for xmm modems
authorShane Parslow <shaneparslow808@gmail.com>
Sat, 29 Oct 2022 09:03:56 +0000 (02:03 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Nov 2022 11:51:03 +0000 (11:51 +0000)
Add a new iosm wwan port that connects to the modem rpc interface. This
interface provides a configuration channel, and in the case of the 7360, is
the only way to configure the modem (as it does not support mbim).

The new interface is compatible with existing software, such as
open_xdatachannel.py from the xmm7360-pci project [1].

[1] https://github.com/xmm7360/xmm7360-pci

Signed-off-by: Shane Parslow <shaneparslow808@gmail.com>
Reviewed-by: Loic Poulain <loic.poulain@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/wwan/iosm/iosm_ipc_chnl_cfg.c
drivers/net/wwan/wwan_core.c
include/linux/wwan.h

index 128c999e08bb930164777a9f41b9d5e21b7f9dde..bcfbc6b3d617ef2a2517a8a6d9ba36c5a1c82e08 100644 (file)
@@ -39,7 +39,7 @@ static struct ipc_chnl_cfg modem_cfg[] = {
        /* RPC - 0 */
        { IPC_MEM_CTRL_CHL_ID_1, IPC_MEM_PIPE_2, IPC_MEM_PIPE_3,
          IPC_MEM_MAX_TDS_RPC, IPC_MEM_MAX_TDS_RPC,
-         IPC_MEM_MAX_DL_RPC_BUF_SIZE, WWAN_PORT_UNKNOWN },
+         IPC_MEM_MAX_DL_RPC_BUF_SIZE, WWAN_PORT_XMMRPC },
        /* IAT0 */
        { IPC_MEM_CTRL_CHL_ID_2, IPC_MEM_PIPE_4, IPC_MEM_PIPE_5,
          IPC_MEM_MAX_TDS_AT, IPC_MEM_MAX_TDS_AT, IPC_MEM_MAX_DL_AT_BUF_SIZE,
index d72ee18476d1a27a2c20d1599ac59a5072f0c1b4..966d0ccd2276b5251e22cd992afac2098a55b738 100644 (file)
@@ -319,6 +319,10 @@ static const struct {
                .name = "FIREHOSE",
                .devsuf = "firehose",
        },
+       [WWAN_PORT_XMMRPC] = {
+               .name = "XMMRPC",
+               .devsuf = "xmmrpc",
+       },
 };
 
 static ssize_t type_show(struct device *dev, struct device_attribute *attr,
index 5ce2acf444fb3bd65b7bc3fc94389895745b165a..24d76500b1cc9fa7cb40e1c0ebad0b12613ad912 100644 (file)
@@ -15,6 +15,7 @@
  * @WWAN_PORT_QMI: Qcom modem/MSM interface for modem control
  * @WWAN_PORT_QCDM: Qcom Modem diagnostic interface
  * @WWAN_PORT_FIREHOSE: XML based command protocol
+ * @WWAN_PORT_XMMRPC: Control protocol for Intel XMM modems
  *
  * @WWAN_PORT_MAX: Highest supported port types
  * @WWAN_PORT_UNKNOWN: Special value to indicate an unknown port type
@@ -26,6 +27,7 @@ enum wwan_port_type {
        WWAN_PORT_QMI,
        WWAN_PORT_QCDM,
        WWAN_PORT_FIREHOSE,
+       WWAN_PORT_XMMRPC,
 
        /* Add new port types above this line */