From: Michal Simek <michal.simek@xilinx.com>
To: Sean Anderson <sean.anderson@seco.com>,
Peter Korsgaard <peter.korsgaard@barco.com>,
Peter Korsgaard <peter@korsgaard.com>,
<linux-serial@vger.kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Alexander Sverdlin <alexander.sverdlin@nokia.com>,
Michal Simek <michal.simek@xilinx.com>,
Rob Herring <robh@kernel.org>, <devicetree@vger.kernel.org>
Subject: Re: [PATCH 2/5] dt-bindings: serial: uartlite: Add properties for synthesis-time parameters
Date: Mon, 26 Jul 2021 14:30:21 +0200 [thread overview]
Message-ID: <a4ec376c-7208-aaf8-344f-fc3b6a31aedc@xilinx.com> (raw)
In-Reply-To: <20210723223152.648326-3-sean.anderson@seco.com>
On 7/24/21 12:31 AM, Sean Anderson wrote:
> The uartlite device is a "soft" device. Many parameters, such as baud
> rate, data bits, and the presence of a parity bit are configured before
> synthesis and may not be changed (or discovered) at runtime. However, we
> must know what these settings are in order to properly calculate the
> uart timeout (and to inform the user about the actual baud of the uart).
>
> These properties are present for out-of-tree bindings generated by
> Xilinx's tools. However, they are also (mostly) present in in-tree
> bindings. I chose current-speed over xlnx,baudrate primarily because it
> seemed to be used by more existing bindings.
>
> Signed-off-by: Sean Anderson <sean.anderson@seco.com>
> ---
>
> .../bindings/serial/xlnx,opb-uartlite.yaml | 39 +++++++++++++++++++
> 1 file changed, 39 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml b/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml
> index 4ef29784ae97..28859e70e60f 100644
> --- a/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml
> +++ b/Documentation/devicetree/bindings/serial/xlnx,opb-uartlite.yaml
> @@ -32,13 +32,49 @@ properties:
> clock-names:
> const: s_axi_aclk
>
> + current-speed:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + The fixed baud rate that the device was configured for.
> +
> + xlnx,data-bits:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [5, 6, 7, 8]
> + default: 8
> + description:
> + The fixed number of data bits that the device was configured for.
> +
> + xlnx,use-parity:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> + default: 0
> + description:
> + Whether parity checking was enabled when the device was configured.
> +
> + xlnx,odd-parity:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [0, 1]
> + description:
> + Whether odd parity was configured.
> +
> required:
> - compatible
> - reg
> - interrupts
> + - current-speed
> + - xlnx,data-bits
> + - xlnx,use-parity
I think all of these should be optional properties because were required
in past. Likely a lot of xilinx dt binding files have them but as it is
visible sh also has it without it.
M
>
> allOf:
> - $ref: /schemas/serial.yaml#
> + - if:
> + properties:
> + xlnx,use-parity:
> + contains:
> + const: 1
> + then:
> + required:
> + - xlnx,odd-parity
>
> additionalProperties: true
>
> @@ -49,5 +85,8 @@ examples:
> reg = <0x800c0000 0x10000>;
> interrupts = <0x0 0x6e 0x1>;
> port-number = <0>;
> + current-speed = <115200>;
> + xlnx,data-bits = <8>;
> + xlnx,use-parity = <0>;
> };
> ...
>
next prev parent reply other threads:[~2021-07-26 12:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-23 22:31 [PATCH 0/5] tty: serial: uartlite: Disable changing fixed parameters Sean Anderson
2021-07-23 22:31 ` [PATCH 1/5] dt-bindings: serial: uartlite: Convert to json-schema Sean Anderson
2021-07-23 22:31 ` [PATCH 2/5] dt-bindings: serial: uartlite: Add properties for synthesis-time parameters Sean Anderson
2021-07-26 12:30 ` Michal Simek [this message]
2021-07-26 15:16 ` Sean Anderson
2021-07-26 14:19 ` [PATCH 0/5] tty: serial: uartlite: Disable changing fixed parameters Michal Simek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a4ec376c-7208-aaf8-344f-fc3b6a31aedc@xilinx.com \
--to=michal.simek@xilinx.com \
--cc=alexander.sverdlin@nokia.com \
--cc=devicetree@vger.kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-serial@vger.kernel.org \
--cc=peter.korsgaard@barco.com \
--cc=peter@korsgaard.com \
--cc=robh@kernel.org \
--cc=sean.anderson@seco.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).