Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp141639ybg; Tue, 2 Jun 2020 19:11:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxP83l4ii3nHG7/uFMDO2uDgKl0Ds0Z3zNL9pJwY4atng5HHuJByCybyGGHoPo0+K+ND0MX X-Received: by 2002:a17:906:22d0:: with SMTP id q16mr8022996eja.455.1591150303033; Tue, 02 Jun 2020 19:11:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591150303; cv=none; d=google.com; s=arc-20160816; b=dQA8o9e/2uMP0B1HDasf5CN44UR8N8FYybRunbCi6EZDysZiTj6eoNQTSPwL7DLqaW T4mARd/uR/D2bLQLrNPVo/JnMIEZ+2lwnZjUgVKBZdJodFYUVkcaGPkgl/TOtZQsV13D +jssT1Lc7ZG9SkOYAvi7Dn+mf9Lfz1eL4butH8EEP4aGwSHzydiX9fKOzwAcQ5qtCmGl yh9OVlWyXyIu+28B7g8aKhQw1AR6Kp/ouaI5qjX5HrlQoRYKq2mDP3wdUZQyohTEWDv2 ncqmQTfwfWKtuaCkZJZACMB+De5xUS6r9b6Ubnlm5BtWXPWytT6AXlEHpElhtVdSGs/k CioQ== 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=TbyV2pDMij4FdSx0mlzbZm0yogLu12O1WfFQIJgwr70=; b=EuOT4rVzYqfKQsSdRw8xbIbW07SQGxpwL6ikpoQowp2FhXuhmUAaDDqBlXFDPlpiK4 fIiSkcZJ1RHSBv7XxMkwf9peaEQuSVFnhW7ao9Y5zzB/5XlpBnMkGSm1PT/WW7VrWJV4 T1PLoWZhcuaaHjF+uK1lG8/o9phPJgJEFUitnbMNBD3fGUtp2NL9JaxejNQYXLN/EOkK bwKIMUckXt42Nhn9yPOauwxZSqVl+VgmLv8O6Jf3jGDoulcRoJz2bGh0qqx2PQAKS7Im O/V9FDNcBdhlDbLngx7VgijtnZdiUIu5AN9TFVjIgVn8MgCbCTbcy8YOZpkrOdYMRm6Z eDIw== 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 a8si354240ejp.552.2020.06.02.19.11.21; Tue, 02 Jun 2020 19:11:43 -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 S1725922AbgFCCJc (ORCPT + 99 others); Tue, 2 Jun 2020 22:09:32 -0400 Received: from inva021.nxp.com ([92.121.34.21]:59010 "EHLO inva021.nxp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725810AbgFCCJa (ORCPT ); Tue, 2 Jun 2020 22:09:30 -0400 Received: from inva021.nxp.com (localhost [127.0.0.1]) by inva021.eu-rdc02.nxp.com (Postfix) with ESMTP id 1CEE7200025; Wed, 3 Jun 2020 04:09:28 +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 7C0EB200CAF; Wed, 3 Jun 2020 04:09:22 +0200 (CEST) Received: from localhost.localdomain (shlinux2.ap.freescale.net [10.192.224.44]) by invc005.ap-rdc01.nxp.com (Postfix) with ESMTP id 56C5B402B1; Wed, 3 Jun 2020 10:09:15 +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, pandy.gao@nxp.com, 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 2/3] dt-bindings: i2c: Convert mxs i2c to json-schema Date: Wed, 3 Jun 2020 09:58:54 +0800 Message-Id: <1591149535-342-3-git-send-email-Anson.Huang@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1591149535-342-1-git-send-email-Anson.Huang@nxp.com> References: <1591149535-342-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 --- 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..7adcba3 --- /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 + +examples: + - | + 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"; + }; -- 2.7.4