From patchwork Tue Mar 2 19:03:02 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Martin Devera X-Patchwork-Id: 12113723 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.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT 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 7A2B0C433E0 for ; Wed, 3 Mar 2021 15:36:52 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 DBBB464EBD for ; Wed, 3 Mar 2021 15:36:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org DBBB464EBD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=eaxlabs.cz 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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:MIME-Version:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:References:In-Reply-To:Message-Id:Date:Subject:Cc:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=McHEyUQNeO/xXhBB08AEOS7U6/umI9cmS60/oggUeT8=; b=f5BPZMBIc34+D+YRkV2y1hYUAf s5M0liNj0piRvlex7b9Z8Wieplan6RjyLx56VMvNqqbz1jHjZfJNHunko58PmFN/xghqNlTpnTNZJ g5uMLE0jolZkLub2GSQWrgb3O8WjlGoKQwfxHBSCGOz9H17YgwjtC31jsukeWH3BpkQKQynZljPuh ZH2sWdNriNKeUrzmP66jCuVtM0MClqftIsGdt6XJJ5Q62/agvrebJTFxO7RrWpNfRACEYGj4scHVt XzxKHOMww9z9ey4QxX1JHRBQ03MKskcO2pbDK9H0tLi2ZLbjln5XoNBbf0BiuWoBa0YRJBTllejfu CzXu/t1w==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lHTWS-005PJs-Gm; Wed, 03 Mar 2021 15:34:49 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHSU8-0058BQ-MY for linux-arm-kernel@desiato.infradead.org; Wed, 03 Mar 2021 14:28:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description; bh=65e45oHZO+BxFf5UqN9fVtID/K010U91Mz2QcQ/swdo=; b=O4qswpXJCoXVQX32xS9ecx1wjT dETsa/ab7CEG7/0k9PVZJqtZMWWJzShC5a+W8fBBkGmQcjsJbmjQymIO9kkqGa6EOiB7EGLW3lOJE 7zRue/TvF73A+wPY7eQGek31rJtYLbyHkNzT7WrZLr5zL/2FQICFk6Mwfi0otSO/nqfBIOn50iIbU yLmW7OpeMpMH+sNjwNrgHPqtEePa7E0stPaJHZ7bPMYl6y5atIM3E4yI9EP3WZrkN/42xdfqyrz2M avznd2jSBZGyEk3Tavy7IopYZncpV7MPaK/cetPhU/9k9jMN6gHglQu99s2OUOVenrrTF8c+K3oJL cpJkhYVw==; Received: from ms9.eaxlabs.cz ([147.135.177.209]) by casper.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lHAIn-0007cf-IP for linux-arm-kernel@lists.infradead.org; Tue, 02 Mar 2021 19:03:26 +0000 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=EDAtFQZ9mVFD65Wff/a94mHlD9FCA6zVKQueKKYilfU3rhnQR4/xuDvTEry+n7OtG5lR54ychj7JxOF2ANKxGfpGjZgsSY0uoYSHBF/LvtumbmdaaRxMbYsXU5+wcfT2VffoR89NzyhIFtMWmSSw7QtQ+RHAIqQaOqQrJqUIZd8=; 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 1lHAIX-000335-MD; Tue, 02 Mar 2021 20:03:11 +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 v4 1/2] dt-bindings: serial: Add rx-tx-swap to stm32-usart Date: Tue, 2 Mar 2021 20:03:02 +0100 Message-Id: <20210302190303.28630-1-devik@eaxlabs.cz> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210302_190326_216553_E82569FB X-CRM114-Status: UNSURE ( 9.05 ) X-CRM114-Notice: Please train this message. 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add new rx-tx-swap property to allow for RX & TX pin swapping. Signed-off-by: Martin Devera Acked-by: Fabrice Gasnier --- .../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