> ---------------------------------------------------------------------- > Hey Witold, > > On Wed, May 08, 2024 at 06:05:20PM -0700, Witold Sadowski wrote: > > > allOf: > > - $ref: spi-controller.yaml# > > + - if: > > + properties: > > + compatible: > > + contains: > > + const: marvell,cn10-xspi-nor > > + then: > > + properties: > > + reg-names: > > + items: > > + - const: io > > + - const: sdma > > + - const: aux > > + - const: xferbase > > + reg: > > + items: > > + - description: address and length of the controller > register set > > + - description: address and length of the Slave DMA data > port > > + - description: address and length of the auxiliary > registers > > + - description: address and length of the xfer registers > > + else: > > + properties: > > + reg-names: > > + items: > > + - const: io > > + - const: sdma > > + - const: aux > > + reg: > > + items: > > + - description: address and length of the controller > register set > > + - description: address and length of the Slave DMA data > port > > + - description: address and length of the auxiliary > > + registers > > The usual approach here is to define the loosest possible constraints at > the top level, so unconditionally define the xfer register region, and > then constrain things based on compatible. In this case, you can set > minItems to 3 unconditionally and then do (in psuedocode): > if: > marvell > then: > reg: > minitems: 4 > else > reg: > maxItems: 3 > > Additionally, when the allOf: is more then just references to other > documents, it should be moved below the required list. Thanks for hints. Yaml file will be reworked to match guideliness > > Thanks, > Conor. Regards Witek