Re: [PATCH v2 2/5] dt-bindings: iommu: verisilicon: Add binding for VSI IOMMU
From: Nicolas Dufresne
Date: Wed Jun 18 2025 - 12:55:04 EST
Le mercredi 18 juin 2025 à 16:55 +0100, Conor Dooley a écrit :
> On Wed, Jun 18, 2025 at 04:09:11PM +0200, Benjamin Gaignard wrote:
> > Add a device tree binding for the Verisilicon (VSI) IOMMU.
> > This IOMMU sits in front of hardware encoder and decoder
> > blocks on SoCs using Verisilicon IP, such as the Rockchip RK3588.
> >
> > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@xxxxxxxxxxxxx>
> > ---
> > changes in version 2:
> > - Add a compatible "rockchip,rk3588-av1-iommu"
> > - Fix clock-names in binding
> > - Remove "vsi_mmu" label in binding example.
> >
> > .../bindings/iommu/verisilicon,iommu.yaml | 72 +++++++++++++++++++
> > 1 file changed, 72 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/iommu/verisilicon,iommu.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/iommu/verisilicon,iommu.yaml
> > b/Documentation/devicetree/bindings/iommu/verisilicon,iommu.yaml
> > new file mode 100644
> > index 000000000000..9ae4a45d76f4
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iommu/verisilicon,iommu.yaml
> > @@ -0,0 +1,72 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iommu/verisilicon,iommu.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Verisilicon IOMMU
> > +
> > +maintainers:
> > + - Benjamin Gaignard <benjamin.gaignard@xxxxxxxxxxxxx>
> > +
> > +description: |+
> > + A Versilicon iommu translates io virtual addresses to physical addresses for
> > + its associated video decoder.
> > +
> > +properties:
> > + compatible:
> > + oneOf:
> > + - enum:
> > + - verisilicon,iommu
> > + - rockchip,rk3588-av1-iommu
>
> This isn't right. Firstly, the "oneOf: - enum" construct doesn't do
> anything. oneOf one item is just the item. Secondly this still allows
> verisilicon,iommu in isolation which is not okay. What you actually want
> here is
> items:
> - const: a
> - const: b
>
> Thirdly, Nicolas mentioned that the version of this iommu is 1.2.0,
> which I would like to see reflected in the compatible.
I believe just 1.2 will be sufficient, the last number is the build number,
the IP is interface is unchanged.
Nicolas
Attachment:
signature.asc
Description: This is a digitally signed message part