dvb-t-02

ccHDtv測試


更新記錄

item note
20150721 第一版

目錄


it9300 driver native

driver test

  • 使用RX Board

記得使用EEPROM Editor將RX Board的9035改原本的9036,如此才能使用linux driver
目前測試,使用EEPROM Editor查看RX Board的ID為0x22,但linux driver probe訊息如下
Device_ID為65531 ??
(採用rx mapping方式修正,就正常)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
  ======================================================
DRIVER_RELEASE_VERSION: v15.01.13.7
ENDEAVOUR_FW_RELEASE_VERSION: V1_3_0_0
ENDEAVOUR_FW_RELEASE_LINK_VERSION: 1.4.0.0
ENDEAVOUR_FW_RELEASE_OFDM_VERSION: 1.0.0.0
FW_RELEASE_LINK_VERSION: 12.53.14.0
FW_RELEASE_OFDM_VERSION: 2.43.14.0
API_RX_RELEASE_VERSION: 203.20140107.0
Company:ITEtech
======================================================
===== it930x usb device pluged in =====
- Enter IT930x_probe Function -
Device test ok
Device test ok
Device test ok
Device test ok
Device test ok
EEPROM - ========== Can read eeprom
EEPROM - Board ID: 80
EEPROM - Number of IT9300 is 1
EEPROM - BR Chip Version is 1, BR Chip Type is 0x9306
EEPROM - 0 NLC(Receiver) NUM: 4
EEPROM - 0 Receiver Chip Type is 0x1
EEPROM - 1 Receiver Chip Type is 0x1
EEPROM - 2 Receiver Chip Type is 0x1
EEPROM - 3 Receiver Chip Type is 0x1
EEPROM - 4 Receiver Chip Type is 0x1
EEPROM - Mapp disalbe, Rx device ID using default
EEPROM - Device_ID = 65531
- DRV_GET_RX_ID success -
EEPROM - 0, 0, RxDevice_ID = 65531
EEPROM - 0, 1, RxDevice_ID = 65530
EEPROM - 0, 2, RxDevice_ID = 65529
EEPROM - 0, 3, RxDevice_ID = 65528
- DRV_GetEEPROMConfig success -
- Enter DRV_IT930x_device_init Function -
IT9300_initialize ok
Init IT913x...!!
0, 0 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Init IT913x...!!
0, 1 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Init IT913x...!!
0, 2 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Init IT913x...!!
0, 3 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
syncByte = 0x40
0, 0 Ts Source Set in TsType OK!
syncByte = 0x41
0, 1 Ts Source Set in TsType OK!
syncByte = 0x42
0, 2 Ts Source Set in TsType OK!
syncByte = 0x43
0, 3 Ts Source Set in TsType OK!
REGIST - 0, 0, change RxDevice_ID = 0
handle name -->> usb-it930x0
REGIST - 0, 1, change RxDevice_ID = 1
handle name -->> usb-it930x1
REGIST - 0, 2, change RxDevice_ID = 2
handle name -->> usb-it930x2
REGIST - 0, 3, change RxDevice_ID = 3
handle name -->> usb-it930x3
Throw shift data, urb length = 0
- IT930x_probe success -

RX ID Mapping

  • 使用EEPROM Editor設定RXID Mapping(打開)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# usb 1-1.1: new high-speed USB device number 12 using hiusb-ehci
