xref: /OK3568_Linux_fs/kernel/Documentation/ABI/testing/sysfs-bus-rapidio (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:d:iiii
2*4882a593SmuzhiyunDescription:
3*4882a593Smuzhiyun		For each RapidIO device, the RapidIO subsystem creates files in
4*4882a593Smuzhiyun		an individual subdirectory with the following name format of
5*4882a593Smuzhiyun		device_name "nn:d:iiii", where:
6*4882a593Smuzhiyun
7*4882a593Smuzhiyun		====   ========================================================
8*4882a593Smuzhiyun		nn     two-digit hexadecimal ID of RapidIO network where the
9*4882a593Smuzhiyun		       device resides
10*4882a593Smuzhiyun		d      device type: 'e' - for endpoint or 's' - for switch
11*4882a593Smuzhiyun		iiii   four-digit device destID for endpoints, or switchID for
12*4882a593Smuzhiyun		       switches
13*4882a593Smuzhiyun		====   ========================================================
14*4882a593Smuzhiyun
15*4882a593Smuzhiyun		For example, below is a list of device directories that
16*4882a593Smuzhiyun		represents a typical RapidIO network with one switch, one host,
17*4882a593Smuzhiyun		and two agent endpoints, as it is seen by the enumerating host
18*4882a593Smuzhiyun		(with destID = 1)::
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun		  /sys/bus/rapidio/devices/00:e:0000
21*4882a593Smuzhiyun		  /sys/bus/rapidio/devices/00:e:0002
22*4882a593Smuzhiyun		  /sys/bus/rapidio/devices/00:s:0001
23*4882a593Smuzhiyun
24*4882a593Smuzhiyun		NOTE:
25*4882a593Smuzhiyun		  An enumerating or discovering endpoint does not create a
26*4882a593Smuzhiyun		  sysfs entry for itself, this is why an endpoint with destID=1
27*4882a593Smuzhiyun		  is not shown in the list.
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunAttributes Common for All RapidIO Devices
30*4882a593Smuzhiyun-----------------------------------------
31*4882a593Smuzhiyun
32*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:d:iiii/did
33*4882a593SmuzhiyunDate:		Nov, 2005
34*4882a593SmuzhiyunKernelVersion:	v2.6.15
35*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
36*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
37*4882a593SmuzhiyunDescription:
38*4882a593Smuzhiyun		(RO) returns the device identifier
39*4882a593Smuzhiyun
40*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:d:iiii/vid
41*4882a593SmuzhiyunDate:		Nov, 2005
42*4882a593SmuzhiyunKernelVersion:	v2.6.15
43*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
44*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
45*4882a593SmuzhiyunDescription:
46*4882a593Smuzhiyun		(RO) returns the device vendor identifier
47*4882a593Smuzhiyun
48*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:d:iiii/device_rev
49*4882a593SmuzhiyunDate:		Nov, 2005
50*4882a593SmuzhiyunKernelVersion:	v2.6.15
51*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
52*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
53*4882a593SmuzhiyunDescription:
54*4882a593Smuzhiyun		(RO) returns the device revision level
55*4882a593Smuzhiyun
56*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:d:iiii/asm_did
57*4882a593SmuzhiyunDate:		Nov, 2005
58*4882a593SmuzhiyunKernelVersion:	v2.6.15
59*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
60*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
61*4882a593SmuzhiyunDescription:
62*4882a593Smuzhiyun		(RO) returns identifier for the assembly containing the device
63*4882a593Smuzhiyun
64*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:d:iiii/asm_rev
65*4882a593SmuzhiyunDate:		Nov, 2005
66*4882a593SmuzhiyunKernelVersion:	v2.6.15
67*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
68*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
69*4882a593SmuzhiyunDescription:
70*4882a593Smuzhiyun		(RO) returns revision level of the assembly containing the
71*4882a593Smuzhiyun		device
72*4882a593Smuzhiyun
73*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:d:iiii/asm_vid
74*4882a593SmuzhiyunDate:		Nov, 2005
75*4882a593SmuzhiyunKernelVersion:	v2.6.15
76*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
77*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
78*4882a593SmuzhiyunDescription:
79*4882a593Smuzhiyun		(RO) returns vendor identifier of the assembly containing the
80*4882a593Smuzhiyun		device
81*4882a593Smuzhiyun
82*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:d:iiii/destid
83*4882a593SmuzhiyunDate:		Mar, 2011
84*4882a593SmuzhiyunKernelVersion:	v2.6.3
85*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
86*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
87*4882a593SmuzhiyunDescription:
88*4882a593Smuzhiyun		(RO) returns device destination ID assigned by the enumeration
89*4882a593Smuzhiyun		routine
90*4882a593Smuzhiyun
91*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:d:iiii/lprev
92*4882a593SmuzhiyunDate:		Mar, 2011
93*4882a593SmuzhiyunKernelVersion:	v2.6.39
94*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
95*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
96*4882a593SmuzhiyunDescription:
97*4882a593Smuzhiyun		(RO) returns name of previous device (switch) on the path to the
98*4882a593Smuzhiyun		device that that owns this attribute
99*4882a593Smuzhiyun
100*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:d:iiii/modalias
101*4882a593SmuzhiyunDate:		Jul, 2013
102*4882a593SmuzhiyunKernelVersion:	v3.11
103*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
104*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
105*4882a593SmuzhiyunDescription:
106*4882a593Smuzhiyun		(RO) returns the device modalias
107*4882a593Smuzhiyun
108*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:d:iiii/config
109*4882a593SmuzhiyunDate:		Nov, 2005
110*4882a593SmuzhiyunKernelVersion:	v2.6.15
111*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
112*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
113*4882a593SmuzhiyunDescription:
114*4882a593Smuzhiyun		(RW) Binary attribute to read from and write to the device
115*4882a593Smuzhiyun		configuration registers using the RapidIO maintenance
116*4882a593Smuzhiyun		transactions. This attribute is similar in behaviour to the
117*4882a593Smuzhiyun		"config" attribute of PCI devices and provides an access to the
118*4882a593Smuzhiyun		RapidIO device registers using standard file read and write
119*4882a593Smuzhiyun		operations.
120*4882a593Smuzhiyun
121*4882a593SmuzhiyunRapidIO Switch Device Attributes
122*4882a593Smuzhiyun--------------------------------
123*4882a593Smuzhiyun
124*4882a593SmuzhiyunRapidIO switches have additional attributes in sysfs. RapidIO subsystem supports
125*4882a593Smuzhiyuncommon and device-specific sysfs attributes for switches. Because switches are
126*4882a593Smuzhiyunintegrated into the RapidIO subsystem, it offers a method to create
127*4882a593Smuzhiyundevice-specific sysfs attributes by specifying a callback function that may be
128*4882a593Smuzhiyunset by the switch initialization routine during enumeration or discovery
129*4882a593Smuzhiyunprocess.
130*4882a593Smuzhiyun
131*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:s:iiii/routes
132*4882a593SmuzhiyunDate:		Nov, 2005
133*4882a593SmuzhiyunKernelVersion:	v2.6.15
134*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
135*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
136*4882a593SmuzhiyunDescription:
137*4882a593Smuzhiyun		(RO) reports switch routing information in "destID port" format.
138*4882a593Smuzhiyun		This attribute reports only valid routing table entries, one
139*4882a593Smuzhiyun		line for each entry.
140*4882a593Smuzhiyun
141*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:s:iiii/destid
142*4882a593SmuzhiyunDate:		Mar, 2011
143*4882a593SmuzhiyunKernelVersion:	v2.6.3
144*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
145*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
146*4882a593SmuzhiyunDescription:
147*4882a593Smuzhiyun		(RO) device destination ID of the associated device that defines
148*4882a593Smuzhiyun		a route to the switch
149*4882a593Smuzhiyun
150*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:s:iiii/hopcount
151*4882a593SmuzhiyunDate:		Mar, 2011
152*4882a593SmuzhiyunKernelVersion:	v2.6.39
153*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
154*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
155*4882a593SmuzhiyunDescription:
156*4882a593Smuzhiyun		(RO) number of hops on the path to the switch
157*4882a593Smuzhiyun
158*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:s:iiii/lnext
159*4882a593SmuzhiyunDate:		Mar, 2011
160*4882a593SmuzhiyunKernelVersion:	v2.6.39
161*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
162*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
163*4882a593SmuzhiyunDescription:
164*4882a593Smuzhiyun		(RO) returns names of devices linked to the switch except one of
165*4882a593Smuzhiyun		a device linked to the ingress port (reported as "lprev"). This
166*4882a593Smuzhiyun		is an array names with number of lines equal to number of ports
167*4882a593Smuzhiyun		in switch. If a switch port has no attached device, returns
168*4882a593Smuzhiyun		"null" instead of a device name.
169*4882a593Smuzhiyun
170*4882a593SmuzhiyunDevice-specific Switch Attributes
171*4882a593Smuzhiyun---------------------------------
172*4882a593Smuzhiyun
173*4882a593SmuzhiyunIDT_GEN2-
174*4882a593Smuzhiyun
175*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/devices/nn:s:iiii/errlog
176*4882a593SmuzhiyunDate:		Oct, 2010
177*4882a593SmuzhiyunKernelVersion:	v2.6.37
178*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
179*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
180*4882a593SmuzhiyunDescription:
181*4882a593Smuzhiyun		(RO) reads contents of device error log until it is empty.
182*4882a593Smuzhiyun
183*4882a593SmuzhiyunRapidIO Bus Attributes
184*4882a593Smuzhiyun----------------------
185*4882a593Smuzhiyun
186*4882a593SmuzhiyunWhat:		/sys/bus/rapidio/scan
187*4882a593SmuzhiyunDate:		May, 2013
188*4882a593SmuzhiyunKernelVersion:	v3.11
189*4882a593SmuzhiyunContact:	Matt Porter <mporter@kernel.crashing.org>,
190*4882a593Smuzhiyun		Alexandre Bounine <alexandre.bounine@idt.com>
191*4882a593SmuzhiyunDescription:
192*4882a593Smuzhiyun		(WO) Allows to trigger enumeration discovery process from user
193*4882a593Smuzhiyun		space. To initiate an enumeration or discovery process on
194*4882a593Smuzhiyun		specific mport device, a user needs to write mport_ID (not
195*4882a593Smuzhiyun		RapidIO destination ID) into this file. The mport_ID is a
196*4882a593Smuzhiyun		sequential number (0 ...  RIO_MAX_MPORTS) assigned to the mport
197*4882a593Smuzhiyun		device. For example, for a machine with a single RapidIO
198*4882a593Smuzhiyun		controller, mport_ID for that controller always will be 0. To
199*4882a593Smuzhiyun		initiate RapidIO enumeration/discovery on all available mports a
200*4882a593Smuzhiyun		user must write '-1' (or RIO_MPORT_ANY) into this attribute
201*4882a593Smuzhiyun		file.
202