1This document contains some hints to test the function of the VCHIQ driver
2without having additional hardware to the Raspberry Pi.
3
4* Requirements & limitations
5
6Testing the VCHIQ driver requires a Raspberry Pi with one of the following SoC:
7  - BCM2835 ( e.g. Raspberry Pi Zero W )
8  - BCM2836 ( e.g. Raspberry Pi 2 )
9  - BCM2837 ( e.g. Raspberry Pi 3 B+ )
10
11The BCM2711 used in the Raspberry Pi 4 is currently not supported in the
12mainline kernel.
13
14There are no specific requirements to the VideoCore firmware to get VCHIQ
15working.
16
17The test scenarios described in this document based on the tool vchiq_test.
18Its source code is available here: https://github.com/raspberrypi/userland
19
20* Configuration
21
22Here are the most common kernel configurations:
23
24 1. BCM2835 target SoC (ARM 32 bit)
25
26    Just use bcm2835_defconfig which already has VCHIQ enabled.
27
28 2. BCM2836/7 target SoC (ARM 32 bit)
29
30    Use the multi_v7_defconfig as a base and then enable all VCHIQ options.
31
32 3. BCM2837 target SoC (ARM 64 bit)
33
34    Use the defconfig as a base and then enable all VCHIQ options.
35
36* Scenarios
37
38 * Initial test
39
40   Check the driver is probed and /dev/vchiq is created
41
42 * Functional test
43
44   Command: vchiq_test -f 10
45
46   Expected output:
47   Functional test - iters:10
48   ======== iteration 1 ========
49   Testing bulk transfer for alignment.
50   Testing bulk transfer at PAGE_SIZE.
51   ...
52
53 * Ping test
54
55   Command: vchiq_test -p 1
56
57   Expected output:
58   Ping test - service:echo, iters:1, version 3
59   vchi ping (size 0) -> 57.000000us
60   vchi ping (size 0, 0 async, 0 oneway) -> 122.000000us
61   vchi bulk (size 0, 0 async, 0 oneway) -> 546.000000us
62   vchi bulk (size 0, 0 oneway) -> 230.000000us
63   vchi ping (size 0) -> 49.000000us
64   vchi ping (size 0, 0 async, 0 oneway) -> 70.000000us
65   vchi bulk (size 0, 0 async, 0 oneway) -> 296.000000us
66   vchi bulk (size 0, 0 oneway) -> 266.000000us
67   vchi ping (size 0, 1 async, 0 oneway) -> 65.000000us
68   vchi bulk (size 0, 0 oneway) -> 456.000000us
69   vchi ping (size 0, 2 async, 0 oneway) -> 74.000000us
70   vchi bulk (size 0, 0 oneway) -> 640.000000us
71   vchi ping (size 0, 10 async, 0 oneway) -> 125.000000us
72   vchi bulk (size 0, 0 oneway) -> 2309.000000us
73   vchi ping (size 0, 0 async, 1 oneway) -> 70.000000us
74   vchi ping (size 0, 0 async, 2 oneway) -> 76.000000us
75   vchi ping (size 0, 0 async, 10 oneway) -> 105.000000us
76   vchi ping (size 0, 10 async, 10 oneway) -> 165.000000us
77   vchi ping (size 0, 100 async, 0 oneway) -> nanus
78   vchi bulk (size 0, 0 oneway) -> nanus
79   vchi ping (size 0, 0 async, 100 oneway) -> nanus
80   vchi ping (size 0, 100 async, 100 oneway) -> infus
81   vchi ping (size 0, 200 async, 0 oneway) -> infus
82   ...
83