You are on page 1of 13

Machine Translated by Google

Junzheng®

Zeratul T31 USB interface configuration and use

Date: Aug.2020
Machine Translated by Google

Junzheng®

Zeratul T31 USB interface configuration and use

Copyright © Ingenic Semiconductor Co. Ltd 2019. All rights reserved.

Release history

Date Revision Change


Aug.2020 1.0 First release

Disclaimer

This documentation is provided for use with Ingenic products. No license to


Ingenic property rights is granted. Ingenic assumes no liability, provides no warranty
either expressed or implied relating to the usage, or intellectual property right
infringement except as provided for by Ingenic Terms and Conditions of Sale.

Ingenic products are not designed for and should not be used in any medical or
life sustaining or supporting equipment.

All information in this document should be treated as preliminary. Ingenic may


make changes to this document without notice. Anyone relying on this
documentation should contact Ingenic for the current documentation and errata.

Beijing Junzheng Integrated Circuit Co., Ltd.

Address: Junzheng Building, Building 14, Yard East District, No. 10 Xibeiwang East Road, Haidian District, Beijing

Tel: (86-10)56345000
Fax: (86-10)56345001
Http: //www.ingenic.c
Machine Translated by Google

T31-USB interface configuration and use

1 USB interface configuration

Due to the wide variety of USB interfaces, this document currently explains the more common interface usage methods: usb to

Ethernet, USB to USB disk, USB to 4G module, USB rndis configuration.

1.1 USB to Ethernet

Figure 1 Connection method

T31 USB interface 1


configuration uses Copyright® 2005-2019 Ingenic Semiconductor Co., Ltd. All rights reserved.
Machine Translated by Google

T31-USB interface configuration and use

Method 1: Load in ko mode and connect

according to the connection method in Figure 1 above, then select the board-level file and enter make menuconfig to configure as follows:

figure 2

image 3

T31 USB interface 2


configuration uses Copyright® 2005-2019 Ingenic Semiconductor Co., Ltd. All rights reserved.
Machine Translated by Google

T31-USB interface configuration and use

Figure 4

After the configuration is completed, enter make modules to generate the corresponding ko. Find the following ko and load the driver in the following order

insmod usb-common.ko
insmod usbcore.ko
insmod dwc2.ko
insmod usbnet.ko
insmod asix.ko

Check if there is eth0

ifconfig -a
udhcpc -i eth0

Method 2: Compile into the kernel: Change

the <M> in Figure 2, Figure 3, and Figure 4 above to [*]. Type make uImage to find uImage.lzo. Burn uImage.lzo compressed kernel. The startup

time of lzo compression kernel is slightly slower than uImage.zrt method by 30ms.

T31 USB interface 3


configuration uses Copyright® 2005-2019 Ingenic Semiconductor Co., Ltd. All rights reserved.
Machine Translated by Google

T31-USB interface configuration and use

1.2 USB to U disk

Figure 5 Connection method

Method 1: Load the implementation in KO mode

Step 1) The kernel make menuconfig configuration is as follows:

1) Device Drivers --->


SCSI device support --->
<M> SCSI device support
<M> SCSI disk support
2) Device Drivers --->
[*] USB support --->
Device Drivers --->

<M> Support for Host-side USB


<M> USB Mass Storage support
<M> DesignWare USB2 DRD Core Support

Step 2) Enter the command make modules to generate ko. Find the following ko and load it in the following order.

insmod usb-common.ko
insmod usbcore.ko
insmod dwc2.ko

insmod scsi_mod.ko
insmod sd_mod.ko

T31 USB interface 4


configuration uses Copyright® 2005-2019 Ingenic Semiconductor Co., Ltd. All rights reserved.
Machine Translated by Google

T31-USB interface configuration and use

insmod usb-storage.ko

Method 2: Compile into the kernel for implementation

Step 1) The kernel make menuconfig configuration is as follows:

1) Device Drivers --->


SCSI device support --->
[*] SCSI device support
[*] SCSI disk support
2) Device Drivers --->
[*] USB support --->
[*] Support for Host-side USB
[*] USB Mass Storage support
[*] DesignWare USB2 DRD Core Support

Step 2)

Enter make uImage to find uImage.lzo. Burn uImage.lzo compressed kernel. The startup time of lzo compression kernel is slightly

slower than uImage.zrt method by 30ms.

T31 USB interface 5


configuration uses Copyright® 2005-2019 Ingenic Semiconductor Co., Ltd. All rights reserved.
Machine Translated by Google

T31-USB interface configuration and use

1.3 USB RNDIS configuration


RNDIS (Remote Network Driver Interface Specification) is also called the remote network driver interface protocol. The
device connects to the host through USB and simulates a network connection for downloading and debugging.

