Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2367269pxa; Mon, 24 Aug 2020 12:08:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIudP6pJ50yB+85QQFOwZlXBzEI9HywXOLd17jxedzmIyabLTG6TAHdRVYF6B//SWB3IIQ X-Received: by 2002:a17:906:3e0a:: with SMTP id k10mr7325939eji.148.1598296108960; Mon, 24 Aug 2020 12:08:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598296108; cv=none; d=google.com; s=arc-20160816; b=vsI027PQVrKq94het+gn5bOz81NKFfNIWQt3eJbYR3pZlWdVIzuHUlhV1jrJ3T30BR KLdGl9SdN8/SCSGBax1+1mKYaoiA4gv1roAFJDIwgNsm7c1xwQU7uZpx62gYuFI1Qxah 58WgwfZiSI3Dg5V1h3fr6eyJRMyWvJAeAd7nR+Dp5AxzvUMArpNrwe5HzVlRhDzgUGZ9 qJVpJ9AoUTlOvDxp7EtmMV/5T3FTgiDKztrflHZA1WPjDUS/Gbung47VVA24G0kg9pVM 08kYQkqAlpmfKt2vYSGmU9CbGN538Vy1y89IFjHNR8Xmne0caLZfreMv3AZ8c2IC6Uid dhvQ== 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:dkim-signature; bh=78S2vmSHFqmzhjt3XwoE2IIRZFjLl15+jj/c6IK8gC4=; b=dc45XRqxT0onSfZRdTAkXO3Q32Xis1dinhvTXJSI2JRSIfAC+gZb+7RActLqlvTZ/x PeiKnv3XHDahU6dRxUG6RkAsPm551er0FJumWJclEy31aCF3J65PVs7QjBdpleGZa7cZ IbR24YS90C1fKQc2/0mcdCqN5TcGcZXKT7F7k+DbiSJVTWT5b0eY4iUWtFr/Yd07Bhaw QCL9iEMBprgWrgPWB0M6uAPK0kt+i386JyZqegzkIuO6CtOMFnAD+FwPBtZ70J2hcT2V 7hgv/HmKhJhHiQ8HKxwlwYn5mKIQ/qqo30leK+0rfyu4StSGYE4IaKsJGKanfTIfQ80W ifZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=Pk63FqLp; 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 rl26si7264479ejb.568.2020.08.24.12.08.05; Mon, 24 Aug 2020 12:08:28 -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; dkim=pass header.i=@kernel.org header.s=default header.b=Pk63FqLp; 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 S1726806AbgHXTHZ (ORCPT + 99 others); Mon, 24 Aug 2020 15:07:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:57078 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbgHXTHW (ORCPT ); Mon, 24 Aug 2020 15:07:22 -0400 Received: from kozik-lap.mshome.net (unknown [194.230.155.216]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 87C9F2078D; Mon, 24 Aug 2020 19:07:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598296041; bh=XHlvvAtBERuOAyXXY6dPcG5or9pk/gOG5ME94ky5VIQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pk63FqLps1QHpow/V9UpEWLK7ynLybVvcGCXAYSHNPZQQKVWQ+6DNVWwsD3KOi1Yj XceVtBLA0n83YgD16ApL8lIttezVrPDKM8YkaTL+2c9mgxYWLrB++UqhMd2SJ8yYFV w98xPVO1LxCi3P6So88BaDiQgK68xDhvu9vUuRO4= From: Krzysztof Kozlowski To: Lee Jones , Rob Herring , Miquel Raynal , Richard Weinberger , Vignesh Raghavendra , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Adam Ford , Daniel Baluta , Anson Huang , Robin Gong , Li Jun , Matti Vaittinen , Han Xu , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, linux-arm-kernel@lists.infradead.org Cc: Krzysztof Kozlowski Subject: [PATCH 02/16] dt-bindings: mtd: gpmi-nand: Fix matching of clocks on different SoCs Date: Mon, 24 Aug 2020 21:06:47 +0200 Message-Id: <20200824190701.8447-2-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200824190701.8447-1-krzk@kernel.org> References: <20200824190701.8447-1-krzk@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Driver requires different amount of clocks for different SoCs. Describe these requirements properly to fix dtbs_check warnings like: arch/arm64/boot/dts/freescale/imx8mm-beacon-kit.dt.yaml: nand-controller@33002000: clock-names:1: 'gpmi_apb' was expected Signed-off-by: Krzysztof Kozlowski --- .../devicetree/bindings/mtd/gpmi-nand.yaml | 76 +++++++++++++++---- 1 file changed, 61 insertions(+), 15 deletions(-) diff --git a/Documentation/devicetree/bindings/mtd/gpmi-nand.yaml b/Documentation/devicetree/bindings/mtd/gpmi-nand.yaml index 28ff8c581837..9d764e654e1d 100644 --- a/Documentation/devicetree/bindings/mtd/gpmi-nand.yaml +++ b/Documentation/devicetree/bindings/mtd/gpmi-nand.yaml @@ -9,9 +9,6 @@ title: Freescale General-Purpose Media Interface (GPMI) binding maintainers: - Han Xu -allOf: - - $ref: "nand-controller.yaml" - description: | The GPMI nand controller provides an interface to control the NAND flash chips. The device tree may optionally contain sub-nodes @@ -58,22 +55,10 @@ properties: clocks: minItems: 1 maxItems: 5 - items: - - description: SoC gpmi io clock - - description: SoC gpmi apb clock - - description: SoC gpmi bch clock - - description: SoC gpmi bch apb clock - - description: SoC per1 bch clock clock-names: minItems: 1 maxItems: 5 - items: - - const: gpmi_io - - const: gpmi_apb - - const: gpmi_bch - - const: gpmi_bch_apb - - const: per1_bch fsl,use-minimum-ecc: type: boolean @@ -107,6 +92,67 @@ required: unevaluatedProperties: false +allOf: + - $ref: "nand-controller.yaml" + + - if: + properties: + compatible: + contains: + enum: + - fsl,imx23-gpmi-nand + - fsl,imx28-gpmi-nand + then: + properties: + clocks: + items: + - description: SoC gpmi io clock + clock-names: + items: + - const: gpmi_io + + - if: + properties: + compatible: + contains: + enum: + - fsl,imx6q-gpmi-nand + - fsl,imx6sx-gpmi-nand + then: + properties: + clocks: + items: + - description: SoC gpmi io clock + - description: SoC gpmi apb clock + - description: SoC gpmi bch clock + - description: SoC gpmi bch apb clock + - description: SoC per1 bch clock + clock-names: + items: + - const: gpmi_io + - const: gpmi_apb + - const: gpmi_bch + - const: gpmi_bch_apb + - const: per1_bch + + - if: + properties: + compatible: + contains: + const: fsl,imx7d-gpmi-nand + then: + properties: + clocks: + items: + - description: SoC gpmi io clock + - description: SoC gpmi bch apb clock + clock-names: + minItems: 2 + maxItems: 2 + items: + - const: gpmi_io + - const: gpmi_bch_apb + examples: - | nand-controller@8000c000 { -- 2.17.1