Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp950189ybg; Wed, 3 Jun 2020 19:04:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwImbkYzKgs64o+Jchfi36g9f1qC+1mBWFniSmIMBMGbkFBqtMBdrlp4t7h8NDANu4SN7y8 X-Received: by 2002:a17:906:704c:: with SMTP id r12mr1894072ejj.308.1591236262334; Wed, 03 Jun 2020 19:04:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591236262; cv=none; d=google.com; s=arc-20160816; b=0Djmf3Ygyus6paURdpum2bIMFZK6aXPgzHXipu18wqjWq7OSyH2x6nl23HdtJ9GTIl FTisk613D4lnA5A5hdehqcj20O6kBdlSNYtOlfUxiP8O6vs/FnPxyt6bXpR8dBv/x2ew RGeH+ibwSppniJL3rIB9QVtllJFbTG1pl53MFmo3QSO3eAc2HuTJi2Qf2zUsKO2Exzvp 8mi+/PHJhDD+iB6iTnseRRH9yFYCXLzTX4T2sCuyMCVb56Df22uGMF98W/lkLQfY1Hly meEycXNu9XOOdGW3ZdThF9SI9cG4fHIc9QTf0y5S7ARo1L7/jSBTfOBBYi71f/yUibKu RjtA== 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=72yYxqpQnApaZu0hYNpb7z/eqT2S03o2R5PgwrLHoh4=; b=IE90icMsm2Aq0pAbCNc1EA7pbiHQpoNtiEnTTJkh7htp5IHeSBqlOFFGyUX1Fag7l9 7I5XzW9EicGyUmhWalB0Dx0QCDUf6F6BRMwBLL+auBxKzBkUgRYbBBaGPSrc0qAeYHEj Y5XgLPbO7mI/nU5NwuMkTgFF2V1Nj+/vGO3JiwWULPx6gQ40+esrvVrS9EGuqtHjjDsQ RA11AruZBITGRLBYS7UkqgDJJsp9enMx3LtZTvjDUd69NRFuiQLuGrSiwaYH+Yd8R6YY aAPAYa30UI/Er0USH174FGiNDuRM7zYf4KlF6e9mRZSAHA2ln/Z4vOj0r8Nu5G5TPgCr zm0A== 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 r26si761155eja.652.2020.06.03.19.03.58; Wed, 03 Jun 2020 19:04:22 -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 S1726592AbgFDB76 (ORCPT + 99 others); Wed, 3 Jun 2020 21:59:58 -0400 Received: from inva020.nxp.com ([92.121.34.13]:45348 "EHLO inva020.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725973AbgFDB74 (ORCPT ); Wed, 3 Jun 2020 21:59:56 -0400 Received: from inva020.nxp.com (localhost [127.0.0.1]) by inva020.eu-rdc02.nxp.com (Postfix) with ESMTP id 750191A016E; Thu, 4 Jun 2020 03:59:53 +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 370931A018E; Thu, 4 Jun 2020 03:59:48 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 75899402A5; Thu, 4 Jun 2020 09:59:41 +0800 (SGT) From: Anson Huang To: aisheng.dong@nxp.com, robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux@rempel-privat.de, wolfram@the-dreams.de, linux-i2c@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 V2 2/3] dt-bindings: i2c: Convert mxs i2c to json-schema Date: Thu, 4 Jun 2020 09:49:17 +0800 Message-Id: <1591235358-15516-3-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591235358-15516-1-git-send-email-Anson.Huang@nxp.com> References: <1591235358-15516-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 MXS I2C binding to DT schema format using json-schema Signed-off-by: Anson Huang --- Changes since V1: - add "additionalProperties: false". --- Documentation/devicetree/bindings/i2c/i2c-mxs.txt | 25 ---------- Documentation/devicetree/bindings/i2c/i2c-mxs.yaml | 55 ++++++++++++++++++++++ 2 files changed, 55 insertions(+), 25 deletions(-) delete mode 100644 Documentation/devicetree/bindings/i2c/i2c-mxs.txt create mode 100644 Documentation/devicetree/bindings/i2c/i2c-mxs.yaml diff --git a/Documentation/devicetree/bindings/i2c/i2c-mxs.txt b/Documentation/devicetree/bindings/i2c/i2c-mxs.txt deleted file mode 100644 index 4e1c8ac..0000000 --- a/Documentation/devicetree/bindings/i2c/i2c-mxs.txt +++ /dev/null @@ -1,25 +0,0 @@ -* Freescale MXS Inter IC (I2C) Controller - -Required properties: -- compatible: Should be "fsl,-i2c" -- reg: Should contain registers location and length -- interrupts: Should contain ERROR interrupt number -- clock-frequency: Desired I2C bus clock frequency in Hz. - Only 100000Hz and 400000Hz modes are supported. -- dmas: DMA specifier, consisting of a phandle to DMA controller node - and I2C DMA channel ID. - Refer to dma.txt and fsl-mxs-dma.txt for details. -- dma-names: Must be "rx-tx". - -Examples: - -i2c0: i2c@80058000 { - #address-cells = <1>; - #size-cells = <0>; - compatible = "fsl,imx28-i2c"; - reg = <0x80058000 2000>; - interrupts = <111>; - clock-frequency = <100000>; - dmas = <&dma_apbx 6>; - dma-names = "rx-tx"; -}; diff --git a/Documentation/devicetree/bindings/i2c/i2c-mxs.yaml b/Documentation/devicetree/bindings/i2c/i2c-mxs.yaml new file mode 100644 index 0000000..3bc14bb --- /dev/null +++ b/Documentation/devicetree/bindings/i2c/i2c-mxs.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/i2c/i2c-mxs.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale MXS Inter IC (I2C) Controller + +maintainers: + - Shawn Guo + +properties: + compatible: + enum: + - fsl,imx23-i2c + - fsl,imx28-i2c + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clock-frequency: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Desired I2C bus clock frequency in Hz, only 100000Hz and 400000Hz + modes are supported. + default: 100000 + + dmas: + maxItems: 1 + + dma-names: + const: rx-tx + +required: + - compatible + - reg + - interrupts + - dmas + - dma-names + +additionalProperties: false + +examples: + - | + i2c@80058000 { + compatible = "fsl,imx28-i2c"; + reg = <0x80058000 2000>; + interrupts = <111>; + clock-frequency = <100000>; + dmas = <&dma_apbx 6>; + dma-names = "rx-tx"; + }; -- 2.7.4