Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1654547 > unrolled thread

[PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs

Started by<sean.wang@mediatek.com>
First post2017-05-31 20:50 +0200
Last post2017-06-07 17:00 +0200
Articles 5 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs <sean.wang@mediatek.com> - 2017-05-31 20:50 +0200
    Re: [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek  SoCs Matthias Brugger <matthias.bgg@gmail.com> - 2017-06-06 13:10 +0200
      Re: [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek  SoCs Sean Wang <sean.wang@mediatek.com> - 2017-06-07 15:30 +0200
        Re: [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek  SoCs Matthias Brugger <matthias.bgg@gmail.com> - 2017-06-07 15:30 +0200
          Re: [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek  SoCs Sean Wang <sean.wang@mediatek.com> - 2017-06-07 17:00 +0200

#1654547 — [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs

From<sean.wang@mediatek.com>
Date2017-05-31 20:50 +0200
Subject[PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs
Message-ID<tNgQW-8tf-19@gated-at.bofh.it>
From: Sean Wang <sean.wang@mediatek.com>

Add the generic binding for allowing the support of RNG on MediaTek SoCs
such as MT7622.

Signed-off-by: Sean Wang <sean.wang@mediatek.com>
---
 Documentation/devicetree/bindings/rng/mtk-rng.txt | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/rng/mtk-rng.txt b/Documentation/devicetree/bindings/rng/mtk-rng.txt
index a6d62a2..0772913 100644
--- a/Documentation/devicetree/bindings/rng/mtk-rng.txt
+++ b/Documentation/devicetree/bindings/rng/mtk-rng.txt
@@ -2,7 +2,8 @@ Device-Tree bindings for Mediatek random number generator
 found in Mediatek SoC family
 
 Required properties:
-- compatible	    : Should be "mediatek,mt7623-rng"
+- compatible	    : Should be "mediatek,generic-rng" or
+				"mediatek,mt7623-rng".
 - clocks	    : list of clock specifiers, corresponding to
 		      entries in clock-names property;
 - clock-names	    : Should contain "rng" entries;
-- 
1.9.1

[toc] | [next] | [standalone]


#1658643 — Re: [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs

FromMatthias Brugger <matthias.bgg@gmail.com>
Date2017-06-06 13:10 +0200
SubjectRe: [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs
Message-ID<tPkx4-7Uz-37@gated-at.bofh.it>
In reply to#1654547

On 31/05/17 20:44, sean.wang@mediatek.com wrote:
> From: Sean Wang <sean.wang@mediatek.com>
> 
> Add the generic binding for allowing the support of RNG on MediaTek SoCs
> such as MT7622.
> 
> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> ---
>   Documentation/devicetree/bindings/rng/mtk-rng.txt | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/rng/mtk-rng.txt b/Documentation/devicetree/bindings/rng/mtk-rng.txt
> index a6d62a2..0772913 100644
> --- a/Documentation/devicetree/bindings/rng/mtk-rng.txt
> +++ b/Documentation/devicetree/bindings/rng/mtk-rng.txt
> @@ -2,7 +2,8 @@ Device-Tree bindings for Mediatek random number generator
>   found in Mediatek SoC family
>   
>   Required properties:
> -- compatible	    : Should be "mediatek,mt7623-rng"
> +- compatible	    : Should be "mediatek,generic-rng" or
> +				"mediatek,mt7623-rng".

What does generic-rng mean. Is it for all mt7xxx, or also for mt6xxx and 
mt8xxx based SoCs? I think we should stick with SoC specific bindings, 
as we don't know if Mediatek won't publish a new IP block next year 
which is differnet.

Just in case we should add a binding for the actual SoC + a fallback. 
For example.
- compatible " Should be
	"mediatek,mt7622-rng", 	"mediatek,mt7623-rng" for SoC mt7622
	"mediatek,mt7623-rng" for SoC mt7623

This will also eliminate the need of adding mt6722-rng to the driver, as 
it will use mt7623-rng as fallback. If in the future we realize that 
mt7622-rng has a extra feature/bug, we can still work around it, without 
breaking the bindings.

Makes sense?

Regards,
Matthias

>   - clocks	    : list of clock specifiers, corresponding to
>   		      entries in clock-names property;
>   - clock-names	    : Should contain "rng" entries;
> 

[toc] | [prev] | [next] | [standalone]


#1659792 — Re: [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs

FromSean Wang <sean.wang@mediatek.com>
Date2017-06-07 15:30 +0200
SubjectRe: [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs
Message-ID<tPJc6-7aN-5@gated-at.bofh.it>
In reply to#1658643
On Tue, 2017-06-06 at 13:07 +0200, Matthias Brugger wrote:
> 
> On 31/05/17 20:44, sean.wang@mediatek.com wrote:
> > From: Sean Wang <sean.wang@mediatek.com>
> > 
> > Add the generic binding for allowing the support of RNG on MediaTek SoCs
> > such as MT7622.
> > 
> > Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> > ---
> >   Documentation/devicetree/bindings/rng/mtk-rng.txt | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/rng/mtk-rng.txt b/Documentation/devicetree/bindings/rng/mtk-rng.txt
> > index a6d62a2..0772913 100644
> > --- a/Documentation/devicetree/bindings/rng/mtk-rng.txt
> > +++ b/Documentation/devicetree/bindings/rng/mtk-rng.txt
> > @@ -2,7 +2,8 @@ Device-Tree bindings for Mediatek random number generator
> >   found in Mediatek SoC family
> >   
> >   Required properties:
> > -- compatible	    : Should be "mediatek,mt7623-rng"
> > +- compatible	    : Should be "mediatek,generic-rng" or
> > +				"mediatek,mt7623-rng".
> 
> What does generic-rng mean. Is it for all mt7xxx, or also for mt6xxx and 
> mt8xxx based SoCs? I think we should stick with SoC specific bindings, 
> as we don't know if Mediatek won't publish a new IP block next year 
> which is differnet.
> 

Yes, what I mean is generic-rng can be applied to all
platform MediaTek provides. 


> Just in case we should add a binding for the actual SoC + a fallback. 
> For example.
> - compatible " Should be
> 	"mediatek,mt7622-rng", 	"mediatek,mt7623-rng" for SoC mt7622
> 	"mediatek,mt7623-rng" for SoC mt7623
> 
> This will also eliminate the need of adding mt6722-rng to the driver, as 
> it will use mt7623-rng as fallback. If in the future we realize that 
> mt7622-rng has a extra feature/bug, we can still work around it, without 
> breaking the bindings.
> 

I knew the fallback rules you said here because I saw them being used in
many drivers such as sysirq and uart driver, such kind of basic drivers.

These drivers are basic enough, various following chipsets almost fall
back into the oldest one. So the clues let me think the hardware
interface shouldn't have too much differences among them.

If there is string used like generic-uart or generic-sysirq, it can
stop we blindly add new string into the binding document when a new
platform is introduced. 

And they easily allows users unfamiliar MediaTek platform (they didn't
know what the oldest MediaTek chipset is) pick up the right compatible
string to start bring up the new platform. 

The specific one can be added after new feature required is added or
critical hardware bug is found. Otherwise the generic one can fit 
all generic needs for those.

Those are only opinions, if you don't like it, I still can accept the
original way as you suggest :)


> Makes sense?
> 
> Regards,
> Matthias
> 
> >   - clocks	    : list of clock specifiers, corresponding to
> >   		      entries in clock-names property;
> >   - clock-names	    : Should contain "rng" entries;
> > 

[toc] | [prev] | [next] | [standalone]


#1659794 — Re: [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs

FromMatthias Brugger <matthias.bgg@gmail.com>
Date2017-06-07 15:30 +0200
SubjectRe: [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs
Message-ID<tPJc6-7aN-17@gated-at.bofh.it>
In reply to#1659792

On 07/06/17 15:20, Sean Wang wrote:
> On Tue, 2017-06-06 at 13:07 +0200, Matthias Brugger wrote:
>>
>> On 31/05/17 20:44, sean.wang@mediatek.com wrote:
>>> From: Sean Wang <sean.wang@mediatek.com>
>>>
>>> Add the generic binding for allowing the support of RNG on MediaTek SoCs
>>> such as MT7622.
>>>
>>> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
>>> ---
>>>    Documentation/devicetree/bindings/rng/mtk-rng.txt | 3 ++-
>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/rng/mtk-rng.txt b/Documentation/devicetree/bindings/rng/mtk-rng.txt
>>> index a6d62a2..0772913 100644
>>> --- a/Documentation/devicetree/bindings/rng/mtk-rng.txt
>>> +++ b/Documentation/devicetree/bindings/rng/mtk-rng.txt
>>> @@ -2,7 +2,8 @@ Device-Tree bindings for Mediatek random number generator
>>>    found in Mediatek SoC family
>>>    
>>>    Required properties:
>>> -- compatible	    : Should be "mediatek,mt7623-rng"
>>> +- compatible	    : Should be "mediatek,generic-rng" or
>>> +				"mediatek,mt7623-rng".
>>
>> What does generic-rng mean. Is it for all mt7xxx, or also for mt6xxx and
>> mt8xxx based SoCs? I think we should stick with SoC specific bindings,
>> as we don't know if Mediatek won't publish a new IP block next year
>> which is differnet.
>>
> 
> Yes, what I mean is generic-rng can be applied to all
> platform MediaTek provides.
> 
> 
>> Just in case we should add a binding for the actual SoC + a fallback.
>> For example.
>> - compatible " Should be
>> 	"mediatek,mt7622-rng", 	"mediatek,mt7623-rng" for SoC mt7622
>> 	"mediatek,mt7623-rng" for SoC mt7623
>>
>> This will also eliminate the need of adding mt6722-rng to the driver, as
>> it will use mt7623-rng as fallback. If in the future we realize that
>> mt7622-rng has a extra feature/bug, we can still work around it, without
>> breaking the bindings.
>>
> 
> I knew the fallback rules you said here because I saw them being used in
> many drivers such as sysirq and uart driver, such kind of basic drivers.
> 
> These drivers are basic enough, various following chipsets almost fall
> back into the oldest one. So the clues let me think the hardware
> interface shouldn't have too much differences among them.
> 
> If there is string used like generic-uart or generic-sysirq, it can
> stop we blindly add new string into the binding document when a new
> platform is introduced.
> 
> And they easily allows users unfamiliar MediaTek platform (they didn't
> know what the oldest MediaTek chipset is) pick up the right compatible
> string to start bring up the new platform.
> 
> The specific one can be added after new feature required is added or
> critical hardware bug is found. Otherwise the generic one can fit
> all generic needs for those.
> 
> Those are only opinions, if you don't like it, I still can accept the
> original way as you suggest :)
> 

I can see your reasoning, but the device tree maintainers prefer to have 
the bindings updated for a new SoC. As I mentioned before, just imagine 
next year Mediatek changes the IP block and from now on, it uses the new 
device in all SoCs. In 5 years we would have a binding which states 
'generic' although it is not compatible with any SoC of the last So

So please keep with the bindings as done up to now.

Best regards,
Matthias

> 
>> Makes sense?
>>
>> Regards,
>> Matthias
>>
>>>    - clocks	    : list of clock specifiers, corresponding to
>>>    		      entries in clock-names property;
>>>    - clock-names	    : Should contain "rng" entries;
>>>
> 
> 

[toc] | [prev] | [next] | [standalone]


#1659871 — Re: [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs

FromSean Wang <sean.wang@mediatek.com>
Date2017-06-07 17:00 +0200
SubjectRe: [PATCH 1/4] dt-bindings: rng: add generic bindings for MediaTek SoCs
Message-ID<tPKBc-7Z0-1@gated-at.bofh.it>
In reply to#1659794
On Wed, 2017-06-07 at 15:25 +0200, Matthias Brugger wrote:
> 
> On 07/06/17 15:20, Sean Wang wrote:
> > On Tue, 2017-06-06 at 13:07 +0200, Matthias Brugger wrote:
> >>
> >> On 31/05/17 20:44, sean.wang@mediatek.com wrote:
> >>> From: Sean Wang <sean.wang@mediatek.com>
> >>>
> >>> Add the generic binding for allowing the support of RNG on MediaTek SoCs
> >>> such as MT7622.
> >>>
> >>> Signed-off-by: Sean Wang <sean.wang@mediatek.com>
> >>> ---
> >>>    Documentation/devicetree/bindings/rng/mtk-rng.txt | 3 ++-
> >>>    1 file changed, 2 insertions(+), 1 deletion(-)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/rng/mtk-rng.txt b/Documentation/devicetree/bindings/rng/mtk-rng.txt
> >>> index a6d62a2..0772913 100644
> >>> --- a/Documentation/devicetree/bindings/rng/mtk-rng.txt
> >>> +++ b/Documentation/devicetree/bindings/rng/mtk-rng.txt
> >>> @@ -2,7 +2,8 @@ Device-Tree bindings for Mediatek random number generator
> >>>    found in Mediatek SoC family
> >>>    
> >>>    Required properties:
> >>> -- compatible	    : Should be "mediatek,mt7623-rng"
> >>> +- compatible	    : Should be "mediatek,generic-rng" or
> >>> +				"mediatek,mt7623-rng".
> >>
> >> What does generic-rng mean. Is it for all mt7xxx, or also for mt6xxx and
> >> mt8xxx based SoCs? I think we should stick with SoC specific bindings,
> >> as we don't know if Mediatek won't publish a new IP block next year
> >> which is differnet.
> >>
> > 
> > Yes, what I mean is generic-rng can be applied to all
> > platform MediaTek provides.
> > 
> > 
> >> Just in case we should add a binding for the actual SoC + a fallback.
> >> For example.
> >> - compatible " Should be
> >> 	"mediatek,mt7622-rng", 	"mediatek,mt7623-rng" for SoC mt7622
> >> 	"mediatek,mt7623-rng" for SoC mt7623
> >>
> >> This will also eliminate the need of adding mt6722-rng to the driver, as
> >> it will use mt7623-rng as fallback. If in the future we realize that
> >> mt7622-rng has a extra feature/bug, we can still work around it, without
> >> breaking the bindings.
> >>
> > 
> > I knew the fallback rules you said here because I saw them being used in
> > many drivers such as sysirq and uart driver, such kind of basic drivers.
> > 
> > These drivers are basic enough, various following chipsets almost fall
> > back into the oldest one. So the clues let me think the hardware
> > interface shouldn't have too much differences among them.
> > 
> > If there is string used like generic-uart or generic-sysirq, it can
> > stop we blindly add new string into the binding document when a new
> > platform is introduced.
> > 
> > And they easily allows users unfamiliar MediaTek platform (they didn't
> > know what the oldest MediaTek chipset is) pick up the right compatible
> > string to start bring up the new platform.
> > 
> > The specific one can be added after new feature required is added or
> > critical hardware bug is found. Otherwise the generic one can fit
> > all generic needs for those.
> > 
> > Those are only opinions, if you don't like it, I still can accept the
> > original way as you suggest :)
> > 
> 
> I can see your reasoning, but the device tree maintainers prefer to have 
> the bindings updated for a new SoC. As I mentioned before, just imagine 
> next year Mediatek changes the IP block and from now on, it uses the new 
> device in all SoCs. In 5 years we would have a binding which states 
> 'generic' although it is not compatible with any SoC of the last So
> 
> So please keep with the bindings as done up to now.

Understood, I'll follow up. 

And that also reminds me that all missing bindings need to be added for
each driver on the MT7623 which can fall back to other existing SoCs.

Thank you a lot

	Sean

> 
> Best regards,
> Matthias
> 
> > 
> >> Makes sense?
> >>
> >> Regards,
> >> Matthias
> >>
> >>>    - clocks	    : list of clock specifiers, corresponding to
> >>>    		      entries in clock-names property;
> >>>    - clock-names	    : Should contain "rng" entries;
> >>>
> > 
> > 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web