xref: /linux/Documentation/ABI/testing/debugfs-dwc-pcie (revision 27491ac2ccd7e111a9c058e7654d372cbfcdad4c)
14fbfa17fSShradha TodiWhat:		/sys/kernel/debug/dwc_pcie_<dev>/rasdes_debug/lane_detect
24fbfa17fSShradha TodiDate:		February 2025
34fbfa17fSShradha TodiContact:	Shradha Todi <shradha.t@samsung.com>
44fbfa17fSShradha TodiDescription:	(RW) Write the lane number to be checked for detection.	Read
54fbfa17fSShradha Todi		will return whether PHY indicates receiver detection on the
64fbfa17fSShradha Todi		selected lane. The default selected lane is Lane0.
74fbfa17fSShradha Todi
84fbfa17fSShradha TodiWhat:		/sys/kernel/debug/dwc_pcie_<dev>/rasdes_debug/rx_valid
94fbfa17fSShradha TodiDate:		February 2025
104fbfa17fSShradha TodiContact:	Shradha Todi <shradha.t@samsung.com>
114fbfa17fSShradha TodiDescription:	(RW) Write the lane number to be checked as valid or invalid.
124fbfa17fSShradha Todi		Read will return the status of PIPE RXVALID signal of the
134fbfa17fSShradha Todi		selected lane. The default selected lane is Lane0.
14d20ee8e2SShradha Todi
15d20ee8e2SShradha TodiWhat:		/sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
16d20ee8e2SShradha TodiDate:		February 2025
17d20ee8e2SShradha TodiContact:	Shradha Todi <shradha.t@samsung.com>
18d20ee8e2SShradha TodiDescription:	The "rasdes_err_inj" is a directory which can be used to inject
19d20ee8e2SShradha Todi		errors into the system. The possible errors that can be injected
20d20ee8e2SShradha Todi		are:
21d20ee8e2SShradha Todi
22d20ee8e2SShradha Todi		  1) tx_lcrc            - TLP LCRC error injection TX Path
23d20ee8e2SShradha Todi		  2) b16_crc_dllp       - 16b CRC error injection of ACK/NAK DLLP
24d20ee8e2SShradha Todi		  3) b16_crc_upd_fc     - 16b CRC error injection of Update-FC DLLP
25d20ee8e2SShradha Todi		  4) tx_ecrc            - TLP ECRC error injection TX Path
26d20ee8e2SShradha Todi		  5) fcrc_tlp           - TLP's FCRC error injection TX Path
27d20ee8e2SShradha Todi		  6) parity_tsos        - Parity error of TSOS
28d20ee8e2SShradha Todi		  7) parity_skpos       - Parity error on SKPOS
29d20ee8e2SShradha Todi		  8) rx_lcrc            - LCRC error injection RX Path
30d20ee8e2SShradha Todi		  9) rx_ecrc            - ECRC error injection RX Path
31d20ee8e2SShradha Todi		  10) tlp_err_seq       - TLPs SEQ# error
32d20ee8e2SShradha Todi		  11) ack_nak_dllp_seq  - DLLPS ACK/NAK SEQ# error
33d20ee8e2SShradha Todi		  12) ack_nak_dllp      - ACK/NAK DLLPs transmission block
34d20ee8e2SShradha Todi		  13) upd_fc_dllp       - UpdateFC DLLPs transmission block
35d20ee8e2SShradha Todi		  14) nak_dllp          - Always transmission for NAK DLLP
36d20ee8e2SShradha Todi		  15) inv_sync_hdr_sym  - Invert SYNC header
37d20ee8e2SShradha Todi		  16) com_pad_ts1       - COM/PAD TS1 order set
38d20ee8e2SShradha Todi		  17) com_pad_ts2       - COM/PAD TS2 order set
39d20ee8e2SShradha Todi		  18) com_fts           - COM/FTS FTS order set
40d20ee8e2SShradha Todi		  19) com_idl           - COM/IDL E-idle order set
41d20ee8e2SShradha Todi		  20) end_edb           - END/EDB symbol
42d20ee8e2SShradha Todi		  21) stp_sdp           - STP/SDP symbol
43d20ee8e2SShradha Todi		  22) com_skp           - COM/SKP SKP order set
44d20ee8e2SShradha Todi		  23) posted_tlp_hdr    - Posted TLP Header credit value control
45d20ee8e2SShradha Todi		  24) non_post_tlp_hdr  - Non-Posted TLP Header credit value control
46d20ee8e2SShradha Todi		  25) cmpl_tlp_hdr      - Completion TLP Header credit value control
47d20ee8e2SShradha Todi		  26) posted_tlp_data   - Posted TLP Data credit value control
48d20ee8e2SShradha Todi		  27) non_post_tlp_data - Non-Posted TLP Data credit value control
49d20ee8e2SShradha Todi		  28) cmpl_tlp_data     - Completion TLP Data credit value control
50d20ee8e2SShradha Todi		  29) duplicate_tlp     - Generates duplicate TLPs
51d20ee8e2SShradha Todi		  30) nullified_tlp     - Generates Nullified TLPs
52d20ee8e2SShradha Todi
53d20ee8e2SShradha Todi		(WO) Write to the attribute will prepare controller to inject
54d20ee8e2SShradha Todi		the respective error in the next transmission of data.
55d20ee8e2SShradha Todi
56d20ee8e2SShradha Todi		Parameter required to write will change in the following ways:
57d20ee8e2SShradha Todi
58d20ee8e2SShradha Todi		- Errors 9 and 10 are sequence errors. The write command:
59d20ee8e2SShradha Todi
60d20ee8e2SShradha Todi		    echo <count> <diff> > /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
61d20ee8e2SShradha Todi
62d20ee8e2SShradha Todi		    <count>
63d20ee8e2SShradha Todi			    Number of errors to be injected
64d20ee8e2SShradha Todi		    <diff>
65d20ee8e2SShradha Todi			    The difference to add or subtract from natural
66d20ee8e2SShradha Todi			    sequence number to generate sequence error.
67d20ee8e2SShradha Todi			    Allowed range from -4095 to 4095
68d20ee8e2SShradha Todi
69d20ee8e2SShradha Todi		- Errors 23 to 28 are credit value error insertions. The write
70d20ee8e2SShradha Todi		  command:
71d20ee8e2SShradha Todi
72d20ee8e2SShradha Todi		    echo <count> <diff> <vc> > /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
73d20ee8e2SShradha Todi
74d20ee8e2SShradha Todi		    <count>
75d20ee8e2SShradha Todi			    Number of errors to be injected
76d20ee8e2SShradha Todi		    <diff>
77d20ee8e2SShradha Todi			    The difference to add or subtract from UpdateFC
78d20ee8e2SShradha Todi			    credit value. Allowed range from -4095 to 4095
79d20ee8e2SShradha Todi		    <vc>
80d20ee8e2SShradha Todi			    Target VC number
81d20ee8e2SShradha Todi
82d20ee8e2SShradha Todi		- All other errors. The write command:
83d20ee8e2SShradha Todi
84d20ee8e2SShradha Todi		    echo <count> > /sys/kernel/debug/dwc_pcie_<dev>/rasdes_err_inj/<error>
85d20ee8e2SShradha Todi
86d20ee8e2SShradha Todi		    <count>
87d20ee8e2SShradha Todi			    Number of errors to be injected
88*27491ac2SShradha Todi
89*27491ac2SShradha TodiWhat:		/sys/kernel/debug/dwc_pcie_<dev>/rasdes_event_counters/<event>/counter_enable
90*27491ac2SShradha TodiDate:		February 2025
91*27491ac2SShradha TodiContact:	Shradha Todi <shradha.t@samsung.com>
92*27491ac2SShradha TodiDescription:	The "rasdes_event_counters" is the directory which can be used
93*27491ac2SShradha Todi		to collect statistical data about the number of times a certain
94*27491ac2SShradha Todi		event has occurred in the controller. The list of possible
95*27491ac2SShradha Todi		events are:
96*27491ac2SShradha Todi
97*27491ac2SShradha Todi		1) EBUF Overflow
98*27491ac2SShradha Todi		2) EBUF Underrun
99*27491ac2SShradha Todi		3) Decode Error
100*27491ac2SShradha Todi		4) Running Disparity Error
101*27491ac2SShradha Todi		5) SKP OS Parity Error
102*27491ac2SShradha Todi		6) SYNC Header Error
103*27491ac2SShradha Todi		7) Rx Valid De-assertion
104*27491ac2SShradha Todi		8) CTL SKP OS Parity Error
105*27491ac2SShradha Todi		9) 1st Retimer Parity Error
106*27491ac2SShradha Todi		10) 2nd Retimer Parity Error
107*27491ac2SShradha Todi		11) Margin CRC and Parity Error
108*27491ac2SShradha Todi		12) Detect EI Infer
109*27491ac2SShradha Todi		13) Receiver Error
110*27491ac2SShradha Todi		14) RX Recovery Req
111*27491ac2SShradha Todi		15) N_FTS Timeout
112*27491ac2SShradha Todi		16) Framing Error
113*27491ac2SShradha Todi		17) Deskew Error
114*27491ac2SShradha Todi		18) Framing Error In L0
115*27491ac2SShradha Todi		19) Deskew Uncompleted Error
116*27491ac2SShradha Todi		20) Bad TLP
117*27491ac2SShradha Todi		21) LCRC Error
118*27491ac2SShradha Todi		22) Bad DLLP
119*27491ac2SShradha Todi		23) Replay Number Rollover
120*27491ac2SShradha Todi		24) Replay Timeout
121*27491ac2SShradha Todi		25) Rx Nak DLLP
122*27491ac2SShradha Todi		26) Tx Nak DLLP
123*27491ac2SShradha Todi		27) Retry TLP
124*27491ac2SShradha Todi		28) FC Timeout
125*27491ac2SShradha Todi		29) Poisoned TLP
126*27491ac2SShradha Todi		30) ECRC Error
127*27491ac2SShradha Todi		31) Unsupported Request
128*27491ac2SShradha Todi		32) Completer Abort
129*27491ac2SShradha Todi		33) Completion Timeout
130*27491ac2SShradha Todi		34) EBUF SKP Add
131*27491ac2SShradha Todi		35) EBUF SKP Del
132*27491ac2SShradha Todi
133*27491ac2SShradha Todi		(RW) Write 1 to enable the event counter and write 0 to disable
134*27491ac2SShradha Todi		the event counter. Read will return whether the counter is
135*27491ac2SShradha Todi		currently enabled or disabled. Counter is disabled by default.
136*27491ac2SShradha Todi
137*27491ac2SShradha TodiWhat:		/sys/kernel/debug/dwc_pcie_<dev>/rasdes_event_counters/<event>/counter_value
138*27491ac2SShradha TodiDate:		February 2025
139*27491ac2SShradha TodiContact:	Shradha Todi <shradha.t@samsung.com>
140*27491ac2SShradha TodiDescription:	(RO) Read will return the current value of the event counter.
141*27491ac2SShradha Todi		To reset the counter, counter should be disabled first and then
142*27491ac2SShradha Todi		enabled back using the "counter_enable" attribute.
143*27491ac2SShradha Todi
144*27491ac2SShradha TodiWhat:		/sys/kernel/debug/dwc_pcie_<dev>/rasdes_event_counters/<event>/lane_select
145*27491ac2SShradha TodiDate:		February 2025
146*27491ac2SShradha TodiContact:	Shradha Todi <shradha.t@samsung.com>
147*27491ac2SShradha TodiDescription:	(RW) Some lanes in the event list are lane specific events.
148*27491ac2SShradha Todi		These include events from 1 to 11, as well as, 34 and 35. Write
149*27491ac2SShradha Todi		the lane number for which you wish the counter to be enabled,
150*27491ac2SShradha Todi		disabled, or value dumped. Read will return the current
151*27491ac2SShradha Todi		selected lane number. Lane0 is selected by default.
152