Commit 89b96e32 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Rob Herring (Arm)

dt-bindings: serial: add common properties schema for UART children

Properties should be defined in only one place, thus add new
serial-peripheral-props.yaml schema with definition of common properties
for UART-connected devices (children of UART controller): current-speed
and max-speed.  The schema can be referenced by individual devices using
these properties.
Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240811-dt-bindings-serial-peripheral-props-v1-2-1dba258b7492@linaro.orgSigned-off-by: default avatarRob Herring (Arm) <robh@kernel.org>
parent 02929075
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/serial/serial-peripheral-props.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Common Properties for Serial-attached Devices
maintainers:
- Rob Herring <robh@kernel.org>
- Greg Kroah-Hartman <gregkh@linuxfoundation.org>
description:
Devices connected over serial/UART, expressed as children of a serial
controller, might need similar properties, e.g. for configuring the baud
rate.
properties:
max-speed:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The maximum baud rate the device operates at.
This should only be present if the maximum is less than the slave
device can support. For example, a particular board has some
signal quality issue or the host processor can't support higher
baud rates.
current-speed:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
The current baud rate the device operates at.
This should only be present in case a driver has no chance to know
the baud rate of the slave device.
Examples:
* device supports auto-baud
* the rate is setup by a bootloader and there is no way to reset
the device
* device baud rate is configured by its firmware but there is no
way to request the actual settings
additionalProperties: true
...@@ -93,6 +93,7 @@ patternProperties: ...@@ -93,6 +93,7 @@ patternProperties:
type: object type: object
then: then:
additionalProperties: true additionalProperties: true
$ref: serial-peripheral-props.yaml#
description: description:
Serial attached devices shall be a child node of the host UART device Serial attached devices shall be a child node of the host UART device
the slave device is attached to. It is expected that the attached the slave device is attached to. It is expected that the attached
...@@ -104,28 +105,6 @@ patternProperties: ...@@ -104,28 +105,6 @@ patternProperties:
description: description:
Compatible of the device connected to the serial port. Compatible of the device connected to the serial port.
max-speed:
$ref: /schemas/types.yaml#/definitions/uint32
description:
The maximum baud rate the device operates at.
This should only be present if the maximum is less than the slave
device can support. For example, a particular board has some
signal quality issue or the host processor can't support higher
baud rates.
current-speed:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
The current baud rate the device operates at.
This should only be present in case a driver has no chance to know
the baud rate of the slave device.
Examples:
* device supports auto-baud
* the rate is setup by a bootloader and there is no way to reset
the device
* device baud rate is configured by its firmware but there is no
way to request the actual settings
required: required:
- compatible - compatible
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment