Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

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