Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2801214pxa; Mon, 17 Aug 2020 20:44:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwgnSe7qntXxLxskREcJ6o7+9ro6jc+T81F5PXqAaKF5JWZut4YJTswF/THB7Rvs6/ExG9H X-Received: by 2002:a17:906:ca4d:: with SMTP id jx13mr17822108ejb.548.1597722268068; Mon, 17 Aug 2020 20:44:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597722268; cv=none; d=google.com; s=arc-20160816; b=xaLLLhGGSb3Zh8vSX2rsmI6dk/E+zAwY4HXhmmW8hRYXtOLdRzy9stnUaWUVTUaJQU zUXr7DEiYV71aNWDaZbrSTmQE5NOmXm6YTfQNZ/uTzYyC7lUqFYHMrNASCAkq4L6gdEd eaWIsBDmzLp0igcodAwRgn3cetb8QVYU6pugcKun0Oo6AwMQD/rUS6w63VIZDE9YgLQS FnzAoc+tCgBSvfRPLqK19JQ3CZPbtG8ydT6HgOo1clFAeRQaHuQy10qaeFP5UIe/Wkd2 hlHOsTijFGv/poWZbT9bUxuvfCehhZjwOPUBevmyO0bnuoLx5wwnszhI5gLJM4RzcwU3 r6dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from; bh=5d2Z0TTJaRjuCgjx8UWZNPKsivrnm9qbjTs28ufZ6kQ=; b=ph3Ypxj4UV/YmjXWyw0GM+TYz6WkAcbDdNpcMw4Xwc8pdV4LYAaaaNCItb6Uknk0FM zkfOMlTwU+KjnMa0pKuPF1C95TB8gUJivteLRyfrDqBcRucfwfGg7T3g5gtBXKF6MJ0B Jf+mBg/MsB0DIf6G5fLYZXR7mLrjYVgCCQUdJjmS+BNpCwYgs4an4/RrKpa6sb/ee4Oo v83Zr6nP9KJVPZN0uFtlpxWe1VX29c6WFRFFpPvW82V8jxEZWS7AT86uLYJlLs152g+5 UiCg56K9crVNqxf5ONBBtRHAhtLjpuOOtGE1AtdptWYsShAj5LgYtpMm3eeFXU5hbVwn fkCg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id mj19si12171034ejb.291.2020.08.17.20.44.02; Mon, 17 Aug 2020 20:44:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726763AbgHRDk3 (ORCPT + 99 others); Mon, 17 Aug 2020 23:40:29 -0400 Received: from inva021.nxp.com ([92.121.34.21]:44740 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbgHRDkM (ORCPT ); Mon, 17 Aug 2020 23:40:12 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 3EDC7200DE3; Tue, 18 Aug 2020 05:40:10 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 3943C2000ED; Tue, 18 Aug 2020 05:40:04 +0200 (CEST) Received: from 10.192.242.69 (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id AF45B402C3; Tue, 18 Aug 2020 05:39:56 +0200 (CEST) From: Anson Huang To: mturquette@baylibre.com, sboyd@kernel.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, gregkh@linuxfoundation.org, fugang.duan@nxp.com, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH V3 3/5] dt-bindings: serial: Convert i.MX uart to json-schema Date: Tue, 18 Aug 2020 11:34:43 +0800 Message-Id: <1597721685-9280-3-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1597721685-9280-1-git-send-email-Anson.Huang@nxp.com> References: <1597721685-9280-1-git-send-email-Anson.Huang@nxp.com> X-Virus-Scanned: ClamAV using ClamSMTP Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the i.MX uart binding to DT schema format using json-schema. Signed-off-by: Anson Huang --- no change. --- .../devicetree/bindings/serial/fsl-imx-uart.txt | 40 ---------- .../devicetree/bindings/serial/fsl-imx-uart.yaml | 92 ++++++++++++++++++++++ 2 files changed, 92 insertions(+), 40 deletions(-) delete mode 100644 Documentation/devicetree/bindings/serial/fsl-imx-uart.txt create mode 100644 Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml diff --git a/Documentation/devicetree/bindings/serial/fsl-imx-uart.txt b/Documentation/devicetree/bindings/serial/fsl-imx-uart.txt deleted file mode 100644 index 9582fc2..0000000 --- a/Documentation/devicetree/bindings/serial/fsl-imx-uart.txt +++ /dev/null @@ -1,40 +0,0 @@ -* Freescale i.MX Universal Asynchronous Receiver/Transmitter (UART) - -Required properties: -- compatible : Should be "fsl,-uart" -- reg : Address and length of the register set for the device -- interrupts : Should contain uart interrupt - -Optional properties: -- fsl,dte-mode : Indicate the uart works in DTE mode. The uart works - in DCE mode by default. -- fsl,inverted-tx , fsl,inverted-rx : Indicate that the hardware attached - to the peripheral inverts the signal transmitted or received, - respectively, and that the peripheral should invert its output/input - using the INVT/INVR registers. -- rs485-rts-delay, rs485-rts-active-low, rs485-rx-during-tx, - linux,rs485-enabled-at-boot-time: see rs485.txt. Note that for RS485 - you must enable either the "uart-has-rtscts" or the "rts-gpios" - properties. In case you use "uart-has-rtscts" the signal that controls - the transceiver is actually CTS_B, not RTS_B. CTS_B is always output, - and RTS_B is input, regardless of dte-mode. - -Please check Documentation/devicetree/bindings/serial/serial.yaml -for the complete list of generic properties. - -Note: Each uart controller should have an alias correctly numbered -in "aliases" node. - -Example: - -aliases { - serial0 = &uart1; -}; - -uart1: serial@73fbc000 { - compatible = "fsl,imx51-uart", "fsl,imx21-uart"; - reg = <0x73fbc000 0x4000>; - interrupts = <31>; - uart-has-rtscts; - fsl,dte-mode; -}; diff --git a/Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml b/Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml new file mode 100644 index 0000000..cba3f83 --- /dev/null +++ b/Documentation/devicetree/bindings/serial/fsl-imx-uart.yaml @@ -0,0 +1,92 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/fsl-imx-uart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale i.MX Universal Asynchronous Receiver/Transmitter (UART) + +maintainers: + - Fabio Estevam + +allOf: + - $ref: "serial.yaml" + - $ref: "rs485.yaml" + +properties: + compatible: + oneOf: + - const: fsl,imx1-uart + - const: fsl,imx21-uart + - const: fsl,imx53-uart + - const: fsl,imx6q-uart + - items: + - enum: + - fsl,imx25-uart + - fsl,imx27-uart + - fsl,imx31-uart + - fsl,imx35-uart + - fsl,imx50-uart + - fsl,imx51-uart + - const: fsl,imx21-uart + - items: + - enum: + - fsl,imx6sl-uart + - fsl,imx6sll-uart + - fsl,imx6sx-uart + - fsl,imx6ul-uart + - fsl,imx7d-uart + - const: fsl,imx6q-uart + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + fsl,dte-mode: + $ref: /schemas/types.yaml#/definitions/flag + description: | + Indicate the uart works in DTE mode. The uart works in DCE mode by default. + + fsl,inverted-tx: + $ref: /schemas/types.yaml#/definitions/flag + description: | + Indicate that the hardware attached to the peripheral inverts the signal + transmitted, and that the peripheral should invert its output using the + INVT registers. + + fsl,inverted-rx: + $ref: /schemas/types.yaml#/definitions/flag + description: | + Indicate that the hardware attached to the peripheral inverts the signal + received, and that the peripheral should invert its input using the + INVR registers. + + uart-has-rtscts: true + + rs485-rts-delay: true + rs485-rts-active-low: true + rs485-rx-during-tx: true + linux,rs485-enabled-at-boot-time: true + +required: + - compatible + - reg + - interrupts + +unevaluatedProperties: false + +examples: + - | + aliases { + serial0 = &uart1; + }; + + uart1: serial@73fbc000 { + compatible = "fsl,imx51-uart", "fsl,imx21-uart"; + reg = <0x73fbc000 0x4000>; + interrupts = <31>; + uart-has-rtscts; + fsl,dte-mode; + }; -- 2.7.4