From: Vignesh Raghavendra <vigneshr@ti.com> To: Rob Herring <robh+dt@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>, <devicetree@vger.kernel.org>, Linux ARM Mailing List <linux-arm-kernel@lists.infradead.org>, Tony Lindgren <tony@atomide.com>, linux-omap <linux-omap@vger.kernel.org>, Nishanth Menon <nm@ti.com>, Grygorii Strashko <grygorii.strashko@ti.com> Subject: Re: [PATCH v2] dt-bindings: serial: Move omap-serial.txt to YAML schema Date: Fri, 18 Jun 2021 20:52:26 +0530 [thread overview] Message-ID: <5ef04ae5-e07e-5162-7dad-ace3e2fdeb0d@ti.com> (raw) In-Reply-To: <CAL_JsqLjqtUapkr6ARyaeTduhSghJL-q7hBWGFPm7ubbvqCmJw@mail.gmail.com> On 6/18/21 8:28 PM, Rob Herring wrote: > On Thu, Jun 10, 2021 at 12:22 PM Vignesh Raghavendra <vigneshr@ti.com> wrote: >> >> Convert serial-omap.txt to YAML schema for better checks and documentation. >> >> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> >> --- >> >> 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 <vigneshr@ti.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 >> + 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 > OK, will send a follow up fix as the patch is already queued. >> + >> + 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 > Yes, support for serial client devices is desired, but I see that with "unevaluatedProperties: false" there are no warnings if DT has a property not documented in the schema? Did I miss something? > You can also drop listing all the inherited properties from the > included schemas. Yes, this can be done with "unevaluatedProperties: false". Regards Vignesh
WARNING: multiple messages have this Message-ID (diff)
From: Vignesh Raghavendra <vigneshr@ti.com> To: Rob Herring <robh+dt@kernel.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>, <devicetree@vger.kernel.org>, Linux ARM Mailing List <linux-arm-kernel@lists.infradead.org>, Tony Lindgren <tony@atomide.com>, linux-omap <linux-omap@vger.kernel.org>, Nishanth Menon <nm@ti.com>, Grygorii Strashko <grygorii.strashko@ti.com> Subject: Re: [PATCH v2] dt-bindings: serial: Move omap-serial.txt to YAML schema Date: Fri, 18 Jun 2021 20:52:26 +0530 [thread overview] Message-ID: <5ef04ae5-e07e-5162-7dad-ace3e2fdeb0d@ti.com> (raw) In-Reply-To: <CAL_JsqLjqtUapkr6ARyaeTduhSghJL-q7hBWGFPm7ubbvqCmJw@mail.gmail.com> On 6/18/21 8:28 PM, Rob Herring wrote: > On Thu, Jun 10, 2021 at 12:22 PM Vignesh Raghavendra <vigneshr@ti.com> wrote: >> >> Convert serial-omap.txt to YAML schema for better checks and documentation. >> >> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com> >> --- >> >> 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 <vigneshr@ti.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 >> + 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 > OK, will send a follow up fix as the patch is already queued. >> + >> + 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 > Yes, support for serial client devices is desired, but I see that with "unevaluatedProperties: false" there are no warnings if DT has a property not documented in the schema? Did I miss something? > You can also drop listing all the inherited properties from the > included schemas. Yes, this can be done with "unevaluatedProperties: false". Regards Vignesh _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2021-06-18 15:24 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2021-06-10 18:22 [PATCH v2] dt-bindings: serial: Move omap-serial.txt to YAML schema Vignesh Raghavendra 2021-06-10 18:22 ` Vignesh Raghavendra 2021-06-11 5:19 ` Tony Lindgren 2021-06-11 5:19 ` Tony Lindgren 2021-06-18 14:58 ` Rob Herring 2021-06-18 14:58 ` Rob Herring 2021-06-18 15:22 ` Vignesh Raghavendra [this message] 2021-06-18 15:22 ` Vignesh Raghavendra 2021-06-18 18:55 ` Rob Herring 2021-06-18 18:55 ` Rob Herring
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=5ef04ae5-e07e-5162-7dad-ace3e2fdeb0d@ti.com \ --to=vigneshr@ti.com \ --cc=devicetree@vger.kernel.org \ --cc=gregkh@linuxfoundation.org \ --cc=grygorii.strashko@ti.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=linux-serial@vger.kernel.org \ --cc=nm@ti.com \ --cc=robh+dt@kernel.org \ --cc=tony@atomide.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.