diff mbox series

[v2,2/2] spi: mediatek: add spi support for mt8192 IC

Message ID 20200721122436.31544-2-leilk.liu@mediatek.com (mailing list archive)
State New, archived
Headers show
Series [v2,1/2] dt-bindings: spi: update bindings for MT8192 SoC | expand

Commit Message

Leilk Liu July 21, 2020, 12:24 p.m. UTC
From: "leilk.liu" <leilk.liu@mediatek.com>

This patch add spi support for mt8192 IC.

Signed-off-by: leilk.liu <leilk.liu@mediatek.com>
---
 drivers/spi/spi-mt65xx.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Matthias Brugger July 21, 2020, 10:44 p.m. UTC | #1
On 21/07/2020 14:24, Leilk Liu wrote:
> From: "leilk.liu" <leilk.liu@mediatek.com>
> 
> This patch add spi support for mt8192 IC.
> 
> Signed-off-by: leilk.liu <leilk.liu@mediatek.com>
> ---
>   drivers/spi/spi-mt65xx.c | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
> index 6783e12c40c2..3d0d69fe0c69 100644
> --- a/drivers/spi/spi-mt65xx.c
> +++ b/drivers/spi/spi-mt65xx.c
> @@ -170,6 +170,9 @@ static const struct of_device_id mtk_spi_of_match[] = {
>   	{ .compatible = "mediatek,mt8183-spi",
>   		.data = (void *)&mt8183_compat,
>   	},
> +	{ .compatible = "mediatek,mt8192-spi",
> +		.data = (void *)&mt6765_compat,
> +	},

That's not needed. We will use the fallback compatible which is 
"mediatek,mt6765-spi" which will take the correct DT data. If in the future we 
realize that mt8192 has a difference in the HW we can add the compatible. 
Otherwise with the binding description we should be fine

>   	{}
>   };
>   MODULE_DEVICE_TABLE(of, mtk_spi_of_match);
>
Leilk Liu July 22, 2020, 8:38 a.m. UTC | #2
On Wed, 2020-07-22 at 00:44 +0200, Matthias Brugger wrote:
> 
> On 21/07/2020 14:24, Leilk Liu wrote:
> > From: "leilk.liu" <leilk.liu@mediatek.com>
> > 
> > This patch add spi support for mt8192 IC.
> > 
> > Signed-off-by: leilk.liu <leilk.liu@mediatek.com>
> > ---
> >   drivers/spi/spi-mt65xx.c | 3 +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
> > index 6783e12c40c2..3d0d69fe0c69 100644
> > --- a/drivers/spi/spi-mt65xx.c
> > +++ b/drivers/spi/spi-mt65xx.c
> > @@ -170,6 +170,9 @@ static const struct of_device_id mtk_spi_of_match[] = {
> >   	{ .compatible = "mediatek,mt8183-spi",
> >   		.data = (void *)&mt8183_compat,
> >   	},
> > +	{ .compatible = "mediatek,mt8192-spi",
> > +		.data = (void *)&mt6765_compat,
> > +	},
> 
> That's not needed. We will use the fallback compatible which is 
> "mediatek,mt6765-spi" which will take the correct DT data. If in the future we 
> realize that mt8192 has a difference in the HW we can add the compatible. 
> Otherwise with the binding description we should be fine
> 
So you mean that only the following binding patch is needed? 
[PATCH v2 1/2] dt-bindings: spi: update bindings for MT8192 SoC

> >   	{}
> >   };
> >   MODULE_DEVICE_TABLE(of, mtk_spi_of_match);
> >
Matthias Brugger July 22, 2020, 10:38 a.m. UTC | #3
On 22/07/2020 10:38, lei liu wrote:
> On Wed, 2020-07-22 at 00:44 +0200, Matthias Brugger wrote:
>>
>> On 21/07/2020 14:24, Leilk Liu wrote:
>>> From: "leilk.liu" <leilk.liu@mediatek.com>
>>>
>>> This patch add spi support for mt8192 IC.
>>>
>>> Signed-off-by: leilk.liu <leilk.liu@mediatek.com>
>>> ---
>>>    drivers/spi/spi-mt65xx.c | 3 +++
>>>    1 file changed, 3 insertions(+)
>>>
>>> diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
>>> index 6783e12c40c2..3d0d69fe0c69 100644
>>> --- a/drivers/spi/spi-mt65xx.c
>>> +++ b/drivers/spi/spi-mt65xx.c
>>> @@ -170,6 +170,9 @@ static const struct of_device_id mtk_spi_of_match[] = {
>>>    	{ .compatible = "mediatek,mt8183-spi",
>>>    		.data = (void *)&mt8183_compat,
>>>    	},
>>> +	{ .compatible = "mediatek,mt8192-spi",
>>> +		.data = (void *)&mt6765_compat,
>>> +	},
>>
>> That's not needed. We will use the fallback compatible which is
>> "mediatek,mt6765-spi" which will take the correct DT data. If in the future we
>> realize that mt8192 has a difference in the HW we can add the compatible.
>> Otherwise with the binding description we should be fine
>>
> So you mean that only the following binding patch is needed?
> [PATCH v2 1/2] dt-bindings: spi: update bindings for MT8192 SoC
> 

Yes, exactly.

Regards,
Matthias
diff mbox series

Patch

diff --git a/drivers/spi/spi-mt65xx.c b/drivers/spi/spi-mt65xx.c
index 6783e12c40c2..3d0d69fe0c69 100644
--- a/drivers/spi/spi-mt65xx.c
+++ b/drivers/spi/spi-mt65xx.c
@@ -170,6 +170,9 @@  static const struct of_device_id mtk_spi_of_match[] = {
 	{ .compatible = "mediatek,mt8183-spi",
 		.data = (void *)&mt8183_compat,
 	},
+	{ .compatible = "mediatek,mt8192-spi",
+		.data = (void *)&mt6765_compat,
+	},
 	{}
 };
 MODULE_DEVICE_TABLE(of, mtk_spi_of_match);