Merge tag 'ntb-5.11' of git://github.com/jonmason/ntb
[linux-2.6-microblaze.git] / Documentation / ABI / testing / debugfs-driver-habanalabs
1 What:           /sys/kernel/debug/habanalabs/hl<n>/addr
2 Date:           Jan 2019
3 KernelVersion:  5.1
4 Contact:        oded.gabbay@gmail.com
5 Description:    Sets the device address to be used for read or write through
6                 PCI bar, or the device VA of a host mapped memory to be read or
7                 written directly from the host. The latter option is allowed
8                 only when the IOMMU is disabled.
9                 The acceptable value is a string that starts with "0x"
10
11 What:           /sys/kernel/debug/habanalabs/hl<n>/clk_gate
12 Date:           May 2020
13 KernelVersion:  5.8
14 Contact:        oded.gabbay@gmail.com
15 Description:    Allow the root user to disable/enable in runtime the clock
16                 gating mechanism in Gaudi. Due to how Gaudi is built, the
17                 clock gating needs to be disabled in order to access the
18                 registers of the TPC and MME engines. This is sometimes needed
19                 during debug by the user and hence the user needs this option.
20                 The user can supply a bitmask value, each bit represents
21                 a different engine to disable/enable its clock gating feature.
22                 The bitmask is composed of 20 bits:
23
24                 =======   ============
25                 0  -  7   DMA channels
26                 8  - 11   MME engines
27                 12 - 19   TPC engines
28                 =======   ============
29
30                 The bit's location of a specific engine can be determined
31                 using (1 << GAUDI_ENGINE_ID_*). GAUDI_ENGINE_ID_* values
32                 are defined in uapi habanalabs.h file in enum gaudi_engine_id
33
34 What:           /sys/kernel/debug/habanalabs/hl<n>/command_buffers
35 Date:           Jan 2019
36 KernelVersion:  5.1
37 Contact:        oded.gabbay@gmail.com
38 Description:    Displays a list with information about the currently allocated
39                 command buffers
40
41 What:           /sys/kernel/debug/habanalabs/hl<n>/command_submission
42 Date:           Jan 2019
43 KernelVersion:  5.1
44 Contact:        oded.gabbay@gmail.com
45 Description:    Displays a list with information about the currently active
46                 command submissions
47
48 What:           /sys/kernel/debug/habanalabs/hl<n>/command_submission_jobs
49 Date:           Jan 2019
50 KernelVersion:  5.1
51 Contact:        oded.gabbay@gmail.com
52 Description:    Displays a list with detailed information about each JOB (CB) of
53                 each active command submission
54
55 What:           /sys/kernel/debug/habanalabs/hl<n>/data32
56 Date:           Jan 2019
57 KernelVersion:  5.1
58 Contact:        oded.gabbay@gmail.com
59 Description:    Allows the root user to read or write directly through the
60                 device's PCI bar. Writing to this file generates a write
61                 transaction while reading from the file generates a read
62                 transaction. This custom interface is needed (instead of using
63                 the generic Linux user-space PCI mapping) because the DDR bar
64                 is very small compared to the DDR memory and only the driver can
65                 move the bar before and after the transaction.
66
67                 If the IOMMU is disabled, it also allows the root user to read
68                 or write from the host a device VA of a host mapped memory
69
70 What:           /sys/kernel/debug/habanalabs/hl<n>/data64
71 Date:           Jan 2020
72 KernelVersion:  5.6
73 Contact:        oded.gabbay@gmail.com
74 Description:    Allows the root user to read or write 64 bit data directly
75                 through the device's PCI bar. Writing to this file generates a
76                 write transaction while reading from the file generates a read
77                 transaction. This custom interface is needed (instead of using
78                 the generic Linux user-space PCI mapping) because the DDR bar
79                 is very small compared to the DDR memory and only the driver can
80                 move the bar before and after the transaction.
81
82                 If the IOMMU is disabled, it also allows the root user to read
83                 or write from the host a device VA of a host mapped memory
84
85 What:           /sys/kernel/debug/habanalabs/hl<n>/device
86 Date:           Jan 2019
87 KernelVersion:  5.1
88 Contact:        oded.gabbay@gmail.com
89 Description:    Enables the root user to set the device to specific state.
90                 Valid values are "disable", "enable", "suspend", "resume".
91                 User can read this property to see the valid values
92
93 What:           /sys/kernel/debug/habanalabs/hl<n>/engines
94 Date:           Jul 2019
95 KernelVersion:  5.3
96 Contact:        oded.gabbay@gmail.com
97 Description:    Displays the status registers values of the device engines and
98                 their derived idle status
99
100 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_addr
101 Date:           Jan 2019
102 KernelVersion:  5.1
103 Contact:        oded.gabbay@gmail.com
104 Description:    Sets I2C device address for I2C transaction that is generated
105                 by the device's CPU
106
107 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_bus
108 Date:           Jan 2019
109 KernelVersion:  5.1
110 Contact:        oded.gabbay@gmail.com
111 Description:    Sets I2C bus address for I2C transaction that is generated by
112                 the device's CPU
113
114 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_data
115 Date:           Jan 2019
116 KernelVersion:  5.1
117 Contact:        oded.gabbay@gmail.com
118 Description:    Triggers an I2C transaction that is generated by the device's
119                 CPU. Writing to this file generates a write transaction while
120                 reading from the file generates a read transcation
121
122 What:           /sys/kernel/debug/habanalabs/hl<n>/i2c_reg
123 Date:           Jan 2019
124 KernelVersion:  5.1
125 Contact:        oded.gabbay@gmail.com
126 Description:    Sets I2C register id for I2C transaction that is generated by
127                 the device's CPU
128
129 What:           /sys/kernel/debug/habanalabs/hl<n>/led0
130 Date:           Jan 2019
131 KernelVersion:  5.1
132 Contact:        oded.gabbay@gmail.com
133 Description:    Sets the state of the first S/W led on the device
134
135 What:           /sys/kernel/debug/habanalabs/hl<n>/led1
136 Date:           Jan 2019
137 KernelVersion:  5.1
138 Contact:        oded.gabbay@gmail.com
139 Description:    Sets the state of the second S/W led on the device
140
141 What:           /sys/kernel/debug/habanalabs/hl<n>/led2
142 Date:           Jan 2019
143 KernelVersion:  5.1
144 Contact:        oded.gabbay@gmail.com
145 Description:    Sets the state of the third S/W led on the device
146
147 What:           /sys/kernel/debug/habanalabs/hl<n>/mmu
148 Date:           Jan 2019
149 KernelVersion:  5.1
150 Contact:        oded.gabbay@gmail.com
151 Description:    Displays the hop values and physical address for a given ASID
152                 and virtual address. The user should write the ASID and VA into
153                 the file and then read the file to get the result.
154                 e.g. to display info about VA 0x1000 for ASID 1 you need to do:
155                 echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu
156
157 What:           /sys/kernel/debug/habanalabs/hl<n>/set_power_state
158 Date:           Jan 2019
159 KernelVersion:  5.1
160 Contact:        oded.gabbay@gmail.com
161 Description:    Sets the PCI power state. Valid values are "1" for D0 and "2"
162                 for D3Hot
163
164 What:           /sys/kernel/debug/habanalabs/hl<n>/userptr
165 Date:           Jan 2019
166 KernelVersion:  5.1
167 Contact:        oded.gabbay@gmail.com
168 Description:    Displays a list with information about the currently user
169                 pointers (user virtual addresses) that are pinned and mapped
170                 to DMA addresses
171
172 What:           /sys/kernel/debug/habanalabs/hl<n>/vm
173 Date:           Jan 2019
174 KernelVersion:  5.1
175 Contact:        oded.gabbay@gmail.com
176 Description:    Displays a list with information about all the active virtual
177                 address mappings per ASID
178
179 What:           /sys/kernel/debug/habanalabs/hl<n>/stop_on_err
180 Date:           Mar 2020
181 KernelVersion:  5.6
182 Contact:        oded.gabbay@gmail.com
183 Description:    Sets the stop-on_error option for the device engines. Value of
184                 "0" is for disable, otherwise enable.