[PATCH v1 0/2] firmware: Add MediaTek TinySYS SCMI Protocol

AngeloGioacchino Del Regno posted 2 patches 5 months, 4 weeks ago
.../firmware/mediatek,mt6895-scmi.yaml        |  22 ++
drivers/firmware/arm_scmi/Kconfig             |   1 +
drivers/firmware/arm_scmi/Makefile            |   1 +
.../arm_scmi/vendors/mediatek/Kconfig         |  16 +
.../arm_scmi/vendors/mediatek/Makefile        |   2 +
.../arm_scmi/vendors/mediatek/mtk-tinysys.c   | 344 ++++++++++++++++++
include/linux/scmi_mtk_protocol.h             |  62 ++++
7 files changed, 448 insertions(+)
create mode 100644 Documentation/devicetree/bindings/firmware/mediatek,mt6895-scmi.yaml
create mode 100644 drivers/firmware/arm_scmi/vendors/mediatek/Kconfig
create mode 100644 drivers/firmware/arm_scmi/vendors/mediatek/Makefile
create mode 100644 drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c
create mode 100644 include/linux/scmi_mtk_protocol.h
[PATCH v1 0/2] firmware: Add MediaTek TinySYS SCMI Protocol
Posted by AngeloGioacchino Del Regno 5 months, 4 weeks ago
This series adds basic support for the MediaTek TinySYS SCMI Protocol,
found on the MediaTek Dimensity 9200, 9300 and 9400, other than on the
MT8196 Chromebook SoC.

This is used to communicate with the CM_MGR and other MCUs for power
management purposes.

AngeloGioacchino Del Regno (2):
  dt-bindings: firmware: Add MediaTek TinySYS SCMI Extension protocol
  firmware: arm_scmi: Add MediaTek TinySYS SCMI Protocol support

 .../firmware/mediatek,mt6895-scmi.yaml        |  22 ++
 drivers/firmware/arm_scmi/Kconfig             |   1 +
 drivers/firmware/arm_scmi/Makefile            |   1 +
 .../arm_scmi/vendors/mediatek/Kconfig         |  16 +
 .../arm_scmi/vendors/mediatek/Makefile        |   2 +
 .../arm_scmi/vendors/mediatek/mtk-tinysys.c   | 344 ++++++++++++++++++
 include/linux/scmi_mtk_protocol.h             |  62 ++++
 7 files changed, 448 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/firmware/mediatek,mt6895-scmi.yaml
 create mode 100644 drivers/firmware/arm_scmi/vendors/mediatek/Kconfig
 create mode 100644 drivers/firmware/arm_scmi/vendors/mediatek/Makefile
 create mode 100644 drivers/firmware/arm_scmi/vendors/mediatek/mtk-tinysys.c
 create mode 100644 include/linux/scmi_mtk_protocol.h

-- 
2.49.0
Re: [PATCH v1 0/2] firmware: Add MediaTek TinySYS SCMI Protocol
Posted by Cristian Marussi 5 months, 4 weeks ago
On Mon, Jun 23, 2025 at 02:01:34PM +0200, AngeloGioacchino Del Regno wrote:
> This series adds basic support for the MediaTek TinySYS SCMI Protocol,
> found on the MediaTek Dimensity 9200, 9300 and 9400, other than on the
> MT8196 Chromebook SoC.
> 
> This is used to communicate with the CM_MGR and other MCUs for power
> management purposes.

Hi Angelo,

thanks for this.

I will do a proper review in the coming days of this series anyway, but
upfront for future V2:

- you should provide some sort of documentation for this new
  vendor protocol and its messages, as an example from IMX:

	drivers/firmware/arm_scmi/vendors/imx/imx95.rst

- where is the SCMI driver that will call all the new vendor ops
  defined in: scmi_mtk_protocol.h ?

Thanks,
Cristian
Re: [PATCH v1 0/2] firmware: Add MediaTek TinySYS SCMI Protocol
Posted by AngeloGioacchino Del Regno 5 months, 4 weeks ago
Il 23/06/25 14:17, Cristian Marussi ha scritto:
> On Mon, Jun 23, 2025 at 02:01:34PM +0200, AngeloGioacchino Del Regno wrote:
>> This series adds basic support for the MediaTek TinySYS SCMI Protocol,
>> found on the MediaTek Dimensity 9200, 9300 and 9400, other than on the
>> MT8196 Chromebook SoC.
>>
>> This is used to communicate with the CM_MGR and other MCUs for power
>> management purposes.
> 
> Hi Angelo,
> 
> thanks for this.
> 
> I will do a proper review in the coming days of this series anyway, but
> upfront for future V2:
> 
> - you should provide some sort of documentation for this new
>    vendor protocol and its messages, as an example from IMX:
> 
> 	drivers/firmware/arm_scmi/vendors/imx/imx95.rst

Noted.

> 
> - where is the SCMI driver that will call all the new vendor ops
>    defined in: scmi_mtk_protocol.h ?

This was tested with code that is not clean at all (hence I can't push it upstream)
and well... I didn't think about the fact that, effectively, without an user, this
code ends up being unused.

I can't promise to send a clean user in this cycle, but I would really appreciate
if you could still check the protocol code, so that if there's anything that you
can spot I can fix it while the rest gets done :-)

Thank you,
Angelo

> 
> Thanks,
> Cristian
Re: [PATCH v1 0/2] firmware: Add MediaTek TinySYS SCMI Protocol
Posted by Cristian Marussi 5 months, 4 weeks ago
On Mon, Jun 23, 2025 at 02:32:24PM +0200, AngeloGioacchino Del Regno wrote:
> Il 23/06/25 14:17, Cristian Marussi ha scritto:
> > On Mon, Jun 23, 2025 at 02:01:34PM +0200, AngeloGioacchino Del Regno wrote:
> > > This series adds basic support for the MediaTek TinySYS SCMI Protocol,
> > > found on the MediaTek Dimensity 9200, 9300 and 9400, other than on the
> > > MT8196 Chromebook SoC.
> > > 
> > > This is used to communicate with the CM_MGR and other MCUs for power
> > > management purposes.
> > 
> > Hi Angelo,
> > 
> > thanks for this.
> > 
> > I will do a proper review in the coming days of this series anyway, but
> > upfront for future V2:
> > 
> > - you should provide some sort of documentation for this new
> >    vendor protocol and its messages, as an example from IMX:
> > 
> > 	drivers/firmware/arm_scmi/vendors/imx/imx95.rst
> 
> Noted.
> 
> > 
> > - where is the SCMI driver that will call all the new vendor ops
> >    defined in: scmi_mtk_protocol.h ?
> 
> This was tested with code that is not clean at all (hence I can't push it upstream)
> and well... I didn't think about the fact that, effectively, without an user, this
> code ends up being unused.
> 
> I can't promise to send a clean user in this cycle, but I would really appreciate
> if you could still check the protocol code, so that if there's anything that you
> can spot I can fix it while the rest gets done :-)

Sure, I will anyway review, but a driver user exampe would be useful, maybe
posting it at the end of the series as a NOT-FOR-UPSTREAM/RFC (something like that)
so that we can have an iddea of the usage patterns while being aware that it is
still not clean for upstream.

Thanks,
Cristian