..
EEPROM - Device_ID = 8
- DRV_GET_RX_ID success -
EEPROM - 0, 0, RxDevice_ID = 8
EEPROM - 0, 1, RxDevice_ID = 9
EEPROM - 0, 2, RxDevice_ID = 10
EEPROM - 0, 3, RxDevice_ID = 11
- DRV_GetEEPROMConfig success -
- Enter DRV_IT930x_device_init Function -
### _IT9300_loadFirmware ###
IT9300_initialize ok
Init IT913x...!!
0, 0 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Init IT913x...!!
0, 1 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Init IT913x...!!
0, 2 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Init IT913x...!!
0, 3 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
syncByte = 0x40
0, 0 Ts Source Set in TsType OK!
syncByte = 0x41
0, 1 Ts Source Set in TsType OK!
syncByte = 0x42
0, 2 Ts Source Set in TsType OK!
syncByte = 0x43
0, 3 Ts Source Set in TsType OK!
REGIST - 0, 0, change RxDevice_ID = 8
handle name -->> usb-it930x8
REGIST - 0, 1, change RxDevice_ID = 9
handle name -->> usb-it930x9
REGIST - 0, 2, change RxDevice_ID = 10
handle name -->> usb-it930x10
REGIST - 0, 3, change RxDevice_ID = 11
handle name -->> usb-it930x11
Throw shift data, urb length = 0
- IT930x_probe success -
  • 比較修正前後EEPROM值
    只差在 [0x0-0x1] check sumb及 [0x50] rx id mapping

    Alt text

it930x driver native

  • IT930x_Driver
1
2
3
4
5
6
7
8
9
10
11
 static struct usb_driver IT930x_Driver = {
#if LINUX_VERSION_CODE <= KERNEL_VERSION(2, 6, 15)
.owner = THIS_MODULE,
#endif
.name = "usb-it930x",
.probe = IT930x_probe,
.disconnect = IT930x_disconnect,
.id_table = IT930x_usb_id_table,
.suspend = IT930x_suspend,
.resume = IT930x_resume,
};

check eeprom value

  • Two reference register addresses and their default values are listed in Table 6 and the user can verify the bus integrity by reading these two registers.

  • driver 讀到訊息如下

    • chip_version_7_0 = 0x1222
    • EEPROM - BR Chip Version is 1, BR Chip Type is 0x9306
1
2
3
4
5
6
 ///read chip type
/*patch for read eeprom valid bit*/
result = IT9300_readRegister ((Endeavour*) &DC->it9300, 0, chip_version_7_0, &chip_version); //chip =0
result = IT9300_readRegisters((Endeavour*) &DC->it9300, 0, chip_version_7_0+1, 2, var);
chip_Type = var[1]<<8 | var[0];
deb_data("EEPROM - BR Chip Version is %d, BR Chip Type is 0x%lx \n", chip_version , chip_Type);

Alt text

  • 目前hi3535使用kernel版本 3.4.35

    • GetReturnChannelPackets_toVirtualCom()
    • RETURNCHANNEL_PID: 0x201
  • it930x_driver_native

1
2
3
4
5
6
7
8
usb_fill_bulk_urb(
br_chip->urbs[urb_index],
dev->DC->usb_dev,
usb_rcvbulkpipe(dev->DC->usb_dev, 0x84),
br_chip->urbs[urb_index]->transfer_buffer,
BR_URB_BUFSIZE,
Rx_urbs_completion,
&br_chip->urb_context[urb_index]);

[Rx_urbs_completion][10]
it930x_driver_native/it930x-core.c
GetReturnChannelPackets_toVirtualCom(dev, br_chip->urbs[context->index]->transfer_buffer, BR_URB_BUFSIZE);

  • it930x-core.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
	#define URB_COUNT   4
#define BR_URB_COUNT 4
#define URB_BUFSIZE (188 * 816) //(188 * 348)
#define BR_URB_BUFSIZE (188 * 816) //(188 * 348)
{% endcodeblock %}

{% codeblock lang:csh %}
# insmod ./tty_Virtual.ko
[tty_Virtual] - tty0tty_init -
tty0tty null modem driver v1.0
#
# ls /dev/tnt*
ls: /dev/tnt*: No such file or directory
# insmod ./tty_Virtual.ko
[tty_Virtual] - tty0tty_init -
tty0tty null modem driver v1.0
# ls /dev/tnt*
/dev/tnt0
#

RX ID Check

  • 第一個板子 RXID -> 65535,34.. -> 0,1,2,3
  • 第二個板子 RXID -> 65531,30.. -> 4,5,6,7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
