1c66ec88fSEmmanuel Vadot* Qualcomm NAND controller 2c66ec88fSEmmanuel Vadot 3c66ec88fSEmmanuel VadotRequired properties: 4c66ec88fSEmmanuel Vadot- compatible: must be one of the following: 5c66ec88fSEmmanuel Vadot * "qcom,ipq806x-nand" - for EBI2 NAND controller being used in IPQ806x 6c66ec88fSEmmanuel Vadot SoC and it uses ADM DMA 7c66ec88fSEmmanuel Vadot * "qcom,ipq4019-nand" - for QPIC NAND controller v1.4.0 being used in 8c66ec88fSEmmanuel Vadot IPQ4019 SoC and it uses BAM DMA 9*5def4c47SEmmanuel Vadot * "qcom,ipq6018-nand" - for QPIC NAND controller v1.5.0 being used in 10*5def4c47SEmmanuel Vadot IPQ6018 SoC and it uses BAM DMA 11c66ec88fSEmmanuel Vadot * "qcom,ipq8074-nand" - for QPIC NAND controller v1.5.0 being used in 12c66ec88fSEmmanuel Vadot IPQ8074 SoC and it uses BAM DMA 13*5def4c47SEmmanuel Vadot * "qcom,sdx55-nand" - for QPIC NAND controller v2.0.0 being used in 14*5def4c47SEmmanuel Vadot SDX55 SoC and it uses BAM DMA 15c66ec88fSEmmanuel Vadot 16c66ec88fSEmmanuel Vadot- reg: MMIO address range 17c66ec88fSEmmanuel Vadot- clocks: must contain core clock and always on clock 18c66ec88fSEmmanuel Vadot- clock-names: must contain "core" for the core clock and "aon" for the 19c66ec88fSEmmanuel Vadot always on clock 20c66ec88fSEmmanuel Vadot 21c66ec88fSEmmanuel VadotEBI2 specific properties: 22c66ec88fSEmmanuel Vadot- dmas: DMA specifier, consisting of a phandle to the ADM DMA 23c66ec88fSEmmanuel Vadot controller node and the channel number to be used for 24c66ec88fSEmmanuel Vadot NAND. Refer to dma.txt and qcom_adm.txt for more details 25c66ec88fSEmmanuel Vadot- dma-names: must be "rxtx" 26c66ec88fSEmmanuel Vadot- qcom,cmd-crci: must contain the ADM command type CRCI block instance 27c66ec88fSEmmanuel Vadot number specified for the NAND controller on the given 28c66ec88fSEmmanuel Vadot platform 29c66ec88fSEmmanuel Vadot- qcom,data-crci: must contain the ADM data type CRCI block instance 30c66ec88fSEmmanuel Vadot number specified for the NAND controller on the given 31c66ec88fSEmmanuel Vadot platform 32c66ec88fSEmmanuel Vadot 33c66ec88fSEmmanuel VadotQPIC specific properties: 34c66ec88fSEmmanuel Vadot- dmas: DMA specifier, consisting of a phandle to the BAM DMA 35c66ec88fSEmmanuel Vadot and the channel number to be used for NAND. Refer to 36c66ec88fSEmmanuel Vadot dma.txt, qcom_bam_dma.txt for more details 37c66ec88fSEmmanuel Vadot- dma-names: must contain all 3 channel names : "tx", "rx", "cmd" 38c66ec88fSEmmanuel Vadot- #address-cells: <1> - subnodes give the chip-select number 39c66ec88fSEmmanuel Vadot- #size-cells: <0> 40c66ec88fSEmmanuel Vadot 41c66ec88fSEmmanuel Vadot* NAND chip-select 42c66ec88fSEmmanuel Vadot 43c66ec88fSEmmanuel VadotEach controller may contain one or more subnodes to represent enabled 44c66ec88fSEmmanuel Vadotchip-selects which (may) contain NAND flash chips. Their properties are as 45c66ec88fSEmmanuel Vadotfollows. 46c66ec88fSEmmanuel Vadot 47c66ec88fSEmmanuel VadotRequired properties: 48c66ec88fSEmmanuel Vadot- reg: a single integer representing the chip-select 49c66ec88fSEmmanuel Vadot number (e.g., 0, 1, 2, etc.) 50c66ec88fSEmmanuel Vadot- #address-cells: see partition.txt 51c66ec88fSEmmanuel Vadot- #size-cells: see partition.txt 52c66ec88fSEmmanuel Vadot 53c66ec88fSEmmanuel VadotOptional properties: 54c66ec88fSEmmanuel Vadot- nand-bus-width: see nand-controller.yaml 55c66ec88fSEmmanuel Vadot- nand-ecc-strength: see nand-controller.yaml. If not specified, then ECC strength will 56c66ec88fSEmmanuel Vadot be used according to chip requirement and available 57c66ec88fSEmmanuel Vadot OOB size. 58c66ec88fSEmmanuel Vadot 59c66ec88fSEmmanuel VadotEach nandcs device node may optionally contain a 'partitions' sub-node, which 60c66ec88fSEmmanuel Vadotfurther contains sub-nodes describing the flash partition mapping. See 61c66ec88fSEmmanuel Vadotpartition.txt for more detail. 62c66ec88fSEmmanuel Vadot 63c66ec88fSEmmanuel VadotExample: 64c66ec88fSEmmanuel Vadot 65c66ec88fSEmmanuel Vadotnand-controller@1ac00000 { 66c66ec88fSEmmanuel Vadot compatible = "qcom,ipq806x-nand"; 67c66ec88fSEmmanuel Vadot reg = <0x1ac00000 0x800>; 68c66ec88fSEmmanuel Vadot 69c66ec88fSEmmanuel Vadot clocks = <&gcc EBI2_CLK>, 70c66ec88fSEmmanuel Vadot <&gcc EBI2_AON_CLK>; 71c66ec88fSEmmanuel Vadot clock-names = "core", "aon"; 72c66ec88fSEmmanuel Vadot 73c66ec88fSEmmanuel Vadot dmas = <&adm_dma 3>; 74c66ec88fSEmmanuel Vadot dma-names = "rxtx"; 75c66ec88fSEmmanuel Vadot qcom,cmd-crci = <15>; 76c66ec88fSEmmanuel Vadot qcom,data-crci = <3>; 77c66ec88fSEmmanuel Vadot 78c66ec88fSEmmanuel Vadot #address-cells = <1>; 79c66ec88fSEmmanuel Vadot #size-cells = <0>; 80c66ec88fSEmmanuel Vadot 81c66ec88fSEmmanuel Vadot nand@0 { 82c66ec88fSEmmanuel Vadot reg = <0>; 83c66ec88fSEmmanuel Vadot 84c66ec88fSEmmanuel Vadot nand-ecc-strength = <4>; 85c66ec88fSEmmanuel Vadot nand-bus-width = <8>; 86c66ec88fSEmmanuel Vadot 87c66ec88fSEmmanuel Vadot partitions { 88c66ec88fSEmmanuel Vadot compatible = "fixed-partitions"; 89c66ec88fSEmmanuel Vadot #address-cells = <1>; 90c66ec88fSEmmanuel Vadot #size-cells = <1>; 91c66ec88fSEmmanuel Vadot 92c66ec88fSEmmanuel Vadot partition@0 { 93c66ec88fSEmmanuel Vadot label = "boot-nand"; 94c66ec88fSEmmanuel Vadot reg = <0 0x58a0000>; 95c66ec88fSEmmanuel Vadot }; 96c66ec88fSEmmanuel Vadot 97c66ec88fSEmmanuel Vadot partition@58a0000 { 98c66ec88fSEmmanuel Vadot label = "fs-nand"; 99c66ec88fSEmmanuel Vadot reg = <0x58a0000 0x4000000>; 100c66ec88fSEmmanuel Vadot }; 101c66ec88fSEmmanuel Vadot }; 102c66ec88fSEmmanuel Vadot }; 103c66ec88fSEmmanuel Vadot}; 104c66ec88fSEmmanuel Vadot 105c66ec88fSEmmanuel Vadotnand-controller@79b0000 { 106c66ec88fSEmmanuel Vadot compatible = "qcom,ipq4019-nand"; 107c66ec88fSEmmanuel Vadot reg = <0x79b0000 0x1000>; 108c66ec88fSEmmanuel Vadot 109c66ec88fSEmmanuel Vadot clocks = <&gcc GCC_QPIC_CLK>, 110c66ec88fSEmmanuel Vadot <&gcc GCC_QPIC_AHB_CLK>; 111c66ec88fSEmmanuel Vadot clock-names = "core", "aon"; 112c66ec88fSEmmanuel Vadot 113c66ec88fSEmmanuel Vadot dmas = <&qpicbam 0>, 114c66ec88fSEmmanuel Vadot <&qpicbam 1>, 115c66ec88fSEmmanuel Vadot <&qpicbam 2>; 116c66ec88fSEmmanuel Vadot dma-names = "tx", "rx", "cmd"; 117c66ec88fSEmmanuel Vadot 118c66ec88fSEmmanuel Vadot #address-cells = <1>; 119c66ec88fSEmmanuel Vadot #size-cells = <0>; 120c66ec88fSEmmanuel Vadot 121c66ec88fSEmmanuel Vadot nand@0 { 122c66ec88fSEmmanuel Vadot reg = <0>; 123c66ec88fSEmmanuel Vadot nand-ecc-strength = <4>; 124c66ec88fSEmmanuel Vadot nand-bus-width = <8>; 125c66ec88fSEmmanuel Vadot 126c66ec88fSEmmanuel Vadot partitions { 127c66ec88fSEmmanuel Vadot compatible = "fixed-partitions"; 128c66ec88fSEmmanuel Vadot #address-cells = <1>; 129c66ec88fSEmmanuel Vadot #size-cells = <1>; 130c66ec88fSEmmanuel Vadot 131c66ec88fSEmmanuel Vadot partition@0 { 132c66ec88fSEmmanuel Vadot label = "boot-nand"; 133c66ec88fSEmmanuel Vadot reg = <0 0x58a0000>; 134c66ec88fSEmmanuel Vadot }; 135c66ec88fSEmmanuel Vadot 136c66ec88fSEmmanuel Vadot partition@58a0000 { 137c66ec88fSEmmanuel Vadot label = "fs-nand"; 138c66ec88fSEmmanuel Vadot reg = <0x58a0000 0x4000000>; 139c66ec88fSEmmanuel Vadot }; 140c66ec88fSEmmanuel Vadot }; 141c66ec88fSEmmanuel Vadot }; 142c66ec88fSEmmanuel Vadot}; 143