MTK Smart Device Gen1 NAND Driver - Testing on MT7623

John Crispin blogic at openwrt.org
Wed Apr 27 01:41:31 PDT 2016


Hi Boris,

>>
>> the devicetree i am using is this
>>
>> &nandc {
>>         status = "okay";
>>         pinctrl-names = "default";
>>         pinctrl-0 = <&nand_pins_default>;
>>         nand at 0 {
>>                 reg = <0>;
>>                 spare_per_sector = <64>;
> 
> If I understood the meaning of spare_per_sector correctly, this should
> be 32 (you have 2K pages and 1024 bytes sectors, so you have 2 sectors
> and want to equally assign the 64 OOB bytes to those sectors =>
> 64 / 2 = 32).
> 
> Anyway, hopefully all this complexity will be gone in the next version
> along with the need to define nand-ecc-strength and nand-ecc-step-size
> (which should be part of the NAND chip detection unless you really
> need to overload them).
> 

thanks for the info. i tried that aswell as some other settings but none
makes the flash work. lets see if Jorge has some ideas. otherwise i will
wait for V4.

	John

>>                 nand-on-flash-bbt;
>>                 nand-ecc-mode = "hw";
>>                 nand-ecc-strength = <12>;
>>                 nand-ecc-step-size = <1024>;
>>                 partitions {
>>                         compatible = "fixed-partitions";
>>                         #address-cells = <1>;
>>                         #size-cells = <1>;
>>
>>                         partition at C0000 {
>>                                 label = "uboot-env";
>>                                 reg = <0xC0000 0x40000>;
>>                         };
>>
>>                         partition at 100000 {
>>                                 label = "factory";
>>                                 reg = <0x100000 0x40000>;
>>                         };
>>
>>                         partition at 140000 {
>>                                 label = "kernel";
>>                                 reg = <0x140000 0x2000000>;
>>                         };
>>
>>                         partition at 2140000 {
>>                                 label = "recovery";
>>                                 reg = <0x2140000 0x2000000>;
>>                         };
>>
>>                         partition at 4140000 {
>>                                 label = "rootfs";
>>                                 reg = <0x4140000 0x1000000>;
>>                         };
>>                 };
>>         };
>> };
> 
> 



More information about the Linux-mediatek mailing list