[PATCH v3 01/24] dt-bindings: iommu: mediatek: Convert IOMMU to DT schema

Yong Wu yong.wu at mediatek.com
Tue Oct 6 00:26:55 EDT 2020


On Fri, 2020-10-02 at 13:07 +0200, Krzysztof Kozlowski wrote:
> On Wed, Sep 30, 2020 at 03:06:24PM +0800, Yong Wu wrote:
> > Convert MediaTek IOMMU to DT schema.
> > 
> > Signed-off-by: Yong Wu <yong.wu at mediatek.com>
> > ---
> >  .../bindings/iommu/mediatek,iommu.txt         | 103 ------------
> >  .../bindings/iommu/mediatek,iommu.yaml        | 154 ++++++++++++++++++
> >  2 files changed, 154 insertions(+), 103 deletions(-)
> >  delete mode 100644 Documentation/devicetree/bindings/iommu/mediatek,iommu.txt
> >  create mode 100644 Documentation/devicetree/bindings/iommu/mediatek,iommu.yaml
> > 

[...]

> > +properties:
> > +  compatible:
> > +    oneOf:
> > +      - enum:
> > +          - mediatek,mt2701-m4u # mt2701 generation one HW
> > +          - mediatek,mt2712-m4u # mt2712 generation two HW
> > +          - mediatek,mt6779-m4u # mt6779 generation two HW
> > +          - mediatek,mt8173-m4u # mt8173 generation two HW
> > +          - mediatek,mt8183-m4u # mt8183 generation two HW
> > +
> > +      - description: mt7623 generation one HW
> > +        items:
> > +          - const: mediatek,mt7623-m4u
> > +          - const: mediatek,mt2701-m4u
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +
> > +  clocks:
> > +    description: |
> > +      bclk is optional. here is the list which require this bclk:
> > +      mt2701, mt2712, mt7623 and mt8173.
> 
> Similarly to my comment in other patch, this should be part of schema
> within 'if-then'.

Thanks for the review.

I will change like this:

=============
  clocks:
    items:
      - description: bclk is the block clock.

  clock-names:
    items:
      - const: bclk

required:
  - compatible
  - reg
  - interrupts
  - mediatek,larbs
  - '#iommu-cells'
if:
  properties:
    compatible:
      contains:
        enum:
          - mediatek,mt2701-m4u
          - mediatek,mt2712-m4u
          - mediatek,mt8173-m4u

then:
 required:
   - clocks
==============

If this is not right, please tell me.
(dt_binding_check is ok.)

> 
> Best regards,
> Krzysztof



More information about the Linux-mediatek mailing list