Other Parts Discussed in Thread: TDA2
Tool/software: Linux
Hello!
Today I've got a quite simple question, because I got a knowledge gap with the flattened device tree:
I would like to write a simple Linux driver, which handles the HW-Mailbox of the TDA2+ device.
(We are not able to use the TI-SDK and its "IPC" over RPMSG. So: NO sdk is used!)
We have to adapt in-house-software to this new SoC and I stuck on the following, may be very simple problem:
How to setup device tree to fulfill the needs of the omap-mbox and mailbox framework inside the linux?
I want to write a driver which handles Mailboxes - the mbox Framework on one side, a userland-API on the other.
Driver is setup as following:
probe....{
...
tdev->tx_channel = mbox_sms_request_channel(pdev, "tx");
tdev->rx_channel = mbox_sms_request_channel(pdev, "rx");
if (!tdev->tx_channel && !tdev->rx_channel)
return -EPROBE_DEFER;
tdev->dev = &pdev->dev;
platform_set_drvdata(pdev, tdev);
...
}
static const struct of_device_id mbox_sms_match[] = {
{ .compatible = "sms-icc-mbox" },
{},
};
static struct platform_driver mbox_sms_driver = {
.driver = {
.name = "mailbox-sms-icc",
.of_match_table = mbox_sms_match,
},
.probe = mbox_sms_probe,
.remove = mbox_sms_remove,
};
And in the DTS File (I do not change anything in the "dtsi")
I would like to use the "free" mailbox No. 10 of the TDAX and try to set it up like this:
Contend of the "mygadget.dts" (relating lines):
\{
...
mailboxsms {
compatible = "sms-icc-mbox";
#mbox-cells = <1>;
mboxes = <&mailbox10 &mbox_sms>;
mbox-names = "rx", "tx";
status = "okay";
};
...
}
...
&mailbox10 {
#mbox-cells = <1>;
status = "okay";
mbox_sms: mbox_sms {
ti,mbox-tx = <10 0 0>;
ti,mbox-rx = <10 1 0>;
status = "okay";
};
};
This do not work... the driver runs into the probing function (fine!), but is not able to request the channels. I got the following error message:
mbox_request_channel: can't parse "mboxes" property
after:
could not get #mbox-cells for /ocp/mailbox@48860000/mbox_sms
Please tell me how I have to set and bind:
mboxes
#mbox-cells
mbox-names
(something forgotten?)
The Documentation in the Kernel wasn't helpful for me and I didn't found any information about how to handle the mbox framework in the net.
Thank you for your help... Marco.