xref: /linux/Documentation/ABI/testing/debugfs-driver-habanalabs (revision 5cce51464c61b868157e578261d45fe389e81e54)
1c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/addr
2c2164773SOded GabbayDate:           Jan 2019
3c2164773SOded GabbayKernelVersion:  5.1
4c2164773SOded GabbayContact:        oded.gabbay@gmail.com
5c2164773SOded GabbayDescription:    Sets the device address to be used for read or write through
64a0ce776STomer Tayar                PCI bar, or the device VA of a host mapped memory to be read or
74a0ce776STomer Tayar                written directly from the host. The latter option is allowed
84a0ce776STomer Tayar                only when the IOMMU is disabled.
94a0ce776STomer Tayar                The acceptable value is a string that starts with "0x"
10c2164773SOded Gabbay
11c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/command_buffers
12c2164773SOded GabbayDate:           Jan 2019
13c2164773SOded GabbayKernelVersion:  5.1
14c2164773SOded GabbayContact:        oded.gabbay@gmail.com
15c2164773SOded GabbayDescription:    Displays a list with information about the currently allocated
16c2164773SOded Gabbay                command buffers
17c2164773SOded Gabbay
18c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/command_submission
19c2164773SOded GabbayDate:           Jan 2019
20c2164773SOded GabbayKernelVersion:  5.1
21c2164773SOded GabbayContact:        oded.gabbay@gmail.com
22c2164773SOded GabbayDescription:    Displays a list with information about the currently active
23c2164773SOded Gabbay                command submissions
24c2164773SOded Gabbay
25c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/command_submission_jobs
26c2164773SOded GabbayDate:           Jan 2019
27c2164773SOded GabbayKernelVersion:  5.1
28c2164773SOded GabbayContact:        oded.gabbay@gmail.com
29c2164773SOded GabbayDescription:    Displays a list with detailed information about each JOB (CB) of
30c2164773SOded Gabbay                each active command submission
31c2164773SOded Gabbay
32c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/data32
33c2164773SOded GabbayDate:           Jan 2019
34c2164773SOded GabbayKernelVersion:  5.1
35c2164773SOded GabbayContact:        oded.gabbay@gmail.com
36c2164773SOded GabbayDescription:    Allows the root user to read or write directly through the
37c2164773SOded Gabbay                device's PCI bar. Writing to this file generates a write
38c2164773SOded Gabbay                transaction while reading from the file generates a read
394a0ce776STomer Tayar                transaction. This custom interface is needed (instead of using
40c2164773SOded Gabbay                the generic Linux user-space PCI mapping) because the DDR bar
41c2164773SOded Gabbay                is very small compared to the DDR memory and only the driver can
424a0ce776STomer Tayar                move the bar before and after the transaction.
434a0ce776STomer Tayar                If the IOMMU is disabled, it also allows the root user to read
444a0ce776STomer Tayar                or write from the host a device VA of a host mapped memory
45c2164773SOded Gabbay
46*5cce5146SMoti HaimovskiWhat:           /sys/kernel/debug/habanalabs/hl<n>/data64
47*5cce5146SMoti HaimovskiDate:           Jan 2020
48*5cce5146SMoti HaimovskiKernelVersion:  5.6
49*5cce5146SMoti HaimovskiContact:        oded.gabbay@gmail.com
50*5cce5146SMoti HaimovskiDescription:    Allows the root user to read or write 64 bit data directly
51*5cce5146SMoti Haimovski                through the device's PCI bar. Writing to this file generates a
52*5cce5146SMoti Haimovski                write transaction while reading from the file generates a read
53*5cce5146SMoti Haimovski                transaction. This custom interface is needed (instead of using
54*5cce5146SMoti Haimovski                the generic Linux user-space PCI mapping) because the DDR bar
55*5cce5146SMoti Haimovski                is very small compared to the DDR memory and only the driver can
56*5cce5146SMoti Haimovski                move the bar before and after the transaction.
57*5cce5146SMoti Haimovski                If the IOMMU is disabled, it also allows the root user to read
58*5cce5146SMoti Haimovski                or write from the host a device VA of a host mapped memory
59*5cce5146SMoti Haimovski
60c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/device
61c2164773SOded GabbayDate:           Jan 2019
62c2164773SOded GabbayKernelVersion:  5.1
63c2164773SOded GabbayContact:        oded.gabbay@gmail.com
64c2164773SOded GabbayDescription:    Enables the root user to set the device to specific state.
65c2164773SOded Gabbay                Valid values are "disable", "enable", "suspend", "resume".
66c2164773SOded Gabbay                User can read this property to see the valid values
67c2164773SOded Gabbay
6806deb86aSTomer TayarWhat:           /sys/kernel/debug/habanalabs/hl<n>/engines
6906deb86aSTomer TayarDate:           Jul 2019
7006deb86aSTomer TayarKernelVersion:  5.3
7106deb86aSTomer TayarContact:        oded.gabbay@gmail.com
7206deb86aSTomer TayarDescription:    Displays the status registers values of the device engines and
7306deb86aSTomer Tayar                their derived idle status
7406deb86aSTomer Tayar
75c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/i2c_addr
76c2164773SOded GabbayDate:           Jan 2019
77c2164773SOded GabbayKernelVersion:  5.1
78c2164773SOded GabbayContact:        oded.gabbay@gmail.com
79c2164773SOded GabbayDescription:    Sets I2C device address for I2C transaction that is generated
80c2164773SOded Gabbay                by the device's CPU
81c2164773SOded Gabbay
82c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/i2c_bus
83c2164773SOded GabbayDate:           Jan 2019
84c2164773SOded GabbayKernelVersion:  5.1
85c2164773SOded GabbayContact:        oded.gabbay@gmail.com
86c2164773SOded GabbayDescription:    Sets I2C bus address for I2C transaction that is generated by
87c2164773SOded Gabbay                the device's CPU
88c2164773SOded Gabbay
89c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/i2c_data
90c2164773SOded GabbayDate:           Jan 2019
91c2164773SOded GabbayKernelVersion:  5.1
92c2164773SOded GabbayContact:        oded.gabbay@gmail.com
93c2164773SOded GabbayDescription:    Triggers an I2C transaction that is generated by the device's
94c2164773SOded Gabbay                CPU. Writing to this file generates a write transaction while
95c2164773SOded Gabbay                reading from the file generates a read transcation
96c2164773SOded Gabbay
97c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/i2c_reg
98c2164773SOded GabbayDate:           Jan 2019
99c2164773SOded GabbayKernelVersion:  5.1
100c2164773SOded GabbayContact:        oded.gabbay@gmail.com
101c2164773SOded GabbayDescription:    Sets I2C register id for I2C transaction that is generated by
102c2164773SOded Gabbay                the device's CPU
103c2164773SOded Gabbay
104c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/led0
105c2164773SOded GabbayDate:           Jan 2019
106c2164773SOded GabbayKernelVersion:  5.1
107c2164773SOded GabbayContact:        oded.gabbay@gmail.com
108c2164773SOded GabbayDescription:    Sets the state of the first S/W led on the device
109c2164773SOded Gabbay
110c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/led1
111c2164773SOded GabbayDate:           Jan 2019
112c2164773SOded GabbayKernelVersion:  5.1
113c2164773SOded GabbayContact:        oded.gabbay@gmail.com
114c2164773SOded GabbayDescription:    Sets the state of the second S/W led on the device
115c2164773SOded Gabbay
116c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/led2
117c2164773SOded GabbayDate:           Jan 2019
118c2164773SOded GabbayKernelVersion:  5.1
119c2164773SOded GabbayContact:        oded.gabbay@gmail.com
120c2164773SOded GabbayDescription:    Sets the state of the third S/W led on the device
121c2164773SOded Gabbay
122c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/mmu
123c2164773SOded GabbayDate:           Jan 2019
124c2164773SOded GabbayKernelVersion:  5.1
125c2164773SOded GabbayContact:        oded.gabbay@gmail.com
126c2164773SOded GabbayDescription:    Displays the hop values and physical address for a given ASID
127c2164773SOded Gabbay                and virtual address. The user should write the ASID and VA into
128c2164773SOded Gabbay                the file and then read the file to get the result.
129c2164773SOded Gabbay                e.g. to display info about VA 0x1000 for ASID 1 you need to do:
130c2164773SOded Gabbay                echo "1 0x1000" > /sys/kernel/debug/habanalabs/hl0/mmu
131c2164773SOded Gabbay
132c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/set_power_state
133c2164773SOded GabbayDate:           Jan 2019
134c2164773SOded GabbayKernelVersion:  5.1
135c2164773SOded GabbayContact:        oded.gabbay@gmail.com
136c2164773SOded GabbayDescription:    Sets the PCI power state. Valid values are "1" for D0 and "2"
137c2164773SOded Gabbay                for D3Hot
138c2164773SOded Gabbay
139c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/userptr
140c2164773SOded GabbayDate:           Jan 2019
141c2164773SOded GabbayKernelVersion:  5.1
142c2164773SOded GabbayContact:        oded.gabbay@gmail.com
143c2164773SOded GabbayDescription:    Displays a list with information about the currently user
144c2164773SOded Gabbay                pointers (user virtual addresses) that are pinned and mapped
145c2164773SOded Gabbay                to DMA addresses
146c2164773SOded Gabbay
147c2164773SOded GabbayWhat:           /sys/kernel/debug/habanalabs/hl<n>/vm
148c2164773SOded GabbayDate:           Jan 2019
149c2164773SOded GabbayKernelVersion:  5.1
150c2164773SOded GabbayContact:        oded.gabbay@gmail.com
151c2164773SOded GabbayDescription:    Displays a list with information about all the active virtual
152c2164773SOded Gabbay                address mappings per ASID
153