Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp1336804pxa; Fri, 28 Aug 2020 09:52:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmlKD8Se1HBdRGmcBxWRzUu+bysls8V4//MDEcqdVIA9Y9wvu9FHtX6LANz25iWlQdq1T0 X-Received: by 2002:a17:906:2b97:: with SMTP id m23mr2945994ejg.61.1598633523340; Fri, 28 Aug 2020 09:52:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598633523; cv=none; d=google.com; s=arc-20160816; b=RbVwavJvmsM7GBBlMJPnijR9E6Z7pf2Rf2EgoEJMBDlXn9SeR4Mb8pJYG4gjX1kv0I cAwVXrJvw4kyz5ZKqjFIQoJSqxRHrWpiE1rikPKnnQbPivoSZoaotvI2GSTEnu193PKE u/Q8CasC3VRV5YHAzhnx2dq0uJX5emmjwZcx/4Fn1bUkYUHww7Hp7ci2PCWmAhvvPJpD PcZSrFKNKKoyckP6KT62/6HZFPpbZqVVPEyArCLO+IVWhS4rqwvlx7UxQLRZsqPwSbnk mUKlX9FkYfCHw/oovAhPCqREYvswJpxzYiojGiAF6jEevUnJ2CLGEg69OUMEmZHf2S+/ iNLQ== 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=V1ALzcxU/d5UEY/hEbvpBQ6wsP/SCbBOOnujixaoBVU=; b=WViWXNWkQ9IhcuB0MsE4Hcb2N8Zos7/ibGaF/zzrs3zpv75TRygC9jyqHXix9DYhsb KnUdF0UiseFfXyLBshvdwgta8Pbke+yA2HuPnywWJzFwuW6II8wkAQ6AEv6yS+zDFS+j YH4IlL63UUBmFU9cRkzT/ro9RphfQ/EfJz34TGMRBw7TyKCYDtflvoSThhs6NBRqIGPa 9nzUuEP24cNjrFUsXuranCUe0HyEXfAYrC8He4XzWpNgUtwQHW79Jhw4j7Ag9kIdPVW8 bdSPu3yp1Rdr9fHSFm6gT4iSMcecVRMF1RfM9r/Kduhd40wjK6DWkyOo79CfFXX1Eos4 xQ3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="r+/vJbN6"; 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 dr22si5572ejc.35.2020.08.28.09.51.40; Fri, 28 Aug 2020 09:52:03 -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="r+/vJbN6"; 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 S1728396AbgH1QtL (ORCPT + 99 others); Fri, 28 Aug 2020 12:49:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:42932 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726436AbgH1QtJ (ORCPT ); Fri, 28 Aug 2020 12:49:09 -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 D92822098B; Fri, 28 Aug 2020 16:49:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1598633348; bh=98AU22xTYMCZ0QAZTXK9ChSrXEOj0TuIT22qgKEeDKo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r+/vJbN6iXqQNVME/w5zvRS3yUo/9L0rC5pX/zWzknm/6fbP93h1bn3NqmTmIgEWz csYos3Uuk3GSUnVkCTg3eK9GOC7QHsuoqHOpkujRz6MrDCcLJvgVhgnlM8efHskEv8 XiZQr6wP7rk99B3/FaAZCoV9M9IkivQM9lh+HCI0= 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 , Anson Huang , 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 v2 02/19] dt-bindings: mtd: gpmi-nand: Fix matching of clocks on different SoCs Date: Fri, 28 Aug 2020 18:47:33 +0200 Message-Id: <20200828164750.10377-3-krzk@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200828164750.10377-1-krzk@kernel.org> References: <20200828164750.10377-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 --- Changes since v1: 1. Do not require order of clocks (use pattern). --- .../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..e08e0a50929e 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: + - pattern: "^(gpmi_(io|apb|bch|bch_apb)|per1_bch)$" + - pattern: "^(gpmi_(io|apb|bch|bch_apb)|per1_bch)$" + - pattern: "^(gpmi_(io|apb|bch|bch_apb)|per1_bch)$" + - pattern: "^(gpmi_(io|apb|bch|bch_apb)|per1_bch)$" + - pattern: "^(gpmi_(io|apb|bch|bch_apb)|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: + - pattern: "^gpmi_(io|bch_apb)$" + - pattern: "^gpmi_(io|bch_apb)$" + examples: - | nand-controller@8000c000 { -- 2.17.1