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