feat: add sim8380g-m2 pcie mode,fix mhi pcie scan
This commit is contained in:
parent
b6209f8768
commit
2712ae6ebf
@ -172,14 +172,16 @@ scan_pcie_slot_interfaces()
|
|||||||
[ ! -z "$dun_device" ] && dun_device_path="$wwan0_path/$dun_device"
|
[ ! -z "$dun_device" ] && dun_device_path="$wwan0_path/$dun_device"
|
||||||
[ ! -z "$dun_device_path" ] && dun_devices=$(basename "$dun_device_path")
|
[ ! -z "$dun_device_path" ] && dun_devices=$(basename "$dun_device_path")
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
#mt_t7xx device
|
#mt_t7xx device
|
||||||
wwan_path="$slot_path/wwan"
|
wwan_path="$slot_path/wwan"
|
||||||
net_devices=$(ls "$wwan_path" | grep -E "wwan[0-9]")
|
if [ -d "$wwan_path" ]; then
|
||||||
devices_path="$wwan_path/$net_devices"
|
net_devices=$(ls "$wwan_path" | grep -E "wwan[0-9]")
|
||||||
if [ -d "$devices_path" ];then
|
devices_path="$wwan_path/$net_devices"
|
||||||
mbim_devices=$(ls "$devices_path" | grep -E "wwan[0-9]mbim[0-9]")
|
if [ -d "$devices_path" ];then
|
||||||
dun_devices=$(ls "$devices_path" | grep -E "wwan[0-9]at[0-9]")
|
mbim_devices=$(ls "$devices_path" | grep -E "wwan[0-9]mbim[0-9]")
|
||||||
|
dun_devices=$(ls "$devices_path" | grep -E "wwan[0-9]at[0-9]")
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
echo "net_devices: $net_devices dun_devices: $dun_devices"
|
echo "net_devices: $net_devices dun_devices: $dun_devices"
|
||||||
at_ports="$dun_devices"
|
at_ports="$dun_devices"
|
||||||
@ -299,6 +301,8 @@ match_config()
|
|||||||
|
|
||||||
[[ "$name" = *"T99W373"* ]] && name="t99w373"
|
[[ "$name" = *"T99W373"* ]] && name="t99w373"
|
||||||
|
|
||||||
|
[[ "$name" = *"SIM8380G"* ]] && name="SIM8380G-M2"
|
||||||
|
|
||||||
#rg200u-cn
|
#rg200u-cn
|
||||||
[[ "$name" = *"rg200u-cn"* ]] && name="rg200u-cn"
|
[[ "$name" = *"rg200u-cn"* ]] && name="rg200u-cn"
|
||||||
|
|
||||||
@ -321,7 +325,7 @@ get_modem_model()
|
|||||||
local at_port=$1
|
local at_port=$1
|
||||||
cgmm=$(at $at_port "AT+CGMM")
|
cgmm=$(at $at_port "AT+CGMM")
|
||||||
sleep 1
|
sleep 1
|
||||||
cgmm_1=$(at $at_port "AT+CGMM?")
|
cgmm_1=$(at $at_port "AT+CGMM")
|
||||||
name_1=$(echo -e "$cgmm" |grep "+CGMM: " | awk -F': ' '{print $2}')
|
name_1=$(echo -e "$cgmm" |grep "+CGMM: " | awk -F': ' '{print $2}')
|
||||||
name_2=$(echo -e "$cgmm_1" |grep "+CGMM: " | awk -F'"' '{print $2} '| cut -d ' ' -f 1)
|
name_2=$(echo -e "$cgmm_1" |grep "+CGMM: " | awk -F'"' '{print $2} '| cut -d ' ' -f 1)
|
||||||
name_3=$(echo -e "$cgmm" | sed -n '2p')
|
name_3=$(echo -e "$cgmm" | sed -n '2p')
|
||||||
@ -366,6 +370,7 @@ add()
|
|||||||
for trys in $(seq 1 3);do
|
for trys in $(seq 1 3);do
|
||||||
for at_port in $valid_at_ports; do
|
for at_port in $valid_at_ports; do
|
||||||
m_debug "try at port $at_port;time $trys"
|
m_debug "try at port $at_port;time $trys"
|
||||||
|
sleeps 1
|
||||||
get_modem_model "/dev/$at_port"
|
get_modem_model "/dev/$at_port"
|
||||||
[ $? -eq 0 ] && break || modem_name=""
|
[ $? -eq 0 ] && break || modem_name=""
|
||||||
done
|
done
|
||||||
|
@ -750,6 +750,19 @@
|
|||||||
"mbim"
|
"mbim"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"simcom_sim8380g-m2": {
|
||||||
|
"manufacturer": "simcom",
|
||||||
|
"platform": "qualcomm",
|
||||||
|
"data_interface": "pcie",
|
||||||
|
"define_connect": "1",
|
||||||
|
"wcdma_band": "1/2/3/4/5/8",
|
||||||
|
"lte_band": "1/2/3/4/5/7/8/12/13/14/17/18/19/20/25/26/28/29/30/66/71",
|
||||||
|
"nsa_band": "1/2/3/5/7/8/12/20/28/40/41/48/66/71/77/78/79",
|
||||||
|
"sa_band": "1/2/3/5/7/8/12/20/28/40/41/48/66/71/77/78/79",
|
||||||
|
"modes": [
|
||||||
|
"qmi"
|
||||||
|
]
|
||||||
|
},
|
||||||
"rm500q-cn": {
|
"rm500q-cn": {
|
||||||
"manufacturer": "quectel",
|
"manufacturer": "quectel",
|
||||||
"platform": "qualcomm",
|
"platform": "qualcomm",
|
||||||
@ -1117,11 +1130,13 @@
|
|||||||
"qualcomm": {
|
"qualcomm": {
|
||||||
"vendor_id": [
|
"vendor_id": [
|
||||||
"1a0e",
|
"1a0e",
|
||||||
"1e0e"
|
"1e0e",
|
||||||
|
"17cb"
|
||||||
],
|
],
|
||||||
"product_id": [
|
"product_id": [
|
||||||
"9001",
|
"9001",
|
||||||
"9011"
|
"9011",
|
||||||
|
"0308"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user