[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200828164750.10377-3-krzk@kernel.org>
Date: Fri, 28 Aug 2020 18:47:33 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Lee Jones <lee.jones@...aro.org>, Rob Herring <robh+dt@...nel.org>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Richard Weinberger <richard@....at>,
Vignesh Raghavendra <vigneshr@...com>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
Anson Huang <Anson.Huang@....com>,
Matti Vaittinen <matti.vaittinen@...rohmeurope.com>,
Han Xu <han.xu@....com>, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
linux-arm-kernel@...ts.infradead.org
Cc: Krzysztof Kozlowski <krzk@...nel.org>
Subject: [PATCH v2 02/19] dt-bindings: mtd: gpmi-nand: Fix matching of clocks on different SoCs
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@...02000: clock-names:1: 'gpmi_apb' was expected
Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
---
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 <han.xu@....com>
-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@...0c000 {
--
2.17.1
Powered by blists - more mailing lists