diff mbox series

[v2,4/4] dt-bindings: pwm: Add compatible for MediaTek MT8186

Message ID 1645003971-16908-5-git-send-email-xinlei.lee@mediatek.com (mailing list archive)
State New, archived
Headers show
Series Convert pwm-mtk-disp.txt to mediatek,pwm-disp.yaml format | expand

Commit Message

Xinlei Lee (李昕磊) Feb. 16, 2022, 9:32 a.m. UTC
From: Xinlei Lee <xinlei.lee@mediatek.corp-partner.google.com>

Add dt-binding documentation of pwm for MediaTek MT8186 SoC.

Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.corp-partner.google.com>
---
 Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 1 +
 1 file changed, 1 insertion(+)

Comments

Krzysztof Kozlowski Feb. 16, 2022, 10:25 a.m. UTC | #1
On 16/02/2022 10:32, xinlei.lee@mediatek.com wrote:
> From: Xinlei Lee <xinlei.lee@mediatek.corp-partner.google.com>
> 
> Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
> 
> Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.corp-partner.google.com>
> ---
>  Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 


Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>


Best regards,
Krzysztof
Rob Herring (Arm) Feb. 24, 2022, 9:19 p.m. UTC | #2
On Wed, Feb 16, 2022 at 05:32:51PM +0800, xinlei.lee@mediatek.com wrote:
> From: Xinlei Lee <xinlei.lee@mediatek.corp-partner.google.com>
> 
> Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
> 
> Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.corp-partner.google.com>
> ---
>  Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> index 768ab04d3764..1f45b1b8c3d4 100755
> --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> @@ -17,6 +17,7 @@ properties:
>        - mediatek,mt6595-disp-pwm
>        - mediatek,mt8173-disp-pwm
>        - mediatek,mt8183-disp-pwm
> +      - mediatek,mt8186-disp-pwm
>        - mediatek,mt8192-disp-pwm
>        - mediatek,mt8195-disp-pwm

It seems unlikely that every SoC has a different version of h/w for 
something as simple as a PWM. There's not an appropriate fallback? The 
first version from an SoC that has all the features and would work with 
existing driver unchanged?

