lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3760d1e6-2121-323b-d962-60e8291d0bb7@ti.com>
Date:   Thu, 27 May 2021 20:49:38 +0300
From:   Grygorii Strashko <grygorii.strashko@...com>
To:     Vignesh Raghavendra <vigneshr@...com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Rob Herring <robh+dt@...nel.org>
CC:     <linux-serial@...r.kernel.org>, <devicetree@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>, <linux-omap@...r.kernel.org>,
        Linux ARM Mailing List <linux-arm-kernel@...ts.infradead.org>
Subject: Re: [PATCH] dt-bindings: serial: Move omap-serial.txt to YAML schema



On 27/05/2021 19:56, Vignesh Raghavendra wrote:
> Convert serial-omap.txt to YAML schema for better checks and documentation.
> 
> Signed-off-by: Vignesh Raghavendra <vigneshr@...com>
> ---
>   .../bindings/serial/omap_serial.txt           |  40 ------
>   .../bindings/serial/ti,omap4-uart.yaml        | 116 ++++++++++++++++++
>   2 files changed, 116 insertions(+), 40 deletions(-)
>   delete mode 100644 Documentation/devicetree/bindings/serial/omap_serial.txt
>   create mode 100644 Documentation/devicetree/bindings/serial/ti,omap4-uart.yaml

Why omap4? Seems ti,omap-uart.yaml is more suitable.

> 
> diff --git a/Documentation/devicetree/bindings/serial/omap_serial.txt b/Documentation/devicetree/bindings/serial/omap_serial.txt
> deleted file mode 100644
> index c2db8cabf2ab..000000000000
> --- a/Documentation/devicetree/bindings/serial/omap_serial.txt
> +++ /dev/null
> @@ -1,40 +0,0 @@
> -OMAP UART controller
> -

[...]

> diff --git a/Documentation/devicetree/bindings/serial/ti,omap4-uart.yaml b/Documentation/devicetree/bindings/serial/ti,omap4-uart.yaml
> new file mode 100644
> index 000000000000..b3e426c24a9e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/serial/ti,omap4-uart.yaml
> @@ -0,0 +1,116 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/serial/ti,omap4-uart.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Bindings for 8250 compliant UARTs on TI's OMAP and K3 SoCs
> +
> +maintainers:
> +  - Vignesh Raghavendra <vigneshr@...com>
> +
> +allOf:
> +  - $ref: /schemas/serial/serial.yaml#
> +  - $ref: /schemas/serial/rs485.yaml#
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - enum:
> +          - ti,am3352-uart
> +          - ti,am4372-uart
> +          - ti,am654-uart
> +          - ti,dra742-uart
> +          - ti,omap2-uart
> +          - ti,omap3-uart
> +          - ti,omap4-uart
> +      - items:
> +          - enum:
> +              - ti,am64-uart
> +              - ti,j721e-uart
> +          - const: ti,am654-uart
> +
> +  ti,hwmods:
> +    description:
> +      Must be "uart<n>", n being the instance number (1-based)
> +      This property is applicable only on legacy platforms mainly omap2/3
> +      and ti81xx and should not be used on other platforms.
> +    $ref: /schemas/types.yaml#/definitions/string
> +    deprecated: true
> +
> +  dmas:
> +    minItems: 1
> +    maxItems: 2
> +
> +  dma-names:
> +    items:
> +      - const: tx
> +      - const: rx
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    minItems: 1
> +    maxItems: 2

Could you add description for interrupts, pls?

> +
> +  clocks:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: fclk
> +
> +  reg-shift:
> +    const: 2
> +  reg-io-width:
> +    const: 4
> +
> +  rts-gpios: true
> +  cts-gpios: true
> +  dtr-gpios: true
> +  dsr-gpios: true
> +  rng-gpios: true
> +  dcd-gpios: true
> +  rs485-rts-delay: true
> +  rs485-rts-active-low: true
> +  rs485-rx-during-tx: true
> +  rs485-rts-active-high: true
> +  linux,rs485-enabled-at-boot-time: true
> +  rts-gpio: true
> +  power-domains: true
> +  clock-frequency: true
> +  current-speed: true
> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +
> +additionalProperties: false
> +
> +if:
> +  properties:
> +    compatible:
> +      oneOf:
> +        - const: ti,omap2-uart
> +        - const: ti,omap3-uart
> +        - const: ti,omap4-uart
> +
> +then:
> +  properties:
> +    ti,hwmods:
> +      items:
> +        - pattern: "^uart([1-9])$"
> +
> +else:
> +  properties:
> +    ti,hwmods: false
> +
> +examples:
> +  - |
> +          uart4: serial@...42000 {
> +                  compatible = "ti,omap3-uart";
> +                  reg = <0x49042000 0x400>;
> +                  interrupts = <80>;
> +                  clock-frequency = <48000000>;
> +          };
> 

-- 
Best regards,
grygorii

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