Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp2580597ybk; Mon, 18 May 2020 02:44:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyRDGbO3hk6iLKD4KEqMPWg5dvd1FZrnF86Fx9cxh6wekHqoMIeMU2Ve3gvuKpvWjvmVDn1 X-Received: by 2002:a50:e1c5:: with SMTP id m5mr6961229edl.47.1589795083525; Mon, 18 May 2020 02:44:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589795083; cv=none; d=google.com; s=arc-20160816; b=U5JQj7znLoA+Hk2RU2qYB5REIXuDWT0Y4d+UkAXF83eytu33vVdX/TR44IqBTC5+4F 92xbB2DftwwkK1DkwuabCFwWxqnBA+5pTDs5aVcqPrIJ4pwu/NdoHosTtuYMfpxAejth 7+hQPO8/srWPW4spiaghIqZXEO+cEroB92B65vd2ABKRm4B6/c+eWN9e47evRRMZ5H3C LDGpelgv0Wx3kIzfOj3yNAkJymNo3yAFMX980dCvF+vicFpWzMOCsbww9585TK7fsNGX 49oKxxW0w3wGjrqFI4m2KtVzA6Gd4E2LfFhbqyV7cNW+cJKf5ELWxNBI6AxN/eu6RMCl cYRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent :content-transfer-encoding:references:in-reply-to:date:cc:to:from :subject:message-id; bh=e7eXDfSXb4bnUQ2lNRXX8Gj78LotcoHSlLQa7dlNVhA=; b=LJMAmgejQRFg+OvNX6iOMePiEe12sVvRLqjpJzzh1qezVIOq01Yw6l7W1PGZpyKP3J drGwym9I7hDKfG52IowMPrtDn3qY3bdxjrpgcaAqhvxU9mlpxZEdrOLC9DrkUhGrEP+W r2f0ag+qILe6+lA8QXF+Rt69JNcQl0N5q4hD3TsgluxUcmsaLsdZ1kDR4ArC49aYu6xt uBnnsdUOEI34a6NwaDQsCxV5hIfQt+aRbTIykIZF/bUEo1OfufdxHwGPxbr5AeKEdxWS YSsRY+TeNRYqIRS3uZv7QVdnEITaiLIJ7DpVt73QPuT5uj5tpdP4N/2CSmgm+taLDrew H+OQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 92si6858378edk.74.2020.05.18.02.44.20; Mon, 18 May 2020 02:44: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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727055AbgERJlq convert rfc822-to-8bit (ORCPT + 99 others); Mon, 18 May 2020 05:41:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40908 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726180AbgERJlq (ORCPT ); Mon, 18 May 2020 05:41:46 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 439CAC061A0C for ; Mon, 18 May 2020 02:41:46 -0700 (PDT) Received: from lupine.hi.pengutronix.de ([2001:67c:670:100:3ad5:47ff:feaf:1a17] helo=lupine) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jacHE-0001oF-9i; Mon, 18 May 2020 11:41:40 +0200 Received: from pza by lupine with local (Exim 4.92) (envelope-from ) id 1jacHD-00015B-CV; Mon, 18 May 2020 11:41:39 +0200 Message-ID: <719ed778a36e7edfea080d42e9b837432e595d15.camel@pengutronix.de> Subject: Re: [PATCH] dt-bindings: reset: Convert i.MX reset to json-schema From: Philipp Zabel To: Anson Huang , robh+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linux-imx@nxp.com Date: Mon, 18 May 2020 11:41:39 +0200 In-Reply-To: <1589250194-29441-1-git-send-email-Anson.Huang@nxp.com> References: <1589250194-29441-1-git-send-email-Anson.Huang@nxp.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT User-Agent: Evolution 3.30.5-1.1 MIME-Version: 1.0 X-SA-Exim-Connect-IP: 2001:67c:670:100:3ad5:47ff:feaf:1a17 X-SA-Exim-Mail-From: p.zabel@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Anson, On Tue, 2020-05-12 at 10:23 +0800, Anson Huang wrote: > Convert the i.MX reset binding to DT schema format using json-schema. > > Signed-off-by: Anson Huang thank you for the conversion. > --- > .../devicetree/bindings/reset/fsl,imx-src.txt | 49 ------------------ > .../devicetree/bindings/reset/fsl,imx-src.yaml | 58 ++++++++++++++++++++++ > 2 files changed, 58 insertions(+), 49 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/reset/fsl,imx-src.txt > create mode 100644 Documentation/devicetree/bindings/reset/fsl,imx-src.yaml > > diff --git a/Documentation/devicetree/bindings/reset/fsl,imx-src.txt b/Documentation/devicetree/bindings/reset/fsl,imx-src.txt > deleted file mode 100644 > index 6ed79e6..0000000 > --- a/Documentation/devicetree/bindings/reset/fsl,imx-src.txt > +++ /dev/null > @@ -1,49 +0,0 @@ > -Freescale i.MX System Reset Controller > -====================================== > - > -Please also refer to reset.txt in this directory for common reset > -controller binding usage. > - > -Required properties: > -- compatible: Should be "fsl,-src" > -- reg: should be register base and length as documented in the > - datasheet > -- interrupts: Should contain SRC interrupt and CPU WDOG interrupt, > - in this order. > -- #reset-cells: 1, see below > - > -example: > - > -src: src@20d8000 { > - compatible = "fsl,imx6q-src"; > - reg = <0x020d8000 0x4000>; > - interrupts = <0 91 0x04 0 96 0x04>; > - #reset-cells = <1>; > -}; > - > -Specifying reset lines connected to IP modules > -============================================== > - > -The system reset controller can be used to reset the GPU, VPU, > -IPU, and OpenVG IP modules on i.MX5 and i.MX6 ICs. Those device > -nodes should specify the reset line on the SRC in their resets > -property, containing a phandle to the SRC device node and a > -RESET_INDEX specifying which module to reset, as described in > -reset.txt > - > -example: > - > - ipu1: ipu@2400000 { > - resets = <&src 2>; > - }; > - ipu2: ipu@2800000 { > - resets = <&src 4>; > - }; > - > -The following RESET_INDEX values are valid for i.MX5: > -GPU_RESET 0 > -VPU_RESET 1 > -IPU1_RESET 2 > -OPEN_VG_RESET 3 > -The following additional RESET_INDEX value is valid for i.MX6: > -IPU2_RESET 4 > diff --git a/Documentation/devicetree/bindings/reset/fsl,imx-src.yaml b/Documentation/devicetree/bindings/reset/fsl,imx-src.yaml > new file mode 100644 > index 0000000..276a533 > --- /dev/null > +++ b/Documentation/devicetree/bindings/reset/fsl,imx-src.yaml > @@ -0,0 +1,58 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/reset/fsl,imx-src.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Freescale i.MX System Reset Controller > + > +maintainers: > + - Philipp Zabel > + > +description: | > + The system reset controller can be used to reset the GPU, VPU, > + IPU, and OpenVG IP modules on i.MX5 and i.MX6 ICs. Those device > + nodes should specify the reset line on the SRC in their resets > + property, containing a phandle to the SRC device node and a > + RESET_INDEX specifying which module to reset, as described in > + reset.txt > + > + The following RESET_INDEX values are valid for i.MX5: > + GPU_RESET 0 > + VPU_RESET 1 > + IPU1_RESET 2 > + OPEN_VG_RESET 3 > + The following additional RESET_INDEX value is valid for i.MX6: > + IPU2_RESET 4 > + > +properties: > + compatible: > + items: > + - const: "fsl,imx51-src" "fsl,imx51-src" is the only compatible the driver matches on, but we have these combinations on compatible SRCs in the device trees: "fsl,imx50-src", "fsl,imx51-src" "fsl,imx51-src" "fsl,imx53-src", "fsl,imx51-src" "fsl,imx6q-src", "fsl,imx51-src" "fsl,imx6sl-src", "fsl,imx51-src" "fsl,imx6sll-src", "fsl,imx51-src" "fsl,imx6sx-src", "fsl,imx51-src" "fsl,imx6ul-src", "fsl,imx51-src" That could be described using oneOf and and an items list of const values per SoC like in the qcom bindings. regards Philipp