xref: /linux/Documentation/ABI/testing/debugfs-driver-dcc (revision 4cbe60cf5ad622f7f45ccc4fa369c9f7a71903b9)
1What:           /sys/kernel/debug/dcc/.../ready
2Date:           December 2022
3Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
4Description:
5		This file is used to check the status of the dcc
6		hardware if it's ready to take the inputs. A 'Y'
7		here indicates dcc is in a ready condition.
8		Example:
9		cat /sys/kernel/debug/dcc/.../ready
10
11What:           /sys/kernel/debug/dcc/.../trigger
12Date:           December 2022
13Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
14Description:
15		This is the debugfs interface for manual software
16		triggers. The user can simply enter a 1 against
17		the debugfs file and enable a manual trigger.
18		Example:
19		echo  1 > /sys/kernel/debug/dcc/.../trigger
20
21What:           /sys/kernel/debug/dcc/.../config_reset
22Date:           December 2022
23Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
24Description:
25		This file is used to reset the configuration of
26		a dcc driver to the default configuration. This
27		means that all the previous addresses stored in
28		the driver gets removed and user needs to enter
29		the address values from the start.
30		Example:
31		echo  1 > /sys/kernel/debug/dcc/../config_reset
32
33What:           /sys/kernel/debug/dcc/.../[list-number]/config
34Date:		 December 2022
35Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
36Description:
37		This stores the addresses of the registers which
38		should be read in case of a hardware crash or
39		manual software triggers. The addresses entered here
40		are considered under all the 4 types of dcc
41		instructions Read type, Write type, Read Modify Write
42		type and Loop type. The lists need to be configured
43		sequentially and not in a overlapping manner. As an
44		example user can jump to list x only after list y is
45		configured and enabled. The format for entering all
46		types of instructions are explained in examples as
47		follows.
48		Example:
49	         i)Read Type Instruction
50		   echo R <1> <2> <3> >/sys/kernel/debug/dcc/../[list-number]/config
51		   1->Address to be considered for reading the value.
52		   2->The word count of the addresses, read n words
53		      starting from address <1>. Each word is of 32 bits.
54		      If not entered 1 is considered.
55		   3->Can be 'apb' or 'ahb' which indicates if it is apb or ahb
56		      bus respectively. If not entered ahb is considered.
57		ii)Write Type Instruction
58		   echo W <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
59		   1->Address to be considered for writing the value.
60		   2->The value that needs to be written at the location.
61		   3->Can be a 'apb' or 'ahb' which indicates if it is apb or ahb
62		      but respectively.
63	       iii)Read Modify Write type instruction
64		   echo RW <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
65		   1->The address which needs to be considered for read then write.
66		   2->The value that needs to be written on the address.
67		   3->The mask of the value to be written.
68		iv)Loop Type Instruction
69		   echo L <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
70		   1->The loop count, the number of times the value of the addresses will be
71		      captured.
72		   2->The address count, total number of addresses to be entered in this
73		      instruction.
74		   3->The series of addresses to be entered separated by a space like <addr1>
75		      <addr2>... and so on.
76
77What:           /sys/kernel/debug/dcc/.../[list-number]/enable
78Date:           December 2022
79Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
80Description:
81		This debugfs interface is used for enabling the
82		the dcc hardware. Enable file is kept under the
83		directory list number for which the user wants
84		to enable it. For example if the user wants to
85		enable list 1, then he should go for
86		echo 1 > /sys/kernel/debug/dcc/.../1/enable.
87		On enabling the dcc, all the addresses entered
88		by the user for the corresponding list is written
89		into dcc sram which is read by the dcc hardware
90		on manual or crash induced triggers. Lists should
91		be enabled sequentially.For example after configuring
92		addresses for list 1 and enabling it, a user can
93		proceed to enable list 2 or vice versa.
94		Example:
95		echo  0 > /sys/kernel/debug/dcc/.../[list-number]/enable
96		(disable dcc for the corresponding list number)
97		echo  1 > /sys/kernel/debug/dcc/.../[list-number]/enable
98		(enable dcc for the corresponding list number)
99