Project

General

Profile

Actions

Feature #2206

open

Note 2 LTE modem on mainline kernel

Added by Joey Hewitt almost 2 years ago. Updated 5 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Start date:
01/09/2021
Due date:
% Done:

0%

Estimated time:
Resolution:
Device:
New device
Grant:
Type of work:
C programming

Description

I'll track work on LTE modems on mainline kernel. The attached patch goes in the kernel. Build and install https://github.com/technexion-android/platform_external_libgpiod, then run the following script:

pin_name() {
    sed 's/-/ /' /sys/firmware/devicetree/base/soc/pinctrl@*/$1/samsung,pins
}

gpioset $(pin_name ap2mdm-soft-reset-n)=0
sleep .005
gpioset $(pin_name ap2mdm-soft-reset-n)=1
sleep .010
gpioset $(pin_name ap2mdm-status)=1

The modem should now appear in lsusb, in QDL mode. I am trying to figure out how to boot it. I'm using https://git.replicant.us/contrib/scintill/external_modem-boot/ with some obsolete pieces stripped out, but now the modem sends a non-existent command 0. I don't know why, but some guesses are that the HSIC is buggy in this kernel, or the old kernel does something I don't know about to get the modem in the right state.


Files

patch (4.38 KB) patch Joey Hewitt, 01/09/2021 12:36 AM
Actions #1

Updated by Joey Hewitt almost 2 years ago

P.S. Credit to https://github.com/fourkbomb/linux/tree/modem for the HSIC devicetree code.

Actions #2

Updated by Kurtis Hanna almost 2 years ago

Denis is doing some upstream modem work in this repo that continues on the work forkbomb was doing at the link above: https://git.replicant.us/contrib/GNUtoo/kernel_replicant_linux/log/?h=replicant-11-i9300-modem

Actions #3

Updated by _I3^ RELATIVISM over 1 year ago

  • Type of work C programming added
Actions #4

Updated by Jack K 6 months ago

Joey Hewitt wrote:

I'll track work on LTE modems on mainline kernel. The attached patch goes in the kernel. Build and install https://github.com/technexion-android/platform_external_libgpiod, then run the following script:

[...]

The modem should now appear in lsusb, in QDL mode. I am trying to figure out how to boot it. I'm using https://git.replicant.us/contrib/scintill/external_modem-boot/ with some obsolete pieces stripped out, but now the modem sends a non-existent command 0. I don't know why, but some guesses are that the HSIC is buggy in this kernel, or the old kernel does something I don't know about to get the modem in the right state.

Hi Joey - have you done any more work? I am interested in getting LTE up and running, and would appreciate liaising with you over this - are you on IRC at all?

Many thanks,

Jack K

Actions #5

Updated by Jack K 5 months ago

I added a couple of USB IDs from smdk4412 kernel in qcserial driver:

diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c
index c18bf8164bc2..e20443289df6 100644
--- a/drivers/usb/serial/qcserial.c
+++ b/drivers/usb/serial/qcserial.c
@@ -116,6 +116,8 @@ static const struct usb_device_id id_table[] = {
     {USB_DEVICE(0x03f0, 0x371d)},    /* HP un2430 Gobi 3000 QDL */
     {USB_DEVICE(0x05c6, 0x920c)},    /* Gobi 3000 QDL */
     {USB_DEVICE(0x05c6, 0x920d)},    /* Gobi 3000 Composite */
+    {USB_DEVICE(0x05c6, 0x9048)},    /* MDM9x15 device */
+    {USB_DEVICE(0x05c6, 0x904C)},    /* MDM9x15 device */
     {USB_DEVICE(0x1410, 0xa020)},   /* Novatel Gobi 3000 QDL */
     {USB_DEVICE(0x1410, 0xa021)},    /* Novatel Gobi 3000 Composite */
     {USB_DEVICE(0x413c, 0x8193)},    /* Dell Gobi 3000 QDL */

And got this in dmesg:

[   82.194645] qcserial 1-2:1.0: Qualcomm USB modem converter detected
[   82.194939] usb 1-2: Qualcomm USB modem converter now attached to ttyUSB0

I think this might be a step in the right direction.

Actions

Also available in: Atom PDF