Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mtd/ingenic,nand.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Ingenic SoCs NAND controller devicetree bindings
0008 
0009 maintainers:
0010   - Paul Cercueil <paul@crapouillou.net>
0011 
0012 allOf:
0013   - $ref: nand-controller.yaml#
0014   - $ref: /schemas/memory-controllers/ingenic,nemc-peripherals.yaml#
0015 
0016 properties:
0017   compatible:
0018     enum:
0019       - ingenic,jz4740-nand
0020       - ingenic,jz4725b-nand
0021       - ingenic,jz4780-nand
0022 
0023   reg:
0024     items:
0025       - description: Bank number, offset and size of first attached NAND chip
0026       - description: Bank number, offset and size of second attached NAND chip
0027       - description: Bank number, offset and size of third attached NAND chip
0028       - description: Bank number, offset and size of fourth attached NAND chip
0029     minItems: 1
0030 
0031   ecc-engine: true
0032 
0033   partitions:
0034     type: object
0035     description:
0036       Node containing description of fixed partitions.
0037       See Documentation/devicetree/bindings/mtd/partition.txt
0038 
0039 patternProperties:
0040   "^nand@[a-f0-9]$":
0041     type: object
0042     properties:
0043       rb-gpios:
0044         description: GPIO specifier for the busy pin.
0045         maxItems: 1
0046 
0047       wp-gpios:
0048         description: GPIO specifier for the write-protect pin.
0049         maxItems: 1
0050 
0051 required:
0052   - compatible
0053   - reg
0054 
0055 unevaluatedProperties: false
0056 
0057 examples:
0058   - |
0059     #include <dt-bindings/clock/ingenic,jz4780-cgu.h>
0060     memory-controller@13410000 {
0061       compatible = "ingenic,jz4780-nemc";
0062       reg = <0x13410000 0x10000>;
0063       #address-cells = <2>;
0064       #size-cells = <1>;
0065       ranges = <1 0 0x1b000000 0x1000000>,
0066          <2 0 0x1a000000 0x1000000>,
0067          <3 0 0x19000000 0x1000000>,
0068          <4 0 0x18000000 0x1000000>,
0069          <5 0 0x17000000 0x1000000>,
0070          <6 0 0x16000000 0x1000000>;
0071 
0072       clocks = <&cgu JZ4780_CLK_NEMC>;
0073 
0074       nand-controller@1 {
0075         compatible = "ingenic,jz4780-nand";
0076         reg = <1 0 0x1000000>;
0077 
0078         #address-cells = <1>;
0079         #size-cells = <0>;
0080 
0081         ecc-engine = <&bch>;
0082 
0083         ingenic,nemc-tAS = <10>;
0084         ingenic,nemc-tAH = <5>;
0085         ingenic,nemc-tBP = <10>;
0086         ingenic,nemc-tAW = <15>;
0087         ingenic,nemc-tSTRV = <100>;
0088 
0089         pinctrl-names = "default";
0090         pinctrl-0 = <&pins_nemc>;
0091 
0092         nand@1 {
0093           reg = <1>;
0094 
0095           nand-ecc-step-size = <1024>;
0096           nand-ecc-strength = <24>;
0097           nand-ecc-mode = "hw";
0098           nand-on-flash-bbt;
0099 
0100           pinctrl-names = "default";
0101           pinctrl-0 = <&pins_nemc_cs1>;
0102 
0103           partitions {
0104             compatible = "fixed-partitions";
0105             #address-cells = <2>;
0106             #size-cells = <2>;
0107 
0108             partition@0 {
0109               label = "u-boot-spl";
0110               reg = <0x0 0x0 0x0 0x800000>;
0111             };
0112 
0113             partition@800000 {
0114               label = "u-boot";
0115               reg = <0x0 0x800000 0x0 0x200000>;
0116             };
0117 
0118             partition@a00000 {
0119               label = "u-boot-env";
0120               reg = <0x0 0xa00000 0x0 0x200000>;
0121             };
0122 
0123             partition@c00000 {
0124               label = "boot";
0125               reg = <0x0 0xc00000 0x0 0x4000000>;
0126             };
0127 
0128             partition@4c00000 {
0129               label = "system";
0130               reg = <0x0 0x4c00000 0x1 0xfb400000>;
0131             };
0132           };
0133         };
0134       };
0135     };