15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 25def4c47SEmmanuel Vadot%YAML 1.2 35def4c47SEmmanuel Vadot--- 45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/mtd/rockchip,nand-controller.yaml# 55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65def4c47SEmmanuel Vadot 75def4c47SEmmanuel Vadottitle: Rockchip SoCs NAND FLASH Controller (NFC) 85def4c47SEmmanuel Vadot 95def4c47SEmmanuel VadotallOf: 10fac71e4eSEmmanuel Vadot - $ref: nand-controller.yaml# 115def4c47SEmmanuel Vadot 125def4c47SEmmanuel Vadotmaintainers: 135def4c47SEmmanuel Vadot - Heiko Stuebner <heiko@sntech.de> 145def4c47SEmmanuel Vadot 155def4c47SEmmanuel Vadotproperties: 165def4c47SEmmanuel Vadot compatible: 175def4c47SEmmanuel Vadot oneOf: 185def4c47SEmmanuel Vadot - const: rockchip,px30-nfc 195def4c47SEmmanuel Vadot - const: rockchip,rk2928-nfc 205def4c47SEmmanuel Vadot - const: rockchip,rv1108-nfc 215def4c47SEmmanuel Vadot - items: 228bab661aSEmmanuel Vadot - enum: 238bab661aSEmmanuel Vadot - rockchip,rk3036-nfc 248bab661aSEmmanuel Vadot - rockchip,rk3128-nfc 255def4c47SEmmanuel Vadot - const: rockchip,rk2928-nfc 265def4c47SEmmanuel Vadot - items: 275def4c47SEmmanuel Vadot - const: rockchip,rk3308-nfc 285def4c47SEmmanuel Vadot - const: rockchip,rv1108-nfc 295def4c47SEmmanuel Vadot 305def4c47SEmmanuel Vadot reg: 315def4c47SEmmanuel Vadot maxItems: 1 325def4c47SEmmanuel Vadot 335def4c47SEmmanuel Vadot interrupts: 345def4c47SEmmanuel Vadot maxItems: 1 355def4c47SEmmanuel Vadot 365def4c47SEmmanuel Vadot clocks: 375def4c47SEmmanuel Vadot minItems: 1 385def4c47SEmmanuel Vadot items: 395def4c47SEmmanuel Vadot - description: Bus Clock 405def4c47SEmmanuel Vadot - description: Module Clock 415def4c47SEmmanuel Vadot 425def4c47SEmmanuel Vadot clock-names: 435def4c47SEmmanuel Vadot minItems: 1 445def4c47SEmmanuel Vadot items: 455def4c47SEmmanuel Vadot - const: ahb 465def4c47SEmmanuel Vadot - const: nfc 475def4c47SEmmanuel Vadot 485def4c47SEmmanuel Vadot assigned-clocks: 495def4c47SEmmanuel Vadot maxItems: 1 505def4c47SEmmanuel Vadot 515def4c47SEmmanuel Vadot assigned-clock-rates: 525def4c47SEmmanuel Vadot maxItems: 1 535def4c47SEmmanuel Vadot 545def4c47SEmmanuel Vadot power-domains: 555def4c47SEmmanuel Vadot maxItems: 1 565def4c47SEmmanuel Vadot 575def4c47SEmmanuel VadotpatternProperties: 585def4c47SEmmanuel Vadot "^nand@[0-7]$": 595def4c47SEmmanuel Vadot type: object 60*f126890aSEmmanuel Vadot $ref: raw-nand-chip.yaml 615def4c47SEmmanuel Vadot properties: 625def4c47SEmmanuel Vadot reg: 635def4c47SEmmanuel Vadot minimum: 0 645def4c47SEmmanuel Vadot maximum: 7 655def4c47SEmmanuel Vadot 665def4c47SEmmanuel Vadot nand-ecc-mode: 675def4c47SEmmanuel Vadot const: hw 685def4c47SEmmanuel Vadot 695def4c47SEmmanuel Vadot nand-ecc-step-size: 705def4c47SEmmanuel Vadot const: 1024 715def4c47SEmmanuel Vadot 725def4c47SEmmanuel Vadot nand-ecc-strength: 735def4c47SEmmanuel Vadot enum: [16, 24, 40, 60, 70] 745def4c47SEmmanuel Vadot description: | 755def4c47SEmmanuel Vadot The ECC configurations that can be supported are as follows. 765def4c47SEmmanuel Vadot NFC v600 ECC 16, 24, 40, 60 775def4c47SEmmanuel Vadot RK2928, RK3066, RK3188 785def4c47SEmmanuel Vadot 795def4c47SEmmanuel Vadot NFC v622 ECC 16, 24, 40, 60 805def4c47SEmmanuel Vadot RK3036, RK3128 815def4c47SEmmanuel Vadot 825def4c47SEmmanuel Vadot NFC v800 ECC 16 835def4c47SEmmanuel Vadot RK3308, RV1108 845def4c47SEmmanuel Vadot 855def4c47SEmmanuel Vadot NFC v900 ECC 16, 40, 60, 70 865def4c47SEmmanuel Vadot RK3326, PX30 875def4c47SEmmanuel Vadot 885def4c47SEmmanuel Vadot nand-bus-width: 895def4c47SEmmanuel Vadot const: 8 905def4c47SEmmanuel Vadot 915def4c47SEmmanuel Vadot rockchip,boot-blks: 925def4c47SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 935def4c47SEmmanuel Vadot minimum: 2 945def4c47SEmmanuel Vadot default: 16 955def4c47SEmmanuel Vadot description: 965def4c47SEmmanuel Vadot The NFC driver need this information to select ECC 975def4c47SEmmanuel Vadot algorithms supported by the boot ROM. 985def4c47SEmmanuel Vadot Only used in combination with 'nand-is-boot-medium'. 995def4c47SEmmanuel Vadot 1005def4c47SEmmanuel Vadot rockchip,boot-ecc-strength: 1015def4c47SEmmanuel Vadot enum: [16, 24, 40, 60, 70] 102c9ccf3a3SEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 1035def4c47SEmmanuel Vadot description: | 1045def4c47SEmmanuel Vadot If specified it indicates that a different BCH/ECC setting is 1055def4c47SEmmanuel Vadot supported by the boot ROM. 1065def4c47SEmmanuel Vadot NFC v600 ECC 16, 24 1075def4c47SEmmanuel Vadot RK2928, RK3066, RK3188 1085def4c47SEmmanuel Vadot 1095def4c47SEmmanuel Vadot NFC v622 ECC 16, 24, 40, 60 1105def4c47SEmmanuel Vadot RK3036, RK3128 1115def4c47SEmmanuel Vadot 1125def4c47SEmmanuel Vadot NFC v800 ECC 16 1135def4c47SEmmanuel Vadot RK3308, RV1108 1145def4c47SEmmanuel Vadot 1155def4c47SEmmanuel Vadot NFC v900 ECC 16, 70 1165def4c47SEmmanuel Vadot RK3326, PX30 1175def4c47SEmmanuel Vadot 1185def4c47SEmmanuel Vadot Only used in combination with 'nand-is-boot-medium'. 1195def4c47SEmmanuel Vadot 120*f126890aSEmmanuel Vadot unevaluatedProperties: false 121*f126890aSEmmanuel Vadot 1225def4c47SEmmanuel Vadotrequired: 1235def4c47SEmmanuel Vadot - compatible 1245def4c47SEmmanuel Vadot - reg 1255def4c47SEmmanuel Vadot - interrupts 1265def4c47SEmmanuel Vadot - clocks 1275def4c47SEmmanuel Vadot - clock-names 1285def4c47SEmmanuel Vadot 1295def4c47SEmmanuel VadotunevaluatedProperties: false 1305def4c47SEmmanuel Vadot 1315def4c47SEmmanuel Vadotexamples: 1325def4c47SEmmanuel Vadot - | 1335def4c47SEmmanuel Vadot #include <dt-bindings/clock/rk3308-cru.h> 1345def4c47SEmmanuel Vadot #include <dt-bindings/interrupt-controller/arm-gic.h> 1355def4c47SEmmanuel Vadot nfc: nand-controller@ff4b0000 { 1365def4c47SEmmanuel Vadot compatible = "rockchip,rk3308-nfc", 1375def4c47SEmmanuel Vadot "rockchip,rv1108-nfc"; 1385def4c47SEmmanuel Vadot reg = <0xff4b0000 0x4000>; 1395def4c47SEmmanuel Vadot interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>; 1405def4c47SEmmanuel Vadot clocks = <&cru HCLK_NANDC>, <&cru SCLK_NANDC>; 1415def4c47SEmmanuel Vadot clock-names = "ahb", "nfc"; 1425def4c47SEmmanuel Vadot assigned-clocks = <&clks SCLK_NANDC>; 1435def4c47SEmmanuel Vadot assigned-clock-rates = <150000000>; 1445def4c47SEmmanuel Vadot 1455def4c47SEmmanuel Vadot pinctrl-0 = <&flash_ale &flash_bus8 &flash_cle &flash_csn0 1465def4c47SEmmanuel Vadot &flash_rdn &flash_rdy &flash_wrn>; 1475def4c47SEmmanuel Vadot pinctrl-names = "default"; 1485def4c47SEmmanuel Vadot 1495def4c47SEmmanuel Vadot #address-cells = <1>; 1505def4c47SEmmanuel Vadot #size-cells = <0>; 1515def4c47SEmmanuel Vadot 1525def4c47SEmmanuel Vadot nand@0 { 1535def4c47SEmmanuel Vadot reg = <0>; 1545def4c47SEmmanuel Vadot label = "rk-nand"; 1555def4c47SEmmanuel Vadot nand-bus-width = <8>; 1565def4c47SEmmanuel Vadot nand-ecc-mode = "hw"; 1575def4c47SEmmanuel Vadot nand-ecc-step-size = <1024>; 1585def4c47SEmmanuel Vadot nand-ecc-strength = <16>; 1595def4c47SEmmanuel Vadot nand-is-boot-medium; 1605def4c47SEmmanuel Vadot rockchip,boot-blks = <8>; 1615def4c47SEmmanuel Vadot rockchip,boot-ecc-strength = <16>; 1625def4c47SEmmanuel Vadot }; 1635def4c47SEmmanuel Vadot }; 1645def4c47SEmmanuel Vadot 1655def4c47SEmmanuel Vadot... 166