Rob
Xinlei Lee (李昕磊) Feb. 25, 2022, 6:17 a.m. UTC | #3
On Thu, 2022-02-24 at 15:19 -0600, Rob Herring wrote:
> On Wed, Feb 16, 2022 at 05:32:51PM +0800, xinlei.lee@mediatek.com
> wrote:
> > From: Xinlei Lee <xinlei.lee@mediatek.corp-partner.google.com>
> > 
> > Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
> > 
> > Signed-off-by: Xinlei Lee <
> > xinlei.lee@mediatek.corp-partner.google.com>
> > ---
> >  Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 1 +
> >  1 file changed, 1 insertion(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-
> > disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-
> > disp.yaml
> > index 768ab04d3764..1f45b1b8c3d4 100755
> > --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> > +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> > @@ -17,6 +17,7 @@ properties:
> >        - mediatek,mt6595-disp-pwm
> >        - mediatek,mt8173-disp-pwm
> >        - mediatek,mt8183-disp-pwm
> > +      - mediatek,mt8186-disp-pwm
> >        - mediatek,mt8192-disp-pwm
> >        - mediatek,mt8195-disp-pwm
> 
> It seems unlikely that every SoC has a different version of h/w for 
> something as simple as a PWM. There's not an appropriate fallback?
> The 
> first version from an SoC that has all the features and would work
> with 
> existing driver unchanged?
> 
> Rob

Hi Rob:

Thanks for your suggestion,I agree with your point of view.
If I want to show that different socs are using this disp_pwm, can I
use oneOf with items to achieve this, and reuse the compatiable that is
currently included in the pwm_mtk_disp.c file.
E.g:
- items:
       - enum:
           -mediatek,mt8186-disp-pwm
       - enum:
           -mediatek,mt8183-disp-pwm
What's your suggestion for this program?

Best Regards!
xinlei
Chen-Yu Tsai Feb. 25, 2022, 6:26 a.m. UTC | #4
On Fri, Feb 25, 2022 at 2:18 PM xinlei.lee <xinlei.lee@mediatek.com> wrote:
>
> On Thu, 2022-02-24 at 15:19 -0600, Rob Herring wrote:
> > On Wed, Feb 16, 2022 at 05:32:51PM +0800, xinlei.lee@mediatek.com
> > wrote:
> > > From: Xinlei Lee <xinlei.lee@mediatek.corp-partner.google.com>
> > >
> > > Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
> > >
> > > Signed-off-by: Xinlei Lee <
> > > xinlei.lee@mediatek.corp-partner.google.com>
> > > ---
> > >  Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml | 1 +
> > >  1 file changed, 1 insertion(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-
> > > disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-
> > > disp.yaml
> > > index 768ab04d3764..1f45b1b8c3d4 100755
> > > --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> > > +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
> > > @@ -17,6 +17,7 @@ properties:
> > >        - mediatek,mt6595-disp-pwm
> > >        - mediatek,mt8173-disp-pwm
> > >        - mediatek,mt8183-disp-pwm
> > > +      - mediatek,mt8186-disp-pwm
> > >        - mediatek,mt8192-disp-pwm
> > >        - mediatek,mt8195-disp-pwm
> >
> > It seems unlikely that every SoC has a different version of h/w for
> > something as simple as a PWM. There's not an appropriate fallback?
> > The
> > first version from an SoC that has all the features and would work
> > with
> > existing driver unchanged?
> >
> > Rob
>
> Hi Rob:
>
> Thanks for your suggestion,I agree with your point of view.
> If I want to show that different socs are using this disp_pwm, can I
> use oneOf with items to achieve this, and reuse the compatiable that is
> currently included in the pwm_mtk_disp.c file.
> E.g:
> - items:
>        - enum:
>            -mediatek,mt8186-disp-pwm
>        - enum:
>            -mediatek,mt8183-disp-pwm
> What's your suggestion for this program?

Using Documentation/devicetree/bindings/mmc/mtk-sd.yaml as a reference,
you would have:
  compatible:
    oneOf:
      - enum:
        - mediatek,mt6595-disp-pwm
        - mediatek,mt8173-disp-pwm
        - mediatek,mt8183-disp-pwm
      - items:
        - const: mediatek,mt8186-disp-pwm
        - const: mediatek,mt8183-disp-pwm
      ...

ChenYu


> Best Regards!
> xinlei
> _______________________________________________
> Linux-mediatek mailing list
> Linux-mediatek@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-mediatek
Xinlei Lee (李昕磊) Feb. 25, 2022, 7:22 a.m. UTC | #5
On Fri, 2022-02-25 at 14:26 +0800, Chen-Yu Tsai wrote:
> On Fri, Feb 25, 2022 at 2:18 PM xinlei.lee <xinlei.lee@mediatek.com>
> wrote:
> > 
> > On Thu, 2022-02-24 at 15:19 -0600, Rob Herring wrote:
> > > On Wed, Feb 16, 2022 at 05:32:51PM +0800, xinlei.lee@mediatek.com
> > > wrote:
> > > > From: Xinlei Lee <xinlei.lee@mediatek.corp-partner.google.com>
> > > > 
> > > > Add dt-binding documentation of pwm for MediaTek MT8186 SoC.
> > > > 
> > > > Signed-off-by: Xinlei Lee <
> > > > xinlei.lee@mediatek.corp-partner.google.com>
> > > > ---
> > > >  Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml |
> > > > 1 +
> > > >  1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git
> > > > a/Documentation/devicetree/bindings/pwm/mediatek,pwm-
> > > > disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-
> > > > disp.yaml
> > > > index 768ab04d3764..1f45b1b8c3d4 100755
> > > > --- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-
> > > > disp.yaml
> > > > +++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-
> > > > disp.yaml
> > > > @@ -17,6 +17,7 @@ properties:
> > > >        - mediatek,mt6595-disp-pwm
> > > >        - mediatek,mt8173-disp-pwm
> > > >        - mediatek,mt8183-disp-pwm
> > > > +      - mediatek,mt8186-disp-pwm
> > > >        - mediatek,mt8192-disp-pwm
> > > >        - mediatek,mt8195-disp-pwm
> > > 
> > > It seems unlikely that every SoC has a different version of h/w
> > > for
> > > something as simple as a PWM. There's not an appropriate
> > > fallback?
> > > The
> > > first version from an SoC that has all the features and would
> > > work
> > > with
> > > existing driver unchanged?
> > > 
> > > Rob
> > 
> > Hi Rob:
> > 
> > Thanks for your suggestion,I agree with your point of view.
> > If I want to show that different socs are using this disp_pwm, can
> > I
> > use oneOf with items to achieve this, and reuse the compatiable
> > that is
> > currently included in the pwm_mtk_disp.c file.
> > E.g:
> > - items:
> >        - enum:
> >            -mediatek,mt8186-disp-pwm
> >        - enum:
> >            -mediatek,mt8183-disp-pwm
> > What's your suggestion for this program?
> 
> Using Documentation/devicetree/bindings/mmc/mtk-sd.yaml as a
> reference,
> you would have:
>   compatible:
>     oneOf:
>       - enum:
>         - mediatek,mt6595-disp-pwm
>         - mediatek,mt8173-disp-pwm
>         - mediatek,mt8183-disp-pwm
>       - items:
>         - const: mediatek,mt8186-disp-pwm
>         - const: mediatek,mt8183-disp-pwm
>       ...
> 
> ChenYu
> 
> 
> > Best Regards!
> > xinlei
> > _______________________________________________
> > Linux-mediatek mailing list
> > Linux-mediatek@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/linux-mediatek

Hi chenyu:

Thanks for your suggestion!
I will refer to this file to reuse the already defined disp_pwm.

Best Regards!
xinlei
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
index 768ab04d3764..1f45b1b8c3d4 100755
--- a/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
+++ b/Documentation/devicetree/bindings/pwm/mediatek,pwm-disp.yaml
@@ -17,6 +17,7 @@  properties:
       - mediatek,mt6595-disp-pwm
       - mediatek,mt8173-disp-pwm
       - mediatek,mt8183-disp-pwm
+      - mediatek,mt8186-disp-pwm
       - mediatek,mt8192-disp-pwm
       - mediatek,mt8195-disp-pwm