mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 00:48:50 +00:00
6fdc6e23a7
This doesn't yet do anything in the tools, but make it explicit so we can check either 'unevaluatedProperties' or 'additionalProperties' is present in schemas. 'unevaluatedProperties' is appropriate when including another schema (via '$ref') and all possible properties and/or child nodes are not explicitly listed in the schema with the '$ref'. This is in preparation to add a meta-schema to check for missing 'unevaluatedProperties' or 'additionalProperties'. This has been a constant source of review issues. Acked-by: Mark Brown <broonie@kernel.org> Acked-by: Wolfram Sang <wsa@kernel.org> Acked-by: Krzysztof Kozlowski <krzk@kernel.org> Acked-By: Vinod Koul <vkoul@kernel.org> Acked-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Ulf Hansson <ulf.hansson@linaro.org> Acked-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://lore.kernel.org/r/20201005183830.486085-2-robh@kernel.org Signed-off-by: Rob Herring <robh@kernel.org>
150 lines
3.1 KiB
YAML
150 lines
3.1 KiB
YAML
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
|
|
%YAML 1.2
|
|
---
|
|
$id: http://devicetree.org/schemas/mtd/denali,nand.yaml#
|
|
$schema: http://devicetree.org/meta-schemas/core.yaml#
|
|
|
|
title: Denali NAND controller
|
|
|
|
maintainers:
|
|
- Masahiro Yamada <yamada.masahiro@socionext.com>
|
|
|
|
properties:
|
|
compatible:
|
|
enum:
|
|
- altr,socfpga-denali-nand
|
|
- socionext,uniphier-denali-nand-v5a
|
|
- socionext,uniphier-denali-nand-v5b
|
|
|
|
reg-names:
|
|
description: |
|
|
There are two register regions:
|
|
nand_data: host data/command interface
|
|
denali_reg: register interface
|
|
items:
|
|
- const: nand_data
|
|
- const: denali_reg
|
|
|
|
reg:
|
|
minItems: 2
|
|
maxItems: 2
|
|
|
|
interrupts:
|
|
maxItems: 1
|
|
|
|
clock-names:
|
|
description: |
|
|
There are three clocks:
|
|
nand: controller core clock
|
|
nand_x: bus interface clock
|
|
ecc: ECC circuit clock
|
|
items:
|
|
- const: nand
|
|
- const: nand_x
|
|
- const: ecc
|
|
|
|
clocks:
|
|
minItems: 3
|
|
maxItems: 3
|
|
|
|
reset-names:
|
|
description: |
|
|
There are two optional resets:
|
|
nand: controller core reset
|
|
reg: register reset
|
|
oneOf:
|
|
- items:
|
|
- const: nand
|
|
- const: reg
|
|
- const: nand
|
|
- const: reg
|
|
|
|
resets:
|
|
minItems: 1
|
|
maxItems: 2
|
|
|
|
allOf:
|
|
- $ref: nand-controller.yaml
|
|
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
const: altr,socfpga-denali-nand
|
|
then:
|
|
patternProperties:
|
|
"^nand@[a-f0-9]$":
|
|
type: object
|
|
properties:
|
|
nand-ecc-strength:
|
|
enum:
|
|
- 8
|
|
- 15
|
|
nand-ecc-step-size:
|
|
enum:
|
|
- 512
|
|
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
const: socionext,uniphier-denali-nand-v5a
|
|
then:
|
|
patternProperties:
|
|
"^nand@[a-f0-9]$":
|
|
type: object
|
|
properties:
|
|
nand-ecc-strength:
|
|
enum:
|
|
- 8
|
|
- 16
|
|
- 24
|
|
nand-ecc-step-size:
|
|
enum:
|
|
- 1024
|
|
|
|
- if:
|
|
properties:
|
|
compatible:
|
|
contains:
|
|
const: socionext,uniphier-denali-nand-v5b
|
|
then:
|
|
patternProperties:
|
|
"^nand@[a-f0-9]$":
|
|
type: object
|
|
properties:
|
|
nand-ecc-strength:
|
|
enum:
|
|
- 8
|
|
- 16
|
|
nand-ecc-step-size:
|
|
enum:
|
|
- 1024
|
|
|
|
required:
|
|
- compatible
|
|
- reg
|
|
- interrupts
|
|
- clock-names
|
|
- clocks
|
|
|
|
unevaluatedProperties: false
|
|
|
|
examples:
|
|
- |
|
|
nand-controller@ff900000 {
|
|
compatible = "altr,socfpga-denali-nand";
|
|
reg-names = "nand_data", "denali_reg";
|
|
reg = <0xff900000 0x20>, <0xffb80000 0x1000>;
|
|
interrupts = <0 144 4>;
|
|
clock-names = "nand", "nand_x", "ecc";
|
|
clocks = <&nand_clk>, <&nand_x_clk>, <&nand_ecc_clk>;
|
|
reset-names = "nand", "reg";
|
|
resets = <&nand_rst>, <&nand_reg_rst>;
|
|
#address-cells = <1>;
|
|
#size-cells = <0>;
|
|
|
|
nand@0 {
|
|
reg = <0>;
|
|
};
|
|
};
|