On 2016-08-24 13:49, John Crispin wrote:
On 24/08/2016 13:44, Kenneth Johansson wrote:
On 2016-08-24 13:32, John Crispin wrote:
On 24/08/2016 13:25, Kenneth Johansson wrote:
What is the status of the nand driver for mt7621 ??
when I try to use it the probing is ok but it fails when I try to
read/write.
known to be working and i used it on the ERX just last week. what
specifc board is this and can you post your dts file please. initial
guess is that pinmux might be bad.
CONFIG_TARGET_SUBTARGET="mt7621"
CONFIG_TARGET_PROFILE="DEVICE_mt7621"
just a thought how do we pass detection with wrong pinmux setting.
badblocks is found it's when the first page read with ecc it fails.
also this code is in the driver, so whatever pins is in the DTS this
code sets back to nand function.
data = DRV_Reg32(RALINK_SYSCTL_BASE+0x60);
data &= ~((0x3<<18)|(0x3<<16));
data |= ((0x2<<18) |(0x2<<16));
DRV_WriteReg32(RALINK_SYSCTL_BASE+0x60, data);
DTS is from target/linux/ramips/dts/mt7621.dtsi with one change.
----------
diff --git a/target/linux/ramips/dts/mt7621.dtsi
b/target/linux/ramips/dts/mt7621.dtsi
index a8b98ed..1b2c22c 100644
--- a/target/linux/ramips/dts/mt7621.dtsi
+++ b/target/linux/ramips/dts/mt7621.dtsi
@@ -360,7 +360,7 @@
};
nand: nand@1e003000 {
- status = "disabled";
+
compatible = "mtk,mt7621-nand";
bank-width = <2>;
----------
sdhci and nand share the same pins. target/linux/ramips/dts/MT7621.dts
enables gpio mode for the sdhci pins. also make sure that the sdhci
driver is not loaded.
the sdhci driver is not even built. Did this to avoid setting to gpio.
still same error . Can it be some clock issue do the ecc hardware have
separate internal clock in the chip ? its two blocks but clk and reset
looks to be the same bit for both.
------
diff --git a/target/linux/ramips/dts/MT7621.dts
b/target/linux/ramips/dts/MT7621.dts
index 4013f3c..b5d5946 100644
--- a/target/linux/ramips/dts/MT7621.dts
+++ b/target/linux/ramips/dts/MT7621.dts
@@ -39,7 +39,7 @@
};
&sdhci {
- status = "okay";
+ status = "disable";
};
&xhci {
@@ -49,7 +49,7 @@
&pinctrl {
state_default: pinctrl0 {
gpio {
- ralink,group = "i2c", "uart2", "uart3",
"rgmii2", "sdhci";
+ ralink,group = "i2c", "uart2", "uart3", "rgmii2";
ralink,function = "gpio";
};
};
------
John
John
[ 4.150000] MediaTek Nand driver init, version v2.1 Fix AHB virt2phys
error
[ 4.170000] Allocate 16 byte aligned buffer: 806f3100
[ 4.180000] Enable NFI Clock
[ 4.180000] # MTK NAND # : Use HW ECC
[ 4.190000] Device not found, ID: ecf1
[ 4.200000] Not Support this Device!
[ 4.200000] chip_mode=00000002
[ 4.210000] Support this Device in MTK table! ecf1
[ 4.220000] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[ 4.230000] nand: Samsung NAND 128MiB 3,3V 8-bit
[ 4.240000] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048,
OOB size: 64
[ 4.260000] [NAND]select ecc bit:4, sparesize :64 spare_per_sector=16
[ 4.270000] Scanning device for bad blocks
[ 4.280000] Bad eraseblock 2 at 0x000000040000
[ 4.290000] Bad eraseblock 3 at 0x000000060000
[ 4.400000] Bad eraseblock 306 at 0x000002640000
[ 4.440000] Bad eraseblock 386 at 0x000003040000
[ 4.510000] Bad eraseblock 588 at 0x000004980000
[ 4.670000] 4 ofpart partitions found on MTD device MT7621-NAND
[ 4.680000] Creating 4 MTD partitions on "MT7621-NAND":
[ 4.690000] 0x000000000000-0x000000080000 : "uboot"
[ 4.700000] 0x000000080000-0x000000100000 : "uboot_env"
[ 4.710000] 0x000000100000-0x000000140000 : "factory"
[ 4.720000] 0x000000140000-0x000001000000 : "rootfs"
[ 4.740000] mtd: device 3 (rootfs) set to be root filesystem
[ 4.750000] mtdsplit: no squashfs found in "rootfs"
[ 4.760000] [mtk_nand] probe successfully!
#cat /dev/mtd0 >/dev/null
[ 75.910000] [mtk_nand_mcu_read_data] timeout
[ 75.940000] [mtk_nand_mcu_read_data] timeout
[ 75.980000] [mtk_nand_mcu_read_data] timeout
[ 76.020000] [mtk_nand_mcu_read_data] timeout
_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev
_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev
_______________________________________________
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev