Skip to content

Conversation

@vaishnavachath
Copy link
Member

@vaishnavachath vaishnavachath commented Apr 8, 2024

TI OMAP mailbox is the inter-processor mailbox IP found in TI K3 devices (AM62X, AM64X, J721E .etc). The mailbox hardware uses a queued mailbox interrupt mechanism that provides a communication channel between processors through a set of registers and their associated interrupt signals by sending and receiving messages. The interrupt/bank associated with each processor entity is found through the usr_id property from device tree.

The bindings and implementation are kept similar to the implementation in Linux, driver implementation logic is similar to other drivers in mbox subsystem.

Tested on AM62X SK for MBOX ping and MBOX Data sample between A53 and M4 running Zephyr :
https://pastebin.com/f88f7NQJ

@vaishnavachath vaishnavachath force-pushed the omap_mbox branch 3 times, most recently from 183229f to 9ce32b6 Compare April 8, 2024 22:08
@vaishnavachath vaishnavachath marked this pull request as ready for review April 9, 2024 01:28
@zephyrbot zephyrbot added platform: TI SimpleLink Texas Instruments SimpleLink MCU area: mbox area: Devicetree Binding PR modifies or adds a Device Tree binding platform: TI K3 Texas Instruments Keystone 3 Processors area: ARM64 ARM (64-bit) Architecture labels Apr 9, 2024
@vaishnavachath vaishnavachath requested a review from dnltz April 9, 2024 01:33
Copy link
Contributor

@dnltz dnltz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some feedback but looks good. I have one question. Why did you call this driver omap while we called the gpio driver davinci? What's the difference and what would be the reason to call a driver davanci or omap? As an external, non-TI engineer, I think it would make more sense to call all drivers identical to make it easier to identify them. But maybe you have a good explanation to choose omap.

@vaishnavachath
Copy link
Member Author

Some feedback but looks good. I have one question. Why did you call this driver omap while we called the gpio driver davinci? What's the difference and what would be the reason to call a driver davanci or omap? As an external, non-TI engineer, I think it would make more sense to call all drivers identical to make it easier to identify them. But maybe you have a good explanation to choose omap.

Thank you for the feedback @dnltz I will work on your review comments, the reason behind naming these drivers with these legacy names is to match the driver names and compatibles in Linux kernel, for example the mailbox driver is here : https://github.com/torvalds/linux/blob/master/drivers/mailbox/omap-mailbox.c , the idea is to make some reuse from the upstream Linux offering, so that adding future nodes in Zephyr becomes easier and the Linux device tree can be taken as reference, an exact 1:1 match is not always possible but the idea is to keep the differences in compatible/bindings .etc same to enable reuse, same was the case for gpio-davinci driver.

@vaishnavachath vaishnavachath force-pushed the omap_mbox branch 3 times, most recently from 4032c3a to 2b4dc06 Compare April 9, 2024 12:12
Copy link
Contributor

@gramsay0 gramsay0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be worth adding TI omap regex's to maintainers.yml as well.

Great work!

@vaishnavachath vaishnavachath force-pushed the omap_mbox branch 3 times, most recently from 50aba94 to 6ed9d69 Compare October 3, 2024 22:17
cfriedt
cfriedt previously approved these changes Oct 3, 2024
Copy link
Member

@cfriedt cfriedt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

dnltz
dnltz previously approved these changes Oct 4, 2024
@kartben
Copy link
Contributor

kartben commented Oct 16, 2024

Ping @carlocaione

@dkalowsk dkalowsk added this to the v4.1.0 milestone Oct 29, 2024
@kartben
Copy link
Contributor

kartben commented Nov 25, 2024

@vaishnavachath this need to be rebased, please.

TI OMAP mailbox is the inter-processor mailbox IP found in TI
K3 devices (AM62X, AM64X, J721E .etc). The mailbox hardware uses
a queued mailbox interrupt mechanism that provides a communication
channel between processors through a set of registers and their
associated interrupt signals by sending and receiving messages.
The interrupt/bank associated with each processor entity is found
through the  usr_id property from device tree.

Signed-off-by: Vaishnav Achath <[email protected]>
Add TI OMAP interprocessor mailbox nodes for AM62X M4,
the user ID assignment is as per thec corresponding mailbox
interrupt assignment for the core.

More details can be found in the device TRM Mailbox section:
https://www.ti.com/lit/ug/spruiv7a/spruiv7a.pdf

Signed-off-by: Vaishnav Achath <[email protected]>
Add TI OMAP interprocessor mailbox nodes for AM62X A53,
the user ID assignment is as per thec corresponding mailbox
interrupt assignment for the core. Also while at it update the
supported feature list in corresponding boards.

More details can be found in the device TRM Mailbox section:
https://www.ti.com/lit/ug/spruiv7a/spruiv7a.pdf

Signed-off-by: Vaishnav Achath <[email protected]>
TI Platform drivers are named according to coresponding
names in Linux kernel, thus add the legacy drivers (DaVinci,
OMAP) also under TI K3 platforms.

Signed-off-by: Vaishnav Achath <[email protected]>
@vaishnavachath
Copy link
Member Author

@kartben @cfriedt sorry for the delay, I have fixed the conflicts

@vaishnavachath
Copy link
Member Author

@kartben Can this PR be picked? did not hear any comments from @carlocaione so far.

@kartben kartben merged commit b8200f2 into zephyrproject-rtos:main Jan 23, 2025
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ARM64 ARM (64-bit) Architecture area: Devicetree Binding PR modifies or adds a Device Tree binding area: mbox area: Process platform: PHYTEC platform: TI K3 Texas Instruments Keystone 3 Processors platform: TI SimpleLink Texas Instruments SimpleLink MCU

Projects

None yet

Development

Successfully merging this pull request may close these issues.