USB RNDIS (Remote Network Driver Interface Specification), the product is a USB slave device.

Enter the kernel and enter the command make menuconfig. The configuration is as follows

USB support--->
Step1 ) <M> Support for Host-side USB
[*]Enable USB persist by default

Step2) <M> USB Gadget Support --->


<M> Ethernet Gadget (with CDC Ethernet support)
[*] RNDIS support

Step3) <M> DesignWare USB2 DRD Core Support


Driver Mode (Device Mode Only) --->
[*] Enable Very Verbose Debugging Messages

Enter the command make uImage to recompile the kernel and burn the kernel. Enter the command make modules to find the
following ko and load it in the following order

insmod usb-common.ko
insmod udc-core.ko
insmod usbcore.ko
insmod dwc2.ko
insmod configfs.ko
insmod libcomposite.ko
insmod u_ether.ko
insmod usb_f_ecm.ko
insmod usb_f_ecm_subset.ko
insmod usb_f_rndis.ko
insmod g_ether.ko

1.3.1 Win10 RNDIS driver installation


Install a driver kindle_rndis.inf_amd64-v1.0.0.1.zip. The first step: Unzip the
installation package on the computer that needs to be operated;

The second step: Find 5-runasadmin_register-CA-cer.cmd in the unzipped file, and use it as an administrator

T31 USB interface 6


configuration uses Copyright® 2005-2019 Ingenic Semiconductor Co., Ltd. All rights reserved.
Machine Translated by Google

T31-USB interface configuration and use

Install the

program; Step 3: In My Computer Management->Device Manager, there is "Ports (COM and LPT)" in the right directory, right-click "Serial USB Device

(COM3)"->Update Driver Software ... Step 4: See a new network card in "Network and Sharing Center" > Change

Adapter Settings in Control Panel

Kindle USB RNDIS device.

Right click and properties:

Then enter the following command on the board in the first step:

$ echo connect >/sys/devices/platform/jz-dwc2/dwc2/udc/dwc2/soft_connect $ ifconfig usb0


192.168.1.1 up $ route add default gw
192.168.1.1

At this time, the Ethernet appears as follows, indicating that the connection is successful:

T31 USB interface 7


configuration uses Copyright® 2005-2019 Ingenic Semiconductor Co., Ltd. All rights reserved.
Machine Translated by Google

T31-USB interface configuration and use

Test whether the ping is successful. As shown in the figure below, it is correct.

1.4 USB to 4G ppp mode

Step 1) The kernel make menuconfig configuration is as follows:

a)Device Drivers
[*] USB support --->
<*> Support for Host-side USB
[*] Enable USB persist by default (NEW)
<*> USB Serial Converter support --->
<*> USB driver for GSM and CDMA modems
<*> USB Gadget Support --->
<*> USB Gadget Drivers (Ethernet Gadget (with CDC Ethernet support))
[*] RNDIS support (NEW)

b)Device Drivers
[*] Network device support --->
<*> PPP (point-to-point protocol) support
<*> PPP BSD-Compress compression
<*> PPP Deflate compression
[*] PPP filtering
<*> PPP MPPE compression (encryption)
[*] PPP multilink support
<*> PPP over Ethernet
<*> PPP support for async serial ports

T31 USB interface 8


configuration uses Copyright® 2005-2019 Ingenic Semiconductor Co., Ltd. All rights reserved.
Machine Translated by Google

T31-USB interface configuration and use

<*> PPP support for sync tty ports


USB Network Adapters --->
<*> Multi-purpose USB Networking Framework

Step 2) Enter

make uImage to find uImage.lzo. Burn uImage.lzo compressed kernel. The startup time of lzo compression kernel is slightly slower than uImage.zrt method by 30ms.

Step3), usb device identification

a. The 4G module firmware is provided by the original 4G manufacturer. Burn the T31 firmware after the above configuration.

b. Enter the main control system and enter lsusb to view the USB device.

c. If it is a network card driver with RNDIS, the following device nodes will be generated under dev for communication with the 4G module.

d. Perform AT dial-up and other networking

1.5 USB to serial port


1. The kernel configuration is as follows:

T31 USB interface 9


configuration uses Copyright® 2005-2019 Ingenic Semiconductor Co., Ltd. All rights reserved.
Machine Translated by Google

T31-USB interface configuration and use

After configuration, save and exit, make uImage.zrt and re-burn the kernel image.

2. The usage method is as follows:

After entering the system, do the following to realize the USB to serial port function.

T31 USB interface configuration uses 10

Copyright® 2005-2019 Ingenic Semiconductor Co., Ltd. All rights reserved.


Machine Translated by Google

T31-USB interface configuration and use

T31 USB interface configuration and use

11

Copyright® 2005-2019 Ingenic Semiconductor Co., Ltd. All rights reserved.

You might also like