166 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/mtd/rockchip,nand-controller.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Rockchip SoCs NAND FLASH Controller (NFC)8 9allOf:10 - $ref: nand-controller.yaml#11 12maintainers:13 - Heiko Stuebner <heiko@sntech.de>14 15properties:16 compatible:17 oneOf:18 - const: rockchip,px30-nfc19 - const: rockchip,rk2928-nfc20 - const: rockchip,rv1108-nfc21 - items:22 - enum:23 - rockchip,rk3036-nfc24 - rockchip,rk3128-nfc25 - const: rockchip,rk2928-nfc26 - items:27 - const: rockchip,rk3308-nfc28 - const: rockchip,rv1108-nfc29 30 reg:31 maxItems: 132 33 interrupts:34 maxItems: 135 36 clocks:37 minItems: 138 items:39 - description: Bus Clock40 - description: Module Clock41 42 clock-names:43 minItems: 144 items:45 - const: ahb46 - const: nfc47 48 assigned-clocks:49 maxItems: 150 51 assigned-clock-rates:52 maxItems: 153 54 power-domains:55 maxItems: 156 57patternProperties:58 "^nand@[0-7]$":59 type: object60 $ref: raw-nand-chip.yaml61 properties:62 reg:63 minimum: 064 maximum: 765 66 nand-ecc-mode:67 const: hw68 69 nand-ecc-step-size:70 const: 102471 72 nand-ecc-strength:73 enum: [16, 24, 40, 60, 70]74 description: |75 The ECC configurations that can be supported are as follows.76 NFC v600 ECC 16, 24, 40, 6077 RK2928, RK3066, RK318878 79 NFC v622 ECC 16, 24, 40, 6080 RK3036, RK312881 82 NFC v800 ECC 1683 RK3308, RV110884 85 NFC v900 ECC 16, 40, 60, 7086 RK3326, PX3087 88 nand-bus-width:89 const: 890 91 rockchip,boot-blks:92 $ref: /schemas/types.yaml#/definitions/uint3293 minimum: 294 default: 1695 description:96 The NFC driver need this information to select ECC97 algorithms supported by the boot ROM.98 Only used in combination with 'nand-is-boot-medium'.99 100 rockchip,boot-ecc-strength:101 enum: [16, 24, 40, 60, 70]102 $ref: /schemas/types.yaml#/definitions/uint32103 description: |104 If specified it indicates that a different BCH/ECC setting is105 supported by the boot ROM.106 NFC v600 ECC 16, 24107 RK2928, RK3066, RK3188108 109 NFC v622 ECC 16, 24, 40, 60110 RK3036, RK3128111 112 NFC v800 ECC 16113 RK3308, RV1108114 115 NFC v900 ECC 16, 70116 RK3326, PX30117 118 Only used in combination with 'nand-is-boot-medium'.119 120 unevaluatedProperties: false121 122required:123 - compatible124 - reg125 - interrupts126 - clocks127 - clock-names128 129unevaluatedProperties: false130 131examples:132 - |133 #include <dt-bindings/clock/rk3308-cru.h>134 #include <dt-bindings/interrupt-controller/arm-gic.h>135 nfc: nand-controller@ff4b0000 {136 compatible = "rockchip,rk3308-nfc",137 "rockchip,rv1108-nfc";138 reg = <0xff4b0000 0x4000>;139 interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;140 clocks = <&cru HCLK_NANDC>, <&cru SCLK_NANDC>;141 clock-names = "ahb", "nfc";142 assigned-clocks = <&clks SCLK_NANDC>;143 assigned-clock-rates = <150000000>;144 145 pinctrl-0 = <&flash_ale &flash_bus8 &flash_cle &flash_csn0146 &flash_rdn &flash_rdy &flash_wrn>;147 pinctrl-names = "default";148 149 #address-cells = <1>;150 #size-cells = <0>;151 152 nand@0 {153 reg = <0>;154 label = "rk-nand";155 nand-bus-width = <8>;156 nand-ecc-mode = "hw";157 nand-ecc-step-size = <1024>;158 nand-ecc-strength = <16>;159 nand-is-boot-medium;160 rockchip,boot-blks = <8>;161 rockchip,boot-ecc-strength = <16>;162 };163 };164 165...166