1.. SPDX-License-Identifier: GPL-2.0 2 3=================== 4MIPI SyS-T over STP 5=================== 6 7The MIPI SyS-T protocol driver can be used with STM class devices to 8generate standardized trace stream. Aside from being a standard, it 9provides better trace source identification and timestamp correlation. 10 11In order to use the MIPI SyS-T protocol driver with your STM device, 12first, you'll need CONFIG_STM_PROTO_SYS_T. 13 14Now, you can select which protocol driver you want to use when you create 15a policy for your STM device, by specifying it in the policy name: 16 17# mkdir /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/ 18 19In other words, the policy name format is extended like this: 20 21 <device_name>:<protocol_name>.<policy_name> 22 23With Intel TH, therefore it can look like "0-sth:p_sys-t.my-policy". 24 25If the protocol name is omitted, the STM class will chose whichever 26protocol driver was loaded first. 27 28You can also double check that everything is working as expected by 29 30# cat /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/protocol 31p_sys-t 32 33Now, with the MIPI SyS-T protocol driver, each policy node in the 34configfs gets a few additional attributes, which determine per-source 35parameters specific to the protocol: 36 37# mkdir /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/default 38# ls /config/stp-policy/dummy_stm.0:p_sys-t.my-policy/default 39channels 40clocksync_interval 41do_len 42masters 43ts_interval 44uuid 45 46The most important one here is the "uuid", which determines the UUID 47that will be used to tag all data coming from this source. It is 48automatically generated when a new node is created, but it is likely 49that you would want to change it. 50 51do_len switches on/off the additional "payload length" field in the 52MIPI SyS-T message header. It is off by default as the STP already 53marks message boundaries. 54 55ts_interval and clocksync_interval determine how much time in milliseconds 56can pass before we need to include a protocol (not transport, aka STP) 57timestamp in a message header or send a CLOCKSYNC packet, respectively. 58 59See Documentation/ABI/testing/configfs-stp-policy-p_sys-t for more 60details. 61 62* [1] https://www.mipi.org/specifications/sys-t 63