xref: /linux/Documentation/ABI/testing/debugfs-driver-dcc (revision dc2f5a499de420001813562ddbc9d51ece295978)
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
64cbe60cfSSouradeep Chowdhury		hardware if it's ready to take the inputs. A 'Y'
74cbe60cfSSouradeep Chowdhury		here indicates dcc is in a ready condition.
84cbe60cfSSouradeep Chowdhury		Example:
94cbe60cfSSouradeep Chowdhury		cat /sys/kernel/debug/dcc/.../ready
104cbe60cfSSouradeep Chowdhury
114cbe60cfSSouradeep ChowdhuryWhat:           /sys/kernel/debug/dcc/.../trigger
124cbe60cfSSouradeep ChowdhuryDate:           December 2022
134cbe60cfSSouradeep ChowdhuryContact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
144cbe60cfSSouradeep ChowdhuryDescription:
154cbe60cfSSouradeep Chowdhury		This is the debugfs interface for manual software
164cbe60cfSSouradeep Chowdhury		triggers. The user can simply enter a 1 against
174cbe60cfSSouradeep Chowdhury		the debugfs file and enable a manual trigger.
184cbe60cfSSouradeep Chowdhury		Example:
194cbe60cfSSouradeep Chowdhury		echo  1 > /sys/kernel/debug/dcc/.../trigger
204cbe60cfSSouradeep Chowdhury
214cbe60cfSSouradeep ChowdhuryWhat:           /sys/kernel/debug/dcc/.../config_reset
224cbe60cfSSouradeep ChowdhuryDate:           December 2022
234cbe60cfSSouradeep ChowdhuryContact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
244cbe60cfSSouradeep ChowdhuryDescription:
254cbe60cfSSouradeep Chowdhury		This file is used to reset the configuration of
264cbe60cfSSouradeep Chowdhury		a dcc driver to the default configuration. This
274cbe60cfSSouradeep Chowdhury		means that all the previous addresses stored in
284cbe60cfSSouradeep Chowdhury		the driver gets removed and user needs to enter
294cbe60cfSSouradeep Chowdhury		the address values from the start.
304cbe60cfSSouradeep Chowdhury		Example:
314cbe60cfSSouradeep Chowdhury		echo  1 > /sys/kernel/debug/dcc/../config_reset
324cbe60cfSSouradeep Chowdhury
334cbe60cfSSouradeep ChowdhuryWhat:           /sys/kernel/debug/dcc/.../[list-number]/config
344cbe60cfSSouradeep ChowdhuryDate:		 December 2022
354cbe60cfSSouradeep ChowdhuryContact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
364cbe60cfSSouradeep ChowdhuryDescription:
374cbe60cfSSouradeep Chowdhury		This stores the addresses of the registers which
384cbe60cfSSouradeep Chowdhury		should be read in case of a hardware crash or
394cbe60cfSSouradeep Chowdhury		manual software triggers. The addresses entered here
404cbe60cfSSouradeep Chowdhury		are considered under all the 4 types of dcc
414cbe60cfSSouradeep Chowdhury		instructions Read type, Write type, Read Modify Write
424cbe60cfSSouradeep Chowdhury		type and Loop type. The lists need to be configured
434cbe60cfSSouradeep Chowdhury		sequentially and not in a overlapping manner. As an
444cbe60cfSSouradeep Chowdhury		example user can jump to list x only after list y is
454cbe60cfSSouradeep Chowdhury		configured and enabled. The format for entering all
464cbe60cfSSouradeep Chowdhury		types of instructions are explained in examples as
47*dc2f5a49SBagas Sanjaya		follows:
48*dc2f5a49SBagas Sanjaya
494cbe60cfSSouradeep Chowdhury	        i) Read Type Instruction
50*dc2f5a49SBagas Sanjaya
514cbe60cfSSouradeep Chowdhury		   echo R <1> <2> <3> >/sys/kernel/debug/dcc/../[list-number]/config
52*dc2f5a49SBagas Sanjaya
534cbe60cfSSouradeep Chowdhury		   1->Address to be considered for reading the value.
54*dc2f5a49SBagas Sanjaya
554cbe60cfSSouradeep Chowdhury		   2->The word count of the addresses, read n words
564cbe60cfSSouradeep Chowdhury		      starting from address <1>. Each word is of 32 bits.
574cbe60cfSSouradeep Chowdhury		      If not entered 1 is considered.
58*dc2f5a49SBagas Sanjaya
594cbe60cfSSouradeep Chowdhury		   3->Can be 'apb' or 'ahb' which indicates if it is apb or ahb
604cbe60cfSSouradeep Chowdhury		      bus respectively. If not entered ahb is considered.
61*dc2f5a49SBagas Sanjaya
624cbe60cfSSouradeep Chowdhury		ii) Write Type Instruction
63*dc2f5a49SBagas Sanjaya
644cbe60cfSSouradeep Chowdhury		    echo W <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
65*dc2f5a49SBagas Sanjaya
664cbe60cfSSouradeep Chowdhury		    1->Address to be considered for writing the value.
67*dc2f5a49SBagas Sanjaya
684cbe60cfSSouradeep Chowdhury		    2->The value that needs to be written at the location.
69*dc2f5a49SBagas Sanjaya
704cbe60cfSSouradeep Chowdhury		    3->Can be a 'apb' or 'ahb' which indicates if it is apb or ahb
714cbe60cfSSouradeep Chowdhury		       but respectively.
72*dc2f5a49SBagas Sanjaya
734cbe60cfSSouradeep Chowdhury	        iii) Read Modify Write type instruction
74*dc2f5a49SBagas Sanjaya
754cbe60cfSSouradeep Chowdhury		     echo RW <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
76*dc2f5a49SBagas Sanjaya
774cbe60cfSSouradeep Chowdhury		     1->The address which needs to be considered for read then write.
78*dc2f5a49SBagas Sanjaya
794cbe60cfSSouradeep Chowdhury		     2->The value that needs to be written on the address.
80*dc2f5a49SBagas Sanjaya
814cbe60cfSSouradeep Chowdhury		     3->The mask of the value to be written.
82*dc2f5a49SBagas Sanjaya
834cbe60cfSSouradeep Chowdhury		iv) Loop Type Instruction
84*dc2f5a49SBagas Sanjaya
854cbe60cfSSouradeep Chowdhury		    echo L <1> <2> <3> > /sys/kernel/debug/dcc/../[list-number]/config
86*dc2f5a49SBagas Sanjaya
874cbe60cfSSouradeep Chowdhury		    1->The loop count, the number of times the value of the addresses will be
884cbe60cfSSouradeep Chowdhury		       captured.
89*dc2f5a49SBagas Sanjaya
904cbe60cfSSouradeep Chowdhury		    2->The address count, total number of addresses to be entered in this
914cbe60cfSSouradeep Chowdhury		       instruction.
92*dc2f5a49SBagas Sanjaya
934cbe60cfSSouradeep Chowdhury		    3->The series of addresses to be entered separated by a space like <addr1>
944cbe60cfSSouradeep Chowdhury		       <addr2>... and so on.
954cbe60cfSSouradeep Chowdhury
964cbe60cfSSouradeep ChowdhuryWhat:           /sys/kernel/debug/dcc/.../[list-number]/enable
974cbe60cfSSouradeep ChowdhuryDate:           December 2022
984cbe60cfSSouradeep ChowdhuryContact:        Souradeep Chowdhury <quic_schowdhu@quicinc.com>
994cbe60cfSSouradeep ChowdhuryDescription:
1004cbe60cfSSouradeep Chowdhury		This debugfs interface is used for enabling the
1014cbe60cfSSouradeep Chowdhury		the dcc hardware. Enable file is kept under the
1024cbe60cfSSouradeep Chowdhury		directory list number for which the user wants
1034cbe60cfSSouradeep Chowdhury		to enable it. For example if the user wants to
1044cbe60cfSSouradeep Chowdhury		enable list 1, then he should go for
1054cbe60cfSSouradeep Chowdhury		echo 1 > /sys/kernel/debug/dcc/.../1/enable.
1064cbe60cfSSouradeep Chowdhury		On enabling the dcc, all the addresses entered
1074cbe60cfSSouradeep Chowdhury		by the user for the corresponding list is written
1084cbe60cfSSouradeep Chowdhury		into dcc sram which is read by the dcc hardware
1094cbe60cfSSouradeep Chowdhury		on manual or crash induced triggers. Lists should
1104cbe60cfSSouradeep Chowdhury		be enabled sequentially.For example after configuring
1114cbe60cfSSouradeep Chowdhury		addresses for list 1 and enabling it, a user can
1124cbe60cfSSouradeep Chowdhury		proceed to enable list 2 or vice versa.
1134cbe60cfSSouradeep Chowdhury		Example:
1144cbe60cfSSouradeep Chowdhury		echo  0 > /sys/kernel/debug/dcc/.../[list-number]/enable
1154cbe60cfSSouradeep Chowdhury		(disable dcc for the corresponding list number)
1164cbe60cfSSouradeep Chowdhury		echo  1 > /sys/kernel/debug/dcc/.../[list-number]/enable
1174cbe60cfSSouradeep Chowdhury		(enable dcc for the corresponding list number)
118