* [PATCH v2 0/3] mailbox: renesas: Support MFIS mailbox driver
@ 2025-10-28 4:32 Kuninori Morimoto
2025-10-28 4:32 ` [PATCH v2 1/3] mailbox: remove unneeded double quotation Kuninori Morimoto
` (2 more replies)
0 siblings, 3 replies; 28+ messages in thread
From: Kuninori Morimoto @ 2025-10-28 4:32 UTC (permalink / raw)
To: Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski,
Rob Herring, devicetree, linux-renesas-soc
Hi
This patch-set adds Renesas MFIS Mailbox driver.
[PATCH 1/3] is cleanup patch for Kconfig
v1 -> v2
- Add Geert's Reviewed-by [1/3]
- Add COMPILE_TEST on Kconfig [2/3]
- Remov unneeded dev_err() [2/3]
- Remov unneeded dev_info() [2/3]
- Call request_irq() at probe() [2/3]
- Add new struct mfis_priv and handle chan info [2/3]
- Add/use spinlock [2/3]
- Remove comma from sentinel [2/3]
- Update Kconfig help [2/3]
- Remove comment for resiter settings [2/3]
- Rename compatible "renesas,mfis-mbox" -> "rcar,mfis-mailbox" [3/3]
- Tidyup title [3/3]
- Remove | [3/3]
- Remove redundant description [3/3]
Link: https://lore.kernel.org/r/87frb8n7kl.wl-kuninori.morimoto.gx@renesas.com
Kuninori Morimoto (3):
mailbox: remove unneeded double quotation
mailbox: renesas: Support MFIS mailbox driver
dt-bindings: mailbox: Add Renesas MFIS Mailbox
.../bindings/mailbox/rcar,mfis-mailbox.yaml | 51 ++++++
drivers/mailbox/Kconfig | 11 +-
drivers/mailbox/Makefile | 2 +
drivers/mailbox/rcar-mfis-mailbox.c | 170 ++++++++++++++++++
4 files changed, 233 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/mailbox/rcar,mfis-mailbox.yaml
create mode 100644 drivers/mailbox/rcar-mfis-mailbox.c
--
2.43.0
^ permalink raw reply [flat|nested] 28+ messages in thread* [PATCH v2 1/3] mailbox: remove unneeded double quotation 2025-10-28 4:32 [PATCH v2 0/3] mailbox: renesas: Support MFIS mailbox driver Kuninori Morimoto @ 2025-10-28 4:32 ` Kuninori Morimoto 2025-10-28 11:06 ` Wolfram Sang 2025-10-28 4:32 ` [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver Kuninori Morimoto 2025-10-28 4:33 ` [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox Kuninori Morimoto 2 siblings, 1 reply; 28+ messages in thread From: Kuninori Morimoto @ 2025-10-28 4:32 UTC (permalink / raw) To: Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc It makes Kconfig strange. fix it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> --- drivers/mailbox/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig index 29f16f220384f..e47cb68989267 100644 --- a/drivers/mailbox/Kconfig +++ b/drivers/mailbox/Kconfig @@ -279,7 +279,7 @@ config MTK_ADSP_MBOX tristate "MediaTek ADSP Mailbox Controller" depends on ARCH_MEDIATEK || COMPILE_TEST help - Say yes here to add support for "MediaTek ADSP Mailbox Controller. + Say yes here to add support for MediaTek ADSP Mailbox Controller. This mailbox driver is used to send notification or short message between processors with ADSP. It will place the message to share buffer and will access the ipc control. -- 2.43.0 ^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] mailbox: remove unneeded double quotation 2025-10-28 4:32 ` [PATCH v2 1/3] mailbox: remove unneeded double quotation Kuninori Morimoto @ 2025-10-28 11:06 ` Wolfram Sang 2025-10-29 0:43 ` Kuninori Morimoto 0 siblings, 1 reply; 28+ messages in thread From: Wolfram Sang @ 2025-10-28 11:06 UTC (permalink / raw) To: Kuninori Morimoto Cc: Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc [-- Attachment #1: Type: text/plain, Size: 400 bytes --] On Tue, Oct 28, 2025 at 04:32:30AM +0000, Kuninori Morimoto wrote: > It makes Kconfig strange. fix it. > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> But should be a seperate patch IMHO. It can be handled independently of the MFIS driver. [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 1/3] mailbox: remove unneeded double quotation 2025-10-28 11:06 ` Wolfram Sang @ 2025-10-29 0:43 ` Kuninori Morimoto 0 siblings, 0 replies; 28+ messages in thread From: Kuninori Morimoto @ 2025-10-29 0:43 UTC (permalink / raw) To: Wolfram Sang Cc: Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Hi Wolfram > > It makes Kconfig strange. fix it. > > > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> > > Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com> > > But should be a seperate patch IMHO. It can be handled independently of > the MFIS driver. Yes. I will separate, and post this patch only. Thank you for your help !! Best regards --- Kuninori Morimoto ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver 2025-10-28 4:32 [PATCH v2 0/3] mailbox: renesas: Support MFIS mailbox driver Kuninori Morimoto 2025-10-28 4:32 ` [PATCH v2 1/3] mailbox: remove unneeded double quotation Kuninori Morimoto @ 2025-10-28 4:32 ` Kuninori Morimoto 2025-11-08 20:13 ` Jassi Brar 2026-01-05 21:49 ` Rob Herring 2025-10-28 4:33 ` [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox Kuninori Morimoto 2 siblings, 2 replies; 28+ messages in thread From: Kuninori Morimoto @ 2025-10-28 4:32 UTC (permalink / raw) To: Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Add Renesas MFIS mailbox driver for R8A78000 (X5H) Signed-off-by: Masashi Ozaki <masashi.ozaki.te@renesas.com> Signed-off-by: Vinh Nguyen <vinh.nguyen.xz@renesas.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> --- drivers/mailbox/Kconfig | 9 ++ drivers/mailbox/Makefile | 2 + drivers/mailbox/rcar-mfis-mailbox.c | 168 ++++++++++++++++++++++++++++ 3 files changed, 179 insertions(+) create mode 100644 drivers/mailbox/rcar-mfis-mailbox.c diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig index e47cb68989267..0f1688f70ea14 100644 --- a/drivers/mailbox/Kconfig +++ b/drivers/mailbox/Kconfig @@ -379,6 +379,15 @@ config BCM74110_MAILBOX processor and coprocessor that handles various power management task and more. +config RCAR_MFIS_MBOX + bool "Renesas R-Car Multifunctional Interface Mailbox Support" + depends on (ARM_SCMI_PROTOCOL && ARCH_RENESAS) || COMPILE_TEST + help + This driver provides support for mailboxes of the MFIS + (Multifunctional Interface) via the SCMI interface. + It is used to send short message between different domains + like AP, RT, and SCP. + config RISCV_SBI_MPXY_MBOX tristate "RISC-V SBI Message Proxy (MPXY) Mailbox" depends on RISCV_SBI diff --git a/drivers/mailbox/Makefile b/drivers/mailbox/Makefile index 81820a4f55285..060a9c7f6727b 100644 --- a/drivers/mailbox/Makefile +++ b/drivers/mailbox/Makefile @@ -27,6 +27,8 @@ obj-$(CONFIG_PL320_MBOX) += pl320-ipc.o obj-$(CONFIG_OMAP2PLUS_MBOX) += omap-mailbox.o +obj-$(CONFIG_RCAR_MFIS_MBOX) += rcar-mfis-mailbox.o + obj-$(CONFIG_ROCKCHIP_MBOX) += rockchip-mailbox.o obj-$(CONFIG_PCC) += pcc.o diff --git a/drivers/mailbox/rcar-mfis-mailbox.c b/drivers/mailbox/rcar-mfis-mailbox.c new file mode 100644 index 0000000000000..c2de4eb03f578 --- /dev/null +++ b/drivers/mailbox/rcar-mfis-mailbox.c @@ -0,0 +1,168 @@ +// SPDX-License-Identifier: GPL-2.0 +// +// Renesas MFIS (Multifunctional Inferface) Mailbox Driver +// +// Copyright (C) 2025, Renesas Electronics Corporation. +// + +#include <linux/device.h> +#include <linux/of_address.h> +#include <linux/of_irq.h> +#include <linux/interrupt.h> +#include <linux/mailbox_controller.h> +#include <linux/module.h> +#include <linux/platform_device.h> + +enum direction { + TX, + RX, + NUM_DIRECTION, +}; + +struct mfis_chan { + u32 __iomem *reg; + bool active; +}; + +struct mfis_priv { + struct mbox_controller mbox; + spinlock_t lock; + struct mbox_chan chan[NUM_DIRECTION]; + struct mfis_chan mchan[NUM_DIRECTION]; +}; + +#define mfis_chan_to_priv(ch) chan->con_priv +#define mfis_chan_to_mchan(priv, ch) (priv->mchan + (ch - priv->chan)) + +static int mfis_send_data(struct mbox_chan *chan, void *data) +{ + struct mfis_priv *priv = mfis_chan_to_priv(chan); + struct mfis_chan *mchan = mfis_chan_to_mchan(priv, chan); + + iowrite32(0x1, mchan->reg); + + return 0; +} + +static irqreturn_t mfis_interrupt(int irq, void *data) +{ + struct mfis_priv *priv = data; + + guard(spinlock)(&priv->lock); + + for (int i = 0; i < NUM_DIRECTION; i++) { + struct mbox_chan *chan = priv->chan + i; + struct mfis_chan *mchan = priv->mchan + i; + + if (mchan->active) + mbox_chan_received_data(chan, 0); + + iowrite32(0x0, mchan->reg); + } + + return IRQ_HANDLED; +} + +static int mfis_chan_set_active(struct mbox_chan *chan, bool active) +{ + struct mfis_priv *priv = mfis_chan_to_priv(chan); + struct mfis_chan *mchan = mfis_chan_to_mchan(priv, chan); + + guard(spinlock_irqsave)(&priv->lock); + + mchan->active = active; + + return 0; +} + +static int mfis_startup(struct mbox_chan *chan) +{ + return mfis_chan_set_active(chan, true); +} + +static void mfis_shutdown(struct mbox_chan *chan) +{ + mfis_chan_set_active(chan, false); +} + +static bool mfis_last_tx_done(struct mbox_chan *chan) +{ + return true; +} + +static const struct mbox_chan_ops mfis_chan_ops = { + .send_data = mfis_send_data, + .startup = mfis_startup, + .shutdown = mfis_shutdown, + .last_tx_done = mfis_last_tx_done +}; + +static int mfis_mbox_probe(struct platform_device *pdev) +{ + struct mfis_priv *priv; + struct device *dev = &pdev->dev; + struct mbox_controller *mbox; + void __iomem *reg; + int ret, irq; + + irq = of_irq_get(dev->of_node, 0); + if (irq < 0) + return irq; + + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return -ENOMEM; + + ret = devm_request_irq(dev, irq, mfis_interrupt, 0, dev_name(dev), priv); + if (ret < 0) + return ret; + + reg = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(reg)) + return PTR_ERR(reg); + + spin_lock_init(&priv->lock); + + priv->mchan[TX].reg = reg + 0x4; + priv->mchan[RX].reg = reg; + + mbox = &priv->mbox; + + mbox->chans = priv->chan; + mbox->chans[TX].mbox = + mbox->chans[RX].mbox = mbox; + mbox->chans[TX].con_priv = + mbox->chans[RX].con_priv = priv; + mbox->txdone_poll = true; + mbox->txdone_irq = false; + mbox->txpoll_period = 1; + mbox->num_chans = NUM_DIRECTION; + mbox->ops = &mfis_chan_ops; + mbox->dev = dev; + + ret = mbox_controller_register(mbox); + if (ret) + return ret; + + platform_set_drvdata(pdev, mbox); + + return 0; +} + +static const struct of_device_id mfis_mbox_of_match[] = { + { .compatible = "rcar,mfis-mailbox-gen5" }, + {} +}; +MODULE_DEVICE_TABLE(of, mfis_mbox_of_match); + +static struct platform_driver mfis_mbox_driver = { + .driver = { + .name = "rcar-mfis-mailbox", + .of_match_table = mfis_mbox_of_match, + }, + .probe = mfis_mbox_probe, +}; +module_platform_driver(mfis_mbox_driver); + +MODULE_LICENSE("GPL v2"); +MODULE_DESCRIPTION("R-Car MFIS mailbox driver"); -- 2.43.0 ^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver 2025-10-28 4:32 ` [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver Kuninori Morimoto @ 2025-11-08 20:13 ` Jassi Brar 2025-11-10 0:42 ` Kuninori Morimoto 2025-11-12 1:11 ` Kuninori Morimoto 2026-01-05 21:49 ` Rob Herring 1 sibling, 2 replies; 28+ messages in thread From: Jassi Brar @ 2025-11-08 20:13 UTC (permalink / raw) To: Kuninori Morimoto Cc: Conor Dooley, Geert Uytterhoeven, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc On Mon, Oct 27, 2025 at 11:32 PM Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote: > diff --git a/drivers/mailbox/rcar-mfis-mailbox.c b/drivers/mailbox/rcar-mfis-mailbox.c > new file mode 100644 > index 0000000000000..c2de4eb03f578 > --- /dev/null > +++ b/drivers/mailbox/rcar-mfis-mailbox.c > @@ -0,0 +1,168 @@ > +// SPDX-License-Identifier: GPL-2.0 > +// > +// Renesas MFIS (Multifunctional Inferface) Mailbox Driver > +// > +// Copyright (C) 2025, Renesas Electronics Corporation. > +// > + > +#include <linux/device.h> > +#include <linux/of_address.h> > +#include <linux/of_irq.h> > +#include <linux/interrupt.h> > +#include <linux/mailbox_controller.h> > +#include <linux/module.h> > +#include <linux/platform_device.h> > + > +enum direction { > + TX, > + RX, > + NUM_DIRECTION, > +}; > + > +struct mfis_chan { > + u32 __iomem *reg; > + bool active; > +}; > + > +struct mfis_priv { > + struct mbox_controller mbox; > + spinlock_t lock; > + struct mbox_chan chan[NUM_DIRECTION]; > + struct mfis_chan mchan[NUM_DIRECTION]; > +}; > + > +#define mfis_chan_to_priv(ch) chan->con_priv > this should be called 'mbox_chan_to_priv' instead, but why at all? Maybe preset chan[i].con_priv = &mchan[i] > +#define mfis_chan_to_mchan(priv, ch) (priv->mchan + (ch - priv->chan)) > + > +static int mfis_send_data(struct mbox_chan *chan, void *data) > +{ > + struct mfis_priv *priv = mfis_chan_to_priv(chan); > + struct mfis_chan *mchan = mfis_chan_to_mchan(priv, chan); > + > + iowrite32(0x1, mchan->reg); > + > + return 0; > +} > + > +static irqreturn_t mfis_interrupt(int irq, void *data) > +{ > + struct mfis_priv *priv = data; > + > + guard(spinlock)(&priv->lock); > + > + for (int i = 0; i < NUM_DIRECTION; i++) { > + struct mbox_chan *chan = priv->chan + i; > + struct mfis_chan *mchan = priv->mchan + i; > + > + if (mchan->active) > + mbox_chan_received_data(chan, 0); > + > + iowrite32(0x0, mchan->reg); > + } > + > + return IRQ_HANDLED; > +} > + > +static int mfis_chan_set_active(struct mbox_chan *chan, bool active) > +{ > + struct mfis_priv *priv = mfis_chan_to_priv(chan); > + struct mfis_chan *mchan = mfis_chan_to_mchan(priv, chan); > + > + guard(spinlock_irqsave)(&priv->lock); > + > + mchan->active = active; > + > + return 0; > +} > + > +static int mfis_startup(struct mbox_chan *chan) > +{ > + return mfis_chan_set_active(chan, true); > +} > + > +static void mfis_shutdown(struct mbox_chan *chan) > +{ > + mfis_chan_set_active(chan, false); > +} > + > +static bool mfis_last_tx_done(struct mbox_chan *chan) > +{ > + return true; > +} > + > +static const struct mbox_chan_ops mfis_chan_ops = { > + .send_data = mfis_send_data, > + .startup = mfis_startup, > + .shutdown = mfis_shutdown, > + .last_tx_done = mfis_last_tx_done > +}; > + > +static int mfis_mbox_probe(struct platform_device *pdev) > +{ > + struct mfis_priv *priv; > + struct device *dev = &pdev->dev; > + struct mbox_controller *mbox; > + void __iomem *reg; > + int ret, irq; > + > + irq = of_irq_get(dev->of_node, 0); > + if (irq < 0) > + return irq; > + > + priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL); > + if (!priv) > + return -ENOMEM; > + > + ret = devm_request_irq(dev, irq, mfis_interrupt, 0, dev_name(dev), priv); > + if (ret < 0) > + return ret; > + > + reg = devm_platform_ioremap_resource(pdev, 0); > + if (IS_ERR(reg)) > + return PTR_ERR(reg); > + > + spin_lock_init(&priv->lock); > + > + priv->mchan[TX].reg = reg + 0x4; > + priv->mchan[RX].reg = reg; > + > + mbox = &priv->mbox; > + > + mbox->chans = priv->chan; > + mbox->chans[TX].mbox = > + mbox->chans[RX].mbox = mbox; > + mbox->chans[TX].con_priv = > + mbox->chans[RX].con_priv = priv; > + mbox->txdone_poll = true; > + mbox->txdone_irq = false; > + mbox->txpoll_period = 1; > + mbox->num_chans = NUM_DIRECTION; > + mbox->ops = &mfis_chan_ops; > + mbox->dev = dev; > + Please fix whitespaces, here and elsewhere. thanks ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver 2025-11-08 20:13 ` Jassi Brar @ 2025-11-10 0:42 ` Kuninori Morimoto 2025-11-12 1:11 ` Kuninori Morimoto 1 sibling, 0 replies; 28+ messages in thread From: Kuninori Morimoto @ 2025-11-10 0:42 UTC (permalink / raw) To: Jassi Brar Cc: Conor Dooley, Geert Uytterhoeven, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Hi Jassi Thank you for your review > > +#define mfis_chan_to_priv(ch) chan->con_priv > > > this should be called 'mbox_chan_to_priv' instead, but why at all? Basically, I uses driver name for prefix if it was "local" define/function. I think "mbox" prefix soulds for global define/function Thank you for your help !! Best regards --- Kuninori Morimoto ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver 2025-11-08 20:13 ` Jassi Brar 2025-11-10 0:42 ` Kuninori Morimoto @ 2025-11-12 1:11 ` Kuninori Morimoto 2025-12-04 2:19 ` Jassi Brar 1 sibling, 1 reply; 28+ messages in thread From: Kuninori Morimoto @ 2025-11-12 1:11 UTC (permalink / raw) To: Jassi Brar Cc: Conor Dooley, Geert Uytterhoeven, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Hi Jassi Thank you for your review. > > + mbox->chans = priv->chan; > > + mbox->chans[TX].mbox = > > + mbox->chans[RX].mbox = mbox; > > + mbox->chans[TX].con_priv = > > + mbox->chans[RX].con_priv = priv; > > + mbox->txdone_poll = true; > > + mbox->txdone_irq = false; > > + mbox->txpoll_period = 1; > > + mbox->num_chans = NUM_DIRECTION; > > + mbox->ops = &mfis_chan_ops; > > + mbox->dev = dev; > > + > Please fix whitespaces, here and elsewhere. This is for cosmetic, but not for technical. I know many opinions exist to this kind of topics, but I like aligned code because it is easy to read, and is also easy to notice some issue if exist in such code. Thank you for your help !! Best regards --- Kuninori Morimoto ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver 2025-11-12 1:11 ` Kuninori Morimoto @ 2025-12-04 2:19 ` Jassi Brar 2025-12-04 2:33 ` Kuninori Morimoto 0 siblings, 1 reply; 28+ messages in thread From: Jassi Brar @ 2025-12-04 2:19 UTC (permalink / raw) To: Kuninori Morimoto Cc: Conor Dooley, Geert Uytterhoeven, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc On Tue, Nov 11, 2025 at 7:11 PM Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote: > > > Hi Jassi > > Thank you for your review. > > > > + mbox->chans = priv->chan; > > > + mbox->chans[TX].mbox = > > > + mbox->chans[RX].mbox = mbox; > > > + mbox->chans[TX].con_priv = > > > + mbox->chans[RX].con_priv = priv; > > > + mbox->txdone_poll = true; > > > + mbox->txdone_irq = false; > > > + mbox->txpoll_period = 1; > > > + mbox->num_chans = NUM_DIRECTION; > > > + mbox->ops = &mfis_chan_ops; > > > + mbox->dev = dev; > > > + > > Please fix whitespaces, here and elsewhere. > > This is for cosmetic, but not for technical. > I know many opinions exist to this kind of topics, but I like aligned code > because it is easy to read, and is also easy to notice some issue if exist > in such code. > Cosmetics are usually for enhancing the beauty :) If you want that please use spaces instead of tabs before '=' thanks ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver 2025-12-04 2:19 ` Jassi Brar @ 2025-12-04 2:33 ` Kuninori Morimoto 0 siblings, 0 replies; 28+ messages in thread From: Kuninori Morimoto @ 2025-12-04 2:33 UTC (permalink / raw) To: Jassi Brar Cc: Conor Dooley, Geert Uytterhoeven, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Hi Jassi Thank you for your feedback > > > > + mbox->chans = priv->chan; > > > > + mbox->chans[TX].mbox = > > > > + mbox->chans[RX].mbox = mbox; > > > > + mbox->chans[TX].con_priv = > > > > + mbox->chans[RX].con_priv = priv; > > > > + mbox->txdone_poll = true; > > > > + mbox->txdone_irq = false; > > > > + mbox->txpoll_period = 1; > > > > + mbox->num_chans = NUM_DIRECTION; > > > > + mbox->ops = &mfis_chan_ops; > > > > + mbox->dev = dev; (snip) > Cosmetics are usually for enhancing the beauty :) If you want that > please use spaces instead of tabs before '=' OK, Thanks Thank you for your help !! Best regards --- Kuninori Morimoto ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver 2025-10-28 4:32 ` [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver Kuninori Morimoto 2025-11-08 20:13 ` Jassi Brar @ 2026-01-05 21:49 ` Rob Herring 2026-01-05 23:52 ` Kuninori Morimoto 2026-01-06 0:22 ` Jassi Brar 1 sibling, 2 replies; 28+ messages in thread From: Rob Herring @ 2026-01-05 21:49 UTC (permalink / raw) To: Kuninori Morimoto, Jassi Brar Cc: Conor Dooley, Geert Uytterhoeven, Krzysztof Kozlowski, devicetree, linux-renesas-soc On Mon, Oct 27, 2025 at 11:33 PM Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote: > > Add Renesas MFIS mailbox driver for R8A78000 (X5H) > > Signed-off-by: Masashi Ozaki <masashi.ozaki.te@renesas.com> > Signed-off-by: Vinh Nguyen <vinh.nguyen.xz@renesas.com> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > --- > drivers/mailbox/Kconfig | 9 ++ > drivers/mailbox/Makefile | 2 + > drivers/mailbox/rcar-mfis-mailbox.c | 168 ++++++++++++++++++++++++++++ > 3 files changed, 179 insertions(+) > create mode 100644 drivers/mailbox/rcar-mfis-mailbox.c Seems this was applied even though there were review comments on the driver and binding (affecting the driver)? And the binding was not applied, so now there's a new undocumented compatible. Rob ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver 2026-01-05 21:49 ` Rob Herring @ 2026-01-05 23:52 ` Kuninori Morimoto 2026-01-18 20:22 ` Jassi Brar 2026-01-06 0:22 ` Jassi Brar 1 sibling, 1 reply; 28+ messages in thread From: Kuninori Morimoto @ 2026-01-05 23:52 UTC (permalink / raw) To: Wolfram Sang, Rob Herring Cc: Linux-Renesas, Linux-DT, Krzysztof Kozlowski, Jassi Brar, Geert Uytterhoeven, Conor Dooley Hi Rob, Jassi, Wolfram > > Add Renesas MFIS mailbox driver for R8A78000 (X5H) > > > > Signed-off-by: Masashi Ozaki <masashi.ozaki.te@renesas.com> > > Signed-off-by: Vinh Nguyen <vinh.nguyen.xz@renesas.com> > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > > --- > > drivers/mailbox/Kconfig | 9 ++ > > drivers/mailbox/Makefile | 2 + > > drivers/mailbox/rcar-mfis-mailbox.c | 168 ++++++++++++++++++++++++++++ > > 3 files changed, 179 insertions(+) > > create mode 100644 drivers/mailbox/rcar-mfis-mailbox.c > > Seems this was applied even though there were review comments on the > driver and binding (affecting the driver)? And the binding was not > applied, so now there's a new undocumented compatible. Thank you for pointing this. I have also thought that v2 patch-set was ignored/rejected because it got many reviews... After posting v2, I have talked with Renesas member and now we are thinking that this driver style should be changed/updated to based on MFD driver. Wolfram is developping it now. So I will post new version/style of it. Thank you for your help !! Best regards --- Kuninori Morimoto ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver 2026-01-05 23:52 ` Kuninori Morimoto @ 2026-01-18 20:22 ` Jassi Brar 0 siblings, 0 replies; 28+ messages in thread From: Jassi Brar @ 2026-01-18 20:22 UTC (permalink / raw) To: Kuninori Morimoto Cc: Wolfram Sang, Rob Herring, Linux-Renesas, Linux-DT, Krzysztof Kozlowski, Geert Uytterhoeven, Conor Dooley On Mon, Jan 5, 2026 at 5:52 PM Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote: > > > Hi Rob, Jassi, Wolfram > > > > Add Renesas MFIS mailbox driver for R8A78000 (X5H) > > > > > > Signed-off-by: Masashi Ozaki <masashi.ozaki.te@renesas.com> > > > Signed-off-by: Vinh Nguyen <vinh.nguyen.xz@renesas.com> > > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > > > --- > > > drivers/mailbox/Kconfig | 9 ++ > > > drivers/mailbox/Makefile | 2 + > > > drivers/mailbox/rcar-mfis-mailbox.c | 168 ++++++++++++++++++++++++++++ > > > 3 files changed, 179 insertions(+) > > > create mode 100644 drivers/mailbox/rcar-mfis-mailbox.c > > > > Seems this was applied even though there were review comments on the > > driver and binding (affecting the driver)? And the binding was not > > applied, so now there's a new undocumented compatible. > > Thank you for pointing this. > I have also thought that v2 patch-set was ignored/rejected because it got > many reviews... > > After posting v2, I have talked with Renesas member and now we are thinking > that this driver style should be changed/updated to based on MFD driver. > Wolfram is developping it now. > So I will post new version/style of it. > Ok, dropped from the mailbox tree. thanks ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver 2026-01-05 21:49 ` Rob Herring 2026-01-05 23:52 ` Kuninori Morimoto @ 2026-01-06 0:22 ` Jassi Brar 1 sibling, 0 replies; 28+ messages in thread From: Jassi Brar @ 2026-01-06 0:22 UTC (permalink / raw) To: Rob Herring Cc: Kuninori Morimoto, Conor Dooley, Geert Uytterhoeven, Krzysztof Kozlowski, devicetree, linux-renesas-soc On Mon, Jan 5, 2026 at 3:49 PM Rob Herring <robh@kernel.org> wrote: > > On Mon, Oct 27, 2025 at 11:33 PM Kuninori Morimoto > <kuninori.morimoto.gx@renesas.com> wrote: > > > > Add Renesas MFIS mailbox driver for R8A78000 (X5H) > > > > Signed-off-by: Masashi Ozaki <masashi.ozaki.te@renesas.com> > > Signed-off-by: Vinh Nguyen <vinh.nguyen.xz@renesas.com> > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > > --- > > drivers/mailbox/Kconfig | 9 ++ > > drivers/mailbox/Makefile | 2 + > > drivers/mailbox/rcar-mfis-mailbox.c | 168 ++++++++++++++++++++++++++++ > > 3 files changed, 179 insertions(+) > > create mode 100644 drivers/mailbox/rcar-mfis-mailbox.c > > Seems this was applied even though there were review comments on the > driver and binding (affecting the driver)? And the binding was not > applied, so now there's a new undocumented compatible. > I wasn't aware of pening review on bindings. The comments on driver were purely for whitespace, so I picked. Actually the whole mailbox pr for 6.19 was not pulled, so this is not merged but only in the mailbox for-next. I think I should recreate that branch (with this dropped). thanks ^ permalink raw reply [flat|nested] 28+ messages in thread
* [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-28 4:32 [PATCH v2 0/3] mailbox: renesas: Support MFIS mailbox driver Kuninori Morimoto 2025-10-28 4:32 ` [PATCH v2 1/3] mailbox: remove unneeded double quotation Kuninori Morimoto 2025-10-28 4:32 ` [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver Kuninori Morimoto @ 2025-10-28 4:33 ` Kuninori Morimoto 2025-10-28 8:36 ` Krzysztof Kozlowski 2025-10-28 9:12 ` Geert Uytterhoeven 2 siblings, 2 replies; 28+ messages in thread From: Kuninori Morimoto @ 2025-10-28 4:33 UTC (permalink / raw) To: Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Add device tree bindings for the Renesas Multifunctional Inferface (MFIS) a mailbox controller. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> --- .../bindings/mailbox/rcar,mfis-mailbox.yaml | 51 +++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/rcar,mfis-mailbox.yaml diff --git a/Documentation/devicetree/bindings/mailbox/rcar,mfis-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/rcar,mfis-mailbox.yaml new file mode 100644 index 0000000000000..8f5f3a5ea717d --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/rcar,mfis-mailbox.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mailbox/rcar,mfis-mailbox.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Renesas MFIS (Multifunctional Inferface) Mailbox controller + +maintainers: + - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> + +description: + The R-Car multifunctional interface (MFIS) provides an interface between + the different CPU Cores, such as AP System Core domain and the Realtime + Core domain, SCP Core domain and AP System Core domain or Realtime Core + domain and AP System Core domain or Realtime Core domain. + The MFIS supports the issuing of interrupts for each CPU core domain. + +properties: + compatible: + items: + - enum: + - rcar,mfis-mailbox-r8a78000 # R-Car X5H + - const: rcar,mfis-mailbox-gen5 # R-Car Gen5 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + "#mbox-cells": + const: 1 + +required: + - compatible + - reg + - interrupts + - "#mbox-cells" + +additionalProperties: false + +examples: + - | + #include <dt-bindings/interrupt-controller/arm-gic.h> + mailbox@18842000 { + compatible = "rcar,mfis-mailbox-r8a78000", "rcar,mfis-mailbox-gen5"; + reg = <0x18842000 0x8>; + interrupts = <GIC_SPI 4362 IRQ_TYPE_LEVEL_HIGH>; + #mbox-cells = <1>; + }; -- 2.43.0 ^ permalink raw reply related [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-28 4:33 ` [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox Kuninori Morimoto @ 2025-10-28 8:36 ` Krzysztof Kozlowski 2025-10-29 0:49 ` Kuninori Morimoto 2025-10-28 9:12 ` Geert Uytterhoeven 1 sibling, 1 reply; 28+ messages in thread From: Krzysztof Kozlowski @ 2025-10-28 8:36 UTC (permalink / raw) To: Kuninori Morimoto Cc: Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc On Tue, Oct 28, 2025 at 04:33:21AM +0000, Kuninori Morimoto wrote: > Add device tree bindings for the Renesas Multifunctional Inferface Typo > (MFIS) a mailbox controller. You still have mis-ordered patches. Please organize the patch documenting compatible (DT bindings) before their user. See also: https://elixir.bootlin.com/linux/v6.14-rc6/source/Documentation/devicetree/bindings/submitting-patches.rst#L46 > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > --- > .../bindings/mailbox/rcar,mfis-mailbox.yaml | 51 +++++++++++++++++++ > 1 file changed, 51 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mailbox/rcar,mfis-mailbox.yaml > > diff --git a/Documentation/devicetree/bindings/mailbox/rcar,mfis-mailbox.yaml b/Documentation/devicetree/bindings/mailbox/rcar,mfis-mailbox.yaml > new file mode 100644 > index 0000000000000..8f5f3a5ea717d > --- /dev/null > +++ b/Documentation/devicetree/bindings/mailbox/rcar,mfis-mailbox.yaml Filename matching fallback compatible. See writing bindings. I already asked for this and you never replied. I will not review the rest, please implement all the comments. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-28 8:36 ` Krzysztof Kozlowski @ 2025-10-29 0:49 ` Kuninori Morimoto 2025-10-29 9:36 ` Geert Uytterhoeven 0 siblings, 1 reply; 28+ messages in thread From: Kuninori Morimoto @ 2025-10-29 0:49 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Hi Krzysztof Thank you for your review > > Add device tree bindings for the Renesas Multifunctional Inferface > > Typo Oops, will fix > You still have mis-ordered patches. Please organize the patch > documenting compatible (DT bindings) before their user. See also: Indeed. I will sort it in next > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/mailbox/rcar,mfis-mailbox.yaml > > Filename matching fallback compatible. See writing bindings. I think I rename the filename again, and it will be filename: renesas,mfis-mailbox compatible = "renesas,r8a78000-mfis-mailbox", "renesas,rcar-gen5-mfis-mailbox", "renesas,mfis-mailbox"; Thank you for your help !! Best regards --- Kuninori Morimoto ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-29 0:49 ` Kuninori Morimoto @ 2025-10-29 9:36 ` Geert Uytterhoeven 2025-10-29 23:17 ` Kuninori Morimoto 0 siblings, 1 reply; 28+ messages in thread From: Geert Uytterhoeven @ 2025-10-29 9:36 UTC (permalink / raw) To: Kuninori Morimoto Cc: Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Hi Morimoto-san, On Wed, 29 Oct 2025 at 01:49, Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote: > > > --- /dev/null > > > +++ b/Documentation/devicetree/bindings/mailbox/rcar,mfis-mailbox.yaml > > > > Filename matching fallback compatible. See writing bindings. > > I think I rename the filename again, and it will be > > filename: renesas,mfis-mailbox > > compatible = "renesas,r8a78000-mfis-mailbox", > "renesas,rcar-gen5-mfis-mailbox", > "renesas,mfis-mailbox"; Please no more generic compatible values like "renesas,mfis-mailbox". Especially in this case, as we know the MFIS mailbox on e.g. R-Car Gen3 is not compatible with the one on R-Car Gen5. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-29 9:36 ` Geert Uytterhoeven @ 2025-10-29 23:17 ` Kuninori Morimoto 2025-10-30 5:38 ` Krzysztof Kozlowski 0 siblings, 1 reply; 28+ messages in thread From: Kuninori Morimoto @ 2025-10-29 23:17 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Hi Geert > > compatible = "renesas,r8a78000-mfis-mailbox", > > "renesas,rcar-gen5-mfis-mailbox", > > "renesas,mfis-mailbox"; > > Please no more generic compatible values like "renesas,mfis-mailbox". > Especially in this case, as we know the MFIS mailbox on e.g. R-Car > Gen3 is not compatible with the one on R-Car Gen5. So, it will be like... compatible = "rcar,r8a78000-mfis-mailbox", "rcar,gen5-mfis-mailbox", "rcar,mfis-mailbox"; Thank you for your help !! Best regards --- Kuninori Morimoto ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-29 23:17 ` Kuninori Morimoto @ 2025-10-30 5:38 ` Krzysztof Kozlowski 2025-10-30 5:44 ` Kuninori Morimoto 0 siblings, 1 reply; 28+ messages in thread From: Krzysztof Kozlowski @ 2025-10-30 5:38 UTC (permalink / raw) To: Kuninori Morimoto, Geert Uytterhoeven Cc: Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc On 30/10/2025 00:17, Kuninori Morimoto wrote: > > Hi Geert > >>> compatible = "renesas,r8a78000-mfis-mailbox", >>> "renesas,rcar-gen5-mfis-mailbox", >>> "renesas,mfis-mailbox"; >> >> Please no more generic compatible values like "renesas,mfis-mailbox". >> Especially in this case, as we know the MFIS mailbox on e.g. R-Car >> Gen3 is not compatible with the one on R-Car Gen5. > > So, it will be like... > > compatible = "rcar,r8a78000-mfis-mailbox", > "rcar,gen5-mfis-mailbox", > "rcar,mfis-mailbox"; > > Thank you for your help !! You changed nothing. Please read again Geert answer. Best regards, Krzysztof ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-30 5:38 ` Krzysztof Kozlowski @ 2025-10-30 5:44 ` Kuninori Morimoto 2025-10-30 5:57 ` Kuninori Morimoto 0 siblings, 1 reply; 28+ messages in thread From: Kuninori Morimoto @ 2025-10-30 5:44 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Geert Uytterhoeven, Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Hi Krzysztof > >> Please no more generic compatible values like "renesas,mfis-mailbox". > >> Especially in this case, as we know the MFIS mailbox on e.g. R-Car > >> Gen3 is not compatible with the one on R-Car Gen5. (snip) > > compatible = "rcar,r8a78000-mfis-mailbox", > > "rcar,gen5-mfis-mailbox", > > "rcar,mfis-mailbox"; (snip) > You changed nothing. Please read again Geert answer. I guess you mentioned about generic compatible "rcar,mfis-mailbox". I didn't mention in this mail thread (?), but 1) we can keep compatible with Gen3/Gen4 and Gen5, 2) we don't support Gen3/Gen4. Thank you for your help !! Best regards --- Kuninori Morimoto ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-30 5:44 ` Kuninori Morimoto @ 2025-10-30 5:57 ` Kuninori Morimoto 2025-10-31 4:22 ` Kuninori Morimoto 0 siblings, 1 reply; 28+ messages in thread From: Kuninori Morimoto @ 2025-10-30 5:57 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Geert Uytterhoeven, Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Hi Krzysztof > > >> Please no more generic compatible values like "renesas,mfis-mailbox". > > >> Especially in this case, as we know the MFIS mailbox on e.g. R-Car > > >> Gen3 is not compatible with the one on R-Car Gen5. > (snip) > > > compatible = "rcar,r8a78000-mfis-mailbox", > > > "rcar,gen5-mfis-mailbox", > > > "rcar,mfis-mailbox"; > (snip) > > You changed nothing. Please read again Geert answer. > > I guess you mentioned about generic compatible "rcar,mfis-mailbox". > I didn't mention in this mail thread (?), but 1) we can keep compatible > with Gen3/Gen4 and Gen5, 2) we don't support Gen3/Gen4. I'm OK to remove generic "rcar,mfis-mailbox". I think this driver can support (maybe) Gen6 or later. So, "rcar,gen6-mfis-mailbox" might be added in the future. In such case, what the file name should be ? You have mentioned that file name should be same as compatible, but no generic compatible. I don't want to have multi-files, but is it recommended ? rcar,gen5-mfis-mailbox.yaml // for Gen5 rcar,gen6-mfis-mailbox.yaml // for Gen6 ... or can we have rcar,mfis-mailbox.yaml // for Gen5/Gen6/... Thank you for your help !! Best regards --- Kuninori Morimoto ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-30 5:57 ` Kuninori Morimoto @ 2025-10-31 4:22 ` Kuninori Morimoto 2025-10-31 7:59 ` Krzysztof Kozlowski 0 siblings, 1 reply; 28+ messages in thread From: Kuninori Morimoto @ 2025-10-31 4:22 UTC (permalink / raw) To: Krzysztof Kozlowski Cc: Geert Uytterhoeven, Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Hi Geert, Krzysztof > compatible = "rcar,r8a78000-mfis-mailbox", > "rcar,gen5-mfis-mailbox", > "rcar,mfis-mailbox"; It is easy to confuse when contradictory comments are made v3 will be compatible = "renesas,r8a78000-mfis-mailbox", "renesas,rcar-gen5-mfis-mailbox"; The file name will be renesas,mfis-mailbox.yaml Thank you for your help !! Best regards --- Kuninori Morimoto ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-31 4:22 ` Kuninori Morimoto @ 2025-10-31 7:59 ` Krzysztof Kozlowski 0 siblings, 0 replies; 28+ messages in thread From: Krzysztof Kozlowski @ 2025-10-31 7:59 UTC (permalink / raw) To: Kuninori Morimoto Cc: Geert Uytterhoeven, Conor Dooley, Geert Uytterhoeven, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc On 31/10/2025 05:22, Kuninori Morimoto wrote: > > Hi Geert, Krzysztof > >> compatible = "rcar,r8a78000-mfis-mailbox", >> "rcar,gen5-mfis-mailbox", >> "rcar,mfis-mailbox"; > > It is easy to confuse when contradictory comments are made There were no contradictory comments. I said absolutely nothing about compatible. > > v3 will be > > compatible = "renesas,r8a78000-mfis-mailbox", > "renesas,rcar-gen5-mfis-mailbox"; > > The file name will be > > renesas,mfis-mailbox.yaml Again, read my comment. The filename must be EQUAL to the compatible. Which one? It is described in writing bindings which I pointed you to already. NAK Best regards, Krzysztof ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-28 4:33 ` [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox Kuninori Morimoto 2025-10-28 8:36 ` Krzysztof Kozlowski @ 2025-10-28 9:12 ` Geert Uytterhoeven 2025-10-28 11:04 ` Wolfram Sang 1 sibling, 1 reply; 28+ messages in thread From: Geert Uytterhoeven @ 2025-10-28 9:12 UTC (permalink / raw) To: Kuninori Morimoto Cc: Conor Dooley, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Hi Morimoto-san, On Tue, 28 Oct 2025 at 05:33, Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote: > Add device tree bindings for the Renesas Multifunctional Inferface > (MFIS) a mailbox controller. > > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Thanks for your patch! > --- /dev/null > +++ b/Documentation/devicetree/bindings/mailbox/rcar,mfis-mailbox.yaml > @@ -0,0 +1,51 @@ > +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/mailbox/rcar,mfis-mailbox.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Renesas MFIS (Multifunctional Inferface) Mailbox controller > + > +maintainers: > + - Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> > + > +description: > + The R-Car multifunctional interface (MFIS) provides an interface between > + the different CPU Cores, such as AP System Core domain and the Realtime > + Core domain, SCP Core domain and AP System Core domain or Realtime Core > + domain and AP System Core domain or Realtime Core domain. > + The MFIS supports the issuing of interrupts for each CPU core domain. > + > +properties: > + compatible: > + items: > + - enum: > + - rcar,mfis-mailbox-r8a78000 # R-Car X5H renesas,r8a78000-mfis-mailbox? > + - const: rcar,mfis-mailbox-gen5 # R-Car Gen5 renesas,rcar-gen5-mfis-mailbox? > +examples: > + - | > + #include <dt-bindings/interrupt-controller/arm-gic.h> > + mailbox@18842000 { > + compatible = "rcar,mfis-mailbox-r8a78000", "rcar,mfis-mailbox-gen5"; > + reg = <0x18842000 0x8>; This is an 8-byte block in the middle of the MFIS register space. Perhaps the DT bindings should describe the full MFIS block, and not just the mailbox part? > + interrupts = <GIC_SPI 4362 IRQ_TYPE_LEVEL_HIGH>; > + #mbox-cells = <1>; > + }; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-28 9:12 ` Geert Uytterhoeven @ 2025-10-28 11:04 ` Wolfram Sang 2025-10-28 11:41 ` Wolfram Sang 0 siblings, 1 reply; 28+ messages in thread From: Wolfram Sang @ 2025-10-28 11:04 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Kuninori Morimoto, Conor Dooley, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc [-- Attachment #1: Type: text/plain, Size: 1547 bytes --] Hi Geert, > > +examples: > > + - | > > + #include <dt-bindings/interrupt-controller/arm-gic.h> > > + mailbox@18842000 { > > + compatible = "rcar,mfis-mailbox-r8a78000", "rcar,mfis-mailbox-gen5"; > > + reg = <0x18842000 0x8>; > > This is an 8-byte block in the middle of the MFIS register space. > Perhaps the DT bindings should describe the full MFIS block, and not > just the mailbox part? I think something in the middle. MFIS block also includes lock registers. We have a BSP driver for these using the hw_spinlock subsystem. That makes sense to me. Currently(tm), the register sets for mailbox and spinlocks are seperated. We could make use of that or we go anxious and start with an MFD right away. Gen5 has 64 of these mailbox TX/RX register pairs. It has additional message registers which should be included here IMHO. It is usually at offset 0x40. I'd think we want to have one MFIS entry in DT and access the mailbox we want with an index. Instead of having 64 entries in DT. Well, actually, we would have two MFIS entries, there is one dedicated to the SCP as well. It would add 32 more nodes if we describe every mailbox independently. Note: if we want Gen3/4 compatibility (I think we want that), we also should go for one MFIS DT entry. On Gen5, every mailbox is 0x1000 apart and has all needed registers in there. On Gen3, first the 8 communication registers come and then the 8 message registers. So, they are not seperated like on Gen5. Happy hacking, Wolfram [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-28 11:04 ` Wolfram Sang @ 2025-10-28 11:41 ` Wolfram Sang 2025-10-30 0:01 ` Kuninori Morimoto 0 siblings, 1 reply; 28+ messages in thread From: Wolfram Sang @ 2025-10-28 11:41 UTC (permalink / raw) To: Geert Uytterhoeven Cc: Kuninori Morimoto, Conor Dooley, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc [-- Attachment #1: Type: text/plain, Size: 476 bytes --] > Well, actually, we would have two MFIS entries, there is one dedicated > to the SCP as well. I just saw that the two MFIS mailbox variants have a slight difference: plain MFIS reg + 0: AP -> RT plain MFIS reg + 4: RT -> AP SCP MFIS reg + 0: SCP -> AP SCP MFIS reg + 4: AP -> SCP As this driver deals with the "AP" part, we need to access different offsets when sending/receiving depending on which variant it is. Shall we handle this with a different compatible? [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 833 bytes --] ^ permalink raw reply [flat|nested] 28+ messages in thread
* Re: [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox 2025-10-28 11:41 ` Wolfram Sang @ 2025-10-30 0:01 ` Kuninori Morimoto 0 siblings, 0 replies; 28+ messages in thread From: Kuninori Morimoto @ 2025-10-30 0:01 UTC (permalink / raw) To: Wolfram Sang Cc: Geert Uytterhoeven, Conor Dooley, Jassi Brar, Krzysztof Kozlowski, Rob Herring, devicetree, linux-renesas-soc Hi Wolfram, Geert > plain MFIS reg + 0: AP -> RT > plain MFIS reg + 4: RT -> AP > > SCP MFIS reg + 0: SCP -> AP > SCP MFIS reg + 4: AP -> SCP > > As this driver deals with the "AP" part, we need to access different > offsets when sending/receiving depending on which variant it is. > > Shall we handle this with a different compatible? In my understanding, "SCP" part will be handled via SCMI (A), "plain" part will be handled via RPMsg (B). This patch is for (A), and I think we don't upstream (B) part (for now ?) I guess our BSP will use (B). > I think something in the middle. MFIS block also includes lock > registers. We have a BSP driver for these using the hw_spinlock > subsystem. That makes sense to me. "MFIS" is including many things into one device/category. So, yes, MFIS lock will be handled via other driver. > Gen5 has 64 of these mailbox TX/RX register pairs. It has additional > message registers which should be included here IMHO. (snip) > This is an 8-byte block in the middle of the MFIS register space. > Perhaps the DT bindings should describe the full MFIS block, and not > just the mailbox part? The HW has 64 channels, but Linux will use 1 channel only for SCP (= A) (for now). Other channels will be used by other OS for other purpose. There is some chance to use more channels if we support (B). > It has additional message registers which should be included here IMHO. > It is usually at offset 0x40. MFIS is created to be used more generic purpose, but Linux don't use this message registers. I guess customer's custom application will use it (?) > Note: if we want Gen3/4 compatibility (I think we want that), we also > should go for one MFIS DT entry. On Gen5, every mailbox is 0x1000 apart > and has all needed registers in there. On Gen3, first the 8 communication > registers come and then the 8 message registers. So, they are not > seperated like on Gen5. Indeed Gen3/Gen4 and Gen5 regster mapping is different, but we need to use is TX/RX part only. I think we can keep compatible with them ? And, I don't think we will use MFIS on Gen3/Gen4, because no user, no software. Thank you for your help !! Best regards --- Kuninori Morimoto ^ permalink raw reply [flat|nested] 28+ messages in thread
end of thread, other threads:[~2026-01-18 20:22 UTC | newest] Thread overview: 28+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2025-10-28 4:32 [PATCH v2 0/3] mailbox: renesas: Support MFIS mailbox driver Kuninori Morimoto 2025-10-28 4:32 ` [PATCH v2 1/3] mailbox: remove unneeded double quotation Kuninori Morimoto 2025-10-28 11:06 ` Wolfram Sang 2025-10-29 0:43 ` Kuninori Morimoto 2025-10-28 4:32 ` [PATCH v2 2/3] mailbox: renesas: Support MFIS mailbox driver Kuninori Morimoto 2025-11-08 20:13 ` Jassi Brar 2025-11-10 0:42 ` Kuninori Morimoto 2025-11-12 1:11 ` Kuninori Morimoto 2025-12-04 2:19 ` Jassi Brar 2025-12-04 2:33 ` Kuninori Morimoto 2026-01-05 21:49 ` Rob Herring 2026-01-05 23:52 ` Kuninori Morimoto 2026-01-18 20:22 ` Jassi Brar 2026-01-06 0:22 ` Jassi Brar 2025-10-28 4:33 ` [PATCH v2 3/3] dt-bindings: mailbox: Add Renesas MFIS Mailbox Kuninori Morimoto 2025-10-28 8:36 ` Krzysztof Kozlowski 2025-10-29 0:49 ` Kuninori Morimoto 2025-10-29 9:36 ` Geert Uytterhoeven 2025-10-29 23:17 ` Kuninori Morimoto 2025-10-30 5:38 ` Krzysztof Kozlowski 2025-10-30 5:44 ` Kuninori Morimoto 2025-10-30 5:57 ` Kuninori Morimoto 2025-10-31 4:22 ` Kuninori Morimoto 2025-10-31 7:59 ` Krzysztof Kozlowski 2025-10-28 9:12 ` Geert Uytterhoeven 2025-10-28 11:04 ` Wolfram Sang 2025-10-28 11:41 ` Wolfram Sang 2025-10-30 0:01 ` Kuninori Morimoto
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox