xref: /linux/Documentation/ABI/testing/debugfs-driver-dcc (revision dc2f5a499de420001813562ddbc9d51ece295978)
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
49	        i) Read Type Instruction
50
51		   echo R <1> <2> <3> >/sys/kernel/debug/dcc/../[list-number]/config
52
53		   1->Address to be considered for reading the value.
54
55		   2->The word count of the addresses, read n words
56		      starting from address <1>. Each word is of 32 bits.
57		      If not entered 1 is considered.
58
59		   3->Can be 'apb' or 'ahb' which indicates if it is apb or ahb
60		      bus respectively. If not entered ahb is considered.
61
62		ii) Write Type Instruction
63
64		    echo W <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
65
66		    1->Address to be considered for writing the value.
67
68		    2->The value that needs to be written at the location.
69
70		    3->Can be a 'apb' or 'ahb' which indicates if it is apb or ahb
71		       but respectively.
72
73	        iii) Read Modify Write type instruction
74
75		     echo RW <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
76
77		     1->The address which needs to be considered for read then write.
78
79		     2->The value that needs to be written on the address.
80
81		     3->The mask of the value to be written.
82
83		iv) Loop Type Instruction
84
85		    echo L <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
86
87		    1->The loop count, the number of times the value of the addresses will be
88		       captured.
89
90		    2->The address count, total number of addresses to be entered in this
91		       instruction.
92
93		    3->The series of addresses to be entered separated by a space like <addr1>
94		       <addr2>... and so on.
95
96What:           /sys/kernel/debug/dcc/.../[list-number]/enable
97Date:           December 2022
98Contact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
99Description:
100		This debugfs interface is used for enabling the
101		the dcc hardware. Enable file is kept under the
102		directory list number for which the user wants
103		to enable it. For example if the user wants to
104		enable list 1, then he should go for
105		echo 1 > /sys/kernel/debug/dcc/.../1/enable.
106		On enabling the dcc, all the addresses entered
107		by the user for the corresponding list is written
108		into dcc sram which is read by the dcc hardware
109		on manual or crash induced triggers. Lists should
110		be enabled sequentially.For example after configuring
111		addresses for list 1 and enabling it, a user can
112		proceed to enable list 2 or vice versa.
113		Example:
114		echo  0 > /sys/kernel/debug/dcc/.../[list-number]/enable
115		(disable dcc for the corresponding list number)
116		echo  1 > /sys/kernel/debug/dcc/.../[list-number]/enable
117		(enable dcc for the corresponding list number)
118