4G

4G模块使用的是合宙的Air724模块(USB接口)。根据原理图了解到,它与U盘共用一个USB口,并通过FSUSB30MUX芯片在两者之间进行切换,当SELECT(GPIO47)输入低电平,切换到HSD1(4G);当SELECT(GPIO47)输入高电平,切换到HSD2(U盘):

4G模块正常工作时,4G_RST(GPIO85)输入高电平,4G_ON_OFF(GPIO86)输入高电平,4G_PWR输入高电平:

  • DTS的配置

由于4G模块和U盘共用一个USB口,DTS的USB部分不需要再配置(在调试USB的时候已经配置好了)。主要配置GPIO47、GPIO85、GPIO86和GPIO90:

# vi kernel/drivers/sstar/include/infinity2m/gpio.h

# cd kernel/arch/arm/boot/dts
# vi infinity2m-ssc011a-s01a-padmux-display.dtsi

接下来重新编译并更新kernel:

# cd ../../../../../
# ./Release_to_customer.sh -f nand -p ssd201

系统起来后,控制GPIO85、GPIO86和GPIO90输出高电平,使4G模块工作:

# echo 85 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio85/direction
# echo 1 > /sys/class/gpio/gpio85/value
# echo 86 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio86/direction
# echo 1 > /sys/class/gpio/gpio86/value
# echo 90 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio90/direction
# echo 1 > /sys/class/gpio/gpio90/value

然后控制GPIO47输出低电平,使USB切换到4G模块:

# echo 47 > /sys/class/gpio/export
# echo out > /sys/class/gpio/gpio47/direction
# echo 0 > /sys/class/gpio/gpio47/value

此时,可以看到,4G模块已经被识别了:

# lsusb

  • Kernel config的配置
# cd kernel
# ARCH=arm make menuconfig

# cp .config ./arch/arm/configs/infinity2m_spinand_ssc011a_s01a_minigui_defconfig -f
# cd -

文档更新时间: 2021-08-17 14:45   作者:Aeeditor