From patchwork Tue Mar 2 13:15:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Devera X-Patchwork-Id: 392484 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=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT 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 1D183C2BA13 for ; Wed, 3 Mar 2021 02:20:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DF95664E75 for ; Wed, 3 Mar 2021 02:20:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349164AbhCCCRb (ORCPT ); Tue, 2 Mar 2021 21:17:31 -0500 Received: from ms9.eaxlabs.cz ([147.135.177.209]:47084 "EHLO ms9.eaxlabs.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1575729AbhCBPgw (ORCPT ); Tue, 2 Mar 2021 10:36:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=eaxlabs.cz; s=mail; h=References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=65e45oHZO+BxFf5UqN9fVtID/K010U91Mz2QcQ/swdo=; b=W0CSeYqtKX1Fo9IiZ2gD/lsrmkNl5mc18rDmr54RX98DO+epfDea2DwP1u8Ik3EoRQvjtTb2uy5nGXqoOg+buliEafOYLrkLFjYbrOgkHUmOkJj63n0UW8I0hDiBZu8HkX4iC0aRyAGna93+b8jpO3SgbXOJfUwhVqM09mFsjag=; Received: from [82.99.129.6] (helo=localhost.localdomain) by ms9.eaxlabs.cz with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1lH4sj-0000g6-Un; Tue, 02 Mar 2021 14:16:12 +0100 From: Martin Devera To: linux-kernel@vger.kernel.org Cc: Martin Devera , Greg Kroah-Hartman , Rob Herring , Maxime Coquelin , Alexandre Torgue , Jiri Slaby , Le Ray , 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: [PATCH v3 1/2] dt-bindings: serial: Add rx-tx-swap to stm32-usart Date: Tue, 2 Mar 2021 14:15:57 +0100 Message-Id: <20210302131558.19375-1-devik@eaxlabs.cz> X-Mailer: git-send-email 2.11.0 In-Reply-To: <439a0d7a-cc0e-764b-7ed8-668b5a85f4a7@foss.st.com> References: <439a0d7a-cc0e-764b-7ed8-668b5a85f4a7@foss.st.com> Precedence: bulk List-ID: X-Mailing-List: linux-serial@vger.kernel.org Add new rx-tx-swap property to allow for RX & TX pin swapping. Signed-off-by: Martin Devera --- .../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 + 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: + - $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 required: - compatible