@@ -72,13 +72,21 @@ properties:
patternProperties:
"^serial@[0-9a-f]+$":
- type: object
+ $ref: /schemas/serial/atmel,at91-usart.yaml
description:
- Child node describing USART. See atmel-usart.txt for details
- of USART bindings.
+ Child node describing USART.
"^spi@[0-9a-f]+$":
- $ref: /schemas/spi/atmel,at91rm9200-spi.yaml
+ allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: atmel,at91sam9260-usart
+ then:
+ $ref: /schemas/serial/atmel,at91-usart.yaml
+ else:
+ $ref: /schemas/spi/atmel,at91rm9200-spi.yaml
description:
Child node describing SPI.
FLEXCOM, among other functionalities, has the ability to offer the USART serial communication protocol. To have the FLEXCOM binding properly validate its USART children nodes, we must reference the correct binding. To differentiate between the SPI of FLEXCOM and the SPI of USART in SPI mode, use the compatible string. Signed-off-by: Sergiu Moga <sergiu.moga@microchip.com> --- v1 -> v2: - Nothing v2 -> v3: - Previously [PATCH 7] - Compare devices based on the compatible instead of the clock .../bindings/mfd/atmel,sama5d2-flexcom.yaml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-)