Ecc in uboot dtsi, imx6ull

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Ecc in uboot dtsi, imx6ull

981 Views
dc1
Contributor II

Hello, I have a question about the dtsi for the imx6ull.
In this project we have had problems with esd discharge during the mounting of the device. Sometimes happen that the system stop on uboot, it doesn't be able to load the operating system for some memory bad block read. We have solved the problem adding some esd diode and putting more attention during the production of the device.
Nevertheless this don't have to happen because our memory, a micron mt29f32g08, contain the ecc. So this feature need to be able to correct some bit flip.
Checking our dtsi, based on the imx6ull evk dtsi (
https://github.com/ARM-software/u-bo...-14x14-evk.dts) we have:

gpmi: gpmi-nand@01806000{
compatible = "fsl,imx6ull-gpmi-nand", "fsl, imx6ul-gpmi-nand";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x01806000 0x2000>, <0x01808000 0x4000>;
reg-names = "gpmi-nand", "bch";
interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "bch";
clocks = <&clks IMX6UL_CLK_GPMI_IO>,
<&clks IMX6UL_CLK_GPMI_APB>,
<&clks IMX6UL_CLK_GPMI_BCH>,
<&clks IMX6UL_CLK_GPMI_BCH_APB>,
<&clks IMX6UL_CLK_PER_BCH>;
clock-names = "gpmi_io", "gpmi_apb", "gpmi_bch",
"gpmi_bch_apb", "per1_bch";
dmas = <&dma_apbh 0>;
dma-names = "rx-tx";
status = "disabled";
};

in this we don't have mention about the ecc, instead in the colibri imx6ull board dtsi https://github.com/u-boot/u-boot/blo...l-colibri.dtsi we have:

/* NAND */
&gpmi {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpmi_nand>;
nand-on-flash-bbt;
nand-ecc-mode = "hw";
nand-ecc-strength = <8>;
nand-ecc-step-size = <512>;
status = "okay";
};

my question is so, for enable the ecc hardware feature we need to add this nand-ecc-mode = "hw" property? and this is enough or we need some library for uboot?

Someone can help me? the documentation on internet about these parameters are not many and many times not cleart. Thanks

Labels (1)
0 Kudos
Reply
1 Reply

928 Views
igorpadykov
NXP Employee
NXP Employee

Hi Daniele

from linux documentation seems nand-ecc-mode = "hw" is used when errors are corrected

by i.mx bch module, "on-die" when corrected by nand chip internally:

https://www.kernel.org/doc/Documentation/devicetree/bindings/mtd/nand.txt 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------