TISCI clock and power initialization, changes and bugfixes#101280
Closed
natto1784 wants to merge 12 commits intozephyrproject-rtos:mainfrom
Closed
TISCI clock and power initialization, changes and bugfixes#101280natto1784 wants to merge 12 commits intozephyrproject-rtos:mainfrom
natto1784 wants to merge 12 commits intozephyrproject-rtos:mainfrom
Conversation
4ce7da4 to
69861b6
Compare
Fix secproxy mailbox driver to correctly handle thread verification and error states. - Update secproxy_verify_thread to return error codes instead of logging - Update secproxy_verify_thread to remove busy wait - Remove unecessary count checks and which is handled within secproxy_verify_thread Signed-off-by: Dave Joseph <d-joseph@ti.com>
Update secure proxy mailbox driver to support per-channel interrupts instead of a single shared interrupt. - Add per-channel interrupt array and ISR handlers - Update ISR to handle specific channels directly - Move device tree configuration to core-specific files - Add interrupt-names requirement to device tree binding Signed-off-by: Dave Joseph <d-joseph@ti.com>
Add function to flush/drain pending messages from RX thread when enabling a mailbox channel to ensure clean state. - Add secproxy_mailbox_flush_thread() to drain pending messages - Call flush function when enabling channel in set_enabled() - Read from last data register to consume messages until queue empty Signed-off-by: Dave Joseph <d-joseph@ti.com>
Add SPDX-License-Identifier to comply with license requirements. Signed-off-by: Dave Joseph <d-joseph@ti.com>
69861b6 to
6b31ac0
Compare
Allow only a single instance for the TISCI driver in the device tree. Signed-off-by: Amneesh Singh <amneesh@ti.com>
TISCI uses ti_secproxy as the mailbox for communicating with the DM for things as power management, clock management and more. We currently use a semaphore as a notification for the received reply/message from the DM after we send a message. However, since kernel services are not initialized during PRE_KERNEL stages, we cannot rely on this. To overcome this, add a polling API that first sends a message on a specified tx_channel and then poll for a reply on a specified rx_channel. This is similar to how SCMI waits for replies during PRE_KERNEL and is also similarly, a blocking call. This is a vendor-specific API and hence requires its own public header. Signed-off-by: Amneesh Singh <amneesh@ti.com>
TISCI uses ti_secproxy as the mailbox for communicating with the DM for things as power management, clock management and more. We currently use a semaphore as a notification for the received reply/message from the DM after we send a message. However, since kernel services are not initialized during PRE_KERNEL stages, we cannot rely on this. To solve this, use the new vendor-specific API that polls the specified RX channel for a reply, but only if TISCI uses TI secure proxy as the mailbox. Note that this blocks the thread. Signed-off-by: Amneesh Singh <amneesh@ti.com>
TISCI power domains are usually tied to one peripheral each, and hence we maintain a massive list of power domains with status set as "okay" for all of them. Although, this is not an issue PM_DEVICE_ACTION_TURN_ON is empty, it still calls a ton of "empty" (in purpose) tisci_pd_init calls. Hence, go over the entire devicetree and look for all nodes with status "okay" then only set up PDs associated with these nodes. While we are at it, also add following improvements: - Remove the redundant check for DMSC during init and instead just let compilation fail if there is no DMSC node. - Add TISCI as a Kconfig dependency for the driver. Signed-off-by: Amneesh Singh <amneesh@ti.com>
Use SYS_INIT hook to turn power domains for all nodes with status okay at runtime, at the POST_KERNEL stage with the priority set to 0. Additionally, also use a separate SYS_INIT hook for the chosen UART console to initialize for prints during PRE_KERNEL. Make sure this is executed before the UART is initialized. Signed-off-by: Amneesh Singh <amneesh@ti.com>
Use SYS_INIT hook to set clock frequencies for all nodes that use TISCI clock controller and contan clock-frequency DT property. This happens at runtime, at the POST_KERNEL stage with the priority set to 1 which ensures this happens after power domain initialization. Additionally, also use a separate SYS_INIT hook for the chosen UART console to initialize for prints during PRE_KERNEL. Make sure this is executed during the UART driver initialization so we can get console support as early as possible. Signed-off-by: Amneesh Singh <amneesh@ti.com>
Add the clock controller node for TISCI and also add power-domains and clocks properties for supported general peripherals in the files. Signed-off-by: Amneesh Singh <amneesh@ti.com>
Enable Kconfig options for TISCI, clock control, power domains and power management for the R5FSS0_0 core. While at it make the following changes: - Remove redundant power-domains property in the board DT - Remove status "okay" from peripherals to prevent their power domains from turning on at runtime. These can be set as "okay" in application overlays. Signed-off-by: Amneesh Singh <amneesh@ti.com>
6b31ac0 to
58aeef5
Compare
|
|
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Contributor
Author
|
not stale |
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.



Dependency: #100642
Supersedes: #91914
Changes
drivers: firmware:
Restricted the TISCI driver to a single instance within the device tree.
drivers: mbox:
Introduced a vendor-specific polling API for ti_secproxy to support blocking RX message retrieval during PRE_KERNEL.
drivers: firmware
Modified TISCI to use polling instead of semaphores during PRE_KERNEL stages to allow early mailbox communication.
drivers: power_domain
Optimized TISCI PD initialization to only target PDs used by "okay" nodes.
soc/ti/k3/am6x
dts
Added TISCI clock controller nodes and peripheral clock/power properties for TI AM64x variants.
am243x_evm
Enabled TISCI, clock, and power management Kconfig options for R5FSS0_0 and cleaned up peripheral status in DT.