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=-16.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 3F437C48BDF for ; Fri, 18 Jun 2021 14:58:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2A71861369 for ; Fri, 18 Jun 2021 14:58:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234873AbhFRPAz (ORCPT ); Fri, 18 Jun 2021 11:00:55 -0400 Received: from mail.kernel.org ([198.145.29.99]:47992 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234850AbhFRPAt (ORCPT ); Fri, 18 Jun 2021 11:00:49 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D986E613E2; Fri, 18 Jun 2021 14:58:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624028319; bh=gvrE5ecmlT4/FJKe+nQLJWvVfWI7v2fx8UJbL88CJ6c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=svMQTztnr9GKpMNR9Y/NwF8epArs/6gpDgjNvAHOwxcwN43nSKdwNZ5E2KLpl47IS g9B0ZsU4NMePu8tYu+5aUXUIO4qBODIBU0vQn49jzDM1m93Xta40Zro/KzYoQO0M9l b3dWG0wuUFAYO7/AQKKJBMnCvQQgMIF9JWETDJNbZdvp2QeGu3tKCY4DgHIG+BVktL TLSQDIyz4hVPO/zKt9628GmUtQKGQJo7/j0Es9CeK/nBt+C531F83f/eWNROPrLzAQ omtgg8VQDMVogAFa2F6/mdqWctbO2q/xdrvL2D4CgmCG1kzm+DG835djNimxyJXkW9 OW7nKhnkWliGA== Received: by mail-ed1-f41.google.com with SMTP id z12so9093116edc.1; Fri, 18 Jun 2021 07:58:39 -0700 (PDT) X-Gm-Message-State: AOAM531dsyGeZWDr98BHWVLaezI06X65W+TH0RcqmlaFDrMHIQGELmzY ImcMLb17ladRfR58j4ZUh4/KE2lSW3UEZE0NuQ== X-Google-Smtp-Source: ABdhPJzjuPtUFgRoKPpwhgygmJo+XsY1mLgW7cvQlyXBImHd5SJrSyJAg5MMSnN+gKu8gb6MezHJJaAsCFWdWGhbg3E= X-Received: by 2002:aa7:cac9:: with SMTP id l9mr5414748edt.373.1624028318425; Fri, 18 Jun 2021 07:58:38 -0700 (PDT) MIME-Version: 1.0 References: <20210610182227.2480-1-vigneshr@ti.com> In-Reply-To: <20210610182227.2480-1-vigneshr@ti.com> From: Rob Herring Date: Fri, 18 Jun 2021 08:58:26 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] dt-bindings: serial: Move omap-serial.txt to YAML schema To: Vignesh Raghavendra Cc: Greg Kroah-Hartman , "open list:SERIAL DRIVERS" , devicetree@vger.kernel.org, Linux ARM Mailing List , Tony Lindgren , linux-omap , Nishanth Menon , Grygorii Strashko Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Jun 10, 2021 at 12:22 PM Vignesh Raghavendra wrote: > > Convert serial-omap.txt to YAML schema for better checks and documentation. > > Signed-off-by: Vignesh Raghavendra > --- > > v2: > *Drop reg-io-width and reg-shift as they are constant and documented in > txt bindings (also not used by driver). > *Drop unused label in example. > *Rename file to 8250_omap.yaml to be more generic as IP is present in > varies families of TI SoCs. > *Add description for interrupt entries > > .../devicetree/bindings/serial/8250_omap.yaml | 118 ++++++++++++++++++ > .../bindings/serial/omap_serial.txt | 40 ------ > 2 files changed, 118 insertions(+), 40 deletions(-) > create mode 100644 Documentation/devicetree/bindings/serial/8250_omap.yaml > delete mode 100644 Documentation/devicetree/bindings/serial/omap_serial.txt > > diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml > new file mode 100644 > index 000000000000..1c826fcf5828 > --- /dev/null > +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml > @@ -0,0 +1,118 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/serial/8250_omap.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Bindings for 8250 compliant UARTs on TI's OMAP2+ and K3 SoCs > + > +maintainers: > + - Vignesh Raghavendra > + > +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 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 > + description: > + First entry is module IRQ required for normal IO operation. > + Second entry is optional and corresponds to system wakeup IRQ > + where supported. interrupts: minItems: 1 items: - description: module IRQ required for normal IO operation - description: system wakeup IRQ > + > + clocks: > + maxItems: 1 > + > + clock-names: > + const: fclk > + > + 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 Do you want to support serial attached devices? If so, you need: unevaluatedProperties: false You can also drop listing all the inherited properties from the included schemas. > + > +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: > + - | > + serial@49042000 { > + compatible = "ti,omap3-uart"; > + reg = <0x49042000 0x400>; > + interrupts = <80>; > + dmas = <&sdma 81 &sdma 82>; > + dma-names = "tx", "rx"; > + ti,hwmods = "uart4"; > + clock-frequency = <48000000>; > + }; > 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 > - > -Required properties: > -- compatible : should be "ti,am64-uart", "ti,am654-uart" for AM64 controllers > -- compatible : should be "ti,j721e-uart", "ti,am654-uart" for J721E controllers > -- compatible : should be "ti,am654-uart" for AM654 controllers > -- compatible : should be "ti,omap2-uart" for OMAP2 controllers > -- compatible : should be "ti,omap3-uart" for OMAP3 controllers > -- compatible : should be "ti,omap4-uart" for OMAP4 controllers > -- compatible : should be "ti,am4372-uart" for AM437x controllers > -- compatible : should be "ti,am3352-uart" for AM335x controllers > -- compatible : should be "ti,dra742-uart" for DRA7x controllers > -- reg : address and length of the register space > -- interrupts or interrupts-extended : Should contain the uart interrupt > - specifier or both the interrupt > - controller phandle and interrupt > - specifier. > -- ti,hwmods : Must be "uart", n being the instance number (1-based) > - > -Optional properties: > -- clock-frequency : frequency of the clock input to the UART > -- dmas : DMA specifier, consisting of a phandle to the DMA controller > - node and a DMA channel number. > -- dma-names : "rx" for receive channel, "tx" for transmit channel. > -- rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt > -- rs485-rts-active-high: drive RTS high when sending (default is low). > -- clocks: phandle to the functional clock as per > - Documentation/devicetree/bindings/clock/clock-bindings.txt > - > -Example: > - > - uart4: serial@49042000 { > - compatible = "ti,omap3-uart"; > - reg = <0x49042000 0x400>; > - interrupts = <80>; > - dmas = <&sdma 81 &sdma 82>; > - dma-names = "tx", "rx"; > - ti,hwmods = "uart4"; > - clock-frequency = <48000000>; > - }; > -- > 2.32.0 > 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.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable 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 33E65C48BE8 for ; Fri, 18 Jun 2021 15:00:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id EF60861260 for ; Fri, 18 Jun 2021 15:00:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF60861260 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=3pxrH1f9Hv0g/TAPYwUTE7TqzBfnJXh5L1yJgaDl9AM=; b=VP5vbWohLK1f49 p3mPGxNBakU7LbZC5Ejc2oKeZTHp5Ojtf4zFqPvdB45p9NPEwxDCuBTeTN7g+CCAtxi/Q+gGHRPso hzuJqck+QVlUXKSoFhfGPIh3v5MKfb2mnfIpCrquPkK7biHdpZQ7GI5uijBP3b3V0X+FqvAGwKAkG 87GDQwmisJun3eq6lt87ZQwfsQ2Ai4dPLFTFs2y1gN5lm7O192BSMVXo74kZBiO0L4ZKDmpTLFNtn n6B/3KiYKpEiL+21zuk8votmAAluifGggqMAn9u9Oog2OLVrPBn7gaG+BZdzU8a7PvqFgQWyX2ETh LVU8rY2mLL9mfq71WJVA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1luFxF-00Eadt-KV; Fri, 18 Jun 2021 14:58:45 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1luFxA-00Eaci-Gw for linux-arm-kernel@lists.infradead.org; Fri, 18 Jun 2021 14:58:42 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id C859961159 for ; Fri, 18 Jun 2021 14:58:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1624028319; bh=gvrE5ecmlT4/FJKe+nQLJWvVfWI7v2fx8UJbL88CJ6c=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=svMQTztnr9GKpMNR9Y/NwF8epArs/6gpDgjNvAHOwxcwN43nSKdwNZ5E2KLpl47IS g9B0ZsU4NMePu8tYu+5aUXUIO4qBODIBU0vQn49jzDM1m93Xta40Zro/KzYoQO0M9l b3dWG0wuUFAYO7/AQKKJBMnCvQQgMIF9JWETDJNbZdvp2QeGu3tKCY4DgHIG+BVktL TLSQDIyz4hVPO/zKt9628GmUtQKGQJo7/j0Es9CeK/nBt+C531F83f/eWNROPrLzAQ omtgg8VQDMVogAFa2F6/mdqWctbO2q/xdrvL2D4CgmCG1kzm+DG835djNimxyJXkW9 OW7nKhnkWliGA== Received: by mail-ed1-f43.google.com with SMTP id r7so8992804edv.12 for ; Fri, 18 Jun 2021 07:58:39 -0700 (PDT) X-Gm-Message-State: AOAM5307OD86m7lW6wxa7nuGfKwQnd00bf1tqAbc+rwjNDYzZkHHXGjd 7eSAnnb2mHu4jCIKLm6dk9ZQESx5DFepNPxp5Q== X-Google-Smtp-Source: ABdhPJzjuPtUFgRoKPpwhgygmJo+XsY1mLgW7cvQlyXBImHd5SJrSyJAg5MMSnN+gKu8gb6MezHJJaAsCFWdWGhbg3E= X-Received: by 2002:aa7:cac9:: with SMTP id l9mr5414748edt.373.1624028318425; Fri, 18 Jun 2021 07:58:38 -0700 (PDT) MIME-Version: 1.0 References: <20210610182227.2480-1-vigneshr@ti.com> In-Reply-To: <20210610182227.2480-1-vigneshr@ti.com> From: Rob Herring Date: Fri, 18 Jun 2021 08:58:26 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2] dt-bindings: serial: Move omap-serial.txt to YAML schema To: Vignesh Raghavendra Cc: Greg Kroah-Hartman , "open list:SERIAL DRIVERS" , devicetree@vger.kernel.org, Linux ARM Mailing List , Tony Lindgren , linux-omap , Nishanth Menon , Grygorii Strashko X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210618_075840_645941_1041A8C6 X-CRM114-Status: GOOD ( 27.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jun 10, 2021 at 12:22 PM Vignesh Raghavendra wrote: > > Convert serial-omap.txt to YAML schema for better checks and documentation. > > Signed-off-by: Vignesh Raghavendra > --- > > v2: > *Drop reg-io-width and reg-shift as they are constant and documented in > txt bindings (also not used by driver). > *Drop unused label in example. > *Rename file to 8250_omap.yaml to be more generic as IP is present in > varies families of TI SoCs. > *Add description for interrupt entries > > .../devicetree/bindings/serial/8250_omap.yaml | 118 ++++++++++++++++++ > .../bindings/serial/omap_serial.txt | 40 ------ > 2 files changed, 118 insertions(+), 40 deletions(-) > create mode 100644 Documentation/devicetree/bindings/serial/8250_omap.yaml > delete mode 100644 Documentation/devicetree/bindings/serial/omap_serial.txt > > diff --git a/Documentation/devicetree/bindings/serial/8250_omap.yaml b/Documentation/devicetree/bindings/serial/8250_omap.yaml > new file mode 100644 > index 000000000000..1c826fcf5828 > --- /dev/null > +++ b/Documentation/devicetree/bindings/serial/8250_omap.yaml > @@ -0,0 +1,118 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/serial/8250_omap.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Bindings for 8250 compliant UARTs on TI's OMAP2+ and K3 SoCs > + > +maintainers: > + - Vignesh Raghavendra > + > +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 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 > + description: > + First entry is module IRQ required for normal IO operation. > + Second entry is optional and corresponds to system wakeup IRQ > + where supported. interrupts: minItems: 1 items: - description: module IRQ required for normal IO operation - description: system wakeup IRQ > + > + clocks: > + maxItems: 1 > + > + clock-names: > + const: fclk > + > + 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 Do you want to support serial attached devices? If so, you need: unevaluatedProperties: false You can also drop listing all the inherited properties from the included schemas. > + > +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: > + - | > + serial@49042000 { > + compatible = "ti,omap3-uart"; > + reg = <0x49042000 0x400>; > + interrupts = <80>; > + dmas = <&sdma 81 &sdma 82>; > + dma-names = "tx", "rx"; > + ti,hwmods = "uart4"; > + clock-frequency = <48000000>; > + }; > 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 > - > -Required properties: > -- compatible : should be "ti,am64-uart", "ti,am654-uart" for AM64 controllers > -- compatible : should be "ti,j721e-uart", "ti,am654-uart" for J721E controllers > -- compatible : should be "ti,am654-uart" for AM654 controllers > -- compatible : should be "ti,omap2-uart" for OMAP2 controllers > -- compatible : should be "ti,omap3-uart" for OMAP3 controllers > -- compatible : should be "ti,omap4-uart" for OMAP4 controllers > -- compatible : should be "ti,am4372-uart" for AM437x controllers > -- compatible : should be "ti,am3352-uart" for AM335x controllers > -- compatible : should be "ti,dra742-uart" for DRA7x controllers > -- reg : address and length of the register space > -- interrupts or interrupts-extended : Should contain the uart interrupt > - specifier or both the interrupt > - controller phandle and interrupt > - specifier. > -- ti,hwmods : Must be "uart", n being the instance number (1-based) > - > -Optional properties: > -- clock-frequency : frequency of the clock input to the UART > -- dmas : DMA specifier, consisting of a phandle to the DMA controller > - node and a DMA channel number. > -- dma-names : "rx" for receive channel, "tx" for transmit channel. > -- rs485-rts-delay, rs485-rx-during-tx, linux,rs485-enabled-at-boot-time: see rs485.txt > -- rs485-rts-active-high: drive RTS high when sending (default is low). > -- clocks: phandle to the functional clock as per > - Documentation/devicetree/bindings/clock/clock-bindings.txt > - > -Example: > - > - uart4: serial@49042000 { > - compatible = "ti,omap3-uart"; > - reg = <0x49042000 0x400>; > - interrupts = <80>; > - dmas = <&sdma 81 &sdma 82>; > - dma-names = "tx", "rx"; > - ti,hwmods = "uart4"; > - clock-frequency = <48000000>; > - }; > -- > 2.32.0 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel