mbox series

[v10,0/5] Add SPMI support for Mediatek SoC IC

Message ID 1627972461-2627-1-git-send-email-hsin-hsiung.wang@mediatek.com
Headers show
Series Add SPMI support for Mediatek SoC IC | expand

Message

Hsin-Hsiung Wang Aug. 3, 2021, 6:34 a.m. UTC
This series adds support for new SoC MT6873/MT8192/MT8195 to the spmi driver.
This series is based on Chun-Jie's patches[1][2].

[1] https://patchwork.kernel.org/project/linux-mediatek/list/?series=521127
[2] https://patchwork.kernel.org/project/linux-mediatek/list/?series=521655

changes since v9:
- rebase to v5.14-rc1.

Henry Chen (1):
  spmi: mediatek: Add support for MT8195

Hsin-Hsiung Wang (4):
  dt-bindings: spmi: modify the constraint 'maxItems' to 'minItems'
  dt-bindings: spmi: document binding for the Mediatek SPMI controller
  spmi: mediatek: Add support for MT6873/8192
  arm64: dts: mt8192: add spmi node

 .../bindings/spmi/mtk,spmi-mtk-pmif.yaml      |  76 +++
 .../devicetree/bindings/spmi/spmi.yaml        |   2 +-
 arch/arm64/boot/dts/mediatek/mt8192.dtsi      |  17 +
 drivers/spmi/Kconfig                          |  10 +
 drivers/spmi/Makefile                         |   2 +
 drivers/spmi/spmi-mtk-pmif.c                  | 555 ++++++++++++++++++
 6 files changed, 661 insertions(+), 1 deletion(-)
 create mode 100644 Documentation/devicetree/bindings/spmi/mtk,spmi-mtk-pmif.yaml
 create mode 100644 drivers/spmi/spmi-mtk-pmif.c


base-commit: e73f0f0ee7541171d89f2e2491130c7771ba58d3
prerequisite-patch-id: 8e70d378642e084a14296dbaa2aa4e07c1d30563
prerequisite-patch-id: 82ced16215cdd31201c6146ddb5c30bc17525996
prerequisite-patch-id: 7f2137e77cfc439c2e4b4e4369a6d6b48fec1ece
prerequisite-patch-id: 15f52bb664f0f0436627d056a53afefb0b99f67a
prerequisite-patch-id: 479b44dfdc6d7b367c0d441d8635d2dc02466057
prerequisite-patch-id: 5df1858972e343d3750cdda1063655fc232eb831
prerequisite-patch-id: 7e63a29430f65c2a0d56d7353df884645d70ed8c
prerequisite-patch-id: 2a6200e8a05329d51aaa4fd63aacfbba66d16177
prerequisite-patch-id: 604d2702c4217b77de3dc305ff08f630ba38fdb4
prerequisite-patch-id: d3ece2688dbd45eee248a8c6ba3206c0c673c904
prerequisite-patch-id: 1bebe1cd9b267c974cae50c3df8c0f8f4f0b0b3d
prerequisite-patch-id: 3b34fe85667da5287bde9fd2378359be4a126266
prerequisite-patch-id: 5d3d139212ab304739b75f7638251703b95948d5
prerequisite-patch-id: 621291b21be177a63eaf6769aa6d2ee8ddb2ea2b
prerequisite-patch-id: 024f786586b409420782d24218b15f05f6476667
prerequisite-patch-id: 946aae93303bde26226289dc389c94de96a9dacd
prerequisite-patch-id: b3ddf6f2079c3c269bd24091243030a971c43cbc
prerequisite-patch-id: 5c0e0308aa8eb06ca6df6f5467bc925f2cc106ad
prerequisite-patch-id: d4e481acd8b970f08d3e4da9c8fc0ad6e1fff551
prerequisite-patch-id: 99db7309fbe1b9f73a07e25d5174db8976c77a2c
prerequisite-patch-id: cffbc99e9e60f6db43cf7879f17e05c5b041d312
prerequisite-patch-id: 69871b871ab339881b50a2d6988173050b6c7a4f
prerequisite-patch-id: 4f5900b98a0c7cbe62694f2477a6cb410187714b

Comments

Stephen Boyd Aug. 6, 2021, 5:49 p.m. UTC | #1
Quoting Hsin-Hsiung Wang (2021-08-02 23:34:20)
> From: Henry Chen <henryc.chen@mediatek.com>

> 

> Add spmi support for MT8195.

> 

> Signed-off-by: Henry Chen <henryc.chen@mediatek.com>


Missing Signed-off-by from hsin-hsiung.wang here

> ---

> changes since v9:

> - No change.

> ---

>  drivers/spmi/spmi-mtk-pmif.c | 90 ++++++++++++++++++++++++++++++++++++

>  1 file changed, 90 insertions(+)

> 

> diff --git a/drivers/spmi/spmi-mtk-pmif.c b/drivers/spmi/spmi-mtk-pmif.c

> index 94c45d46ab0c..0c320801c9d5 100644

> --- a/drivers/spmi/spmi-mtk-pmif.c

> +++ b/drivers/spmi/spmi-mtk-pmif.c

> @@ -348,6 +427,14 @@ static const struct pmif_data mt6873_pmif_arb = {

>         .soc_chan = 2,

>  };

>  

> +static const struct pmif_data mt8195_pmif_arb[] = {


This is an array of type pmif_data.

> +       {

> +               .regs = mt8195_regs,

> +               .spmimst_regs = mt8195_spmi_regs,

> +               .soc_chan = 2,

> +       },

> +};

