This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[66AK2H14]DTS file for EMIF NOR flash?

Dear Champs,

Is there DTS file for EMIF NOR flash can be referenced?

I need reference DTS file for MCSDK3.14 to implement NOR booting, and please share it if you have.

My customer is trying to set for EMIF NOR flash in DTS file, but could not have any idea on it.

So, they are requesting reference file. please help on this.

Thanks and Best Regards,

SI.

  • Hi,

    Refer to the following e2e thread. Post by Shankari:
    e2e.ti.com/.../1740869

    You should change the:
    sram: cs5@0x3C000000 {

    compatible = "mmio-sram";

    reg = <0x3C000000 0x40000>; /* 256 KiB SRAM at address 0x3C000000 */

    };

    part with:
    nor: cs5@38000000 {
    compatible = "<corresponding driver>";
    reg = <38000000 0xsize_you_want_to_use> ; /*max size is 64MB*/
    };
    };

    Best Regards,
    Yordan
  • Hi Yordan,

    My customer implemented it for their custom board, but got warning message.

    aemif@30000000 {
    nand_cs:cs2@30000000 {
    compatible = "ti,davinci-cs";
    #address-cells = <1>;
    #size-cells = <1>;
    /* all timings in nanoseconds */
    ti,davinci-cs-ta = <12>;
    ti,davinci-cs-rhold = <6>;
    ti,davinci-cs-rstrobe = <23>;
    ti,davinci-cs-rsetup = <9>;
    ti,davinci-cs-whold = <8>;
    ti,davinci-cs-wstrobe = <23>;
    ti,davinci-cs-wsetup = <8>;
    };
    nand@2,0 {
    compatible = "ti,davinci-nand";
    reg = <2 0x0 0x8000000
    6 0x0 0x100>;
    #address-cells = <1>;
    #size-cells = <1>;
    ti,davinci-chipselect = <0>;
    ti,davinci-mask-ale = <0x2000>;
    ti,davinci-mask-cle = <0x4000>;
    ti,davinci-mask-chipsel = <0>;
    ti,davinci-ecc-mode = "hw";
    ti,davinci-ecc-bits = <4>;
    ti,davinci-nand-use-bbt;
    ti,davinci-no-subpage-write;
    clocks = <&clkaemif>;
    clock-names = "aemif";

    partition@0 {
    label = "u-boot";
    reg = <0x0 0x100000>;
    read-only;
    };

    partition@100000 {
    label = "params";
    reg = <0x100000 0x80000>;
    read-only;
    };

    partition@180000 {
    label = "ubifs";
    reg = <0x180000 0x1fe80000>;
    };
    };

    nor:cs1@0x34000000{ <- Insert for NOR flash
    compatible = "cfi-flash";
    #address-cells = <1>;
    #size-cells = <1>;

    reg = <0x34000000 0x2000000>; <- Warning occurred!
    partition@0 { <- 파티션 추가
    label = "nor";
    reg = <0 0x2000000>;
    };
    };

    };

    When they try to make dtb file uisng this modified dts file, but found warning msg as below.

    dtc -I dts -O dtb -o uImage-k2hk-evm.dtb k2hk-evm.dts
    Warning (reg_format): "reg" property in /soc/aemif@30000000/cs1@0x34000000 has invalid length (8 bytes) (#address-cells == 2, #size-cells == 1)


    It seems there is wrong in reg settings. Could you please check this?


    Thanks and Best Regards,
    SI.
  • Hi,

    Have a look at Documentation/devicetree/bindings/memory-controllers/ti-aemif.txt. I think you get the errors because of the address-cells & size-cells values:

    - #address-cells: Must be 2. The partition number has to be encoded in the
    first address cell and it may accept values 0..N-1
    (N - total number of partitions). It's recommended to
    assign N-1 number for the control partition. The second
    cell is the offset into the partition.

    - #size-cells: Must be set to 1.


    Best Regards,
    Yordan