Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1823510ybt; Mon, 15 Jun 2020 10:16:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzC9gS1PYI9+ndZoXMTGKyBLCW6thA1PR8pbn87QvuEXkMuPSXHcdj8j5DRgVJMCrfzOLbU X-Received: by 2002:a17:906:90d4:: with SMTP id v20mr26068688ejw.471.1592241373958; Mon, 15 Jun 2020 10:16:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592241373; cv=none; d=google.com; s=arc-20160816; b=PfkUEJpgcXVt63E588YgC2aP6NXVw0J5pMbnTw4s7SOAdzqQIDjkLbcIsw0t3VozwO WuSP5j5gxuWJ97ydV23Lfe3oAO6kh1mOh1SKUCZwoOTP/Fbzls1FDbNWdjy/VKH94ZoZ zJX4qvpkn2sds/X22AG9KviAJOWJSHda/UhQoJDjVFQw1USRHcyBhU2z8KAY6TAJ6O4g mIu04I5VNQev+PvLhxxXmw5g5ivOQLc1zMeN5JS3qbca2vJJcyzzvo58X2oF/D6FTR9v F11oMOisIndB+ePg7enPuYHpvwlgBICl+0LEDVcPwAA665Rv7a3nIE558A0/qHw3hJZA GrnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=PBR+ikasBYezgWfg6lbl7wvtqOB14P0FNCohMlzbJzo=; b=xgNUMOfqz9Fw6Sw4xEaLhkOfFM8WsZRB1IKQmFx3v+Ic6Kah7stRKHs1SEtEYF85Aa ebVeeMH+2nRwKvE4iyOEeGsc1gV1ZqD1fYF45P3IbnBoFuxISkEW58gLL34MUCMwuLCs Y8iUZIh06s94dhvR/PevONp+3+MqCZFi+9d/kAXIPLRrEOvQXIHAoMiBLmMdgMLDKEHI 4aXVYy1iHigxIZoZqRM/nCGzCG114MsXlpTLTpFM/qVJPFmPPSID9WLjicyAQ5Y/b4HO fgFHp2+1ixvqDKTHQJtaP+sCoxetK2eCov3EFrv92VxBqzUgugjWoqKBtidtiYxv2fu6 grGg== 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id pw8si9684691ejb.83.2020.06.15.10.15.51; Mon, 15 Jun 2020 10:16:13 -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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729862AbgFORGR (ORCPT + 99 others); Mon, 15 Jun 2020 13:06:17 -0400 Received: from mail-il1-f194.google.com ([209.85.166.194]:40948 "EHLO mail-il1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729124AbgFORGQ (ORCPT ); Mon, 15 Jun 2020 13:06:16 -0400 Received: by mail-il1-f194.google.com with SMTP id t8so68562ilm.7; Mon, 15 Jun 2020 10:06:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=PBR+ikasBYezgWfg6lbl7wvtqOB14P0FNCohMlzbJzo=; b=JTLaycjBrUTtWoHLh4j/ZTivjliOeQjLIVZf99kxbSau0YqucSsDVtrbtKQCn7BjfG IYN09O7xO01sEBhDMldN+UtVAp8DGMrf7yRN90zUQyEMVDlX5M74i2hwoyPx7nC64EAU ZxG/Sc1PpElOiIVbZdpNY2CTp/7rcErw1NCXSxJ/bKp5pIP/7ijZCHS9ym5LANgr0T2H mYpMcBLiwFsxYwomuAcDKyPmIYmbLOLpGK4HVDPAQr1Umg1yj/u0SsGXY+le1yW8cS+R Yn3y8PBiv2pDfmjhZOF0m7Q5NqY1yqvoSPnJbZkLMKbNduO+7it6cfeZ1FJXhnPr6NmD /I3Q== X-Gm-Message-State: AOAM531DglWk8cX4bRVL6LN2QrgQ+DF4b414x+DWDoDiKV+DGFbSMmU4 Bxb0Ywkqxr+wS1QpcxJaAw== X-Received: by 2002:a05:6e02:12b4:: with SMTP id f20mr27358656ilr.243.1592240775375; Mon, 15 Jun 2020 10:06:15 -0700 (PDT) Received: from xps15 ([64.188.179.251]) by smtp.gmail.com with ESMTPSA id j63sm8527311ilg.50.2020.06.15.10.06.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jun 2020 10:06:14 -0700 (PDT) Received: (nullmailer pid 1961183 invoked by uid 1000); Mon, 15 Jun 2020 17:06:13 -0000 Date: Mon, 15 Jun 2020 11:06:13 -0600 From: Rob Herring To: Anson Huang Cc: aisheng.dong@nxp.com, 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, Linux-imx@nxp.com Subject: Re: [PATCH V2 2/3] dt-bindings: i2c: Convert mxs i2c to json-schema Message-ID: <20200615170613.GA1959567@bogus> References: <1591235358-15516-1-git-send-email-Anson.Huang@nxp.com> <1591235358-15516-3-git-send-email-Anson.Huang@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1591235358-15516-3-git-send-email-Anson.Huang@nxp.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jun 04, 2020 at 09:49:17AM +0800, Anson Huang wrote: > 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 'clock-frequency' already has a type. > + description: | > + Desired I2C bus clock frequency in Hz, only 100000Hz and 400000Hz > + modes are supported. Sounds like constraints. > + 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 >