u-boot/drivers/mailbox
Tanmay Shah babee72ff6 mailbox: zynqmp: support mulitple mboxes via device-tree
As of now only one mailbox agent is supported by mailbox driver.
On zynqmp platform there are about 7 mailbox agents which can communicate
over same IPI channel to U-Boot. This patch series introduces new
"zynqmp_ipi_dest" driver which adds one to multi-channel mailbox
support.

Following format in device-tree is expected as per latest bindings:
zynqmp-ipi {
	compatible = "xlnx,zynqmp-ipi-mailbox";

	mbox_1: mailbox@1 {
		/* New compatible for child node */
		compatible = "xlnx,zynqmp-ipi-dest-mailbox";
		...
	};

	...

	mbox_n: mailbox@n {
		compatible = "xlnx,zynqmp-ipi-dest-mailbox";
		...
	}
};

Then mailbox client uses child mailbox node as following:

ipi-dest-1 {
	...
	mboxes = <mbox_1 0>, <mbox_1 1>;
	mbox-names = "tx", "rx";
	...
};

New "zynqmp_ipi_dest" driver is for devices with
"xlnx,zynqmp-ipi-dest-mailbox" compatible string. This driver will take care
of mailbox send recv ops and it replaces previous "zynqmp_ipi" driver.
Now "zynqmp_ipi" driver simply binds each child device with "zynqmp_ipi_dest"
driver.

However, its important to maintain backward comaptibility with previous
bindings where child node does not have compatible string. In such case, new
driver isn't probed by U-Boot during boot and system fails to boot. To
resolve this issue firmware-zynqmp.c driver probes all the IPI parent node
driver which binds each child node device with "zynqmp_ipi_dest" driver.

This makes sure corresponding child driver will be
probed when requested using mbox_get_by_name or mbox_get_by_idx
framework calls.

This way multiple mailbox agents are supported in device-tree without breaking
previous binding support.

Signed-off-by: Tanmay Shah <tanmay.shah@amd.com>
Link: https://lore.kernel.org/r/20231204215620.63334-4-tanmay.shah@amd.com
Signed-off-by: Michal Simek <michal.simek@amd.com>
2023-12-13 08:58:07 +01:00
..
apple-mbox.c mailbox: apple: Add driver for Apple IOP mailbox 2022-02-10 16:44:23 -05:00
k3-sec-proxy.c tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
Kconfig mailbox: zynqmp: Enable ipi mailbox driver for Versal NET 2022-09-26 14:23:29 +02:00
mailbox-uclass.c treewide: invaild -> invalid 2022-01-13 07:57:49 -05:00
Makefile mailbox: apple: Add driver for Apple IOP mailbox 2022-02-10 16:44:23 -05:00
sandbox-mbox-test.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
sandbox-mbox.c dm: treewide: Rename auto_alloc_size members to be shorter 2020-12-13 08:00:25 -07:00
stm32-ipcc.c mailbox: stm32-ipcc: migrate trace to dev and log macro 2021-01-13 09:52:58 +01:00
tegra-hsp.c treewide: invaild -> invalid 2022-01-13 07:57:49 -05:00
zynqmp-ipi.c mailbox: zynqmp: support mulitple mboxes via device-tree 2023-12-13 08:58:07 +01:00