======================================================
DRIVER_RELEASE_VERSION: v15.01.13.7
ENDEAVOUR_FW_RELEASE_VERSION: V1_3_0_0
ENDEAVOUR_FW_RELEASE_LINK_VERSION: 1.4.0.0
ENDEAVOUR_FW_RELEASE_OFDM_VERSION: 1.0.0.0
FW_RELEASE_LINK_VERSION: 12.53.14.0
FW_RELEASE_OFDM_VERSION: 2.43.14.0
API_RX_RELEASE_VERSION: 203.20140107.0
Company:ITEtech
======================================================
===== it930x usb device pluged in =====
- Enter IT930x_probe Function -
Device test ok
Device test ok
Device test ok
Device test ok
Device test ok
EEPROM - ========== Can read eeprom
EEPROM - Board ID: 80
EEPROM - Number of IT9300 is 1
EEPROM - BR Chip Version is 1, BR Chip Type is 0x9306
EEPROM - 0 NLC(Receiver) NUM: 4
EEPROM - 0 Receiver Chip Type is 0x1
EEPROM - 1 Receiver Chip Type is 0x1
EEPROM - 2 Receiver Chip Type is 0x1
EEPROM - 3 Receiver Chip Type is 0x1
EEPROM - 4 Receiver Chip Type is 0x1
EEPROM - Mapp disalbe, Rx device ID using default
EEPROM - Device_ID = 65535
- DRV_GET_RX_ID success -
EEPROM - 0, 0, RxDevice_ID = 65535
EEPROM - 0, 1, RxDevice_ID = 65534
EEPROM - 0, 2, RxDevice_ID = 65533
EEPROM - 0, 3, RxDevice_ID = 65532
- DRV_GetEEPROMConfig success -
- Enter DRV_IT930x_device_init Function -
### _IT9300_loadFirmware ###
IT9300_initialize ok
Init IT913x...!!
0, 0 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Init IT913x...!!
0, 1 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Init IT913x...!!
0, 2 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Init IT913x...!!
0, 3 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
syncByte = 0x40
0, 0 Ts Source Set in TsType OK!
syncByte = 0x41
0, 1 Ts Source Set in TsType OK!
syncByte = 0x42
0, 2 Ts Source Set in TsType OK!
syncByte = 0x43
0, 3 Ts Source Set in TsType OK!
REGIST - 0, 0, change RxDevice_ID = 0
handle name -->> usb-it930x0
REGIST - 0, 1, change RxDevice_ID = 1
handle name -->> usb-it930x1
REGIST - 0, 2, change RxDevice_ID = 2
handle name -->> usb-it930x2
REGIST - 0, 3, change RxDevice_ID = 3
handle name -->> usb-it930x3
Throw shift data, urb length = 0
- IT930x_probe success -
#
#
#
#
#
..xx..
EEPROM - Device_ID = 65531
- DRV_GET_RX_ID success -
EEPROM - 0, 0, RxDevice_ID = 65531
EEPROM - 0, 1, RxDevice_ID = 65530
EEPROM - 0, 2, RxDevice_ID = 65529
EEPROM - 0, 3, RxDevice_ID = 65528
- DRV_GetEEPROMConfig success -
- Enter DRV_IT930x_device_init Function -
### _IT9300_loadFirmware ###
IT9300_initialize ok
Init IT913x...!!
0, 0 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Init IT913x...!!
0, 1 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Init IT913x...!!
0, 2 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
Init IT913x...!!
0, 3 Ts Source initialize ok!
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
syncByte = 0x40
0, 0 Ts Source Set in TsType OK!
syncByte = 0x41
0, 1 Ts Source Set in TsType OK!
syncByte = 0x42
0, 2 Ts Source Set in TsType OK!
syncByte = 0x43
0, 3 Ts Source Set in TsType OK!
REGIST - 0, 0, change RxDevice_ID = 4
handle name -->> usb-it930x4
REGIST - 0, 1, change RxDevice_ID = 5
handle name -->> usb-it930x5
REGIST - 0, 2, change RxDevice_ID = 6
handle name -->> usb-it930x6
REGIST - 0, 3, change RxDevice_ID = 7
handle name -->> usb-it930x7
Throw shift data, urb length = 0
- IT930x_probe success -