1*4882a593SmuzhiyunWhat: /sys/devices/socX 2*4882a593SmuzhiyunDate: January 2012 3*4882a593Smuzhiyuncontact: Lee Jones <lee.jones@linaro.org> 4*4882a593SmuzhiyunDescription: 5*4882a593Smuzhiyun The /sys/devices/ directory contains a sub-directory for each 6*4882a593Smuzhiyun System-on-Chip (SoC) device on a running platform. Information 7*4882a593Smuzhiyun regarding each SoC can be obtained by reading sysfs files. This 8*4882a593Smuzhiyun functionality is only available if implemented by the platform. 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun The directory created for each SoC will also house information 11*4882a593Smuzhiyun about devices which are commonly contained in /sys/devices/platform. 12*4882a593Smuzhiyun It has been agreed that if an SoC device exists, its supported 13*4882a593Smuzhiyun devices would be better suited to appear as children of that SoC. 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunWhat: /sys/devices/socX/machine 16*4882a593SmuzhiyunDate: January 2012 17*4882a593Smuzhiyuncontact: Lee Jones <lee.jones@linaro.org> 18*4882a593SmuzhiyunDescription: 19*4882a593Smuzhiyun Read-only attribute common to all SoCs. Contains the SoC machine 20*4882a593Smuzhiyun name (e.g. Ux500). 21*4882a593Smuzhiyun 22*4882a593SmuzhiyunWhat: /sys/devices/socX/family 23*4882a593SmuzhiyunDate: January 2012 24*4882a593Smuzhiyuncontact: Lee Jones <lee.jones@linaro.org> 25*4882a593SmuzhiyunDescription: 26*4882a593Smuzhiyun Read-only attribute common to all SoCs. Contains SoC family name 27*4882a593Smuzhiyun (e.g. DB8500). 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun On many of ARM based silicon with SMCCC v1.2+ compliant firmware 30*4882a593Smuzhiyun this will contain the JEDEC JEP106 manufacturer’s identification 31*4882a593Smuzhiyun code. The format is "jep106:XXYY" where XX is identity code and 32*4882a593Smuzhiyun YY is continuation code. 33*4882a593Smuzhiyun 34*4882a593Smuzhiyun This manufacturer’s identification code is defined by one 35*4882a593Smuzhiyun or more eight (8) bit fields, each consisting of seven (7) 36*4882a593Smuzhiyun data bits plus one (1) odd parity bit. It is a single field, 37*4882a593Smuzhiyun limiting the possible number of vendors to 126. To expand 38*4882a593Smuzhiyun the maximum number of identification codes, a continuation 39*4882a593Smuzhiyun scheme has been defined. 40*4882a593Smuzhiyun 41*4882a593Smuzhiyun The specified mechanism is that an identity code of 0x7F 42*4882a593Smuzhiyun represents the "continuation code" and implies the presence 43*4882a593Smuzhiyun of an additional identity code field, and this mechanism 44*4882a593Smuzhiyun may be extended to multiple continuation codes followed 45*4882a593Smuzhiyun by the manufacturer's identity code. 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun For example, ARM has identity code 0x7F 0x7F 0x7F 0x7F 0x3B, 48*4882a593Smuzhiyun which is code 0x3B on the fifth 'page'. This is shortened 49*4882a593Smuzhiyun as JEP106 identity code of 0x3B and a continuation code of 50*4882a593Smuzhiyun 0x4 to represent the four continuation codes preceding the 51*4882a593Smuzhiyun identity code. 52*4882a593Smuzhiyun 53*4882a593SmuzhiyunWhat: /sys/devices/socX/serial_number 54*4882a593SmuzhiyunDate: January 2019 55*4882a593Smuzhiyuncontact: Bjorn Andersson <bjorn.andersson@linaro.org> 56*4882a593SmuzhiyunDescription: 57*4882a593Smuzhiyun Read-only attribute supported by most SoCs. Contains the SoC's 58*4882a593Smuzhiyun serial number, if available. 59*4882a593Smuzhiyun 60*4882a593SmuzhiyunWhat: /sys/devices/socX/soc_id 61*4882a593SmuzhiyunDate: January 2012 62*4882a593Smuzhiyuncontact: Lee Jones <lee.jones@linaro.org> 63*4882a593SmuzhiyunDescription: 64*4882a593Smuzhiyun Read-only attribute supported by most SoCs. In the case of 65*4882a593Smuzhiyun ST-Ericsson's chips this contains the SoC serial number. 66*4882a593Smuzhiyun 67*4882a593Smuzhiyun On many of ARM based silicon with SMCCC v1.2+ compliant firmware 68*4882a593Smuzhiyun this will contain the SOC ID appended to the family attribute 69*4882a593Smuzhiyun to ensure there is no conflict in this namespace across various 70*4882a593Smuzhiyun vendors. The format is "jep106:XXYY:ZZZZ" where XX is identity 71*4882a593Smuzhiyun code, YY is continuation code and ZZZZ is the SOC ID. 72*4882a593Smuzhiyun 73*4882a593SmuzhiyunWhat: /sys/devices/socX/revision 74*4882a593SmuzhiyunDate: January 2012 75*4882a593Smuzhiyuncontact: Lee Jones <lee.jones@linaro.org> 76*4882a593SmuzhiyunDescription: 77*4882a593Smuzhiyun Read-only attribute supported by most SoCs. Contains the SoC's 78*4882a593Smuzhiyun manufacturing revision number. 79*4882a593Smuzhiyun 80*4882a593SmuzhiyunWhat: /sys/devices/socX/process 81*4882a593SmuzhiyunDate: January 2012 82*4882a593Smuzhiyuncontact: Lee Jones <lee.jones@linaro.org> 83*4882a593SmuzhiyunDescription: 84*4882a593Smuzhiyun Read-only attribute supported ST-Ericsson's silicon. Contains the 85*4882a593Smuzhiyun the process by which the silicon chip was manufactured. 86*4882a593Smuzhiyun 87*4882a593SmuzhiyunWhat: /sys/bus/soc 88*4882a593SmuzhiyunDate: January 2012 89*4882a593Smuzhiyuncontact: Lee Jones <lee.jones@linaro.org> 90*4882a593SmuzhiyunDescription: 91*4882a593Smuzhiyun The /sys/bus/soc/ directory contains the usual sub-folders 92*4882a593Smuzhiyun expected under most buses. /sys/bus/soc/devices is of particular 93*4882a593Smuzhiyun interest, as it contains a symlink for each SoC device found on 94*4882a593Smuzhiyun the system. Each symlink points back into the aforementioned 95*4882a593Smuzhiyun /sys/devices/socX devices. 96