TI中文支持网
TI专业的中文技术问题搜集分享网站

am335x linux Nand gpmc driver error: omap2-nand 8000000.nand: uncorrectable bit-flips found

ti工程师 你好,
我的板子是beaglebone-black 加了一片 Nand chip: MT29F8G08ABACAH4 (4k page ,SLC,8 bit width)
uboot 可以正常工作, ECC 用 bch16 (uboot:am335x_evm.h #define CONFIG_NAND_OMAP_ECCSCHEME    OMAP_ECC_BCH16_CODE_HW )
linux可以挂载UBIFS文件系统并登陆,但是reboot后ubifs损坏。
linux登陆后后有 下面的错误消息。请帮忙看下是否正常。如何修正
got error dmesg:
—————
omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/nandflash_pins_default, deferring probe

[    7.882490] omap2-nand 8000000.nand: uncorrectable bit-flips found
[    7.895575] omap2-nand 8000000.nand: uncorrectable bit-flips found

在linux 4-4 内核的dts改动如下
————————————-
am335x-boneblack.dts

 &am33xx_pinmux {
  …
/*I add nand support,bellow is taken from am335x-evm.dts */
  nandflash_pins_default: nandflash_pins_default {
                  pinctrl-single,pins = <
                          0x0 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad0.gpmc_ad0 */
                          0x4 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad1.gpmc_ad1 */
                          0x8 (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad2.gpmc_ad2 */
                          0xc (PIN_INPUT_PULLUP | MUX_MODE0)      /* gpmc_ad3.gpmc_ad3 */
                          0x10 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad4.gpmc_ad4 */
                          0x14 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad5.gpmc_ad5 */
                          0x18 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad6.gpmc_ad6 */
                          0x1c (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_ad7.gpmc_ad7 */
                          0x70 (PIN_INPUT_PULLUP | MUX_MODE0)     /* gpmc_wait0.gpmc_wait0 */
                          0x74 (PIN_INPUT_PULLUP | MUX_MODE7)     /* gpmc_wpn.gpio0_30 */
                          0x7c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_csn0.gpmc_csn0  */
                          0x90 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_advn_ale.gpmc_advn_ale */
                          0x94 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_oen_ren.gpmc_oen_ren */
                          0x98 (PIN_OUTPUT | MUX_MODE0)           /* gpmc_wen.gpmc_wen */
                          0x9c (PIN_OUTPUT | MUX_MODE0)           /* gpmc_be0n_cle.gpmc_be0n_cle */
                  >;

          };           nandflash_pins_sleep: nandflash_pins_sleep {

                  pinctrl-single,pins = <
                          0x0 (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x4 (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x8 (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0xc (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x10 (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x14 (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x18 (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x1c (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x70 (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x74 (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x7c (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x90 (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x94 (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x98 (PIN_INPUT_PULLDOWN | MUX_MODE7)
                          0x9c (PIN_INPUT_PULLDOWN | MUX_MODE7)
                  >;
          };

 };

 &gpmc {
          status = "okay";
          pinctrl-names = "default","sleep";
          pinctrl-0 = <&nandflash_pins_default>;
          pinctrl-1 = <&nandflash_pins_sleep>;
          ranges = <0 0 0x08000000 0x1000000>;    /* CS0: 16MB for NAND */
          nand@0,0 {
                  compatible = "ti,omap2-nand";
                  reg = <0 0 4>; /* CS0, offset 0, IO size 4 */
                  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-ecc-opt = "bch16";
                  ti,elm-id = <&elm>;
                  nand-bus-width = <8>;
                  gpmc,device-width = <1>;
                  gpmc,sync-clk-ps = <0>;
                  gpmc,cs-on-ns = <0>;
                  gpmc,cs-rd-off-ns = <40>;
                  gpmc,cs-wr-off-ns = <40>;
                  gpmc,adv-on-ns = <0>;
                  gpmc,adv-rd-off-ns = <25>;
                  gpmc,adv-wr-off-ns = <25>;
                  gpmc,we-on-ns = <0>;
                  gpmc,we-off-ns = <20>;
                  gpmc,oe-on-ns = <3>;
                  gpmc,oe-off-ns = <30>;
                  gpmc,access-ns = <30>;
                  gpmc,rd-cycle-ns = <40>;
                  gpmc,wr-cycle-ns = <40>;
                  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>;
                  partition@0 {
                          label = "NAND.SPL";
                          reg = <0x00000000 0x000020000>;
                  };
                  partition@1 {
                          label = "NAND.SPL.backup1";
                          reg = <0x00020000 0x00020000>;
                  };
                  partition@2 {
                          label = "NAND.SPL.backup2";
                          reg = <0x00040000 0x00020000>;
                  };
                  partition@3 {
                          label = "NAND.SPL.backup3";
                          reg = <0x00060000 0x00020000>;
                  };
                  partition@4 {
                          label = "NAND.u-boot-spl-os";
                          reg = <0x00080000 0x00040000>;
                  };
                  partition@5 {
                          label = "NAND.u-boot";
                          reg = <0x000C0000 0x00100000>;
                  };
                  partition@6 {
                          label = "NAND.u-boot-env";
                          reg = <0x001C0000 0x00020000>;
                  };
                   partition@7 {
                          label = "NAND.u-boot-env.backup1";
                          reg = <0x001E0000 0x00020000>;
                  };
                  partition@8 {
                          label = "NAND.kernel";
                          reg = <0x00200000 0x00800000>;
                  };
                  partition@9 {
                          label = "NAND.file-system";
                          reg = <0x00A00000 0x0F600000>;
                  };
          };
  };
谢谢

James
james shang:

hi,

Shine:

回复 james shang:

请看一下重新刷文件系统后,是否可以正常启动?ubifs文件损坏是在一次reboot后就发生了吗?

Eggsy Pang:

参考

http://processors.wiki.ti.com/index.php/Raw_NAND_ECC#Is_it_possible_to_use_any_ECC_algorithm_for_any_NAND.3F

赞(0)
未经允许不得转载:TI中文支持网 » am335x linux Nand gpmc driver error: omap2-nand 8000000.nand: uncorrectable bit-flips found
分享到: 更多 (0)