u-boot/drivers/firmware
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
..
arm-ffa arm_ffa: fix: remove deadcode in ffa_print_error_log() 2023-10-30 15:32:49 -04:00
scmi firmware: scmi: support protocols on sandbox only if enabled 2023-11-28 22:31:03 -05:00
firmware-sandbox.c dm: test: Add "/firmware" node scan test 2018-09-29 11:49:35 -06:00
firmware-uclass.c treewide: Simply conditions with the new OF_REAL 2021-09-25 09:46:15 -06:00
firmware-zynqmp.c mailbox: zynqmp: support mulitple mboxes via device-tree 2023-12-13 08:58:07 +01:00
Kconfig arm_ffa: introduce Arm FF-A support 2023-08-08 10:22:03 -04:00
Makefile firmware: add SCMI agent uclass 2020-09-30 11:55:23 -04:00
psci.c firmware: psci: enable DM_FLAG_PRE_RELOC 2023-04-25 15:31:28 -04:00
ti_sci.c tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
ti_sci.h tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00
ti_sci_static_data.h tree-wide: Replace http:// link with https:// link for ti.com 2023-11-10 11:01:50 -05:00