0001 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mtd/denali,nand.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Denali NAND controller
0008
0009 maintainers:
0010 - Masahiro Yamada <yamada.masahiro@socionext.com>
0011
0012 properties:
0013 compatible:
0014 enum:
0015 - altr,socfpga-denali-nand
0016 - socionext,uniphier-denali-nand-v5a
0017 - socionext,uniphier-denali-nand-v5b
0018
0019 reg-names:
0020 description: |
0021 There are two register regions:
0022 nand_data: host data/command interface
0023 denali_reg: register interface
0024 items:
0025 - const: nand_data
0026 - const: denali_reg
0027
0028 reg:
0029 minItems: 2
0030 maxItems: 2
0031
0032 interrupts:
0033 maxItems: 1
0034
0035 clock-names:
0036 description: |
0037 There are three clocks:
0038 nand: controller core clock
0039 nand_x: bus interface clock
0040 ecc: ECC circuit clock
0041 items:
0042 - const: nand
0043 - const: nand_x
0044 - const: ecc
0045
0046 clocks:
0047 minItems: 3
0048 maxItems: 3
0049
0050 reset-names:
0051 description: |
0052 There are two optional resets:
0053 nand: controller core reset
0054 reg: register reset
0055 oneOf:
0056 - items:
0057 - const: nand
0058 - const: reg
0059 - const: nand
0060 - const: reg
0061
0062 resets:
0063 minItems: 1
0064 maxItems: 2
0065
0066 allOf:
0067 - $ref: nand-controller.yaml
0068
0069 - if:
0070 properties:
0071 compatible:
0072 contains:
0073 const: altr,socfpga-denali-nand
0074 then:
0075 patternProperties:
0076 "^nand@[a-f0-9]$":
0077 type: object
0078 properties:
0079 nand-ecc-strength:
0080 enum:
0081 - 8
0082 - 15
0083 nand-ecc-step-size:
0084 enum:
0085 - 512
0086
0087 - if:
0088 properties:
0089 compatible:
0090 contains:
0091 const: socionext,uniphier-denali-nand-v5a
0092 then:
0093 patternProperties:
0094 "^nand@[a-f0-9]$":
0095 type: object
0096 properties:
0097 nand-ecc-strength:
0098 enum:
0099 - 8
0100 - 16
0101 - 24
0102 nand-ecc-step-size:
0103 enum:
0104 - 1024
0105
0106 - if:
0107 properties:
0108 compatible:
0109 contains:
0110 const: socionext,uniphier-denali-nand-v5b
0111 then:
0112 patternProperties:
0113 "^nand@[a-f0-9]$":
0114 type: object
0115 properties:
0116 nand-ecc-strength:
0117 enum:
0118 - 8
0119 - 16
0120 nand-ecc-step-size:
0121 enum:
0122 - 1024
0123
0124 required:
0125 - compatible
0126 - reg
0127 - interrupts
0128 - clock-names
0129 - clocks
0130
0131 unevaluatedProperties: false
0132
0133 examples:
0134 - |
0135 nand-controller@ff900000 {
0136 compatible = "altr,socfpga-denali-nand";
0137 reg-names = "nand_data", "denali_reg";
0138 reg = <0xff900000 0x20>, <0xffb80000 0x1000>;
0139 interrupts = <0 144 4>;
0140 clock-names = "nand", "nand_x", "ecc";
0141 clocks = <&nand_clk>, <&nand_x_clk>, <&nand_ecc_clk>;
0142 reset-names = "nand", "reg";
0143 resets = <&nand_rst>, <&nand_reg_rst>;
0144 #address-cells = <1>;
0145 #size-cells = <0>;
0146
0147 nand@0 {
0148 reg = <0>;
0149 };
0150 };