From: Rob Herring <robh@kernel.org> To: Martin Devera <devik@eaxlabs.cz> Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@st.com>, Jiri Slaby <jirislaby@kernel.org>, Le Ray <erwan.leray@st.com>, fabrice.gasnier@foss.st.com, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 1/2] dt-bindings: serial: Add rx-tx-swap to stm32-usart Date: Mon, 8 Mar 2021 12:20:40 -0700 [thread overview] Message-ID: <20210308192040.GA2807217@robh.at.kernel.org> (raw) In-Reply-To: <20210302190303.28630-1-devik@eaxlabs.cz> On Tue, Mar 02, 2021 at 08:03:02PM +0100, Martin Devera wrote: > Add new rx-tx-swap property to allow for RX & TX pin swapping. > > Signed-off-by: Martin Devera <devik@eaxlabs.cz> > --- > .../devicetree/bindings/serial/st,stm32-uart.yaml | 32 +++++++++++++++------- > 1 file changed, 22 insertions(+), 10 deletions(-) > > diff --git a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml > index 8631678283f9..6eab2debebb5 100644 > --- a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml > +++ b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml > @@ -9,9 +9,6 @@ maintainers: > > title: STMicroelectronics STM32 USART bindings > > -allOf: > - - $ref: rs485.yaml > - > properties: > compatible: > enum: > @@ -40,6 +37,10 @@ properties: > > uart-has-rtscts: true > > + rx-tx-swap: > + type: boolean > + maxItems: 1 Type is boolean, but 'maxItems' applies to arrays. In any case, this is already defined in serial.yaml, so just 'rx-tx-swap: true' here. > + > dmas: > minItems: 1 > maxItems: 2 > @@ -66,13 +67,24 @@ properties: > linux,rs485-enabled-at-boot-time: true > rs485-rx-during-tx: true > > -if: > - required: > - - st,hw-flow-ctrl > -then: > - properties: > - cts-gpios: false > - rts-gpios: false > +allOf: And add '- $ref: serial.yaml#' here. > + - $ref: rs485.yaml > + - if: > + required: > + - st,hw-flow-ctrl > + then: > + properties: > + cts-gpios: false > + rts-gpios: false > + - if: > + required: > + - rx-tx-swap > + then: > + properties: > + compatible: > + enum: > + - st,stm32f7-uart > + - st,stm32h7-uart The normal pattern is the 'if' has compatible. You can put the other compatible strings in the if, and then 'then' is: then: properties: rx-tx-swap: false Rob
WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org> To: Martin Devera <devik@eaxlabs.cz> Cc: linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Maxime Coquelin <mcoquelin.stm32@gmail.com>, Alexandre Torgue <alexandre.torgue@st.com>, Jiri Slaby <jirislaby@kernel.org>, Le Ray <erwan.leray@st.com>, fabrice.gasnier@foss.st.com, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 1/2] dt-bindings: serial: Add rx-tx-swap to stm32-usart Date: Mon, 8 Mar 2021 12:20:40 -0700 [thread overview] Message-ID: <20210308192040.GA2807217@robh.at.kernel.org> (raw) In-Reply-To: <20210302190303.28630-1-devik@eaxlabs.cz> On Tue, Mar 02, 2021 at 08:03:02PM +0100, Martin Devera wrote: > Add new rx-tx-swap property to allow for RX & TX pin swapping. > > Signed-off-by: Martin Devera <devik@eaxlabs.cz> > --- > .../devicetree/bindings/serial/st,stm32-uart.yaml | 32 +++++++++++++++------- > 1 file changed, 22 insertions(+), 10 deletions(-) > > diff --git a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml > index 8631678283f9..6eab2debebb5 100644 > --- a/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml > +++ b/Documentation/devicetree/bindings/serial/st,stm32-uart.yaml > @@ -9,9 +9,6 @@ maintainers: > > title: STMicroelectronics STM32 USART bindings > > -allOf: > - - $ref: rs485.yaml > - > properties: > compatible: > enum: > @@ -40,6 +37,10 @@ properties: > > uart-has-rtscts: true > > + rx-tx-swap: > + type: boolean > + maxItems: 1 Type is boolean, but 'maxItems' applies to arrays. In any case, this is already defined in serial.yaml, so just 'rx-tx-swap: true' here. > + > dmas: > minItems: 1 > maxItems: 2 > @@ -66,13 +67,24 @@ properties: > linux,rs485-enabled-at-boot-time: true > rs485-rx-during-tx: true > > -if: > - required: > - - st,hw-flow-ctrl > -then: > - properties: > - cts-gpios: false > - rts-gpios: false > +allOf: And add '- $ref: serial.yaml#' here. > + - $ref: rs485.yaml > + - if: > + required: > + - st,hw-flow-ctrl > + then: > + properties: > + cts-gpios: false > + rts-gpios: false > + - if: > + required: > + - rx-tx-swap > + then: > + properties: > + compatible: > + enum: > + - st,stm32f7-uart > + - st,stm32h7-uart The normal pattern is the 'if' has compatible. You can put the other compatible strings in the if, and then 'then' is: then: properties: rx-tx-swap: false Rob _______________________________________________ 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-03-08 19:21 UTC|newest] Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-02-29 16:05 [PATCH 1/2] tty/serial: Add st,swap OF option to stm32-usart Martin Devera 2020-02-29 16:05 ` Martin Devera 2020-02-29 16:05 ` [PATCH 2/2] dt-bindings: serial: Add st,swap " Martin Devera 2020-02-29 16:05 ` Martin Devera 2020-03-10 19:00 ` Rob Herring 2020-03-10 19:00 ` Rob Herring 2020-03-10 19:00 ` Rob Herring 2020-03-20 18:05 ` Rob Herring 2020-03-20 18:05 ` Rob Herring 2021-02-27 16:41 ` [PATCH v2 1/2] tty/serial: Add rx-tx-swap OF option " Martin Devera 2021-02-27 16:41 ` Martin Devera 2021-02-27 16:41 ` [PATCH v2 2/2] dt-bindings: serial: Add rx-tx-swap " Martin Devera 2021-02-27 16:41 ` Martin Devera 2021-03-01 10:36 ` Fabrice Gasnier 2021-03-01 10:36 ` Fabrice Gasnier 2021-03-01 10:28 ` [PATCH v2 1/2] tty/serial: Add rx-tx-swap OF option " Fabrice Gasnier 2021-03-01 10:28 ` Fabrice Gasnier 2021-03-01 22:40 ` Martin DEVERA 2021-03-01 22:40 ` Martin DEVERA 2021-03-02 10:20 ` Fabrice Gasnier 2021-03-02 10:20 ` Fabrice Gasnier 2021-03-02 13:15 ` [PATCH v3 1/2] dt-bindings: serial: Add rx-tx-swap " Martin Devera 2021-03-02 13:15 ` Martin Devera 2021-03-02 13:15 ` [PATCH v3 2/2] tty/serial: Add rx-tx-swap OF option " Martin Devera 2021-03-02 13:15 ` Martin Devera 2021-03-02 17:44 ` Fabrice Gasnier 2021-03-02 17:44 ` Fabrice Gasnier 2021-03-02 19:03 ` [PATCH v4 1/2] dt-bindings: serial: Add rx-tx-swap " Martin Devera 2021-03-02 19:03 ` Martin Devera 2021-03-02 19:03 ` [PATCH v4 2/2] tty/serial: Add rx-tx-swap OF option " Martin Devera 2021-03-02 19:03 ` Martin Devera 2021-03-03 16:06 ` Fabrice Gasnier 2021-03-03 16:06 ` Fabrice Gasnier 2021-03-03 17:23 ` [PATCH v4 1/2] dt-bindings: serial: Add rx-tx-swap " Fabrice Gasnier 2021-03-03 17:23 ` Fabrice Gasnier 2021-03-08 19:20 ` Rob Herring [this message] 2021-03-08 19:20 ` Rob Herring 2021-03-11 21:51 ` [PATCH v5 " Martin Devera 2021-03-11 21:51 ` Martin Devera 2021-03-11 21:51 ` [PATCH v5 2/2] tty/serial: Add rx-tx-swap OF option " Martin Devera 2021-03-11 21:51 ` Martin Devera 2021-03-12 8:15 ` Greg Kroah-Hartman 2021-03-12 8:15 ` Greg Kroah-Hartman 2021-03-12 10:27 ` [PATCH v6 1/2] dt-bindings: serial: Add rx-tx-swap " Martin Devera 2021-03-12 10:27 ` Martin Devera 2021-03-12 10:27 ` [PATCH v6 2/2] tty/serial: Add rx-tx-swap OF option " Martin Devera 2021-03-12 10:27 ` Martin Devera 2021-03-12 14:23 ` [PATCH v6 1/2] dt-bindings: serial: Add rx-tx-swap " Rob Herring 2021-03-12 14:23 ` Rob Herring 2021-03-12 14:56 ` Martin DEVERA 2021-03-12 14:56 ` Martin DEVERA 2021-03-12 15:03 ` Martin DEVERA 2021-03-12 15:03 ` Martin DEVERA 2021-03-12 15:37 ` [PATCH v7 " Martin Devera 2021-03-12 15:37 ` Martin Devera 2021-03-12 15:37 ` [PATCH v7 2/2] tty/serial: Add rx-tx-swap OF option " Martin Devera 2021-03-12 15:37 ` Martin Devera 2021-03-26 14:18 ` Greg Kroah-Hartman 2021-03-26 14:18 ` Greg Kroah-Hartman 2021-03-28 15:43 ` [PATCH v8 1/2] dt-bindings: serial: Add rx-tx-swap " Martin Devera 2021-03-28 15:43 ` Martin Devera 2021-03-28 15:43 ` [PATCH v8 2/2] tty/serial: Add rx-tx-swap OF option " Martin Devera 2021-03-28 15:43 ` Martin Devera 2021-03-23 22:30 ` [PATCH v7 1/2] dt-bindings: serial: Add rx-tx-swap " Rob Herring 2021-03-23 22:30 ` Rob Herring 2021-03-02 19:06 ` [PATCH v3 2/2] tty/serial: Add rx-tx-swap OF option " Martin DEVERA 2021-03-02 19:06 ` Martin DEVERA 2020-03-12 9:02 ` [PATCH 1/2] tty/serial: Add st,swap " Greg Kroah-Hartman 2020-03-12 9:02 ` Greg Kroah-Hartman
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=20210308192040.GA2807217@robh.at.kernel.org \ --to=robh@kernel.org \ --cc=alexandre.torgue@st.com \ --cc=devicetree@vger.kernel.org \ --cc=devik@eaxlabs.cz \ --cc=erwan.leray@st.com \ --cc=fabrice.gasnier@foss.st.com \ --cc=gregkh@linuxfoundation.org \ --cc=jirislaby@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-serial@vger.kernel.org \ --cc=linux-stm32@st-md-mailman.stormreply.com \ --cc=mcoquelin.stm32@gmail.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.