Update the TGU driver to the latest upstream version#526
Open
jiegan0107 wants to merge 15 commits intoqualcomm-linux:qcom-6.18.yfrom
Open
Update the TGU driver to the latest upstream version#526jiegan0107 wants to merge 15 commits intoqualcomm-linux:qcom-6.18.yfrom
jiegan0107 wants to merge 15 commits intoqualcomm-linux:qcom-6.18.yfrom
Conversation
This reverts commit e6d6870.
…TGU" This reverts commit aee7a58.
This reverts commit 78172ff.
This reverts commit c247e91.
This reverts commit 2e7b6a1.
This reverts commit 9584fed.
This reverts commit 2ea01e7.
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>
Update the TGU config according to the latest version of TGU driver. Signed-off-by: Jie Gan <jie.gan@oss.qualcomm.com>
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