Update TGU driver to the latest upstream version#563
Open
jiegan0107 wants to merge 15 commits into
Open
Conversation
shashim-quic
requested changes
May 12, 2026
shashim-quic
left a comment
There was a problem hiding this comment.
Revert "FROMLIST: coresight-tgu: add reset node to initialize"
This reverts commit e6d6870.
Please mention the reason in revert commit log, in this case for example revert is to revise to latest version of upstream patches.
This reverts commit e6d6870. This is an old version of the TGU patch. An upstream version already exists. Revise to the latest version, V14, of the upstream patch. Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
…TGU" This reverts commit aee7a58. This is an old version of the TGU patch. An upstream version already exists. Revise to the latest version, V14, of the upstream patch. Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
This reverts commit 78172ff. This is an old version of the TGU patch. An upstream version already exists. Revise to the latest version, V14, of the upstream patch. Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
This reverts commit c247e91. This is an old version of the TGU patch. An upstream version already exists. Revise to the latest version, V14, of the upstream patch. Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
This reverts commit 2e7b6a1. This is an old version of the TGU patch. An upstream version already exists. Revise to the latest version, V14, of the upstream patch. Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
This reverts commit 9584fed. This is an old version of the TGU patch. An upstream version already exists. Revise to the latest version, V14, of the upstream patch. Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
This reverts commit 2ea01e7. This is an old version of the TGU patch. An upstream version already exists. Revise to the latest version, V14, of the upstream patch. Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
The Trigger Generation Unit (TGU) is designed to detect patterns or
sequences within a specific region of the System on Chip (SoC). Once
configured and activated, it monitors sense inputs and can detect a
pre-programmed state or sequence across clock cycles, subsequently
producing a trigger.
TGU configuration space
offset table
x-------------------------x
| |
| |
| | Step configuration
| | space layout
| coresight management | x-------------x
| registers | |---> | |
| | | | reserve |
| | | | |
|-------------------------| | |-------------|
| | | | priority[3] |
| step[7] |<-- | |-------------|
|-------------------------| | | | priority[2] |
| | | | |-------------|
| ... | |Steps region | | priority[1] |
| | | | |-------------|
|-------------------------| | | | priority[0] |
| |<-- | |-------------|
| step[0] |--------------------> | |
|-------------------------| | condition |
| | | |
| control and status | x-------------x
| space | | |
x-------------------------x |Timer/Counter|
| |
x-------------x
TGU Configuration in Hardware
The TGU provides a step region for user configuration, similar
to a flow chart. Each step region consists of three register clusters:
1.Priority Region: Sets the required signals with priority.
2.Condition Region: Defines specific requirements (e.g., signal A
reaches three times) and the subsequent action once the requirement is
met.
3.Timer/Counter (Optional): Provides timing or counting functionality.
Add a new tgu.yaml file to describe the bindings required to
define the TGU in the device trees.
Link: https://lore.kernel.org/all/20260417073336.2712426-2-songwei.chai@oss.qualcomm.com/
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Songwei Chai <songwei.chai@oss.qualcomm.com>
Add driver to support device TGU (Trigger Generation Unit). TGU is a Data Engine which can be utilized to sense a plurality of signals and create a trigger into the CTI or generate interrupts to processors. Add probe/enable/disable functions for tgu. Link: https://lore.kernel.org/all/20260417073336.2712426-3-songwei.chai@oss.qualcomm.com/ Signed-off-by: Songwei Chai <songwei.chai@oss.qualcomm.com> Acked-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Like circuit of a Logic analyzer, in TGU, the requirement could be configured in each step and the trigger will be created once the requirements are met. Add priority functionality here to sort the signals into different priorities. The signal which is wanted could be configured in each step's priority node, the larger number means the higher priority and the signal with higher priority will be sensed more preferentially. Link: https://lore.kernel.org/all/20260417073336.2712426-4-songwei.chai@oss.qualcomm.com/ Reviewed-by: Jie Gan <jie.gan@oss.qualcomm.com> Signed-off-by: Songwei Chai <songwei.chai@oss.qualcomm.com>
Decoding is when all the potential pieces for creating a trigger are brought together for a given step. Example - there may be a counter keeping track of some occurrences and a priority-group that is being used to detect a pattern on the sense inputs. These 2 inputs to condition_decode must be programmed, for a given step, to establish the condition for the trigger, or movement to another steps. Link: https://lore.kernel.org/all/20260417073336.2712426-5-songwei.chai@oss.qualcomm.com/ Reviewed-by: Jie Gan <jie.gan@oss.qualcomm.com> Signed-off-by: Songwei Chai <songwei.chai@oss.qualcomm.com>
Add "select" node for each step to determine if another step is taken, trigger(s) are generated, counters/timers incremented/decremented, etc. Link: https://lore.kernel.org/all/20260417073336.2712426-6-songwei.chai@oss.qualcomm.com/ Reviewed-by: Jie Gan <jie.gan@oss.qualcomm.com> Signed-off-by: Songwei Chai <songwei.chai@oss.qualcomm.com>
Add counter and timer node for each step which could be programed if they are to be utilized in trigger event/sequence. Link: https://lore.kernel.org/all/20260417073336.2712426-7-songwei.chai@oss.qualcomm.com/ Reviewed-by: Jie Gan <jie.gan@oss.qualcomm.com> Signed-off-by: Songwei Chai <songwei.chai@oss.qualcomm.com>
Add reset node to initialize the value of priority/condition_decode/condition_select/timer/counter nodes. Link: https://lore.kernel.org/all/20260417073336.2712426-8-songwei.chai@oss.qualcomm.com/ Signed-off-by: Songwei Chai <songwei.chai@oss.qualcomm.com>
The TGU driver was moved from the Coresight subsystem to the Qualcomm hwtracing subsystem and the Kconfig symbol was renamed accordingly from CONFIG_CORESIGHT_TGU to CONFIG_QCOM_TGU. Update qcom.config to use the new symbol name so the module continues to be built. Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
Author
Updated the commit message for the revert commits. |
shashim-quic
approved these changes
May 12, 2026
Test Matrix
|
Test Matrix
|
Test Matrix
|
Test Matrix
|
Test Matrix
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the TGU driver to the latest upstream version.
CRs-Fixed: 4521366