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=-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,URIBL_BLOCKED, 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 3F8CBC433E1 for ; Sun, 28 Mar 2021 15:46:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 04DE361999 for ; Sun, 28 Mar 2021 15:46:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230526AbhC1PqH (ORCPT ); Sun, 28 Mar 2021 11:46:07 -0400 Received: from smtp.wifcom.cz ([85.207.3.150]:36824 "EHLO smtp.wifcom.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230247AbhC1Ppp (ORCPT ); Sun, 28 Mar 2021 11:45:45 -0400 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=vpikJD29gomwC8ZCLMcKJZFaNKhjOnwb++xunGrRQQY=; b=FjRxjHgQ/JU0splXWne3o9kBFZy2G/z0jd6nmLeR6XSOjhL04ELAZ2IuF++sSM8g8+6wdfvhIg0D5Ob0hV4qL9oLgvrchpXVWi3dhQy1m3o+SUEM8pro7Pt+jHEgGkEumcvg47lccuzQzrr5dkkV/rQcpEOunnzQ8uzZJ+B4ibk=; 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 v8 1/2] dt-bindings: serial: Add rx-tx-swap to stm32-usart Date: Sun, 28 Mar 2021 17:43:05 +0200 Message-Id: <20210328154306.22674-1-devik@eaxlabs.cz> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-Wif-ss: -1.1 (-) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add new rx-tx-swap property to allow for RX & TX pin swapping. Signed-off-by: Martin Devera Acked-by: Fabrice Gasnier Reviewed-by: Rob Herring --- v8: - rebase to the latest tty-next v7: - fix yaml linter warning v6: - add version changelog v5: - yaml fixes based on Rob Herring comments - add serial.yaml reference - move compatible from 'then' to 'if' v3: - don't allow rx-tx-swap for st,stm32-uart (suggested by Fabrice Gasnier) v2: - change st,swap to rx-tx-swap (suggested by Rob Herring) --- .../devicetree/bindings/serial/st,stm32-uart.yaml | 29 ++++++++++++++-------- 1 file changed, 19 insertions(+), 10 deletions(-) --- .../devicetree/bindings/serial/st,stm32-uart.yaml | 29 ++++++++++++++-------- 1 file changed, 19 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..126e07566965 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,8 @@ properties: uart-has-rtscts: true + rx-tx-swap: true + dmas: minItems: 1 maxItems: 2 @@ -66,13 +65,23 @@ 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# + - $ref: serial.yaml# + - if: + required: + - st,hw-flow-ctrl + then: + properties: + cts-gpios: false + rts-gpios: false + - if: + properties: + compatible: + const: st,stm32-uart + then: + properties: + rx-tx-swap: false required: - compatible -- 2.11.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=-17.0 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,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 1CDABC433E0 for ; Mon, 29 Mar 2021 21:38:11 +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 A01B161989 for ; Mon, 29 Mar 2021 21:38:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A01B161989 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=i5Sqju0zrQs1tpFv5RhQfpk7OVQb2g56ogsmCfWGoAg=; b=ddhUOY5Iwm3sQLgd54HTHwbZmT 9oQDVI+qzs+1KqtQvWxVQRWs5ZnOwJCJZgSDqNB/4NsEMBHgXxalBOk7maLvXQ9Kj+PlMHPTjEDzl Sasz5UYbwWV+AIsT7XjRJwqAwH1By9sfRaGhGkKfTpdk2HFP0SmIgpbsn0Sv3QscTtFktp0dZj94L jc6yc40ZIOpYFLDejZMjDoCtBSteqsrnSTFwSeIZdD+0p+W4jE5vlIOAZC22JuiWHnLZm9Pi58dQe vnsDLnxAnUK3B6oKGEwwIXx3lucTZvvrgham4I4sycybYF0VQxrPvbEHT9yKfg/qUSZL4XzcEl321 nUIuhFRQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lQzXt-001UEa-6y; Mon, 29 Mar 2021 21:35:37 +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 1lQovb-000ZZQ-1l for linux-arm-kernel@desiato.infradead.org; Mon, 29 Mar 2021 10:15:23 +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=vpikJD29gomwC8ZCLMcKJZFaNKhjOnwb++xunGrRQQY=; b=K+naSwHVz7mOGMhIM5+DRVeLIi po0sPPpseZ1Dnvjsi1J2Yv08DmjSbVcwhZjMBenUBXE9OkkwbHXYWpo7sGUt8499IgOVg6ECAFOMn 2iSMJSIskIq0nwYP5A8w1R2Q67AvJif2fRvLSWQL744UkVJTNTZGxSOrykV1sfYS22kCWsxBQ0z+U POACHMForcJvaSzy5AURX1F/iTYLEeo71tAWVZgMs6ZAzt6wHqMRSeQYe7I/cBtPjcj3YijUjJe/4 tAeu0MPinC8REHnaPg8MgHnOXpj1d4arlK6jbYidoX8imNzYIpSAY+YCftmJcOJhamB6XEtbUb9br +Pg5LIQw==; Received: from smtp.wifcom.cz ([85.207.3.150]) by casper.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lQXby-000EK4-07 for linux-arm-kernel@lists.infradead.org; Sun, 28 Mar 2021 15:46:08 +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=vpikJD29gomwC8ZCLMcKJZFaNKhjOnwb++xunGrRQQY=; b=FjRxjHgQ/JU0splXWne3o9kBFZy2G/z0jd6nmLeR6XSOjhL04ELAZ2IuF++sSM8g8+6wdfvhIg0D5Ob0hV4qL9oLgvrchpXVWi3dhQy1m3o+SUEM8pro7Pt+jHEgGkEumcvg47lccuzQzrr5dkkV/rQcpEOunnzQ8uzZJ+B4ibk=; 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 v8 1/2] dt-bindings: serial: Add rx-tx-swap to stm32-usart Date: Sun, 28 Mar 2021 17:43:05 +0200 Message-Id: <20210328154306.22674-1-devik@eaxlabs.cz> X-Mailer: git-send-email 2.11.0 In-Reply-To: References: X-Antivirus-Scanner: Clean mail though you should still use an Antivirus X-Wif-ss: -1.1 (-) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210328_164558_484362_31E51AE8 X-CRM114-Status: UNSURE ( 9.00 ) 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 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 Add new rx-tx-swap property to allow for RX & TX pin swapping. Signed-off-by: Martin Devera Acked-by: Fabrice Gasnier Reviewed-by: Rob Herring --- v8: - rebase to the latest tty-next v7: - fix yaml linter warning v6: - add version changelog v5: - yaml fixes based on Rob Herring comments - add serial.yaml reference - move compatible from 'then' to 'if' v3: - don't allow rx-tx-swap for st,stm32-uart (suggested by Fabrice Gasnier) v2: - change st,swap to rx-tx-swap (suggested by Rob Herring) --- .../devicetree/bindings/serial/st,stm32-uart.yaml | 29 ++++++++++++++-------- 1 file changed, 19 insertions(+), 10 deletions(-) --- .../devicetree/bindings/serial/st,stm32-uart.yaml | 29 ++++++++++++++-------- 1 file changed, 19 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..126e07566965 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,8 @@ properties: uart-has-rtscts: true + rx-tx-swap: true + dmas: minItems: 1 maxItems: 2 @@ -66,13 +65,23 @@ 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# + - $ref: serial.yaml# + - if: + required: + - st,hw-flow-ctrl + then: + properties: + cts-gpios: false + rts-gpios: false + - if: + properties: + compatible: + const: st,stm32-uart + then: + properties: + rx-tx-swap: false required: - compatible -- 2.11.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel