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.

[参考译文] PROCESSOR-SDK-AM437X:增加 NAND 位宽度不会提高启动速度

Guru**** 2427060 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/1542683/processor-sdk-am437x-increasing-the-nand-bit-width-did-not-improve-the-startup-speed

器件型号:PROCESSOR-SDK-AM437X


工具/软件:

您好、

 
我们有一块使用了很长时间的 AM437x gp EVM 板、系统是 Ubi NAND。 也会从 NAND 启动。 最近、我希望在 Hong 的支持下、成功地将 NAND 位宽度从 8 位增加到 16 位、从而提高系统的读取和写入速度。 然而,我发现从 NAND 引导后速度没有增加,而是变慢了。 我想知道增加位宽是否无法提高启动速度? 这是否是由于系统速度实际下降的原因造成的? Uboot 和 Linux 内核、系统、应用程序等与以前相同。
 一般理解是、增加数据位宽度应该可以提高读取和写入速度。
8 位 NAND 的 DTS 时序:

	nand@0,0 {
		compatible = "ti,omap2-nand";
		reg = <0 0 4>;		/* device IO registers */
		interrupt-parent = <&gpmc>;
		interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
			     <1 IRQ_TYPE_NONE>;	/* termcount */
		rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>;	/* gpmc_wait0 */
		ti,nand-xfer-type = "prefetch-dma";
		ti,nand-ecc-opt = "bch16";
		ti,elm-id = <&elm>;
		nand-bus-width = <8>;
		gpmc,device-width = <1>;
		gpmc,sync-clk-ps = <0>;
		/*CONFIG2*/
		gpmc,cs-on-ns = <0>;
		gpmc,cs-rd-off-ns = <40>;
		gpmc,cs-wr-off-ns = <40>;
		/*CONFIG3*/
		gpmc,adv-on-ns = <0>;
		gpmc,adv-rd-off-ns = <25>;
		gpmc,adv-wr-off-ns = <25>;
		/*CONFIG4*/
		gpmc,we-on-ns = <0>;
		gpmc,we-off-ns = <20>;
		gpmc,oe-on-ns = <3>;
		gpmc,oe-off-ns = <30>;
		/*CONFIG5*/
		gpmc,access-ns = <30>;
		gpmc,rd-cycle-ns = <40>;
		gpmc,wr-cycle-ns = <40>;
		/*CONFIG6*/
		gpmc,bus-turnaround-ns = <0>;
		gpmc,cycle2cycle-delay-ns = <0>;
		gpmc,clk-activation-ns = <0>;
		gpmc,wr-access-ns = <40>;
		gpmc,wr-data-mux-bus-ns = <0>;
		/* MTD partition table */
		/* All SPL-* partitions are sized to minimal length
		 * which can be independently programmable. For
		 * NAND flash this is equal to size of erase-block */
		#address-cells = <1>;
		#size-cells = <1>;

16 位 NAND 的 DTS 时序:

	nand@0,0 {
		compatible = "ti,omap2-nand";
		reg = <0 0 4>;		/* device IO registers */
		interrupt-parent = <&gpmc>;
		interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
			     <1 IRQ_TYPE_NONE>;	/* termcount */
		rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>;	/* gpmc_wait0 */
		ti,nand-xfer-type = "prefetch-dma";
		ti,elm-id = <&elm>;
		
		ti,nand-ecc-opt = "bch8";
		nand-bus-width = <16>; 
		gpmc,wait-pin = <0>;

		gpmc,sync-clk-ps = <0>;
		gpmc,cs-on-ns = <0>;
		gpmc,cs-rd-off-ns = <44>;
		gpmc,cs-wr-off-ns = <44>;
		gpmc,adv-on-ns = <6>;
		gpmc,adv-rd-off-ns = <34>;
		gpmc,adv-wr-off-ns = <44>;
		gpmc,we-off-ns = <40>;
		gpmc,oe-off-ns = <54>;
		gpmc,access-ns = <64>;
		gpmc,rd-cycle-ns = <82>;
		gpmc,wr-cycle-ns = <82>;
		gpmc,wr-access-ns = <40>;
		gpmc,wr-data-mux-bus-ns = <0>;

最好的注意!

Dudechao

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    16 位 NAND 为 MT29F4G16ABADAWP-IT:D、数据表为:

    e2e.ti.com/.../4520.MT29F8G08ADADAH4D.PDF

    最好的注意、

    Dudechao

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    从早期的 e2e 来看、您的设置中似乎使用了 U-Boot 2018.01。
    PROCESSOR-SDK-AM437X:如何将 u-boot 配置为支持 AM437x SDK 中 16 位宽度的 NAND 闪存 

    u-boot DTS 板文件中当前未使用 GPMC-nand 时序参数。 相反、GPMC-n 和参数在 u-boot src 中配置。
    请参阅补丁(在 SDK 9.3 中)、了解如何更新 u-boot src 中的 GPMC-n 和参数以提高 NAND 性能。
    https://git.ti.com/cgit/ti-u-boot/ti-u-boot/commit/arch/arm/include/asm/arch-am33xx?h=09.03.05&id=cd5b656a60fa778a3a4f435361550d0c84681f48
    此致、
    - Hong

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Hong、

    我很高兴再次收到你的答复。
    根据您的指导、在修改 mem.h 中 uboot 下的代码后、与以前相比、uboot 的启动速度已显著提高。 但是、进入 Linux 系统后、应用程序的加载速度仍然非常慢。 我是否应该修改内核下 arch/arm/boot/dts 文件中 nand 的时序? 或者、我是否应该找到 nand 驱动程序并像在 u-boot 中一样配置以下参数?
    #define M_NAND_GPMC_CONFIG1 0x00000800
    #define M_NAND_GPMC_CONFIG2 0x00050500
    #define M_NAND_GPMC_CONFIG3 0x00050401
    #define M_NAND_GPMC_CONFIG4 0x04000600
    #define M_NAND_GPMC_CONFIG5 0x00070909
    #define M_NAND_GPMC_CONFIG6 0x84000000
    #define M_NAND_GPMC_CONFIG7 0x00000008
    谢谢您!

    最好的考虑、

    Dudecchao

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    最好了解 u-boot 补丁有助于提高 u-boot GPMC-n 和设置性能。
    BTW。 通过 AM335x GP EVM 上的 u-boot 补丁、u-boot GPMC-n 和读取性能提高了 4 倍。

    内核板 dts 文件用于内核 GPMC-nand 配置。
    实际上、u-boot 补丁中的 GPMC-n 和参数应该与 AM335x GP EVM 的 GPMC-n 和配置的内核 dts 板文件相匹配
    https://git.ti.com/cgit/ti-linux-kernel/ti-linux-kernel/tree/arch/arm/boot/dts/am335x-evm.dts?h=09.03.05#n504
    此致、
    - Hong

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Hong、

    大家好、我们在内核下修改了 AM437X-gp-evm.dts 文件、如下所示:  

    &gpmc {
    	/*
    	 * When enabling GPMC, disable eMMC and set
    	 * SelEMMCorNAND to output-low
    	 */
    	status = "okay";
    	pinctrl-names = "default";
    	pinctrl-0 = <&nand_flash_x8>;/*<&gpmc_bus_default>;*//*<&nand_flash_x8>*/
    	ranges = <0 0 0x01000000 0x01000000>,	/* <0 0 0x08000000 0x01000000>,CS0 space. Min partition = 16MB */
    			 <2 0 0x08000000 0x01000000>,	/* <2 0 0x01000000 0x01000000>,CS2 space, FPGA cs2 */
    			 <3 0 0x02000000 0x01000000>;   /* <3 0 0x02000000 0x01000000>;CS3 space, FPGA cs3 */
    	nand@0,0 {
    		compatible = "ti,omap2-nand";
    		reg = <0 0 4>;		/* device IO registers */
    		interrupt-parent = <&gpmc>;
    		interrupts = <0 IRQ_TYPE_NONE>, /* fifoevent */
    			     <1 IRQ_TYPE_NONE>;	/* termcount */
    		rb-gpios = <&gpmc 0 GPIO_ACTIVE_HIGH>;	/* gpmc_wait0 */
    		ti,nand-xfer-type = "prefetch-dma";
    		ti,elm-id = <&elm>;
    		
    
    		ti,nand-ecc-opt = "bch8";
    		nand-bus-width = <16>; 
    		
    		gpmc,device-width = <1>;
    		gpmc,sync-clk-ps = <0>;
    		gpmc,cs-on-ns = <0>;
    		gpmc,cs-rd-off-ns = <44>;
    		gpmc,cs-wr-off-ns = <44>;
    		gpmc,adv-on-ns = <6>;
    		gpmc,adv-rd-off-ns = <34>;
    		gpmc,adv-wr-off-ns = <44>;
    		gpmc,we-on-ns = <0>;
    		gpmc,we-off-ns = <40>;
    		gpmc,oe-on-ns = <0>;
    		gpmc,oe-off-ns = <54>;
    		gpmc,access-ns = <64>;
    		gpmc,rd-cycle-ns = <82>;
    		gpmc,wr-cycle-ns = <82>;
    		gpmc,bus-turnaround-ns = <0>;
    		gpmc,cycle2cycle-delay-ns = <0>;
    		gpmc,clk-activation-ns = <0>;
    		gpmc,wr-access-ns = <40>;
    		gpmc,wr-data-mux-bus-ns = <0>;
    

    然而,我们发现速度没有提高。 经过比较后、我们发现此处使用的时序参数与我们之前使用的时序参数相同(之前也由您提供):  
    该时序参数是否与 u-boot 下的时序参数相同?  
    #define M_NAND_GPMC_CONFIG1 0x00000800  
    #define M_NAND_GPMC_CONFIG2 0x00050500  
    #define M_NAND_GPMC_CONFIG3 0x00050401  
    #define M_NAND_GPMC_CONFIG4 0x04000600  
    #define M_NAND_GPMC_CONFIG5 0x00070909  
    #define M_NAND_GPMC_CONFIG6 0x84000000  
    #define M_NAND_GPMC_CONFIG7 0x00000008  
      
    谢谢你。

    最好的注意、

    Dudechao

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。
    此计时参数与 u-boot 下的计时参数是否相同?  
    u-boot dts 电路板文件中当前未使用 GPMC-nand 时序参数。 相反、GPMC-n 和参数在 u-boot src 中配置。
    请参阅补丁(在 SDK 9.3 中)、了解如何更新 u-boot src 中的 GPMC-n 和参数以提高 NAND 性能。
    内核电路板 dts 文件用于内核 GPMC-n 和配置。
    实际上、u-boot 补丁中的 GPMC-nand 参数应该与 GPMC-n 的内核 dts 板文件和 AM335x GP EVM
    的配置相匹配

    我要@两个列出 GPMC_CONFIGx (x=1 到 7) 的日志以供参考:一个@u-boot;一个 kernel
    此致、
    - Hong

    e2e.ti.com/.../am3_5F00_9.1.0.1_5F00_gpmc_5F00_rd_5F00_full.log

    e2e.ti.com/.../am3_5F00_9.2.0.3_5F00_kernel_5F00_gpmc_5F00_reg.log