From 4e976b1521ca5e19fc2c0ba2bae0b97877ad0ef4 Mon Sep 17 00:00:00 2001 From: Arseniy Krasnov Date: Wed, 8 May 2024 02:09:01 +0300 Subject: dt-bindings: mtd: amlogic,meson-nand: support fields for boot ROM code Boot ROM code on Meson requires that some pages on NAND must be written in special mode: "short" ECC mode where each block is 384 bytes and scrambling mode is on. Such pages are located on the chip in the following way (for example): [ p0 ][ p1 ][ p2 ][ p3 ][ p4 ][ p5 ][ p6 ][ p7 ] ... [ pN ] ^ ^ ^ ^ pX is page number "X". "^" means "special" page used by boot ROM - e.g. every 2nd page in the range of [0, 7]. Step (2 in example is set by 'amlogic,boot-page-step' field. Last page in range (7 in example) is set by 'amlogic,boot-pages' field. Signed-off-by: Arseniy Krasnov Reviewed-by: Rob Herring (Arm) Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240507230903.3399594-2-avkrasnov@salutedevices.com --- .../devicetree/bindings/mtd/amlogic,meson-nand.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml index 57b6957c8415..284f0f882c32 100644 --- a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml +++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml @@ -64,11 +64,29 @@ patternProperties: items: maximum: 0 + amlogic,boot-pages: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Number of pages starting from offset 0, where a special ECC + configuration must be used because it is accessed by the ROM + code. This ECC configuration uses 384 bytes data blocks. + Also scrambling mode is enabled for such pages. + + amlogic,boot-page-step: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Interval between pages, accessed by the ROM code. For example + we have 8 pages [0, 7]. Pages 0,2,4,6 are accessed by the + ROM code, so this field will be 2 (e.g. every 2nd page). Rest + of pages - 1,3,5,7 are read/written without this mode. + unevaluatedProperties: false dependencies: nand-ecc-strength: [nand-ecc-step-size] nand-ecc-step-size: [nand-ecc-strength] + amlogic,boot-pages: [nand-is-boot-medium, "amlogic,boot-page-step"] + amlogic,boot-page-step: [nand-is-boot-medium, "amlogic,boot-pages"] required: -- cgit v1.2.3-58-ga151 From 70cdc145c42e604a76ec5476af07d862ed2fbf70 Mon Sep 17 00:00:00 2001 From: Frank Li Date: Mon, 20 May 2024 12:09:12 -0400 Subject: dt-bindings: mtd: gpmi-nand: Add 'fsl,imx8qxp-gpmi-nand' compatible string Add 'fsl,imx8qxp-gpmi-nand' compatible string and clock-names restriction. Signed-off-by: Frank Li Reviewed-by: Rob Herring (Arm) Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240520-gpmi_nand-v2-1-e3017e4c9da5@nxp.com --- .../devicetree/bindings/mtd/gpmi-nand.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/mtd/gpmi-nand.yaml b/Documentation/devicetree/bindings/mtd/gpmi-nand.yaml index 021c0da0b072..f9eb1868ca1f 100644 --- a/Documentation/devicetree/bindings/mtd/gpmi-nand.yaml +++ b/Documentation/devicetree/bindings/mtd/gpmi-nand.yaml @@ -24,6 +24,7 @@ properties: - fsl,imx6q-gpmi-nand - fsl,imx6sx-gpmi-nand - fsl,imx7d-gpmi-nand + - fsl,imx8qxp-gpmi-nand - items: - enum: - fsl,imx8mm-gpmi-nand @@ -151,6 +152,27 @@ allOf: - const: gpmi_io - const: gpmi_bch_apb + - if: + properties: + compatible: + contains: + enum: + - fsl,imx8qxp-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 + clock-names: + items: + - const: gpmi_io + - const: gpmi_apb + - const: gpmi_bch + - const: gpmi_bch_apb + examples: - | nand-controller@8000c000 { -- cgit v1.2.3-58-ga151 From 14427d4b883159d179847f1090112221c1abc7bd Mon Sep 17 00:00:00 2001 From: "Rob Herring (Arm)" Date: Tue, 25 Jun 2024 15:56:05 -0600 Subject: dt-bindings: mtd: qcom,nandc: Define properties at top-level Convention is DT schemas should define all properties at the top-level and not inside of if/then schemas. That minimizes the if/then schemas and is more future proof. There were 2 "if" schemas for "qcom,ipq806x-nand" and the "qcom,boot-partitions: true" unnecessary, so the conditional schemas can be simplified a bit. Signed-off-by: Rob Herring (Arm) Reviewed-by: Krzysztof Kozlowski Signed-off-by: Miquel Raynal Link: https://lore.kernel.org/linux-mtd/20240625215605.192260-1-robh@kernel.org --- .../devicetree/bindings/mtd/qcom,nandc.yaml | 38 ++++++++-------------- 1 file changed, 14 insertions(+), 24 deletions(-) (limited to 'Documentation') diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml index 4ada60fbf81d..35b4206ea918 100644 --- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml +++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml @@ -31,6 +31,18 @@ properties: - const: core - const: aon + qcom,cmd-crci: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Must contain the ADM command type CRCI block instance number specified for + the NAND controller on the given platform + + qcom,data-crci: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Must contain the ADM data type CRCI block instance number specified for + the NAND controller on the given platform + patternProperties: "^nand@[a-f0-9]$": type: object @@ -83,18 +95,6 @@ allOf: items: - const: rxtx - qcom,cmd-crci: - $ref: /schemas/types.yaml#/definitions/uint32 - description: - Must contain the ADM command type CRCI block instance number - specified for the NAND controller on the given platform - - qcom,data-crci: - $ref: /schemas/types.yaml#/definitions/uint32 - description: - Must contain the ADM data type CRCI block instance number - specified for the NAND controller on the given platform - - if: properties: compatible: @@ -119,19 +119,9 @@ allOf: - const: rx - const: cmd - - if: - properties: - compatible: - contains: - enum: - - qcom,ipq806x-nand + qcom,cmd-crci: false + qcom,data-crci: false - then: - patternProperties: - "^nand@[a-f0-9]$": - properties: - qcom,boot-partitions: true - else: patternProperties: "^nand@[a-f0-9]$": properties: -- cgit v1.2.3-58-ga151