From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.0 required=3.0 tests=BAYES_00,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91F46C432BE for ; Mon, 2 Aug 2021 21:24:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6ED6160F4B for ; Mon, 2 Aug 2021 21:24:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230050AbhHBVY3 (ORCPT ); Mon, 2 Aug 2021 17:24:29 -0400 Received: from mail-il1-f176.google.com ([209.85.166.176]:40781 "EHLO mail-il1-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229567AbhHBVY2 (ORCPT ); Mon, 2 Aug 2021 17:24:28 -0400 Received: by mail-il1-f176.google.com with SMTP id d10so17759713ils.7; Mon, 02 Aug 2021 14:24:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tuVZ24LVGMoBzY6dKcuqHBiIi1ycbFa41YAKYiSlnEU=; b=m3cWAf31IBxGk/kHBaG/a7m+obK7N3wd9dGFXwvxX1MdQwIVxWmdYznFdpLzO3SFXo LqrVXkd2rp+x90GjqNj+GGEFnE2AlxcV1mVAlKR/LYbjhghyZrtYqJG7o0MKclTjXgwD PAB+trDoFJQh8qkPvKYvxUEzfTTYOx9Bh1EHklmypR3GDLMhGdBeF3wPGAiEkWuCn34e +z12mw2e3ni1OYlToxGLsxZlGHVZlod1sp4J24DVdVwCbYSptG/WVqjx2AScjxNBmcJO MblJtCv27utEyrsfjtn5LeJYFkYt4h61m+hGrSB/dECfN2OuzAc/cLw2yhxS5AV5qX59 m89Q== X-Gm-Message-State: AOAM533rtkAYVLf7uoooXl7/gJrbZHl/nC+suRNNZ2MpzvP/OGDHUAtC 8rQzVQU/+/hoz5Fb/2543A== X-Google-Smtp-Source: ABdhPJyelfwLh59fnuv6TYF7OQgdh2i7svgVS8hXg0hxqVdxCNAZn65bZTLeZnDbA9sl5YLkksGwVg== X-Received: by 2002:a92:190f:: with SMTP id 15mr1294800ilz.45.1627939458494; Mon, 02 Aug 2021 14:24:18 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.248]) by smtp.gmail.com with ESMTPSA id t1sm6359686ilf.34.2021.08.02.14.24.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Aug 2021 14:24:17 -0700 (PDT) Received: (nullmailer pid 1638528 invoked by uid 1000); Mon, 02 Aug 2021 21:24:16 -0000 Date: Mon, 2 Aug 2021 15:24:16 -0600 From: Rob Herring To: Sean Anderson Cc: Peter Korsgaard , Peter Korsgaard , linux-serial@vger.kernel.org, Greg Kroah-Hartman , Michal Simek , Shubhrajyoti Datta , Alexander Sverdlin , devicetree@vger.kernel.org Subject: Re: [PATCH v2 2/4] dt-bindings: serial: uartlite: Add properties for synthesis-time parameters Message-ID: References: <20210727221740.1997731-1-sean.anderson@seco.com> <20210727221740.1997731-3-sean.anderson@seco.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210727221740.1997731-3-sean.anderson@seco.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Tue, Jul 27, 2021 at 06:17:38PM -0400, 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. Although these properties > are marked as "required", note that only current-speed is required by > the driver itself. Hopefully, this will allow for an easier transition. > > Signed-off-by: Sean Anderson > --- > > (no changes since v1) > > .../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 default with required doesn't make sense as 'default' what value is assumed in the property isn't present. > + 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 > > 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>; > }; > ... > -- > 2.25.1 > >