> +

>  static int mtk_spmi_probe(struct platform_device *pdev)

>  {

>         struct pmif *arb;

> @@ -444,6 +531,9 @@ static const struct of_device_id mtk_spmi_match_table[] = {

>         {

>                 .compatible = "mediatek,mt6873-spmi",

>                 .data = &mt6873_pmif_arb,


mt6873_pmif_arb is not an array, see the context header above.

How does this work? Has this been tested?

> +       }, {

> +               .compatible = "mediatek,mt8195-spmi",

> +               .data = &mt8195_pmif_arb,

>         }, {

>                 /* sentinel */

>         },

> -- 

> 2.18.0

>
Hsin-Hsiung Wang Aug. 7, 2021, 3:28 a.m. UTC | #2
Hi,

On Fri, 2021-08-06 at 10:49 -0700, Stephen Boyd wrote:
> Quoting Hsin-Hsiung Wang (2021-08-02 23:34:20)

> > From: Henry Chen <henryc.chen@mediatek.com>

> > 

> > Add spmi support for MT8195.

> > 

> > Signed-off-by: Henry Chen <henryc.chen@mediatek.com>

> 

> Missing Signed-off-by from hsin-hsiung.wang here

> 


Sorry for the missing. I will add it in the next patch.

Thanks.

> > ---

> > changes since v9:

> > - No change.

> > ---

> >  drivers/spmi/spmi-mtk-pmif.c | 90 ++++++++++++++++++++++++++++++++++++

> >  1 file changed, 90 insertions(+)

> > 

> > diff --git a/drivers/spmi/spmi-mtk-pmif.c b/drivers/spmi/spmi-mtk-pmif.c

> > index 94c45d46ab0c..0c320801c9d5 100644

> > --- a/drivers/spmi/spmi-mtk-pmif.c

> > +++ b/drivers/spmi/spmi-mtk-pmif.c

> > @@ -348,6 +427,14 @@ static const struct pmif_data mt6873_pmif_arb = {

> >         .soc_chan = 2,

> >  };

> >  

> > +static const struct pmif_data mt8195_pmif_arb[] = {

> 

> This is an array of type pmif_data.

> 

> > +       {

> > +               .regs = mt8195_regs,

> > +               .spmimst_regs = mt8195_spmi_regs,

> > +               .soc_chan = 2,

> > +       },

> > +};

> > +

> >  static int mtk_spmi_probe(struct platform_device *pdev)

> >  {

> >         struct pmif *arb;

> > @@ -444,6 +531,9 @@ static const struct of_device_id mtk_spmi_match_table[] = {

> >         {

> >                 .compatible = "mediatek,mt6873-spmi",

> >                 .data = &mt6873_pmif_arb,

> 

> mt6873_pmif_arb is not an array, see the context header above.

> 

> How does this work? Has this been tested?

> 

> > +       }, {

> > +               .compatible = "mediatek,mt8195-spmi",

> > +               .data = &mt8195_pmif_arb,

> >         }, {

> >                 /* sentinel */

> >         },

> > -- 

> > 2.18.0

> >
Hsin-Hsiung Wang Aug. 7, 2021, 3:51 a.m. UTC | #3
Hi,
sorry for missing other comments, I will confirm it internally and
update it.

Thanks a lot.

On Fri, 2021-08-06 at 10:49 -0700, Stephen Boyd wrote:
> Quoting Hsin-Hsiung Wang (2021-08-02 23:34:20)

> > From: Henry Chen <henryc.chen@mediatek.com>

> > 

> > Add spmi support for MT8195.

> > 

> > Signed-off-by: Henry Chen <henryc.chen@mediatek.com>

> 

> Missing Signed-off-by from hsin-hsiung.wang here

> 

> > ---

> > changes since v9:

> > - No change.

> > ---

> >  drivers/spmi/spmi-mtk-pmif.c | 90 ++++++++++++++++++++++++++++++++++++

> >  1 file changed, 90 insertions(+)

> > 

> > diff --git a/drivers/spmi/spmi-mtk-pmif.c b/drivers/spmi/spmi-mtk-pmif.c

> > index 94c45d46ab0c..0c320801c9d5 100644

> > --- a/drivers/spmi/spmi-mtk-pmif.c

> > +++ b/drivers/spmi/spmi-mtk-pmif.c

> > @@ -348,6 +427,14 @@ static const struct pmif_data mt6873_pmif_arb = {

> >         .soc_chan = 2,

> >  };

> >  

> > +static const struct pmif_data mt8195_pmif_arb[] = {

> 

> This is an array of type pmif_data.

> 

> > +       {

> > +               .regs = mt8195_regs,

> > +               .spmimst_regs = mt8195_spmi_regs,

> > +               .soc_chan = 2,

> > +       },

> > +};

> > +

> >  static int mtk_spmi_probe(struct platform_device *pdev)

> >  {

> >         struct pmif *arb;

> > @@ -444,6 +531,9 @@ static const struct of_device_id mtk_spmi_match_table[] = {

> >         {

> >                 .compatible = "mediatek,mt6873-spmi",

> >                 .data = &mt6873_pmif_arb,

> 

> mt6873_pmif_arb is not an array, see the context header above.

> 

> How does this work? Has this been tested?

> 

> > +       }, {

> > +               .compatible = "mediatek,mt8195-spmi",

> > +               .data = &mt8195_pmif_arb,

> >         }, {

> >                 /* sentinel */

> >         },

> > -- 

> > 2.18.0

> >