Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp212171pxa; Tue, 4 Aug 2020 22:02:41 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz+6sSHoSREeXroDUHvj+8x2sa9hC56gjghKjFdCxeoEkb4QT90Pv1L4qn9SYnAUVLgGicW X-Received: by 2002:a05:6402:1587:: with SMTP id c7mr1152199edv.213.1596603761459; Tue, 04 Aug 2020 22:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596603761; cv=none; d=google.com; s=arc-20160816; b=ZBrE36GqrkN2HNcPUXDpY7tDa31Oxa58XgKTY1S7Djv9g/xRqo6nhaD3GjM78l3GPJ Bu+50PpYox3OUJsTfoFrk/oad9okbiC5lvIfLSGlK3/uEWJSgxtVndRIRfwrcTKqjj33 ojQjGXO90jlzTqOSXg9NunwYiy3/PzjjGpRjYvke5O6WzzMi93PuaJi9MAwF0E/J01UF FLRkodZgofKx/jN5qpLK/aFrvEg52IEeswq686SBH8F0LtegWACEXUvdnOXGFWALUzNC e7G/lT503kK1IKDBTrNuzgPWirkvmipm5Los8R1oa7TkQ+05fIGNyt5XbWFRnEu1HN8Y PcGA== 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=25y6YAcl5OyrDwP2RAuOIe1pHjdlnfmw/4e9POApRzc=; b=sOSfQR4c3NgbyCmWH77WNMapBFCav65XmYG7RVDJY2Cb/A+ga+9It7pOGXtEZzRiHm 9tlU0dne8UCoI0HpEzxa2oP6FFXej4+fgdSEcnA1xw/Wi3XfcMWSzT57HdCMbSFK2c3f eeGhGEl9c8VvAiKiYiK/NztlQ/eUIyQmn6jUrKCx2q6LlEpXct+r1eXH4ZPbqEHbxvzq WjBSyhjXC4QtLJ3FwuuHk+rw3G2eI1mhwHZ54701T7HQQWRZPfALwyiTH5hKydwHPOaw YsLiS7IE2olQgP1hCpNdVG1M7tMRYQd2IQnnY1s6K54nLfqS0tr/xDzTN+Iny24wLHnN P6Eg== 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 91si757301edy.18.2020.08.04.22.02.19; Tue, 04 Aug 2020 22:02:41 -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 S1726532AbgHEE7O (ORCPT + 99 others); Wed, 5 Aug 2020 00:59:14 -0400 Received: from inva020.nxp.com ([92.121.34.13]:36182 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725372AbgHEE7E (ORCPT ); Wed, 5 Aug 2020 00:59:04 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 0EFD51A037B; Wed, 5 Aug 2020 06:59:02 +0200 (CEST) Received: from invc005.ap-rdc01.nxp.com (invc005.ap-rdc01.nxp.com [165.114.16.14]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id E77C61A0448; Wed, 5 Aug 2020 06:58:56 +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 6512C4032B; Wed, 5 Aug 2020 06:58:50 +0200 (CEST) From: Anson Huang To: gregkh@linuxfoundation.org, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, galak@codeaurora.org, linux-serial@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Subject: [PATCH 3/3] dt-bindings: serial: Convert NXP lpuart to json-schema Date: Wed, 5 Aug 2020 12:54:19 +0800 Message-Id: <1596603259-5367-3-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1596603259-5367-1-git-send-email-Anson.Huang@nxp.com> References: <1596603259-5367-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 NXP lpuart binding to DT schema format using json-schema. Signed-off-by: Anson Huang --- .../devicetree/bindings/serial/fsl-lpuart.txt | 43 ------------ .../devicetree/bindings/serial/fsl-lpuart.yaml | 79 ++++++++++++++++++++++ 2 files changed, 79 insertions(+), 43 deletions(-) delete mode 100644 Documentation/devicetree/bindings/serial/fsl-lpuart.txt create mode 100644 Documentation/devicetree/bindings/serial/fsl-lpuart.yaml diff --git a/Documentation/devicetree/bindings/serial/fsl-lpuart.txt b/Documentation/devicetree/bindings/serial/fsl-lpuart.txt deleted file mode 100644 index e7448b9..0000000 --- a/Documentation/devicetree/bindings/serial/fsl-lpuart.txt +++ /dev/null @@ -1,43 +0,0 @@ -* Freescale low power universal asynchronous receiver/transmitter (lpuart) - -Required properties: -- compatible : - - "fsl,vf610-lpuart" for lpuart compatible with the one integrated - on Vybrid vf610 SoC with 8-bit register organization - - "fsl,ls1021a-lpuart" for lpuart compatible with the one integrated - on LS1021A SoC with 32-bit big-endian register organization - - "fsl,ls1028a-lpuart" for lpuart compatible with the one integrated - on LS1028A SoC with 32-bit little-endian register organization - - "fsl,imx7ulp-lpuart" for lpuart compatible with the one integrated - on i.MX7ULP SoC with 32-bit little-endian register organization - - "fsl,imx8qxp-lpuart" for lpuart compatible with the one integrated - on i.MX8QXP SoC with 32-bit little-endian register organization - - "fsl,imx8qm-lpuart" for lpuart compatible with the one integrated - on i.MX8QM SoC with 32-bit little-endian register organization -- reg : Address and length of the register set for the device -- interrupts : Should contain uart interrupt -- clocks : phandle + clock specifier pairs, one for each entry in clock-names -- clock-names : For vf610/ls1021a/ls1028a/imx7ulp, "ipg" clock is for uart - bus/baud clock. For imx8qxp lpuart, "ipg" clock is bus clock that is used - to access lpuart controller registers, it also requires "baud" clock for - module to receive/transmit data. - -Optional properties: -- dmas: A list of two dma specifiers, one for each entry in dma-names. -- dma-names: should contain "tx" and "rx". -- rs485-rts-active-low, linux,rs485-enabled-at-boot-time: see rs485.txt - -Note: Optional properties for DMA support. Write them both or both not. - -Example: - -uart0: serial@40027000 { - compatible = "fsl,vf610-lpuart"; - reg = <0x40027000 0x1000>; - interrupts = <0 61 0x00>; - clocks = <&clks VF610_CLK_UART0>; - clock-names = "ipg"; - dmas = <&edma0 0 2>, - <&edma0 0 3>; - dma-names = "rx","tx"; - }; diff --git a/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml b/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml new file mode 100644 index 0000000..1b955f3 --- /dev/null +++ b/Documentation/devicetree/bindings/serial/fsl-lpuart.yaml @@ -0,0 +1,79 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/serial/fsl-lpuart.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale low power universal asynchronous receiver/transmitter (lpuart) + +maintainers: + - Kumar Gala + +allOf: + - $ref: "rs485.yaml" + +properties: + compatible: + enum: + - fsl,vf610-lpuart + - fsl,ls1021a-lpuart + - fsl,ls1028a-lpuart + - fsl,imx7ulp-lpuart + - fsl,imx8qxp-lpuart + - fsl,imx8qm-lpuart + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + items: + - description: ipg clock + - description: baud clock + minItems: 1 + maxItems: 2 + + clock-names: + items: + - const: ipg + - const: baud + minItems: 1 + maxItems: 2 + + dmas: + items: + - description: DMA controller phandle and request line for RX + - description: DMA controller phandle and request line for TX + + dma-names: + items: + - const: rx + - const: tx + + rs485-rts-active-low: true + linux,rs485-enabled-at-boot-time: true + +required: + - compatible + - reg + - interrupts + - clocks + - clock-names + +unevaluatedProperties: false + +examples: + - | + #include + + serial@40027000 { + compatible = "fsl,vf610-lpuart"; + reg = <0x40027000 0x1000>; + interrupts = <0 61 0x00>; + clocks = <&clks VF610_CLK_UART0>; + clock-names = "ipg"; + dmas = <&edma0 0 2>, <&edma0 0 3>; + dma-names = "rx","tx"; + }; -- 2.7.4