xref: /openbmc/linux/Documentation/ABI/testing/debugfs-driver-dcc (revision 9a87ffc99ec8eb8d35eed7c4f816d75f5cc9662e)
14cbe60cfSSouradeep ChowdhuryWhat:           /sys/kernel/debug/dcc/.../ready
24cbe60cfSSouradeep ChowdhuryDate:           December 2022
34cbe60cfSSouradeep ChowdhuryContact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
44cbe60cfSSouradeep ChowdhuryDescription:
54cbe60cfSSouradeep Chowdhury		This file is used to check the status of the dcc
6*13763fb9SBagas Sanjaya		hardware if it's ready to receive user configurations.
7*13763fb9SBagas Sanjaya		A 'Y' here indicates dcc is ready.
84cbe60cfSSouradeep Chowdhury
94cbe60cfSSouradeep ChowdhuryWhat:           /sys/kernel/debug/dcc/.../trigger
104cbe60cfSSouradeep ChowdhuryDate:           December 2022
114cbe60cfSSouradeep ChowdhuryContact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
124cbe60cfSSouradeep ChowdhuryDescription:
134cbe60cfSSouradeep Chowdhury		This is the debugfs interface for manual software
14*13763fb9SBagas Sanjaya		triggers. The trigger can be invoked by writing '1'
15*13763fb9SBagas Sanjaya		to the file.
164cbe60cfSSouradeep Chowdhury
174cbe60cfSSouradeep ChowdhuryWhat:           /sys/kernel/debug/dcc/.../config_reset
184cbe60cfSSouradeep ChowdhuryDate:           December 2022
194cbe60cfSSouradeep ChowdhuryContact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
204cbe60cfSSouradeep ChowdhuryDescription:
214cbe60cfSSouradeep Chowdhury		This file is used to reset the configuration of
22*13763fb9SBagas Sanjaya		a dcc driver to the default configuration. When '1'
23*13763fb9SBagas Sanjaya		is written to the file, all the previous addresses
24*13763fb9SBagas Sanjaya		stored in the driver gets removed and users need to
25*13763fb9SBagas Sanjaya		reconfigure addresses again.
264cbe60cfSSouradeep Chowdhury
274cbe60cfSSouradeep ChowdhuryWhat:           /sys/kernel/debug/dcc/.../[list-number]/config
284cbe60cfSSouradeep ChowdhuryDate:		 December 2022
294cbe60cfSSouradeep ChowdhuryContact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
304cbe60cfSSouradeep ChowdhuryDescription:
314cbe60cfSSouradeep Chowdhury		This stores the addresses of the registers which
32*13763fb9SBagas Sanjaya		can be read in case of a hardware crash or manual
33*13763fb9SBagas Sanjaya		software triggers. The input addresses type
34*13763fb9SBagas Sanjaya		can be one of following dcc instructions: read,
35*13763fb9SBagas Sanjaya		write, read-write, and loop type. The lists need to
36*13763fb9SBagas Sanjaya		be configured sequentially and not in a overlapping
37*13763fb9SBagas Sanjaya		manner; e.g. users can jump to list x only after
38*13763fb9SBagas Sanjaya		list y is configured and enabled. The input format for
39*13763fb9SBagas Sanjaya		each type is as follows:
40dc2f5a49SBagas Sanjaya
41*13763fb9SBagas Sanjaya	        i) Read instruction
42dc2f5a49SBagas Sanjaya
43*13763fb9SBagas Sanjaya		   ::
44dc2f5a49SBagas Sanjaya
45*13763fb9SBagas Sanjaya		     echo R <addr> <n> <bus> >/sys/kernel/debug/dcc/../[list-number]/config
46dc2f5a49SBagas Sanjaya
47*13763fb9SBagas Sanjaya		   where:
48dc2f5a49SBagas Sanjaya
49*13763fb9SBagas Sanjaya		   <addr>
50*13763fb9SBagas Sanjaya			The address to be read.
51dc2f5a49SBagas Sanjaya
52*13763fb9SBagas Sanjaya		   <n>
53*13763fb9SBagas Sanjaya			The addresses word count, starting from address <1>.
54*13763fb9SBagas Sanjaya			Each word is 32 bits (4 bytes). If omitted, defaulted
55*13763fb9SBagas Sanjaya			to 1.
56dc2f5a49SBagas Sanjaya
57*13763fb9SBagas Sanjaya		   <bus type>
58*13763fb9SBagas Sanjaya			The bus type, which can be either 'apb' or 'ahb'.
59*13763fb9SBagas Sanjaya			The default is 'ahb' if leaved out.
60dc2f5a49SBagas Sanjaya
61*13763fb9SBagas Sanjaya		ii) Write instruction
62dc2f5a49SBagas Sanjaya
63*13763fb9SBagas Sanjaya		    ::
64dc2f5a49SBagas Sanjaya
65*13763fb9SBagas Sanjaya		      echo W <addr> <n> <bus type> > /sys/kernel/debug/dcc/../[list-number]/config
66dc2f5a49SBagas Sanjaya
67*13763fb9SBagas Sanjaya		    where:
68dc2f5a49SBagas Sanjaya
69*13763fb9SBagas Sanjaya		    <addr>
70*13763fb9SBagas Sanjaya			The address to be written.
71dc2f5a49SBagas Sanjaya
72*13763fb9SBagas Sanjaya		    <n>
73*13763fb9SBagas Sanjaya			The value to be written at <addr>.
74dc2f5a49SBagas Sanjaya
75*13763fb9SBagas Sanjaya		    <bus type>
76*13763fb9SBagas Sanjaya			The bus type, which can be either 'apb' or 'ahb'.
77dc2f5a49SBagas Sanjaya
78*13763fb9SBagas Sanjaya	        iii) Read-write instruction
79dc2f5a49SBagas Sanjaya
80*13763fb9SBagas Sanjaya		     ::
81dc2f5a49SBagas Sanjaya
82*13763fb9SBagas Sanjaya		       echo RW <addr> <n> <mask> > /sys/kernel/debug/dcc/../[list-number]/config
83dc2f5a49SBagas Sanjaya
84*13763fb9SBagas Sanjaya		     where:
85dc2f5a49SBagas Sanjaya
86*13763fb9SBagas Sanjaya		     <addr>
87*13763fb9SBagas Sanjaya			The address to be read and written.
88dc2f5a49SBagas Sanjaya
89*13763fb9SBagas Sanjaya		     <n>
90*13763fb9SBagas Sanjaya		        The value to be written at <addr>.
91*13763fb9SBagas Sanjaya
92*13763fb9SBagas Sanjaya		     <mask>
93*13763fb9SBagas Sanjaya			The value mask.
94*13763fb9SBagas Sanjaya
95*13763fb9SBagas Sanjaya		iv) Loop instruction
96*13763fb9SBagas Sanjaya
97*13763fb9SBagas Sanjaya		    ::
98*13763fb9SBagas Sanjaya
99*13763fb9SBagas Sanjaya		      echo L <loop count> <address count> <address>... > /sys/kernel/debug/dcc/../[list-number]/config
100*13763fb9SBagas Sanjaya
101*13763fb9SBagas Sanjaya		    where:
102*13763fb9SBagas Sanjaya
103*13763fb9SBagas Sanjaya		    <loop count>
104*13763fb9SBagas Sanjaya			Number of iterations
105*13763fb9SBagas Sanjaya
106*13763fb9SBagas Sanjaya		    <address count>
107*13763fb9SBagas Sanjaya			total number of addresses to be written
108*13763fb9SBagas Sanjaya
109*13763fb9SBagas Sanjaya		    <address>
110*13763fb9SBagas Sanjaya			Space-separated list of addresses.
1114cbe60cfSSouradeep Chowdhury
1124cbe60cfSSouradeep ChowdhuryWhat:           /sys/kernel/debug/dcc/.../[list-number]/enable
1134cbe60cfSSouradeep ChowdhuryDate:           December 2022
1144cbe60cfSSouradeep ChowdhuryContact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
1154cbe60cfSSouradeep ChowdhuryDescription:
1164cbe60cfSSouradeep Chowdhury		This debugfs interface is used for enabling the
117*13763fb9SBagas Sanjaya		the dcc hardware. A file named "enable" is in the
118*13763fb9SBagas Sanjaya		directory list number where users can enable/disable
119*13763fb9SBagas Sanjaya		the specific list by writing boolean (1 or 0) to the
120*13763fb9SBagas Sanjaya		file.
121*13763fb9SBagas Sanjaya
122*13763fb9SBagas Sanjaya		On enabling the dcc, all the addresses specified
1234cbe60cfSSouradeep Chowdhury		by the user for the corresponding list is written
1244cbe60cfSSouradeep Chowdhury		into dcc sram which is read by the dcc hardware
125*13763fb9SBagas Sanjaya		on manual or crash induced triggers. Lists must
126*13763fb9SBagas Sanjaya		be configured and enabled sequentially, e.g. list
127*13763fb9SBagas Sanjaya		2 can only be enabled when list 1 have so.
128